Merge pull request #29882 from nextcloud/backport/29826/stable23

[stable23] Personalsettings - fix marginLeft as it breaks the layout
This commit is contained in:
szaimen 2021-11-24 17:41:44 +01:00 committed by GitHub
commit 43e032dd1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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'
}