aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/js/templates/federationscopemenu.handlebars
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-02-01 03:34:36 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2021-04-23 11:44:42 +0200
commitda84ed7d4c2d05b4f9841d345d3a47dfe673ea7a (patch)
tree91f1bc73adc56ef06155c21143925f818ea2303a /apps/settings/js/templates/federationscopemenu.handlebars
parent7159a708947e29f963b634aa3af6ab5354f6bed4 (diff)
downloadnextcloud-server-da84ed7d4c2d05b4f9841d345d3a47dfe673ea7a.tar.gz
nextcloud-server-da84ed7d4c2d05b4f9841d345d3a47dfe673ea7a.zip
Fix active scope not visible in the menu if excluded
Depending on some settings (for example, if lookup server upload is disabled) some items can be hidden in the scope menu. However, if the user selected an scope in the past once the settings were changed the scope was no longer visible in the menu. Now the active scope will be always visible in the menu, although if it is an excluded scope it will be disabled. Selecting any other scope will then hide the excluded and no longer active one. When upload to the lookup server is disabled the scope menu was hidden for display name and email in the personal information settings; now the menu will be always shown to enable the above described behaviour. Note that the menu will be shown even if there is a single available scope so the user can read its description. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/settings/js/templates/federationscopemenu.handlebars')
-rw-r--r--apps/settings/js/templates/federationscopemenu.handlebars10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/settings/js/templates/federationscopemenu.handlebars b/apps/settings/js/templates/federationscopemenu.handlebars
index e5cfd942f46..5a2077d4fc3 100644
--- a/apps/settings/js/templates/federationscopemenu.handlebars
+++ b/apps/settings/js/templates/federationscopemenu.handlebars
@@ -1,7 +1,12 @@
<ul>
{{#each items}}
+ {{#unless hidden}}
<li>
+ {{#if disabled}}
+ <div class="menuitem action action-{{name}} permanent {{#if active}}active{{/if}} disabled" data-action="{{name}}">
+ {{else}}
<a href="#" class="menuitem action action-{{name}} permanent {{#if active}}active{{/if}}" data-action="{{name}}">
+ {{/if}}
{{#if iconClass}}
<span class="icon {{iconClass}}"></span>
{{else}}
@@ -11,7 +16,12 @@
<strong class="menuitem-text">{{displayName}}</strong><br>
<span class="menuitem-text-detail">{{tooltip}}</span>
</p>
+ {{#if disabled}}
+ </div>
+ {{else}}
</a>
+ {{/if}}
</li>
+ {{/unless}}
{{/each}}
</ul>