Skip to content

Commit b85e1b9

Browse files
committed
fix: improve icon and location
Add i18n support for viewing create package.
1 parent 3a4905e commit b85e1b9

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

app/components/Terminal/Install.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@ const copyCreateCommand = () => copyCreate(getFullCreateCommand())
200200
<span class="text-fg-subtle font-mono text-sm select-none"
201201
># {{ $t('package.create.title') }}</span
202202
>
203+
<NuxtLink
204+
:to="`/package/${createPackageInfo.packageName}`"
205+
class="text-fg-muted hover:text-fg text-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50 rounded"
206+
:title="$t('package.create.view', { packageName: createPackageInfo.packageName })"
207+
>
208+
<span class="i-carbon:information w-3 h-3 mt-1" aria-hidden="true" />
209+
<span class="sr-only">{{
210+
$t('package.create.view', { packageName: createPackageInfo.packageName })
211+
}}</span>
212+
</NuxtLink>
203213
</div>
204214

205215
<div
@@ -217,14 +227,6 @@ const copyCreateCommand = () => copyCreate(getFullCreateCommand())
217227
>{{ i > 0 ? ' ' : '' }}{{ part }}</span
218228
></code
219229
>
220-
<NuxtLink
221-
:to="`/package/${createPackageInfo.packageName}`"
222-
class="text-fg-muted hover:text-fg text-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50 rounded"
223-
:title="`View ${createPackageInfo.packageName}`"
224-
>
225-
<span class="i-carbon:arrow-right rtl-flip w-3 h-3 mt-1" aria-hidden="true" />
226-
<span class="sr-only">View {{ createPackageInfo.packageName }}</span>
227-
</NuxtLink>
228230
<button
229231
type="button"
230232
class="px-2 py-0.5 font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border rounded transition-colors duration-200 opacity-0 group-hover/createcmd:opacity-100 hover:(text-fg border-border-hover) active:scale-95 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"

i18n/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@
193193
},
194194
"create": {
195195
"title": "Create new project",
196-
"copy_command": "Copy create command"
196+
"copy_command": "Copy create command",
197+
"view": "{packageName} has the same maintainer. Click for more details."
197198
},
198199
"run": {
199200
"title": "Run",

lunaria/files/en-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@
193193
},
194194
"create": {
195195
"title": "Create new project",
196-
"copy_command": "Copy create command"
196+
"copy_command": "Copy create command",
197+
"view": "{packageName} has the same maintainer. Click for more details."
197198
},
198199
"run": {
199200
"title": "Run",

0 commit comments

Comments
 (0)