Skip to content

Commit 56087e2

Browse files
committed
fix library id not changing on page changes
1 parent c05b0ce commit 56087e2

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/components/LibraryActionsMenu.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<template>
22
<q-menu class="text-body2 text-weight-medium">
3-
<q-item clickable v-close-popup @click="autoIdentify">
3+
<q-item clickable v-close-popup @click="autoIdentify">
44
<q-item-section class="text-body2 text-weight-medium" no-wrap>Auto-Identify Library</q-item-section>
55
</q-item>
6-
<q-item clickable v-close-popup @click="promptResetLibrary">
6+
<q-item clickable v-close-popup @click="promptResetLibrary">
77
<q-item-section class="text-body2 text-weight-medium" no-wrap>Reset Metadata</q-item-section>
88
</q-item>
99
</q-menu>
1010
</template>
1111

1212
<script setup lang="ts">
13-
import {computed, inject} from 'vue'
13+
import {inject} from 'vue'
1414
import type KomfMetadataService from '../services/komf-metadata.service'
1515
import ConfirmationDialog from '@/components/ConfirmationDialog.vue'
1616
import {komfMetadataKey} from '@/injection-keys'
@@ -20,13 +20,13 @@ import {useQuasar} from 'quasar';
2020
const $q = useQuasar();
2121
const metadataService = inject<KomfMetadataService>(komfMetadataKey) as KomfMetadataService
2222
23-
const libraryId = computed(() => {
23+
function libraryId() {
2424
return window.location.pathname.split('/')[2]
25-
})
25+
}
2626
2727
async function autoIdentify() {
2828
try {
29-
await metadataService.matchLibrary(libraryId.value)
29+
await metadataService.matchLibrary(libraryId())
3030
} catch (e) {
3131
errorNotification(e, $q)
3232
return
@@ -57,7 +57,7 @@ function promptResetLibrary() {
5757
5858
async function resetLibrary() {
5959
try {
60-
await metadataService?.resetLibrary(libraryId.value)
60+
await metadataService?.resetLibrary(libraryId())
6161
} catch (e) {
6262
errorNotification(e, $q)
6363
}

0 commit comments

Comments
 (0)