From a294f7d3a24546fb9d2c40ca3992ecdfc93039d8 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 19 Oct 2022 11:51:02 +0200 Subject: Add prefetching using `nuxt-link` (#1) --- pages/models/_id/index.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pages/models/_id/index.vue') diff --git a/pages/models/_id/index.vue b/pages/models/_id/index.vue index 6ab1086..9aab923 100644 --- a/pages/models/_id/index.vue +++ b/pages/models/_id/index.vue @@ -7,7 +7,7 @@ .relative.transform.overflow-hidden.rounded-lg.bg-white.text-left.shadow-xl.transition-all(class="sm:my-8 sm:w-full sm:max-w-lg") .bg-white.px-4.pt-5.pb-4(class="sm:p-6 sm:pb-4") div - h2 You must log in first. + h2 You must log in first. .bg-gray-50.px-4.py-3(class="sm:flex sm:flex-row-reverse sm:px-6") button.mt-3.inline-flex.w-full.justify-center.rounded-md.border.border-gray-300.bg-white.px-4.py-2.text-base.font-medium.text-gray-700.shadow-sm( type="button" @@ -92,7 +92,7 @@ .mr-3.float-left user-avatar(:data="model.author") p.leading-8 - a.text-green-800(class="hover:text-green-700 dark:text-green-300 dark:hover:text-green-200" :href="'/user/'+model.author_id") + nuxt-link.text-green-800(class="hover:text-green-700 dark:text-green-300 dark:hover:text-green-200" :to="'/user/'+model.author_id") | @ span.underline {{ model.author.username }} .description.mt-3(class="dark:text-white") @@ -122,9 +122,9 @@ | Report - a.inline-flex.leading-6.justify-center.rounded-md.border.border-transparent.bg-gray-600.py-2.px-4.mr-2.text-sm.font-medium.text-white.shadow-sm( + nuxt-link.inline-flex.leading-6.justify-center.rounded-md.border.border-transparent.bg-gray-600.py-2.px-4.mr-2.text-sm.font-medium.text-white.shadow-sm( class="hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2" - :href="'/models/'+model.id+'/edit'" v-if="me && (me.is_staff || me.id == model.author_id)" + :to="'/models/'+model.id+'/edit'" v-if="me && (me.is_staff || me.id == model.author_id)" ) @@ -208,7 +208,7 @@ path(fill-rule="evenodd", d="M15.621 4.379a3 3 0 00-4.242 0l-7 7a3 3 0 004.241 4.243h.001l.497-.5a.75.75 0 011.064 1.057l-.498.501-.002.002a4.5 4.5 0 01-6.364-6.364l7-7a4.5 4.5 0 016.368 6.36l-3.455 3.553A2.625 2.625 0 119.52 9.52l3.45-3.451a.75.75 0 111.061 1.06l-3.45 3.451a1.125 1.125 0 001.587 1.595l3.454-3.553a3 3 0 000-4.242z", clip-rule="evenodd") span.ml-2.w-0.flex-1.truncate {{ getFileName(upload.filepath) }} .ml-4.flex-shrink-0 - a.font-medium.text-black-700(:href="baseAPI + '' + upload.filepath" target="_new" download class="hover:underline") Download + nuxt-link.font-medium.text-black-700(:to="baseAPI + '' + upload.filepath" target="_new" download class="hover:underline") Download -- cgit v1.2.3-18-g5258