Skip to content

Commit c45e5ef

Browse files
bteaghostdevv
andauthored
fix(ui): preview mode show the pr number (#2018)
Co-authored-by: Willow (GHOST) <git@willow.sh>
1 parent 171d446 commit c45e5ef

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

app/components/AppHeader.vue

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -243,16 +243,18 @@ onKeyStroke(
243243
{{ env === 'release' ? 'alpha' : env }}
244244
</span>
245245
</NuxtLink>
246-
<NuxtLink
247-
v-if="prNumber"
248-
:to="`https://github.com/npmx-dev/npmx.dev/pull/${prNumber}`"
249-
:aria-label="`Open GitHub pull request ${prNumber}`"
250-
>
251-
<span class="text-xs px-1.5 py-0.5 rounded badge-green font-sans font-medium ms-2">
252-
PR #{{ prNumber }}
253-
</span>
254-
</NuxtLink>
255246
</div>
247+
248+
<NuxtLink
249+
v-if="showLogo && !isSearchExpanded && prNumber"
250+
:to="`https://github.com/npmx-dev/npmx.dev/pull/${prNumber}`"
251+
:aria-label="$t('header.pr', { prNumber })"
252+
>
253+
<span class="text-xs px-1.5 py-0.5 rounded badge-green font-sans font-medium">
254+
PR #{{ prNumber }}
255+
</span>
256+
</NuxtLink>
257+
256258
<!-- Spacer when logo is hidden on desktop -->
257259
<span v-else class="hidden sm:block w-1" />
258260

i18n/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,8 @@
10581058
"error": "Failed to load organizations",
10591059
"empty": "No organizations found",
10601060
"view_all": "View all"
1061-
}
1061+
},
1062+
"pr": "Open GitHub pull request #{prNumber}"
10621063
},
10631064
"compare": {
10641065
"packages": {

i18n/locales/zh-CN.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,8 @@
10481048
"error": "加载组织失败",
10491049
"empty": "未找到组织",
10501050
"view_all": "查看全部"
1051-
}
1051+
},
1052+
"pr": "在 GitHub 上打开 PR #{prNumber}"
10521053
},
10531054
"compare": {
10541055
"packages": {

i18n/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3180,6 +3180,9 @@
31803180
}
31813181
},
31823182
"additionalProperties": false
3183+
},
3184+
"pr": {
3185+
"type": "string"
31833186
}
31843187
},
31853188
"additionalProperties": false

0 commit comments

Comments
 (0)