Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions app/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ withDefaults(

const { isConnected, npmUser } = useConnector()

const { packageName } = usePackageRoute()

const compareTarget = computed(() =>
packageName.value
? { name: 'compare' as const, query: { packages: packageName.value } }
: { name: 'compare' as const },
)

const desktopLinks = computed<NavigationConfig>(() => [
{
name: 'Compare',
label: $t('nav.compare'),
to: { name: 'compare' },
to: compareTarget.value,
keyshortcut: 'c',
type: 'link',
external: false,
Expand Down Expand Up @@ -209,7 +217,7 @@ function handleSearchFocus() {
}

useShortcuts({
'c': () => ({ name: 'compare' }),
'c': () => compareTarget.value,
',': () => ({ name: 'settings' }),
})
</script>
Expand Down
9 changes: 0 additions & 9 deletions app/components/Package/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ useShortcuts({
'.': () => codeLink.value,
'm': () => mainLink.value,
'd': () => docsLink.value,
'c': () => props.pkg && { name: 'compare' as const, query: { packages: props.pkg.name } },
'f': () => diffLink.value,
'-': () => changelogLink.value,
't': () => timelineLink.value,
Expand Down Expand Up @@ -255,14 +254,6 @@ useShortcuts({
</h1>
<!-- Package metrics -->
<div class="flex gap-2 flex-wrap items-stretch">
<LinkBase
variant="button-secondary"
:to="{ name: 'compare', query: { packages: packageName } }"
aria-keyshortcuts="c"
classicon="i-lucide:git-compare"
>
<span class="max-sm:sr-only">{{ $t('package.links.compare_this_package') }}</span>
</LinkBase>
<PackageLikes :packageName />

<LinkBase
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/ar-EG.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@
"skills_cli": "مهارات CLI"
},
"links": {
"main": "الرئيسي",
"compare_this_package": "مقارنة هذه الحزمة"
"main": "الرئيسي"
},
"docs": {
"contents": "المحتويات",
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/bn-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@
"compare": "তুলনা করুন",
"timeline": "সময়রেখা",
"stats": "পরিসংখ্যান",
"compare_this_package": "এই প্যাকেজ তুলনা",
"changelog": "চেঞ্জলগ"
},
"likes": {
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/cs-CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@
"compare": "porovnat",
"timeline": "časová osa",
"stats": "statistiky",
"compare_this_package": "porovnat tento balíček",
"changelog": "seznam změn"
},
"likes": {
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@
"fund": "Spenden",
"compare": "Vergleichen",
"timeline": "Zeitleiste",
"compare_this_package": "Dieses Paket vergleichen",
"changelog": "Änderungsprotokoll"
},
"likes": {
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@
"compare": "compare",
"timeline": "timeline",
"stats": "stats",
"compare_this_package": "compare this package",
"changelog": "changelog"
},
"likes": {
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@
"compare": "comparar",
"timeline": "línea temporal",
"stats": "estadísticas",
"compare_this_package": "comparar este paquete",
"changelog": "registro de cambios"
},
"likes": {
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@
"fund": "donner",
"compare": "comparer",
"timeline": "historique",
"compare_this_package": "comparer ce paquet",
"changelog": "changements"
},
"likes": {
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/hi-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,7 @@
"code": "कोड",
"docs": "दस्तावेज़",
"fund": "दान करें",
"compare": "तुलना करें",
"compare_this_package": "इस पैकेज की तुलना करें"
"compare": "तुलना करें"
},
"likes": {
"like": "इस पैकेज को लाइक करें",
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/id-ID.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@
"code": "kode",
"docs": "dokumentasi",
"fund": "donasi",
"compare": "bandingkan",
"compare_this_package": "Bandingkan paket ini"
"compare": "bandingkan"
},
"likes": {
"like": "Sukai paket ini",
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@
"compare": "confronta",
"timeline": "Cronologia",
"stats": "Statistiche",
"compare_this_package": "Confronta questo pacchetto",
"changelog": "Registro delle modifiche"
},
"likes": {
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@
"compare": "比較",
"timeline": "タイムライン",
"stats": "統計",
"compare_this_package": "このパッケージを比較",
"changelog": "changelog"
},
"likes": {
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/mr-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@
"code": "कोड",
"docs": "दस्तऐवज",
"fund": "निधी",
"compare": "तुलना करा",
"compare_this_package": "या पॅकेजची तुलना करा"
"compare": "तुलना करा"
},
"likes": {
"like": "हे पॅकेज पसंत करा",
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/nb-NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@
"compare": "sammenlign",
"timeline": "tidslinje",
"stats": "statistikk",
"compare_this_package": "sammenlign denne pakken",
"changelog": "endringslogg"
},
"likes": {
Expand Down
2 changes: 1 addition & 1 deletion i18n/locales/ne-NP.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
"slate": "स्लेट",
"black": "कालो"
},
"foreground_themes": {},
"keyboard_shortcuts_enabled": "किबोर्ड सर्टकटहरू सक्षम गर्नुहोस्",
"keyboard_shortcuts_enabled_description": "अन्य ब्राउजर वा सिस्टम सर्टकटहरूसँग बाझिएमा किबोर्ड सर्टकटहरू निष्क्रिय गर्न सकिन्छ",
"enable_code_ligatures": "कोडमा लिगेचरहरू सक्षम गर्नुहोस्",
Expand Down Expand Up @@ -489,7 +490,6 @@
"compare": "तुलना",
"timeline": "टाइमलाइन",
"stats": "तथ्याङ्क",
"compare_this_package": "यो प्याकेज तुलना गर्नुहोस्",
"changelog": "चेन्जलग"
},
"likes": {
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@
"compare": "vergelijk",
"timeline": "tijdlijn",
"stats": "stats",
"compare_this_package": "Vergelijk dit pakket",
"changelog": "Wijzigingen"
},
"likes": {
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@
"docs": "documentação",
"fund": "financiar",
"compare": "comparar",
"timeline": "linha do tempo",
"compare_this_package": "comparar este pacote"
"timeline": "linha do tempo"
},
"likes": {
"like": "Gosto deste pacote",
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@
"docs": "docs",
"fund": "financiar",
"compare": "comparar",
"timeline": "linha do tempo",
"compare_this_package": "comparar este pacote"
"timeline": "linha do tempo"
},
"likes": {
"like": "Gostar deste pacote",
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/ro-RO.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@
"docs": "documente",
"fund": "finanțează",
"compare": "compară",
"timeline": "cronologie",
"compare_this_package": "compară acest pachet"
"timeline": "cronologie"
},
"likes": {
"like": "Dă 'Like' la acest pachet",
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@
"compare": "сравнить",
"timeline": "хронология",
"stats": "статистика",
"compare_this_package": "сравнить этот пакет",
"changelog": "изменения"
},
"likes": {
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/sr-Latn-RS.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@
"code": "kod",
"docs": "dokumentacija",
"fund": "podržite",
"compare": "uporedite",
"compare_this_package": "uporedite ovaj paket"
"compare": "uporedite"
},
"likes": {
"like": "Sviđa mi se ovaj paket",
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/tr-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@
"fund": "fonlama",
"compare": "karşılaştır",
"timeline": "zaman çizelgesi",
"compare_this_package": "bu paketi karşılaştır",
"changelog": "değişiklik günlüğü"
},
"likes": {
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/uk-UA.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@
"docs": "документація",
"fund": "спонсорство",
"compare": "порівняти",
"timeline": "хронологія",
"compare_this_package": "порівняти цей пакет"
"timeline": "хронологія"
},
"likes": {
"like": "Подобається цей пакет",
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/vi-VN.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@
"code": "code",
"docs": "docs",
"fund": "fund",
"compare": "so sánh",
"compare_this_package": "so sánh gói này"
"compare": "so sánh"
},
"likes": {
"like": "Thích gói này",
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@
"docs": "文档",
"fund": "资助",
"compare": "比较",
"timeline": "时间线",
"compare_this_package": "比较此包"
"timeline": "时间线"
},
"likes": {
"like": "点赞此包",
Expand Down
3 changes: 1 addition & 2 deletions i18n/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,7 @@
"code": "程式碼",
"docs": "文件",
"fund": "贊助",
"compare": "比較",
"compare_this_package": "比較這個套件"
"compare": "比較"
},
"likes": {
"like": "喜歡這個套件",
Expand Down
3 changes: 0 additions & 3 deletions i18n/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1498,9 +1498,6 @@
"stats": {
"type": "string"
},
"compare_this_package": {
"type": "string"
},
"changelog": {
"type": "string"
}
Expand Down
Loading