Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Empty state styles #5758

Merged
merged 16 commits into from
Nov 16, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 28 additions & 32 deletions ui/app/templates/vault/cluster/secrets/backend/list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 I thought this would look much more confusing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh yeah, still not great with concat and quoting various things, but not too bad!

}}
/>
{{/if}}
{{/if}}
{{/if}}
{{/with}}