summaryrefslogtreecommitdiffstats
path: root/apps/settings/src
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2021-11-26 00:51:57 +0000
committernextcloud-command <nextcloud-command@users.noreply.github.com>2021-11-26 01:04:21 +0000
commit9ac81f6c2aed94ca3b3f901f584eb8ab492e3892 (patch)
treea416c5fd69716110a950d23a4b9a7ba4056bcd6e /apps/settings/src
parent848e589923de150b779060611701710eb16fffbd (diff)
downloadnextcloud-server-9ac81f6c2aed94ca3b3f901f584eb8ab492e3892.tar.gz
nextcloud-server-9ac81f6c2aed94ca3b3f901f584eb8ab492e3892.zip
Set number of visibility dropdown rows dynamically
Signed-off-by: Christopher Ng <chrng8@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/settings/src')
-rw-r--r--apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue b/apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue
index 8d9e69a483a..d13b26b2d92 100644
--- a/apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue
+++ b/apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue
@@ -32,7 +32,11 @@
{{ t('settings', 'The more restrictive setting of either visibility or scope is respected on your Profile. For example, if visibility is set to "Show to everyone" and scope is set to "Private", "Private" is respected.') }}
</em>
- <div class="visibility-dropdowns">
+ <div
+ class="visibility-dropdowns"
+ :style="{
+ gridTemplateRows: `repeat(${rows}, 44px)`,
+ }">
<VisibilityDropdown v-for="param in visibilityParams"
:key="param.id"
:param-id="param.id"
@@ -89,6 +93,10 @@ export default {
disabled() {
return !this.profileEnabled
},
+
+ rows() {
+ return Math.ceil(this.visibilityParams.length / 2)
+ },
},
mounted() {
@@ -137,7 +145,6 @@ section {
.visibility-dropdowns {
display: grid;
- grid-template-rows: repeat(auto-fit, 44px);
gap: 10px 40px;
}
@@ -146,7 +153,6 @@ section {
.visibility-dropdowns {
grid-auto-flow: column;
- height: 320px;
}
}