mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-25 12:56:13 -04:00
Merge pull request #695 from kiwix/532-bookmark-no-long-press
532 bookmark no long press
This commit is contained in:
commit
5b339ee389
@ -71,6 +71,26 @@ struct BookmarkButton: View {
|
|||||||
Text("common.button.done".localized).fontWeight(.semibold)
|
Text("common.button.done".localized).fontWeight(.semibold)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ToolbarItem(placement: .navigationBarTrailing) {
|
||||||
|
Button {
|
||||||
|
if browser.articleBookmarked {
|
||||||
|
browser.deleteBookmark()
|
||||||
|
} else {
|
||||||
|
browser.createBookmark()
|
||||||
|
}
|
||||||
|
} label: {
|
||||||
|
Label {
|
||||||
|
Text(
|
||||||
|
browser.articleBookmarked ?
|
||||||
|
"common.dialog.button.remove_bookmark".localized :
|
||||||
|
"common.dialog.button.add_bookmark".localized
|
||||||
|
)
|
||||||
|
} icon: {
|
||||||
|
Image(systemName: browser.articleBookmarked ? "star.fill" : "star")
|
||||||
|
.renderingMode(browser.articleBookmarked ? .original : .template)
|
||||||
|
}
|
||||||
|
}.disabled(browser.url == nil)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(idealWidth: 360, idealHeight: 600)
|
.frame(idealWidth: 360, idealHeight: 600)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user