@christianriedl/media 1.0.176 → 1.0.178

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.176",
3
+ "version": "1.0.178",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -45,19 +45,15 @@
45
45
  function fieldChanged () {
46
46
  showSave.value = true;
47
47
  }
48
- function ratingChanged (value: string | number) { // modelValue not working
49
- book.rating = Number(value);
50
- showSave.value = true;
51
- }
52
48
  </script>
53
49
 
54
50
  <template>
55
51
  <v-row v-if="props.ismobile" dense align="center" :class="cls" @click="onSelect" >
56
52
  <v-col cols="9" >
57
- <v-text-field v-model="book.title" hide-details density="compact" ></v-text-field>
53
+ <v-text-field v-model="book.title" disabled hide-details density="compact" ></v-text-field>
58
54
  </v-col>
59
55
  <v-col cols="3" >
60
- <v-text-field v-model="book.year" hide-details density="compact" ></v-text-field>
56
+ <v-text-field v-model="book.year" disabled hide-details density="compact" ></v-text-field>
61
57
  </v-col>
62
58
  </v-row>
63
59
  <v-row v-else dense align="center" :class="cls" @click="onSelect" >
@@ -71,7 +67,7 @@
71
67
  <v-text-field v-model="book.year" hide-details density="compact" type="number" @update:modelValue="fieldChanged"></v-text-field>
72
68
  </v-col>
73
69
  <v-col cols="2" >
74
- <v-rating hover clearable :length="5" :size="32" :model-value="book.rating" active-color="primary" @update:modelValue="ratingChanged" />
70
+ <v-rating hover clearable :length="5" :size="32" v-model="book.rating" active-color="primary" @update:modelValue="fieldChanged" />
75
71
  </v-col>
76
72
  <v-col cols="2">
77
73
  <v-btn v-if="showDelete" icon="$delete" :disabled="props.readonly" @click="onDelete"></v-btn>
@@ -119,6 +119,7 @@
119
119
  allBooks.value = await getAuthorBooksFromAI (author.surName, author.givenName, author.id);
120
120
  lastAllBooksId.value = author.id;
121
121
  }
122
+ currentBook.value = { id: 0, authorId: 0, title: ""};
122
123
  newBook = reactive<IBook>({ id: 0, authorId: author.id, title: "", rating: 0 });
123
124
  showAddBookLine.value = true;
124
125
  }
@@ -296,7 +297,7 @@
296
297
  },
297
298
  "strict": true
298
299
  }
299
- const prompt = `Alle Werke mit Erscheinungsjahr von ${givenName} ${surName}`;
300
+ const prompt = `Alle Buchtitel in Deutsch mit Erscheinungsjahr von ${givenName} ${surName}`;
300
301
  const result = await openAI.completeJson(prompt, schema) as any;
301
302
  if (result && result.werke) {
302
303
  const books: IBook[] = [];
@@ -362,7 +363,7 @@
362
363
  <v-text-field v-model="author.country" hide-details density="compact" @update:modelValue="fieldChanged"></v-text-field>
363
364
  </v-col>
364
365
  <v-col cols="2">
365
- <v-btn v-if="mustAddAuthor" @click="addAuthor" :disabled="readonly" append-icon="$plus">AUTHOR</v-btn>
366
+ <v-btn v-if="mustAddAuthor" @click="addAuthor" :disabled="readonly" prepend-icon="$plus">AUTHOR</v-btn>
366
367
  <v-btn v-if="mustUpdateAuthor" @click="updateAuthor" :disabled="readonly" icon="$save"></v-btn>
367
368
  <v-btn v-if="author.id > 0" @click="deleteAuthor" :disabled="readonly" icon="$delete"></v-btn>
368
369
  </v-col>
@@ -377,15 +378,15 @@
377
378
  <v-col cols="2">JAHR</v-col>
378
379
  <v-col cols="2">RATING</v-col>
379
380
  <v-col v-if="author.id" cols="2">
380
- <v-btn v-if="!showAddBookLine" @click="addNewBook" :disabled="readonly" append-icon="$plus">BOOK</v-btn>
381
+ <v-btn v-if="!showAddBookLine" @click="addNewBook" :disabled="readonly" prepend-icon="$plus">BOOK</v-btn>
381
382
  <v-btn v-if="showAddBookLine" @click="cancelAddNewBook" :disabled="readonly" icon="$cancel"></v-btn>
382
383
  </v-col>
383
384
  </v-row>
384
385
  <book-line v-if="showAddBookLine" :book="newBook" :add="true" :allbooks="allBooks" :readonly="readonly" :ismobile="isMobile" @selectbook="selectBook" @deletebook="deleteBook" @savebook="saveBook"></book-line>
385
386
  <book-line v-for="book in author.books" :key="book.id" :book="book" :readonly="readonly" :ismobile="isMobile" @selectbook="selectBook" @deletebook="deleteBook" @savebook="saveBook"></book-line>
386
- <v-textarea v-if="showCurrentBook" class="pt-2"clearable auto-grow variant="outlined" label="Beschreibung" v-model="currentBook.description" @update:modelValue="descriptionChanged">
387
+ <v-textarea v-if="showCurrentBook" clearable auto-grow variant="outlined" label="Beschreibung" :disabled="isMobile" class="pt-2" v-model="currentBook.description" @update:modelValue="descriptionChanged">
387
388
  </v-textarea>
388
- <v-textarea v-if="showCurrentBook" clearable auto-grow variant="outlined" label="Kommentar" v-model="currentBook.comment" @update:modelValue="descriptionChanged">
389
+ <v-textarea v-if="showCurrentBook" clearable auto-grow variant="outlined" label="Kommentar" :disabled="isMobile" v-model="currentBook.comment" @update:modelValue="descriptionChanged">
389
390
  </v-textarea>
390
391
  </v-defaults-provider>
391
392
  </v-container>
@@ -160,7 +160,7 @@
160
160
  }
161
161
  function showMap(ev: Event) {
162
162
  const current = items[index.value];
163
- window.history.replaceState(null, "", `${appConfig.urlPrefix}photoalbum?id=${folderId}&start=${current.dlnaid}`);
163
+ router.options.history.replace(`/photoalbum?id=${folderId}&start=${current.dlnaid}`);
164
164
  router.push({
165
165
  path: 'map', query: {
166
166
  lat: `${gpsLat[0]} ${gpsLat[1]}`,