From 27d3e51ce3f3f766abda8109212446ea2364dbcf Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 22 Aug 2024 15:04:03 +0800 Subject: [PATCH 1/4] more permission based ux implementations --- addon/components/content-panel.hbs | 26 ++++- addon/components/content-panel.js | 15 ++- addon/components/coordinates-input.hbs | 10 +- addon/components/coordinates-input.js | 8 ++ addon/components/full-calendar/draggable.hbs | 2 +- addon/components/full-calendar/draggable.js | 36 +++++- addon/components/layout/sidebar/item.hbs | 10 +- addon/components/layout/sidebar/panel.hbs | 103 ++++++++++-------- addon/components/layout/sidebar/panel.js | 15 ++- addon/components/model-select.hbs | 12 +- addon/components/model-select.js | 20 +++- addon/components/select.hbs | 8 +- addon/components/select.js | 4 +- addon/components/table/cell/dropdown.hbs | 6 +- .../table/cell/dropdown/action-item.hbs | 4 +- addon/components/unit-input.hbs | 5 +- addon/components/unit-input.js | 12 +- addon/styles/components/full-calendar.css | 6 + addon/styles/components/input.css | 20 +++- addon/styles/components/tabs.css | 21 ++++ addon/styles/layout/next.css | 70 ++++++++++-- addon/styles/layout/reset.css | 6 + package.json | 2 +- 23 files changed, 330 insertions(+), 91 deletions(-) diff --git a/addon/components/content-panel.hbs b/addon/components/content-panel.hbs index 9f95b8f..82b3212 100644 --- a/addon/components/content-panel.hbs +++ b/addon/components/content-panel.hbs @@ -7,7 +7,7 @@ {{@panelHeaderClass}} {{if @isLoading 'is-loading'}}" > - + {{#unless @hideCaret}} @@ -49,6 +49,15 @@ {{/if}} + {{#if this.doesntHavePermissions}} + + + + {{else if @helpText}} + + + + {{/if}}
{{#if @titleRightSideComponent}} @@ -89,24 +98,31 @@ @iconPrefix={{button.iconPrefix}} @onClick={{button.onClick}} @wrapperClass={{button.wrapperClass}} + @permission={{button.permission}} + @disabled={{button.disabled}} class={{button.class}} /> {{/each}} {{#if @dropdownButton}} -