remove empty state block

This commit is contained in:
drivera258 2025-05-22 12:45:32 -04:00
parent 3b8a709f2f
commit ce34d8c76f

View file

@ -14,48 +14,32 @@
{{! currently here empty per design, TBD if actions or filters will be added }}
<Toolbar />
{{#if @loginRules}}
{{#each @loginRules as |rule|}}
<div class="list-item-row linked-block-item is-no-underline">
<div>
<div class="is-grid align-items-center linked-block-title">
<Hds::Icon @name="user-check" @size="24" />
<div class="has-text-weight-semibold has-left-margin-xs" data-test-rule-name={{rule.Name}}>{{rule.Name}}</div>
</div>
<div class="has-top-margin-m" data-test-rule-path={{rule.Namespace}}>{{rule.Namespace}}</div>
</div>
<div class="linked-block-popup-menu">
<Hds::Dropdown @isInline={{true}} as |dd|>
<dd.ToggleIcon
@icon="more-horizontal"
@hasChevron={{false}}
@text="login rules menu"
data-test-popup-menu-trigger
/>
<dd.Interactive @route="login-settings.rule.details" @model={{rule.Name}} data-test-popup-menu="view-rule">
View
</dd.Interactive>
{{#if (has-capability this.capabilities "delete" pathKey="customLogin" params=rule)}}
<dd.Interactive
@color="critical"
data-test-popup-menu="delete-rule"
{{on "click" (fn (mut this.ruleToDelete) rule)}}
>Delete</dd.Interactive>
{{/if}}
</Hds::Dropdown>
{{#each @loginRules as |rule|}}
<div class="list-item-row linked-block-item is-no-underline">
<div>
<div class="is-grid align-items-center linked-block-title">
<Hds::Icon @name="user-check" @size="24" />
<div class="has-text-weight-semibold has-left-margin-xs" data-test-rule-name={{rule.Name}}>{{rule.Name}}</div>
</div>
<div class="has-top-margin-m" data-test-rule-path={{rule.Namespace}}>{{rule.Namespace}}</div>
</div>
{{/each}}
{{else}}
<EmptyState
data-test-empty-state="login-rules-list"
@title="No UI login rules yet"
@message="Login rules can be used to select default and back up login methods and customize which methods display in the web UI login form. Available to be created via the CLI or HTTP API."
>
{{! TODO: update href with tutorial link }}
{{! <Hds::Link::Standalone @icon="arrow-right" @iconPosition="trailing" @text="Learn more" @href="/" /> }}
</EmptyState>
{{/if}}
<div class="linked-block-popup-menu">
<Hds::Dropdown @isInline={{true}} as |dd|>
<dd.ToggleIcon @icon="more-horizontal" @hasChevron={{false}} @text="login rules menu" data-test-popup-menu-trigger />
<dd.Interactive @route="login-settings.rule.details" @model={{rule.Name}} data-test-popup-menu="view-rule">
View
</dd.Interactive>
{{#if (has-capability this.capabilities "delete" pathKey="customLogin" params=rule)}}
<dd.Interactive
@color="critical"
data-test-popup-menu="delete-rule"
{{on "click" (fn (mut this.ruleToDelete) rule)}}
>Delete</dd.Interactive>
{{/if}}
</Hds::Dropdown>
</div>
</div>
{{/each}}
{{#if this.ruleToDelete}}
<ConfirmModal