Visual cosmetics for settings messages

pull/7048/head
Cagatay Civici 2025-01-04 14:11:42 +03:00
parent b34d32df14
commit 827fae8b50
4 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,7 @@
background: light-dark(var(--p-surface-0), var(--p-surface-900)); background: light-dark(var(--p-surface-0), var(--p-surface-900));
border-color: light-dark(var(--p-surface-200), var(--p-surface-700)); border-color: light-dark(var(--p-surface-200), var(--p-surface-700));
color: light-dark(#09090b, #ffffff); color: light-dark(#09090b, #ffffff);
box-shadow: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)'; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
} }
.p-fieldset { .p-fieldset {

View File

@ -4,11 +4,11 @@
@layer components { @layer components {
.btn-design { .btn-design {
@apply px-3 py-2 bg-zinc-950 disabled:hover:bg-zinc-950 hover:bg-zinc-800 text-white dark:bg-white dark:hover:bg-gray-100 dark:disabled:hover:bg-white dark:text-black rounded-md font-medium cursor-pointer disabled:cursor-auto transition-colors duration-200 focus:outline focus:outline-offset-2 focus:outline-zinc-950 focus:dark:outline-white disabled:opacity-60; @apply px-3 py-2 bg-zinc-950 disabled:hover:bg-zinc-950 hover:bg-zinc-800 text-white dark:bg-white dark:hover:bg-gray-100 dark:disabled:hover:bg-white dark:text-black rounded-md font-medium cursor-pointer disabled:cursor-auto transition-colors duration-200 focus:outline focus:outline-offset-2 focus:outline-zinc-950 dark:focus:outline-white disabled:opacity-60;
} }
.btn-design-outlined { .btn-design-outlined {
@apply px-3 py-2 bg-transparent border border-gray-200 dark:border-gray-700 hover:border-gray-800 dark:hover:border-gray-500 text-black dark:text-white rounded-md font-medium cursor-pointer transition-colors duration-200 focus:outline focus:outline-offset-2 focus:outline-zinc-950 focus:dark:outline-white disabled:opacity-60; @apply px-3 py-2 bg-transparent border border-gray-200 dark:border-gray-700 hover:border-gray-800 dark:hover:border-gray-500 text-black dark:text-white rounded-md font-medium cursor-pointer transition-colors duration-200 focus:outline focus:outline-offset-2 focus:outline-zinc-950 dark:focus:outline-white disabled:opacity-60;
} }
.icon-btn { .icon-btn {

View File

@ -5,7 +5,7 @@
<Tab value="1">Semantic</Tab> <Tab value="1">Semantic</Tab>
<Tab value="2" :disabled="!isComponentRoute">Component</Tab> <Tab value="2" :disabled="!isComponentRoute">Component</Tab>
<Tab value="3">Custom</Tab> <Tab value="3">Custom</Tab>
<Tab value="4" class="ml-auto">Settings</Tab> <Tab value="4" class="!ml-auto">Settings</Tab>
</TabList> </TabList>
<TabPanels> <TabPanels>
<TabPanel value="0"> <TabPanel value="0">

View File

@ -29,19 +29,19 @@
<button v-if="status === 'preview' && missingTokens.length > 0" type="button" @click="confirmMigration" class="btn-design">Migrate</button> <button v-if="status === 'preview' && missingTokens.length > 0" type="button" @click="confirmMigration" class="btn-design">Migrate</button>
</div> </div>
<div v-if="status === 'preview'"> <div v-if="status === 'preview'">
<div v-if="missingTokens.length" class="p-3 bg-yellow-100 text-yellow-950 dark:bg-amber-600 dark:text-black font-medium mt-4 rounded-md leading-normal"> <div v-if="missingTokens.length" class="p-3 bg-yellow-100 text-yellow-950 dark:bg-yellow-500/30 dark:text-yellow-100 font-medium mt-4 rounded-md leading-normal">
There are missing tokens, you may add them automatically using the migrate option with placeholder values. After migration, visit the corresponding section to define the actual values for your theme. There are missing tokens, you may add them automatically using the migrate option with placeholder values. After migration, visit the corresponding section to define the actual values for your theme.
</div> </div>
<div v-else class="p-3 bg-green-100 text-green-950 dark:bg-green-500 dark:text-black font-medium mt-4 rounded-md leading-normal">Your theme is up to date.</div> <div v-else class="p-3 bg-green-100 text-green-950 dark:bg-green-500/30 dark:text-white font-medium mt-4 rounded-md leading-normal">Your theme is up to date.</div>
</div> </div>
<div v-else-if="status === 'updated'"> <div v-else-if="status === 'updated'">
<div class="p-3 bg-green-100 text-green-950 dark:bg-green-500 dark:text-black font-medium mt-4 rounded-md leading-normal">Your theme is successfully updated.</div> <div class="p-3 bg-green-100 text-green-950 dark:bg-green-500/30 dark:text-white font-medium mt-4 rounded-md leading-normal">Your theme is successfully updated.</div>
</div> </div>
<div v-if="missingTokens.length" class="max-h-60 overflow-auto mt-4 px-3 py-2 rounded-md border border-surface-300 dark:border-surface-700 w-full"> <div v-if="missingTokens.length" class="max-h-60 overflow-auto mt-4 px-3 py-2 rounded-md border border-surface-300 dark:border-surface-700 w-full">
<ul class="flex flex-col gap-1"> <ul class="flex flex-col gap-1">
<li v-for="token of missingTokens" :key="token.value" class="flex justify-between"> <li v-for="token of missingTokens" :key="token.value" class="flex justify-between">
<span class="bg-red-50 text-red-950 text-sm font-medium px-2 py-1 rounded-lg">{{ token.value }}</span> <span class="bg-red-50 text-red-950 dark:bg-red-500/30 dark:text-red-100 text-sm font-medium px-2 py-1 rounded-lg">{{ token.value }}</span>
<span class="bg-zinc-950 text-white dark:bg-white dark:text-black rounded-full px-2 text-xs inline-flex items-center font-medium">{{ token.type }}</span> <span class="bg-zinc-950 text-white dark:bg-white dark:text-black rounded-full px-2 text-xs inline-flex items-center font-medium">{{ token.type }}</span>
</li> </li>
</ul> </ul>