Skip to content

Commit 0c2e7fc

Browse files
marcoambrosininextcloud-command
authored andcommitted
Improve personal settings layout
Signed-off-by: Marco Ambrosini <[email protected]> Signed-off-by: nextcloud-command <[email protected]>
1 parent 4e84846 commit 0c2e7fc

File tree

10 files changed

+27
-23
lines changed

10 files changed

+27
-23
lines changed

apps/settings/css/settings.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/css/settings.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/css/settings.scss

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,15 @@ select {
8686
}
8787

8888
#personal-settings {
89-
display: grid;
89+
display: flex;
90+
flex-direction: column;
9091
padding: 20px;
91-
max-width: 1700px;
92-
grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
93-
grid-column-gap: 10px;
92+
max-width: 800px;
93+
margin: auto;
94+
95+
label {
96+
font-weight: bold;
97+
}
9498

9599
.section {
96100
padding: 10px 10px;
@@ -101,6 +105,7 @@ select {
101105
}
102106

103107
h3 {
108+
font-weight: bold;
104109
> label {
105110
font-weight: bold;
106111
}

apps/settings/src/components/PersonalInfo/ProfileSection/EditProfileAnchorLink.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,10 @@ html {
6969
a {
7070
display: block;
7171
height: 44px;
72-
width: min(100%, 290px);
7372
overflow: hidden;
7473
text-overflow: ellipsis;
7574
line-height: 44px;
7675
padding: 0 16px;
77-
margin: 14px auto;
7876
border-radius: var(--border-radius-pill);
7977
color: var(--color-text-maxcontrast);
8078
background-color: transparent;

apps/settings/src/components/PersonalInfo/ProfileSection/ProfilePreviewCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export default {
9595
display: flex;
9696
flex-direction: column;
9797
position: relative;
98-
width: min(100%, 290px);
9998
height: 116px;
10099
margin: 14px auto;
101100
border-radius: var(--border-radius-large);

apps/settings/src/components/PersonalInfo/ProfileSection/ProfileSection.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
<section>
2525
<HeaderBar :readable="propertyReadable" />
2626

27-
<ProfileCheckbox :profile-enabled.sync="profileEnabled" />
27+
<div class="profile-section_controls-wrapper">
28+
<ProfileCheckbox :profile-enabled.sync="profileEnabled" />
29+
<EditProfileAnchorLink :profile-enabled="profileEnabled" />
30+
</div>
2831

2932
<ProfilePreviewCard :organisation="organisation"
3033
:display-name="displayName"
3134
:profile-enabled="profileEnabled"
3235
:user-id="userId" />
33-
34-
<EditProfileAnchorLink :profile-enabled="profileEnabled" />
3536
</section>
3637
</template>
3738

@@ -103,4 +104,9 @@ section {
103104
cursor: default;
104105
}
105106
}
107+
108+
.profile-section_controls-wrapper {
109+
display: flex;
110+
align-items: center;
111+
}
106112
</style>

apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
<template>
2424
<!-- TODO remove this inline margin placeholder once the settings layout is updated -->
25-
<section id="profile-visibility"
26-
:style="{ marginLeft }">
25+
<section id="profile-visibility">
2726
<HeaderBar :is-heading="true" :readable="heading" />
2827

2928
<em :class="{ disabled }">
@@ -79,10 +78,6 @@ export default {
7978
visibilityParams: Object.entries(profileConfig)
8079
.map(([paramId, { appId, displayId, visibility }]) => ({ id: paramId, appId, displayId, visibility }))
8180
.sort(compareParams),
82-
// TODO remove this when not used once the settings layout is updated
83-
marginLeft: window.matchMedia('(min-width: 1600px)').matches
84-
? window.getComputedStyle(document.getElementById('vue-avatar-section')).getPropertyValue('width').trim()
85-
: '0px',
8681
}
8782
},
8883
@@ -121,8 +116,9 @@ export default {
121116
<style lang="scss" scoped>
122117
section {
123118
padding: 30px;
124-
max-width: 900px;
119+
max-width: 800px;
125120
width: 100%;
121+
margin: auto;
126122
127123
em {
128124
display: block;

apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default {
133133

134134
<style lang="scss" scoped>
135135
.headerbar-label {
136-
font-weight: normal;
136+
font-weight: bold;
137137
display: inline-flex;
138138
width: 100%;
139139
margin: 12px 0 0 0;

dist/settings-vue-settings-personal-info.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-personal-info.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)