|
38 | 38 | :disabled="!currentAccount" |
39 | 39 | :color="syncing || scheduled? 'primary' : ''" |
40 | 40 | v-bind="attrs" |
| 41 | + :class="{'sync-dropdown-hint': !Boolean(syncing)}" |
41 | 42 | v-on="on" |
42 | | - @click="onTriggerSync" :class="{'sync-dropdown-hint': !Boolean(syncing)}"> |
| 43 | + @click="onTriggerSync"> |
43 | 44 | <v-icon |
44 | 45 | :class="{'sync--active': Boolean(syncing)}"> |
45 | 46 | {{ scheduled ? 'mdi-timer-sync-outline' : 'mdi-sync' }} |
|
157 | 158 | class="loading" /> |
158 | 159 | <v-list |
159 | 160 | v-else-if="currentFolder && items && items.length" |
160 | | - style="min-height: 95vh" |
161 | 161 | two-line |
162 | | - class="pb-10"> |
| 162 | + :class="{'pb-10': true, 'list-full-height': !(searchQuery && otherSearchItems && otherSearchItems.length)}"> |
163 | 163 | <template v-for="item in items"> |
164 | 164 | <v-list-item |
165 | 165 | :key="item.type+item.id" |
|
246 | 246 | {{ t('LabelNobookmarks') }} |
247 | 247 | </h3> |
248 | 248 | </v-card> |
| 249 | + <v-card class="pt-5"> |
| 250 | + <v-list-item |
| 251 | + v-if="searchQuery && otherSearchItems && otherSearchItems.length"> |
| 252 | + <v-list-item-avatar><v-icon>mdi-select-search</v-icon></v-list-item-avatar> {{ t('LabelSearchresultsotherfolders') }} |
| 253 | + </v-list-item> |
| 254 | + </v-card> |
| 255 | + <v-list |
| 256 | + v-if="searchQuery && otherSearchItems && otherSearchItems.length" |
| 257 | + two-line |
| 258 | + class="list-full-height"> |
| 259 | + <template v-for="item in otherSearchItems"> |
| 260 | + <v-list-item |
| 261 | + :key="item.type+item.id" |
| 262 | + class="pl-3" |
| 263 | + dense |
| 264 | + @click="clickItem(item)"> |
| 265 | + <v-list-item-avatar> |
| 266 | + <v-icon |
| 267 | + v-if="item.type === 'folder'" |
| 268 | + color="blue darken-1" |
| 269 | + large> |
| 270 | + mdi-folder |
| 271 | + </v-icon> |
| 272 | + <FaviconImage |
| 273 | + v-else |
| 274 | + :url="item.url" |
| 275 | + :use-network="useNetwork" /> |
| 276 | + </v-list-item-avatar> |
| 277 | + |
| 278 | + <v-list-item-content> |
| 279 | + <v-list-item-title>{{ item.title }}</v-list-item-title> |
| 280 | + <v-list-item-subtitle v-if="item.type === 'bookmark'"> |
| 281 | + {{ item.url | hostname }} |
| 282 | + </v-list-item-subtitle> |
| 283 | + </v-list-item-content> |
| 284 | + |
| 285 | + <v-list-item-action> |
| 286 | + <v-menu |
| 287 | + bottom |
| 288 | + left> |
| 289 | + <template #activator="{ on, attrs }"> |
| 290 | + <v-btn |
| 291 | + icon |
| 292 | + v-bind="attrs" |
| 293 | + v-on="on"> |
| 294 | + <v-icon>mdi-dots-vertical</v-icon> |
| 295 | + </v-btn> |
| 296 | + </template> |
| 297 | + |
| 298 | + <v-list> |
| 299 | + <v-list-item @click="editItem(item)"> |
| 300 | + <v-list-item-avatar> |
| 301 | + <v-icon>mdi-pencil</v-icon> |
| 302 | + </v-list-item-avatar> |
| 303 | + <v-list-item-title> |
| 304 | + {{ t('LabelEdititem') }} |
| 305 | + </v-list-item-title> |
| 306 | + </v-list-item> |
| 307 | + <v-list-item |
| 308 | + v-if="item.type === 'bookmark'" |
| 309 | + @click="shareBookmark(item)"> |
| 310 | + <v-list-item-avatar> |
| 311 | + <v-icon>mdi-share</v-icon> |
| 312 | + </v-list-item-avatar> |
| 313 | + <v-list-item-title> |
| 314 | + {{ t('LabelShareitem') }} |
| 315 | + </v-list-item-title> |
| 316 | + </v-list-item> |
| 317 | + <v-list-item @click="deleteItem(item)"> |
| 318 | + <v-list-item-avatar> |
| 319 | + <v-icon>mdi-delete</v-icon> |
| 320 | + </v-list-item-avatar> |
| 321 | + <v-list-item-title> |
| 322 | + {{ t('LabelDeleteitem') }} |
| 323 | + </v-list-item-title> |
| 324 | + </v-list-item> |
| 325 | + </v-list> |
| 326 | + </v-menu> |
| 327 | + </v-list-item-action> |
| 328 | + </v-list-item> |
| 329 | + <v-divider |
| 330 | + :key="String(item.id)+item.type+'divider'" /> |
| 331 | + </template> |
| 332 | + </v-list> |
249 | 333 | <v-speed-dial |
250 | 334 | v-model="fab" |
251 | 335 | fixed |
@@ -430,6 +514,12 @@ export default { |
430 | 514 | return items |
431 | 515 | } |
432 | 516 | }, |
| 517 | + otherSearchItems() { |
| 518 | + if (!this.currentFolder && (!this.searchQuery || this.searchQuery.length < 2)) { |
| 519 | + return [] |
| 520 | + } |
| 521 | + return this.search(this.searchQuery.toLowerCase().trim(), this.tree).filter(item => !this.items.includes(item)) |
| 522 | + }, |
433 | 523 | routes() { |
434 | 524 | return routes |
435 | 525 | }, |
@@ -646,4 +736,8 @@ export default { |
646 | 736 | top: 30px; |
647 | 737 | left: 30px; |
648 | 738 | } |
| 739 | +
|
| 740 | +.list-full-height { |
| 741 | + min-height: 95vh; |
| 742 | +} |
649 | 743 | </style> |
0 commit comments