Skip to content

Commit b6adba6

Browse files
committed
refactor(design): name fixed status and preview color shortcuts
1 parent dad84fd commit b6adba6

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎design/uno.config.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export function createDesignConfig(options: CreateDesignConfigOptions = {}) {
6666
colors: { devframe: resolvePrimary('#3a6a45') },
6767
},
6868
shortcuts: {
69+
/** Fixed semantic colors stay independent of the panel's primary accent. */
70+
'color-status-positive': 'color-devframe-600 dark:color-devframe-300',
71+
'color-preview-accent': 'color-devframe-600 dark:color-devframe-300',
72+
'bg-preview-accent': 'bg-devframe',
6973
/** Fixed navbar height, shared by every surface's top nav. */
7074
'h-nav': 'h-10',
7175
/** Named z-index layers, shared across every surface. */

‎plugins/git/app/components/ui/status-mark.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const STATUS_COLOR: Record<FileStatusCode, string> = {
2020
'added': 'text-success',
2121
'deleted': 'text-error',
2222
'modified': 'text-warning',
23-
'renamed': 'color-devframe-600 dark:color-devframe-300',
24-
'copied': 'color-devframe-600 dark:color-devframe-300',
23+
'renamed': 'color-status-positive',
24+
'copied': 'color-status-positive',
2525
'type-changed': 'text-warning',
2626
'unmerged': 'text-error',
2727
'unknown': 'color-muted',

‎plugins/og/app/app/app.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ onMounted(() => viewer.inspect())
4949
<div v-else class="grid min-h-full gap4 p4 xl:grid-cols-[minmax(0,1fr)_minmax(28rem,0.85fr)]">
5050
<div class="min-w-0 flex flex-col gap4">
5151
<div class="flex flex-wrap items-center gap-2 color-muted text-xs">
52-
<span class="i-ph-check-circle-duotone color-devframe-600 dark:color-devframe-300" />
52+
<span class="i-ph-check-circle-duotone color-status-positive" />
5353
<a :href="viewer.snapshot.value.url" target="_blank" rel="noreferrer" class="min-w-0 truncate font-mono hover:color-active" :title="viewer.snapshot.value.url">
5454
{{ viewer.snapshot.value.url }}
5555
</a>

‎plugins/og/app/app/components/previews/TelegramPreview.vue‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ const time = new Intl.DateTimeFormat(undefined, { hour: '2-digit', minute: '2-di
1111

1212
<template>
1313
<article class="w-full max-w-105 border border-base rounded-4 rounded-bl-sm bg-base p3 shadow-sm">
14-
<a :href="card.url" target="_blank" rel="noreferrer" class="block truncate color-devframe-600 dark:color-devframe-300 text-sm underline">{{ card.url }}</a>
14+
<a :href="card.url" target="_blank" rel="noreferrer" class="block truncate color-preview-accent text-sm underline">{{ card.url }}</a>
1515
<div class="mt2 grid grid-cols-[2px_1fr] gap-2">
16-
<div class="rounded bg-devframe op70" />
16+
<div class="rounded bg-preview-accent op70" />
1717
<div class="min-w-0">
1818
<PreviewImage :src="card.image" :alt="card.imageAlt" class="mb2 aspect-1.91/1 w-full rounded" />
19-
<div class="color-devframe-600 dark:color-devframe-300 text-sm font-semibold">
19+
<div class="color-preview-accent text-sm font-semibold">
2020
{{ card.hostname }}
2121
</div>
2222
<h3 class="my1 text-sm font-semibold">

0 commit comments

Comments
 (0)