Files
threshold-ui/ui/admin/app/templates/application.hbs
T

143 lines
4.1 KiB
Handlebars
Raw Normal View History

2020-11-16 14:57:42 -05:00
{{page-title (app-name)}}
2020-07-23 09:37:06 -04:00
<Rose::Layout::Global as |layout|>
<layout.header>
2022-09-07 16:21:27 -04:00
<Rose::Header class={{if (is-loading) ' loading'}} as |header|>
<header.brand @logo='logo-app' @text={{(app-name)}} />
2020-10-01 13:15:45 -04:00
2020-07-24 17:49:42 -04:00
{{#if this.session.isAuthenticated}}
<header.nav>
<HeaderNav />
</header.nav>
2020-09-27 21:20:57 -04:00
2020-07-24 17:49:42 -04:00
<header.utilities as |utilities|>
<utilities.dropdown
2020-10-01 14:15:20 -04:00
@text={{this.session.data.authenticated.username}}
2021-09-16 14:03:26 -07:00
@icon='flight-icons/svg/user-circle-16'
as |dropdown|
2020-07-24 17:49:42 -04:00
>
<dropdown.link @route='account.change-password'>
2020-09-17 10:24:22 -04:00
{{t 'actions.change-password'}}
</dropdown.link>
<dropdown.separator />
2020-11-04 13:51:37 -05:00
<dropdown.button {{on 'click' (route-action 'invalidateSession')}}>
2020-07-24 17:49:42 -04:00
{{t 'actions.deauthenticate'}}
</dropdown.button>
2020-11-04 13:51:37 -05:00
<dropdown.separator />
<dropdown.section @title={{t 'titles.toggle-color-theme'}}>
<Rose::Form as |form|>
<form.radioGroup
@name='theme'
@selectedValue={{this.session.data.theme}}
@changed={{route-action 'toggleTheme'}}
as |radioGroup|
>
<dropdown.item>
<radioGroup.radio @label={{t 'themes.system'}} />
</dropdown.item>
<dropdown.item>
<radioGroup.radio
@label={{t 'themes.light'}}
@value='light'
/>
</dropdown.item>
<dropdown.item>
<radioGroup.radio
@label={{t 'themes.dark'}}
@value='dark'
/>
</dropdown.item>
</form.radioGroup>
</Rose::Form>
</dropdown.section>
2020-11-04 13:51:37 -05:00
2020-07-24 17:49:42 -04:00
</utilities.dropdown>
</header.utilities>
2020-10-01 13:15:45 -04:00
2020-07-24 17:49:42 -04:00
{{/if}}
2020-10-01 13:15:45 -04:00
2020-05-28 09:14:51 -04:00
</Rose::Header>
</layout.header>
2020-06-08 11:32:19 -04:00
<layout.body>
2020-06-24 10:57:56 -04:00
{{outlet}}
</layout.body>
2020-05-30 12:42:10 -04:00
</Rose::Layout::Global>
2020-05-29 19:44:46 -04:00
{{#if this.flashMessages.queue}}
<div class='ember-notify-cn ember-notify-default'>
{{#each this.flashMessages.queue as |flash|}}
<div
class='ember-notify-show callout
{{flash.noticationType}}
ember-view ember-notify clearfix'
>
<Rose::Notification
@style={{flash.noticationType}}
@heading={{t (concat 'states.' flash.noticationType)}}
@dismiss={{fn flash.dismiss flash}}
@dismissText={{t 'actions.dismiss'}}
>
{{flash.message}}
</Rose::Notification>
</div>
{{/each}}
</div>
{{/if}}
2020-10-14 09:33:44 -04:00
<PendingConfirmations as |confirmation accept deny|>
2020-10-15 16:45:38 -04:00
{{#if confirmation.options.isAbandonConfirm}}
<Rose::Dialog
@heading={{t 'titles.abandon-confirm'}}
@dismissButtonText={{t 'actions.cancel'}}
2021-09-16 14:03:26 -07:00
@icon='flight-icons/svg/alert-triangle-16'
@style='warning'
2020-10-15 16:45:38 -04:00
@modal={{true}}
@dismiss={{deny}}
as |dialog|
>
2020-10-15 16:45:38 -04:00
<dialog.body>
<p>{{t 'questions.abandon-confirm'}}</p>
2020-10-15 16:45:38 -04:00
</dialog.body>
<dialog.footer>
<Rose::Button @style='primary' {{on 'click' accept}}>
{{t 'actions.discard'}}
2020-10-15 16:45:38 -04:00
</Rose::Button>
<Rose::Button @style='secondary' {{on 'click' deny}}>
{{t 'actions.cancel'}}
2020-10-15 16:45:38 -04:00
</Rose::Button>
</dialog.footer>
</Rose::Dialog>
{{else}}
<Rose::Dialog
@heading={{if
confirmation.options.title
(t confirmation.options.title)
(t 'actions.confirm')
}}
@dismissButtonText={{t 'actions.cancel'}}
2021-09-16 14:03:26 -07:00
@icon='flight-icons/svg/alert-triangle-16'
@style='warning'
2020-10-15 16:45:38 -04:00
@modal={{true}}
@dismiss={{deny}}
as |dialog|
>
2020-10-15 16:45:38 -04:00
<dialog.body>
<p>{{confirmation.text}}</p>
</dialog.body>
<dialog.footer>
<Rose::Button @style='primary' {{on 'click' accept}}>
{{t 'actions.ok'}}
2020-10-15 16:45:38 -04:00
</Rose::Button>
<Rose::Button @style='secondary' {{on 'click' deny}}>
{{t 'actions.cancel'}}
2020-10-15 16:45:38 -04:00
</Rose::Button>
</dialog.footer>
</Rose::Dialog>
{{/if}}
2022-10-06 11:41:12 -04:00
</PendingConfirmations>