fix: small phones (iphone8) displayed bad layout on file-menu
Massimo Melina committed
Apr 12, 2025 at 20:32 UTC
39ad96a827ce0db584815d30f2a3142e0685d524
2 files changed
+4
-4
frontend/src/fileMenu.ts
+3
-3
@@ -26,7 +26,7 @@ interface FileMenuEntry {
26
href?: string
27
icon?: string
28
toggled?: boolean
29
- onClick?: (ev:MouseEvent<Element>) => any
29
+ onClick?: (ev:MouseEvent) => any
30
}
31
32
export async function openFileMenu(entry: DirEntry, ev: MouseEvent, addToMenu: (Falsy | FileMenuEntry | 'open' | 'delete' | 'show')[]) {
@@ -111,9 +111,9 @@ export async function openFileMenu(entry: DirEntry, ev: MouseEvent, addToMenu: (
111
dontBotherWithKeys(showProps.map(prop => isValidElement(prop) ? prop
112
: _.isPlainObject(prop) ? h('div', { id: `menu-prop-${prop.id}` }, h('dt', {}, prop.label), h('dd', {}, prop.value))
113
: null
114
- ))
114
+ )),
115
+ entry.cantOpen && h('div', {}, hIcon('password', { style: { marginRight: '.5em', marginTop: '.5em' } }), t(MISSING_PERM)),
116
),
116
- entry.cantOpen && h(Fragment, {}, hIcon('password', { style: { marginRight: '.5em', marginTop: '.5em' } }), t(MISSING_PERM)),
117
h('div', { className: 'file-menu' },
118
dontBotherWithKeys(menu.map((entry: FileMenuEntry, i) => // render menu entries
119
isValidElement(entry) ? entry
frontend/src/index.scss
+1
-1
@@ -862,7 +862,7 @@ form label+input { margin-top: .2em; }
862
}
863
}
864
865
-@media (max-height: 600px) {
865
+@media (max-height: 600px) and (orientation: landscape) {
866
.file-dialog {
867
.dialog-content {
868
display: flex;