Personalsettings - remove marginLeft as it breaks the layout

Signed-off-by: szaimen <szaimen@e.mail.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
szaimen 2021-11-21 15:44:01 +01:00 committed by nextcloud-command
parent fd487c1a43
commit 0224687e23
3 changed files with 8 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -79,7 +79,9 @@ export default {
.map(([paramId, { appId, displayId, visibility }]) => ({ id: paramId, appId, displayId, visibility }))
.sort(compareParams),
// TODO remove this when not used once the settings layout is updated
marginLeft: window.getComputedStyle(document.getElementById('personal-settings-avatar-container')).getPropertyValue('width').trim(),
marginLeft: window.matchMedia('(min-width: 1600px)').matches
? window.getComputedStyle(document.getElementById('personal-settings-avatar-container')).getPropertyValue('width').trim()
: '0px'
}
},
@ -93,7 +95,7 @@ export default {
subscribe('settings:profile-enabled:updated', this.handleProfileEnabledUpdate)
// TODO remove this when not used once the settings layout is updated
window.onresize = () => {
this.marginLeft = window.matchMedia('(min-width: 1200px)').matches
this.marginLeft = window.matchMedia('(min-width: 1600px)').matches
? window.getComputedStyle(document.getElementById('personal-settings-avatar-container')).getPropertyValue('width').trim()
: '0px'
}