diff options
author | Christopher Ng <chrng8@gmail.com> | 2021-11-26 00:51:57 +0000 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2021-11-26 01:04:21 +0000 |
commit | 9ac81f6c2aed94ca3b3f901f584eb8ab492e3892 (patch) | |
tree | a416c5fd69716110a950d23a4b9a7ba4056bcd6e /apps/settings/src | |
parent | 848e589923de150b779060611701710eb16fffbd (diff) | |
download | nextcloud-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.vue | 12 |
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; } } |