@finema/finework-layer 2.0.18 → 2.0.19

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.19](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.18...2.0.19) (2026-07-31)
4
+
3
5
  ## [2.0.18](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.17...2.0.18) (2026-07-31)
4
6
 
5
7
  ## [2.0.17](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.16...2.0.17) (2026-07-31)
@@ -8,13 +8,13 @@
8
8
  }"
9
9
  >
10
10
  <Icon
11
- name="ph:star"
11
+ name="ph:bookmark-simple"
12
12
  class="size-6 cursor-pointer"
13
13
  title="Add bookmark"
14
14
  />
15
15
 
16
16
  <template #content>
17
- <Card class="w-[360px]">
17
+ <Card class="w-90">
18
18
  <div class="mb-3 flex items-center justify-between">
19
19
  <h3 class="text-base font-semibold">
20
20
  Add bookmark
@@ -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="Paste the link you want to bookmark"
53
+ placeholder="Paste a link"
54
54
  size="lg"
55
55
  @blur="onFetchPreview"
56
56
  @keyup.enter="onFetchPreview"
@@ -71,6 +71,7 @@
71
71
  placeholder="Folder"
72
72
  size="lg"
73
73
  class="flex-1"
74
+ clearable
74
75
  />
75
76
  <Button
76
77
  icon="ph:folder-plus"
@@ -124,7 +125,7 @@
124
125
  </Button>
125
126
  <Button
126
127
  :loading="bookmarks.add.status.isLoading || bookmarks.update.status.isLoading"
127
- :disabled="!url || !name"
128
+ :disabled="!url"
128
129
  @click="onSave"
129
130
  >
130
131
  Done
@@ -158,8 +159,6 @@ const folderOptions = computed(() => folders.fetch.items.map((folder) => ({
158
159
  value: folder.id,
159
160
  })))
160
161
 
161
- const defaultFolderId = computed(() => folders.fetch.items[0]?.id)
162
-
163
162
  onMounted(() => {
164
163
  bookmarks.fetchAll()
165
164
  folders.fetchAll()
@@ -173,7 +172,7 @@ watch(isOpen, (open) => {
173
172
  url.value = ''
174
173
  name.value = ''
175
174
  thumbnailUrl.value = null
176
- folderId.value = defaultFolderId.value
175
+ folderId.value = undefined
177
176
  })
178
177
 
179
178
  const onFetchPreview = () => {
@@ -181,7 +180,7 @@ const onFetchPreview = () => {
181
180
 
182
181
  if (existing.value) {
183
182
  name.value = existing.value.name
184
- folderId.value = existing.value.folder_id ?? defaultFolderId.value
183
+ folderId.value = existing.value.folder_id ?? undefined
185
184
  thumbnailUrl.value = existing.value.favicon_url || existing.value.image_url
186
185
 
187
186
  return
@@ -217,10 +216,12 @@ const onCreateFolder = async () => {
217
216
  }
218
217
 
219
218
  const onSave = async () => {
219
+ const bookmarkName = name.value || url.value
220
+
220
221
  if (existing.value) {
221
222
  await bookmarks.updateRun(existing.value.id, {
222
223
  data: {
223
- name: name.value,
224
+ name: bookmarkName,
224
225
  folder_id: folderId.value,
225
226
  },
226
227
  })
@@ -228,7 +229,7 @@ const onSave = async () => {
228
229
  await bookmarks.addRun({
229
230
  data: {
230
231
  url: url.value,
231
- name: name.value,
232
+ name: bookmarkName,
232
233
  folder_id: folderId.value,
233
234
  },
234
235
  })
@@ -41,7 +41,7 @@ export const routes = {
41
41
  bookmarks: {
42
42
  label: 'Bookmarks',
43
43
  to: '/account/bookmarks',
44
- icon: 'ph:star',
44
+ icon: 'ph:bookmarks',
45
45
  },
46
46
  },
47
47
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@finema/finework-layer",
3
3
  "type": "module",
4
- "version": "2.0.18",
4
+ "version": "2.0.19",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground -o",