Remove note.href property
authorAdam Dullage <redacted>
Wed, 12 Jun 2024 11:33:33 +0000 (12:33 +0100)
committerAdam Dullage <redacted>
Wed, 12 Jun 2024 11:33:33 +0000 (12:33 +0100)
client/classes.js
client/views/Home.vue
client/views/SearchResults.vue

index 20ae3936533cb4c72b85051eb4f1139d5529460f..007d42a5cffd23d0c484a8dd3842943491f8d5c3 100644 (file)
@@ -7,10 +7,6 @@ class Note {
     this.content = note?.content;
   }
 
-  get href() {
-    return `${router.resolve({ name: "note", params: { title: this.title } }).href}`;
-  }
-
   get lastModifiedAsDate() {
     return new Date(this.lastModified * 1000);
   }
index 89bbaeb034cf7a86f38a404ab4d4fd3966c60a9d..2a00b2c42a54b5b2e670615edd8f8c1a16d0219e 100644 (file)
         >
           RECENTLY MODIFIED
         </p>
-        <RouterLink v-for="note in notes" :to="note.href" class="mb-1">
+        <RouterLink
+          v-for="note in notes"
+          :to="{ name: 'note', params: { title: note.title } }"
+          class="mb-1"
+        >
           <CustomButton :label="note.title" />
         </RouterLink>
       </LoadingIndicator>
index cead56dbdb92b844a81d9d49c2911cde2f8030d9..905e7502e4d3b392246aaa0e1c828f23700a91c1 100644 (file)
@@ -20,7 +20,7 @@
         v-for="result in results"
         class="mb-4 cursor-pointer rounded px-2 py-1 hover:bg-theme-background-elevated"
       >
-        <RouterLink :to="result.href">
+        <RouterLink :to="{ name: 'note', params: { title: result.title } }">
           <!-- Title and Tags -->
           <div>
             <span v-html="result.titleHighlightsOrTitle" class="mr-2"></span>
git clone https://git.99rst.org/PROJECT