Skip to content

Commit dd5e281

Browse files
committed
style: use checkmark and copy icons to be consistent
1 parent 97c7c56 commit dd5e281

3 files changed

Lines changed: 29 additions & 11 deletions

File tree

app/components/Package/SkillsModal.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ function getWarningTooltip(skill: SkillListItem): string | undefined {
137137
:aria-label="$t('package.get_started.copy_command')"
138138
@click.stop="copyCommand"
139139
>
140-
<span aria-live="polite">{{ copied ? $t('common.copied') : $t('common.copy') }}</span>
140+
<span
141+
:class="copied ? 'i-carbon:checkmark' : 'i-carbon:copy'"
142+
class="size-4 inline-block"
143+
aria-hidden="true"
144+
/>
141145
</button>
142146
</div>
143147
</div>

app/components/Terminal/Execute.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,15 @@ const copyExecuteCommand = () => copyExecute(getFullExecuteCommand())
7070
>
7171
<button
7272
type="button"
73-
class="px-2 py-0.5 font-mono ms-auto text-xs text-fg-muted bg-bg-subtle/80 border border-border rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
73+
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
7474
:aria-label="$t('package.get_started.copy_command')"
7575
@click.stop="copyExecuteCommand"
7676
>
77-
{{ executeCopied ? $t('common.copied') : $t('common.copy') }}
77+
<span
78+
:class="executeCopied ? 'i-carbon:checkmark' : 'i-carbon:copy'"
79+
class="size-4 inline-block"
80+
aria-hidden="true"
81+
/>
7882
</button>
7983
</div>
8084
</div>

app/components/Terminal/Install.vue

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,15 @@ const copyCreateCommand = () => copyCreate(getFullCreateCommand())
123123
>
124124
<button
125125
type="button"
126-
class="px-2 py-0.5 font-mono ms-auto text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
126+
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
127127
:aria-label="$t('package.get_started.copy_command')"
128128
@click.stop="copyInstallCommand"
129129
>
130-
<span aria-live="polite">{{ copied ? $t('common.copied') : $t('common.copy') }}</span>
130+
<span
131+
:class="copied ? 'i-carbon:checkmark' : 'i-carbon:copy'"
132+
class="size-4 inline-block"
133+
aria-hidden="true"
134+
/>
131135
</button>
132136
</div>
133137

@@ -185,10 +189,14 @@ const copyCreateCommand = () => copyCreate(getFullCreateCommand())
185189
>
186190
<button
187191
type="button"
188-
class="px-2 py-0.5 font-mono ms-auto text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
192+
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
189193
@click.stop="copyRunCommand(executableInfo?.primaryCommand)"
190194
>
191-
{{ runCopied ? $t('common.copied') : $t('common.copy') }}
195+
<span
196+
:class="runCopied ? 'i-carbon:checkmark' : 'i-carbon:copy'"
197+
class="size-4 inline-block"
198+
aria-hidden="true"
199+
/>
192200
</button>
193201
</div>
194202
</template>
@@ -230,13 +238,15 @@ const copyCreateCommand = () => copyCreate(getFullCreateCommand())
230238
>
231239
<button
232240
type="button"
233-
class="px-2 py-0.5 font-mono ms-auto text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
241+
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
234242
:aria-label="$t('package.create.copy_command')"
235243
@click.stop="copyCreateCommand"
236244
>
237-
<span aria-live="polite">{{
238-
createCopied ? $t('common.copied') : $t('common.copy')
239-
}}</span>
245+
<span
246+
:class="createCopied ? 'i-carbon:checkmark' : 'i-carbon:copy'"
247+
class="size-4 inline-block"
248+
aria-hidden="true"
249+
/>
240250
</button>
241251
</div>
242252
</template>

0 commit comments

Comments
 (0)