4.7 KiB
title | description | lead | date | lastmod | draft | images | menu | toc | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Favourites | 2020-10-06T08:48:23+00:00 | 2020-10-06T08:48:23+00:00 | false |
|
true |
Adding a favourite
key source file: src/status/libstatus/browser.nim
key source file: src/app/browser/view.nim
with the Star icon
key source file: ui/app/AppLayouts/Browser/BrowserHeader.qml
with the Add favourite button
key source file: ui/app/AppLayouts/Browser/FavoritesList.qml
key source file: ui/app/AppLayouts/Browser/AddFavoriteModal.qml
The modal is opened by calling addFavoriteModal.open()
in ui/app/AppLayouts/Browser/FavoritesList.qml
Displaying favourites
key source file: src/status/libstatus/browser.nim
key source file: src/app/browser/view.nim
key source file: src/app/browser/views/bookmark_list.nim
In the Toolbar
key source file: ui/app/AppLayouts/Browser/FavoritesBar.qml
in the blank page
key source file: ui/app/AppLayouts/Browser/BrowserLayout.qml
key source file: ui/app/AppLayouts/Browser/FavoritesList.qml
// todo add how the list is added from the backend
Editing a favourite
key source file: src/status/libstatus/browser.nim
Removing a favourite
key source file: ui/app/AppLayouts/Browser/FavoriteMenu.qml
key source file: ui/app/AppLayouts/Browser/AddFavoriteModal.qml
key source file: src/app/browser/view.nim
key source file: src/status/libstatus/browser.nim
A favourite is removed by calling browserModel.removeBookmark
from QML, in Nim, an RPC call to the backend is made using browsers_deleteBookmark
with url
as the payload
Loading a favourite
key source file: ui/app/AppLayouts/Browser/FavoritesBar.qml
key source file: ui/app/AppLayouts/Browser/BrowserLayout.qml
A favourite is loaded by setting currentWebView.url
to the intended url.
In this case ui/app/AppLayouts/Browser/FavoritesBar.qml
each delegate has its own url
property and that is used to set the currentWebView.url
value after going through thedetermineRealURL
helper in case it's a ENS domain etc..
currentWebView.url = determineRealURL(url)