- Fix theme-wrapper size on touch devices

- Make x-instructor shrinkable on small screens
- Evaluate x-Peers overflow when header expand button is clicked
- Refactor padding/margin classnames
This commit is contained in:
schlagmichdoch 2023-12-12 13:39:55 +01:00
parent 1f1e029071
commit a5cc115fa6
4 changed files with 69 additions and 49 deletions

View file

@ -125,9 +125,12 @@ class HeaderUI {
}
async evaluateOverflowing() {
// remove and reset bracket icon before evaluating
// remove bracket icon before evaluating
this.$expandBtn.setAttribute('hidden', true);
// reset bracket icon rotation and header overflow
this.$expandBtn.classList.add('flipped');
this.$header.classList.remove('overflow-expanded');
const rtlLocale = Localization.isCurrentLocaleRtl();
let icon;
@ -152,7 +155,7 @@ class HeaderUI {
}
else {
// no overflowing
// add overflowing-hidden class
// remove overflowing-hidden class
this.$header.classList.remove('overflow-hidden');
}
}
@ -169,6 +172,7 @@ class HeaderUI {
this.$header.classList.remove('overflow-expanded');
this.$expandBtn.classList.add('flipped');
}
Events.fire('header-changed');
}
}

View file

@ -37,6 +37,7 @@ class PeersUI {
Events.on('dragleave', _ => this._onDragEnd());
Events.on('dragend', _ => this._onDragEnd());
Events.on('resize', _ => this._evaluateOverflowingPeers());
Events.on('header-changed', _ => this._evaluateOverflowingPeers());
Events.on('paste', e => this._onPaste(e));
Events.on('activate-share-mode', e => this._activateShareMode(e.detail.files, e.detail.text));
@ -1586,7 +1587,7 @@ class EditPairedDevicesDialog extends Dialog {
<span class="center wrap">
${autoAcceptString}
</span>
<label class="auto-accept switch pointer m1">
<label class="auto-accept switch pointer m-1">
<input type="checkbox" ${roomSecretsEntry.auto_accept ? "checked" : ""}>
<div class="slider round"></div>
</label>