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'
1414import type KomfMetadataService from ' ../services/komf-metadata.service'
1515import ConfirmationDialog from ' @/components/ConfirmationDialog.vue'
1616import {komfMetadataKey } from ' @/injection-keys'
@@ -20,13 +20,13 @@ import {useQuasar} from 'quasar';
2020const $q = useQuasar ();
2121const metadataService = inject <KomfMetadataService >(komfMetadataKey ) as KomfMetadataService
2222
23- const libraryId = computed (() => {
23+ function libraryId() {
2424 return window .location .pathname .split (' /' )[2 ]
25- })
25+ }
2626
2727async 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
5858async 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