@finema/finework-layer 2.0.16 → 2.0.17
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.17](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.16...2.0.17) (2026-07-31)
|
|
4
|
+
|
|
3
5
|
## [2.0.16](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.15...2.0.16) (2026-07-31)
|
|
4
6
|
|
|
5
7
|
## [2.0.15](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.14...2.0.15) (2026-07-27)
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
>
|
|
10
10
|
<Icon
|
|
11
11
|
name="ph:star"
|
|
12
|
-
class="size-6 cursor-pointer
|
|
12
|
+
class="size-6 cursor-pointer"
|
|
13
13
|
title="Add bookmark"
|
|
14
14
|
/>
|
|
15
15
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<div class="flex flex-1 flex-col gap-2">
|
|
51
51
|
<Input
|
|
52
52
|
v-model="url"
|
|
53
|
-
placeholder="
|
|
53
|
+
placeholder="Paste the link you want to bookmark"
|
|
54
54
|
size="lg"
|
|
55
55
|
@blur="onFetchPreview"
|
|
56
56
|
@keyup.enter="onFetchPreview"
|
|
@@ -149,7 +149,7 @@ const newFolderName = ref('')
|
|
|
149
149
|
const bookmarks = useBookmarksLoader()
|
|
150
150
|
const folders = useBookmarkFoldersLoader()
|
|
151
151
|
const preview = useBookmarkPreviewLoader()
|
|
152
|
-
|
|
152
|
+
const noti = useNotification()
|
|
153
153
|
const existing = computed(() => bookmarks.fetch.items.find((item) => item.url === url.value) || null)
|
|
154
154
|
const isBookmarked = computed(() => !!existing.value)
|
|
155
155
|
|
|
@@ -242,4 +242,26 @@ const onRemove = async () => {
|
|
|
242
242
|
await bookmarks.deleteRun(existing.value.id)
|
|
243
243
|
isOpen.value = false
|
|
244
244
|
}
|
|
245
|
+
|
|
246
|
+
useWatchTrue(() => bookmarks.add.status.isSuccess, () => {
|
|
247
|
+
bookmarks.fetchAll()
|
|
248
|
+
})
|
|
249
|
+
|
|
250
|
+
useWatchTrue(() => bookmarks.add.status.isError, () => {
|
|
251
|
+
noti.error({
|
|
252
|
+
title: 'Failed to add bookmark',
|
|
253
|
+
description: StringHelper.getError(bookmarks.add.status.errorData, 'Something went wrong. Please try again later.'),
|
|
254
|
+
})
|
|
255
|
+
})
|
|
256
|
+
|
|
257
|
+
useWatchTrue(() => bookmarks.update.status.isSuccess, () => {
|
|
258
|
+
bookmarks.fetchAll()
|
|
259
|
+
})
|
|
260
|
+
|
|
261
|
+
useWatchTrue(() => bookmarks.update.status.isError, () => {
|
|
262
|
+
noti.error({
|
|
263
|
+
title: 'Failed to update bookmark',
|
|
264
|
+
description: StringHelper.getError(bookmarks.update.status.errorData, 'Something went wrong. Please try again later.'),
|
|
265
|
+
})
|
|
266
|
+
})
|
|
245
267
|
</script>
|
|
@@ -24,25 +24,25 @@ export interface IBookmarkPreview {
|
|
|
24
24
|
bookmark: IBookmark | null
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export const useBookmarkFoldersLoader = () => {
|
|
27
|
+
export const useBookmarkFoldersLoader = defineStore('bookmarks.folders', () => {
|
|
28
28
|
const options = useRequestOptions()
|
|
29
29
|
|
|
30
30
|
return usePageLoader<IBookmarkFolder>({
|
|
31
31
|
baseURL: '/bookmark-folders',
|
|
32
32
|
getBaseRequestOptions: options.auth,
|
|
33
33
|
})
|
|
34
|
-
}
|
|
34
|
+
})
|
|
35
35
|
|
|
36
|
-
export const useBookmarksLoader = () => {
|
|
36
|
+
export const useBookmarksLoader = defineStore('bookmarks.bookmarks', () => {
|
|
37
37
|
const options = useRequestOptions()
|
|
38
38
|
|
|
39
39
|
return usePageLoader<IBookmark>({
|
|
40
40
|
baseURL: '/bookmarks',
|
|
41
41
|
getBaseRequestOptions: options.auth,
|
|
42
42
|
})
|
|
43
|
-
}
|
|
43
|
+
})
|
|
44
44
|
|
|
45
|
-
export const useBookmarkPreviewLoader = () => {
|
|
45
|
+
export const useBookmarkPreviewLoader = defineStore('bookmarks.preview', () => {
|
|
46
46
|
const options = useRequestOptions()
|
|
47
47
|
|
|
48
48
|
return useObjectLoader<IBookmarkPreview>({
|
|
@@ -50,4 +50,4 @@ export const useBookmarkPreviewLoader = () => {
|
|
|
50
50
|
url: '/bookmarks/preview',
|
|
51
51
|
getRequestOptions: options.auth,
|
|
52
52
|
})
|
|
53
|
-
}
|
|
53
|
+
})
|