diff --git a/client/components/modals/BookmarksModal.vue b/client/components/modals/BookmarksModal.vue index 08d800f0..ad0d7343 100644 --- a/client/components/modals/BookmarksModal.vue +++ b/client/components/modals/BookmarksModal.vue @@ -5,24 +5,26 @@

{{ $strings.LabelYourBookmarks }}

-
-
+
+
-
-

{{ $strings.MessageNoBookmarks }}

-
-
-
-
+
+
+

{{ $strings.MessageNoBookmarks }}

+
+ +
+ +

{{ this.$secondsToTimestamp(currentTime) }}

- +
add
@@ -44,8 +46,7 @@ export default { type: Number, default: 0 }, - libraryItemId: String, - hideCreate: Boolean + libraryItemId: String }, data() { return { @@ -57,6 +58,7 @@ export default { watch: { show(newVal) { if (newVal) { + this.selectedBookmark = null this.showBookmarkTitleInput = false this.newBookmarkTitle = '' } @@ -72,7 +74,7 @@ export default { } }, canCreateBookmark() { - return !this.bookmarks.find((bm) => bm.time === this.currentTime) + return !this.bookmarks.find((bm) => Math.abs(this.currentTime - bm.time) < 1) }, dateFormat() { return this.$store.state.serverSettings.dateFormat @@ -102,19 +104,6 @@ export default { clickBookmark(bm) { this.$emit('select', bm) }, - submitUpdateBookmark(updatedBookmark) { - var bookmark = { ...updatedBookmark } - this.$axios - .$patch(`/api/me/item/${this.libraryItemId}/bookmark`, bookmark) - .then(() => { - this.$toast.success(this.$strings.ToastBookmarkUpdateSuccess) - }) - .catch((error) => { - this.$toast.error(this.$strings.ToastFailedToUpdate) - console.error(error) - }) - this.show = false - }, submitCreateBookmark() { if (!this.newBookmarkTitle) { this.newBookmarkTitle = this.$formatDatetime(Date.now(), this.dateFormat, this.timeFormat) diff --git a/client/components/modals/bookmarks/BookmarkItem.vue b/client/components/modals/bookmarks/BookmarkItem.vue index 1be3894a..c4035bc8 100644 --- a/client/components/modals/bookmarks/BookmarkItem.vue +++ b/client/components/modals/bookmarks/BookmarkItem.vue @@ -1,5 +1,5 @@