Move the toggle to the main content

This commit is contained in:
Eric Eastwood 2023-05-02 02:23:19 -05:00
parent 97d42a11ab
commit c6adf22329
1 changed files with 22 additions and 22 deletions

View File

@ -205,28 +205,6 @@ class RoomDirectoryView extends TemplateView {
},
[
t.header({ className: 'RoomDirectoryView_header' }, [headerForm]),
t.section([
t.div({ className: 'DeveloperOptionsContentView_settingsFlag' }, [
t.label({ for: 'safeSearchEnabled' }, [
t.map(
(vm) => vm.safeSearchEnabled,
(safeSearchEnabled /*, t, vm*/) => {
if (safeSearchEnabled) {
return text('Safe search is on');
}
return text('Safe search is off');
}
),
]),
t.input({
id: 'safeSearchEnabled',
type: 'checkbox',
checked: (vm) => vm.safeSearchEnabled,
onInput: (event) => vm.setSafeSearchEnabled(event.target.checked),
}),
]),
]),
t.main({ className: 'RoomDirectoryView_mainContent' }, [
// Display a nice error section when we failed to fetch rooms from the room directory
t.if(
@ -301,6 +279,28 @@ class RoomDirectoryView extends TemplateView {
}
),
// Otherwise, display the rooms that we fetched
t.section([
t.div({ className: 'RoomDirectoryView_safeSearchToggle' }, [
t.label({ for: 'safeSearchEnabled' }, [
t.map(
(vm) => vm.safeSearchEnabled,
(safeSearchEnabled /*, t, vm*/) => {
if (safeSearchEnabled) {
return text('Safe search is on');
}
return text('Safe search is off');
}
),
]),
t.input({
id: 'safeSearchEnabled',
type: 'checkbox',
checked: (vm) => vm.safeSearchEnabled,
onInput: (event) => vm.setSafeSearchEnabled(event.target.checked),
}),
]),
]),
t.view(roomList),
t.div({ className: 'RoomDirectoryView_paginationButtonCombo' }, [
t.a(