@@ -14,7 +14,7 @@ const props = defineProps<{
1414 latestVersion: SlimVersion | null
1515 provenanceData: ProvenanceDetails | null
1616 provenanceStatus: string
17- page: ' readme ' | ' docs' | ' code' | ' diff'
17+ page: ' main ' | ' docs' | ' code' | ' diff'
1818}>()
1919
2020const { requestedVersion, orgName } = usePackageRoute ()
@@ -107,7 +107,7 @@ const codeLink = computed((): RouteLocationRaw | null => {
107107 }
108108})
109109
110- const readmeLink = computed ((): RouteLocationRaw | null => {
110+ const mainLink = computed ((): RouteLocationRaw | null => {
111111 if (props .pkg == null || props .resolvedVersion == null ) {
112112 return null
113113 }
@@ -145,12 +145,12 @@ onKeyStroke(
145145)
146146
147147onKeyStroke (
148- e => keyboardShortcuts .value && isKeyWithoutModifiers (e , ' r ' ) && ! isEditableElement (e .target ),
148+ e => keyboardShortcuts .value && isKeyWithoutModifiers (e , ' m ' ) && ! isEditableElement (e .target ),
149149 e => {
150- if (readmeLink .value === null ) return
150+ if (mainLink .value === null ) return
151151 e .preventDefault ()
152152
153- navigateTo (readmeLink .value )
153+ navigateTo (mainLink .value )
154154 },
155155 { dedupe: true },
156156)
@@ -355,7 +355,7 @@ const likeAction = async () => {
355355 >
356356 <LinkBase
357357 variant =" button-secondary"
358- to =" #provenance"
358+ : to =" packageRoute(packageName, resolvedVersion, ' #provenance') "
359359 :aria-label =" $t('package.provenance_section.view_more_details')"
360360 classicon =" i-lucide:shield-check"
361361 class =" py-1.5 px-2.5 me-2"
@@ -393,13 +393,13 @@ const likeAction = async () => {
393393 :class =" $style.packageNav"
394394 >
395395 <LinkBase
396- v-if =" readmeLink "
397- :to =" readmeLink "
398- aria-keyshortcuts =" r "
396+ v-if =" mainLink "
397+ :to =" mainLink "
398+ aria-keyshortcuts =" m "
399399 class =" decoration-none border-b-2 p-1 hover:border-accent/50 lowercase"
400- :class =" page === 'readme ' ? 'border-accent text-accent!' : 'border-transparent'"
400+ :class =" page === 'main ' ? 'border-accent text-accent!' : 'border-transparent'"
401401 >
402- {{ $t('package.readme.title ') }}
402+ {{ $t('package.links.main ') }}
403403 </LinkBase >
404404 <LinkBase
405405 v-if =" docsLink"
0 commit comments