open-vault/ui/app/components/secret-form-header.js
Matthew Irish d509588cd2
Ember update (#5386)
Ember update - update ember-cli, ember-data, and ember to 3.4 series
2018-09-25 11:28:26 -05:00

51 lines
1.2 KiB
JavaScript

import { alias } from '@ember/object/computed';
import Component from '@ember/component';
import hbs from 'htmlbars-inline-precompile';
export default Component.extend({
key: null,
mode: null,
path: null,
actionClass: null,
title: alias('key.keyWithoutParent'),
layout: hbs`
<div class="consul-show-header connected">
{{#secret-link
mode="list"
secret=key.parentKey
class="back-button"
}}
{{i-con glyph="chevron-left" size=11}}
Secrets
{{/secret-link}}
<div class="actions {{actionClass}}">
{{yield}}
</div>
<div class="item-name">
{{#if (eq mode "create") }}
Create a secret at
<code>
{{#if showPrefix}}
{{! need this to prevent a shift in the layout before we transition when saving }}
{{#if key.isCreating}}
{{key.initialParentKey}}
{{else}}
{{key.parentKey}}
{{/if}}
{{/if}}
</code>
{{/if}}
{{#if (eq mode "edit") }}
Edit
{{/if}}
<code>{{title}}</code>
</div>
</div>`,
});