use EmptyState on secrets list

This commit is contained in:
Matthew Irish 2018-11-15 16:46:25 -06:00
parent e4a7521231
commit d72c7db57e
1 changed files with 28 additions and 32 deletions

View File

@ -54,37 +54,33 @@
}}
{{/if}}
{{else}}
<div class="empty-state">
<div class="empty-state-content">
{{#if (eq baseKey.id '')}}
<div class="empty-state-title">
No {{pluralize options.item}} in this backend yet
</div>
<div class="empty-state-message">
Secrets in this backend will be listed here. Add a secret to get started.
</div>
<div class="empty-state-actions">
{{#secret-link
mode="create"
secret=''
queryParams=(query-params initialKey=(or filter baseKey.id))
class="link"
}}
{{options.create}}
{{/secret-link}}
</div>
{{else}}
{{#if filterIsFolder}}
<div class="empty-state-title">
{{#if (eq filter baseKey.id)}}
No {{pluralize options.item}} under <code>{{or filter}}</code>
{{else}}
No folders matching <code>{{filter}}</code>
{{/if}}
</div>
{{/if}}
{{/if}}
</div>
</div>
{{#if (eq baseKey.id '')}}
<EmptyState
@title="No {{pluralize options.item}} in this backend yet"
@message="Secrets in this backend will be listed here. Add a secret to get started."
>
{{#secret-link
mode="create"
secret=''
queryParams=(query-params initialKey=(or filter baseKey.id))
class="link"
}}
{{options.create}}
{{/secret-link}}
</EmptyState>
{{else}}
{{#if filterIsFolder}}
<EmptyState
@title={{if (eq filter baseKey.id)
(concat
"No " (pluralize options.item) " under &quot;" this.filter "&quot;"
)
(concat
"No folders matching &quot;" this.filter "&quot;"
)
}}
/>
{{/if}}
{{/if}}
{{/if}}
{{/with}}