archive button as a link that can be copied
Massimo Melina committed
Jan 15, 2022 at 15:57 UTC
07bebe7397c3bfca3942b3fe98ecedd4a16e4df0
2 files changed
+6
-5
frontend/src/menu.ts
+6
-4
@@ -37,12 +37,10 @@ export function MenuPanel() {
37
label: 'Options',
38
onClick: showOptions
39
}),
40
- h(MenuButton, {
40
+ h(MenuLink, {
41
icon: 'archive',
42
label: 'Archive',
43
- onClick() {
44
- window.location.href = '?get=zip'
45
- }
43
+ href: '?get=zip',
44
})
45
),
46
remoteSearch && h('div', { id: 'searched' }, (stopSearch ? 'Searching' : 'Searched') + ': ' + remoteSearch + prefix(' (', stoppedSearch && 'interrupted', ')')),
@@ -97,6 +95,10 @@ export function MenuButton({ icon, label, toggled, onClick, className = '' }: Me
95
h('label', {}, label))
96
}
97
98
+export function MenuLink({ href, ...rest }: MenuButtonProps & { href: string }) {
99
+ return h('a', { href }, h(MenuButton, rest))
100
+}
101
+
102
function LoginButton() {
103
const snap = useSnapState()
104
const navigate = useNavigate()
todo.md
-1
@@ -1,6 +1,5 @@
1
# To do
2
- confirm archive
3
-- archive button as a link that can be copied
3
- emoji as an alternative to icons?
4
- smaller icons file?
5
- remove seconds from time