easier styling for search dialog
Massimo Melina committed
Feb 28, 2025 at 10:01 UTC
ca99b28b7fec5c8260ffc29dec8579854a1ba604
3 files changed
+21
-10
frontend/src/index.scss
+7
-1
@@ -513,8 +513,14 @@ button .icon + .label {
513
margin-bottom: .5em;
514
margin-left: .1em;
515
}
516
+ .submit { text-align: right; }
517
+}
518
+#search-dialog form {
519
+ display: flex;
520
+ flex-direction: column;
521
+ gap: 1em;
522
+ .submit { text-align: right; }
523
}
517
-#search-dialog form label:not(:first-of-type) { display: block; margin-top: 1em }
524
525
form label+input { margin-top: .2em; }
526
frontend/src/login.ts
+1
-1
@@ -103,7 +103,7 @@ export async function loginDialog(closable=true, reloadAfter=true) {
103
onKeyDown
104
}),
105
),
106
- h('div', { style: { textAlign: 'right' } },
106
+ h('div', { className: 'submit' },
107
h('button', { type: 'submit' }, t`Continue`)),
108
h('div', { id: 'login-options' },
109
h(Checkbox, { ref: ipRef, id: 'allow_session_ip_change' },
frontend/src/menu.ts
+13
-8
@@ -217,15 +217,20 @@ function searchDialog() {
217
Content() {
218
const style = { width: 0, minWidth: '100%', maxWidth: '100%', boxSizing: 'border-box' }
219
return h(Fragment, {},
220
- h('label', { htmlFor: 'name' }, t('search_msg', "Search this folder and sub-folders")),
221
- h('input', { name: 'name', style, autoFocus: true, }),
222
- h('label', { htmlFor: 'comment' }, t`Comment`),
223
- h('input', { name: 'comment', style, }),
224
- h('div', { style: { margin: '1em 0' } },
225
- h(Checkbox, { name: 'wild', defaultChecked: true }, t`Wildcards`), // uncontrolled
226
- h('a', { href: `${WIKI_URL}Wildcards`, target: 'doc' }, hIcon('info')),
220
+ t('search_msg', "Search this folder and sub-folders"),
221
+ h('div', { className: 'field name' },
222
+ h('label', { htmlFor: 'name' }, t`Name`),
223
+ h('input', { name: 'name', style, autoFocus: true, }),
224
),
228
- h('div', { style: { textAlign: 'right', marginTop: '.8em' } },
225
+ h('div', { className: 'field comment' },
226
+ h('label', { htmlFor: 'comment' }, t`Comment`),
227
+ h('input', { name: 'comment', style, }),
228
+ ),
229
+ h('div', { className: 'field wildcards' },
230
+ h(Checkbox, { name: 'wild', defaultChecked: true }, t`Wildcards`,
231
+ h('a', { href: `${WIKI_URL}Wildcards`, target: 'doc' }, hIcon('info'))), // uncontrolled
232
+ ),
233
+ h('div', { className: 'submit' },
234
h('button', {}, t`Continue`)),
235
)
236
}