DEV: Apply prettier to hbs files

This commit is contained in:
David Taylor 2022-12-28 12:28:11 +00:00
parent 104a16610a
commit c8e2e37fa7
847 changed files with 18124 additions and 4627 deletions

View File

@ -1,11 +1,7 @@
<label class="hook-event">
<Input
@type="checkbox"
@checked={{this.enabled}}
name="event-choice"
/>
<Input @type="checkbox" @checked={{this.enabled}} name="event-choice" />
{{this.name}}
<p>{{this.details}}</p>
</label>
</label>

View File

@ -36,4 +36,4 @@
<pre><code>{{this.body}}</code></pre>
</div>
{{/if}}
</li>
</li>

View File

@ -1,4 +1,5 @@
<div class="web-hook-events-listing"
<div
class="web-hook-events-listing"
{{did-insert this.subscribe}}
{{will-destroy this.unsubscribe}}
>
@ -14,16 +15,34 @@
<LoadMore @selector=".web-hook-events li" @action={{this.loadMore}}>
<div class="web-hook-events content-list">
<div class="heading-container">
<div class="col heading first status">{{i18n "admin.web_hooks.events.status"}}</div>
<div class="col heading event-id">{{i18n "admin.web_hooks.events.event_id"}}</div>
<div class="col heading timestamp">{{i18n "admin.web_hooks.events.timestamp"}}</div>
<div class="col heading completion">{{i18n "admin.web_hooks.events.completion"}}</div>
<div class="col heading actions">{{i18n "admin.web_hooks.events.actions"}}</div>
<div class="col heading first status">{{i18n
"admin.web_hooks.events.status"
}}</div>
<div class="col heading event-id">{{i18n
"admin.web_hooks.events.event_id"
}}</div>
<div class="col heading timestamp">{{i18n
"admin.web_hooks.events.timestamp"
}}</div>
<div class="col heading completion">{{i18n
"admin.web_hooks.events.completion"
}}</div>
<div class="col heading actions">{{i18n
"admin.web_hooks.events.actions"
}}</div>
</div>
{{#if this.hasIncoming}}
<a href tabindex="0" {{on "click" this.showInserted}} class="alert alert-info clickable">
<CountI18n @key="admin.web_hooks.events.incoming" @count={{this.incomingCount}} />
<a
href
tabindex="0"
{{on "click" this.showInserted}}
class="alert alert-info clickable"
>
<CountI18n
@key="admin.web_hooks.events.incoming"
@count={{this.incomingCount}}
/>
</a>
{{/if}}
@ -39,4 +58,4 @@
{{else}}
<p>{{i18n "admin.web_hooks.events.none"}}</p>
{{/if}}
</div>
</div>

View File

@ -1,2 +1,2 @@
{{d-icon this.iconName (hash class=this.iconClass)}}
{{this.deliveryStatus}}
{{this.deliveryStatus}}

View File

@ -28,4 +28,4 @@
</ul>
</div>
{{outlet}}
</div>
</div>

View File

@ -9,12 +9,19 @@
{{icon-or-image this.model}}
<span class="badge-display-name">{{this.model.name}}</span>
{{else}}
<span class="badge-placeholder">{{i18n "admin.badges.mass_award.no_badge_selected"}}</span>
<span class="badge-placeholder">{{i18n
"admin.badges.mass_award.no_badge_selected"
}}</span>
{{/if}}
</div>
<div class="control-group">
<h4>{{i18n "admin.badges.mass_award.upload_csv"}}</h4>
<input type="file" id="massAwardCSVUpload" accept=".csv" onchange={{action "updateFileSelected"}}>
<input
type="file"
id="massAwardCSVUpload"
accept=".csv"
onchange={{action "updateFileSelected"}}
/>
</div>
<div class="control-group">
<label>
@ -23,12 +30,23 @@
</label>
{{#if this.model.multiple_grant}}
<label class="grant-existing-holders">
<Input @type="checkbox" @checked={{this.grantExistingHolders}} class="grant-existing-holders-checkbox" />
<Input
@type="checkbox"
@checked={{this.grantExistingHolders}}
class="grant-existing-holders-checkbox"
/>
{{i18n "admin.badges.mass_award.grant_existing_holders"}}
</label>
{{/if}}
</div>
<DButton @class="btn-primary" @action={{action "massAward"}} @type="submit" @disabled={{this.massAwardButtonDisabled}} @icon="certificate" @label="admin.badges.mass_award.perform" />
<DButton
@class="btn-primary"
@action={{action "massAward"}}
@type="submit"
@disabled={{this.massAwardButtonDisabled}}
@icon="certificate"
@label="admin.badges.mass_award.perform"
/>
<LinkTo @route="adminBadges.index" class="btn btn-normal">
{{d-icon "times"}}
<span>{{i18n "cancel"}}</span>
@ -48,10 +66,16 @@
</p>
{{#if this.unmatchedEntries.length}}
<p>
{{d-icon "exclamation-triangle" class="bulk-award-status-icon failure"}}
{{d-icon
"exclamation-triangle"
class="bulk-award-status-icon failure"
}}
<span>
{{#if this.unmatchedEntriesTruncated}}
{{i18n "admin.badges.mass_award.csv_has_unmatched_users_truncated_list" count=this.unmatchedEntriesCount}}
{{i18n
"admin.badges.mass_award.csv_has_unmatched_users_truncated_list"
count=this.unmatchedEntriesCount
}}
{{else}}
{{i18n "admin.badges.mass_award.csv_has_unmatched_users"}}
{{/if}}
@ -65,6 +89,8 @@
{{/if}}
{{/if}}
{{else}}
<span class="badge-required">{{i18n "admin.badges.mass_award.no_badge_selected"}}</span>
<span class="badge-required">{{i18n
"admin.badges.mass_award.no_badge_selected"
}}</span>
{{/if}}
</DSection>
</DSection>

View File

@ -1,11 +1,20 @@
<DSection @class="current-badges">
<div class="badge-intro admin-intro">
<img src={{this.badgeIntroEmoji}} class="badge-intro-emoji" alt={{i18n "admin.badges.badge_intro.emoji"}}>
<img
src={{this.badgeIntroEmoji}}
class="badge-intro-emoji"
alt={{i18n "admin.badges.badge_intro.emoji"}}
/>
<div class="content-wrapper">
<h1>{{i18n "admin.badges.badge_intro.title"}}</h1>
<div class="external-resources">
{{#each this.badgeIntroLinks as |link|}}
<a href={{link.href}} class="external-link" target="_blank" rel="noopener noreferrer">
<a
href={{link.href}}
class="external-link"
target="_blank"
rel="noopener noreferrer"
>
{{d-icon link.icon}}
<span>{{i18n link.text}}</span>
</a>
@ -13,4 +22,4 @@
</div>
</div>
</div>
</DSection>
</DSection>

View File

@ -3,9 +3,17 @@
<div class="control-group">
<label for="name">{{i18n "admin.badges.name"}}</label>
{{#if this.readOnly}}
<Input @type="text" name="name" @value={{this.buffered.name}} disabled={{true}} />
<Input
@type="text"
name="name"
@value={{this.buffered.name}}
disabled={{true}}
/>
<p class="help">
<LinkTo @route="adminSiteText" @query={{hash q=(concat this.textCustomizationPrefix "name")}}>
<LinkTo
@route="adminSiteText"
@query={{hash q=(concat this.textCustomizationPrefix "name")}}
>
{{i18n "admin.badges.read_only_setting_help"}}
</LinkTo>
</p>
@ -18,47 +26,97 @@
<label for="graphic">{{i18n "admin.badges.graphic"}}</label>
<div class="radios inline-form full-width">
<label class="radio-label" for="badge-icon">
<RadioButton @name="badge-icon" @id="badge-icon" @value="icon" @selection={{this.selectedGraphicType}} @onChange={{action "changeGraphicType"}} />
<RadioButton
@name="badge-icon"
@id="badge-icon"
@value="icon"
@selection={{this.selectedGraphicType}}
@onChange={{action "changeGraphicType"}}
/>
<span>{{i18n "admin.badges.select_an_icon"}}</span>
</label>
<label class="radio-label" for="badge-image">
<RadioButton @name="badge-image" @id="badge-image" @value="image" @selection={{this.selectedGraphicType}} @onChange={{action "changeGraphicType"}} />
<RadioButton
@name="badge-image"
@id="badge-image"
@value="image"
@selection={{this.selectedGraphicType}}
@onChange={{action "changeGraphicType"}}
/>
<span>{{i18n "admin.badges.upload_an_image"}}</span>
</label>
</div>
{{#if this.imageUploaderSelected}}
<UppyImageUploader @id="badge-image-uploader" @imageUrl={{this.buffered.image_url}} @type="badge_image" @onUploadDone={{action "setImage"}} @onUploadDeleted={{action "removeImage"}} @class="no-repeat contain-image" />
<UppyImageUploader
@id="badge-image-uploader"
@imageUrl={{this.buffered.image_url}}
@type="badge_image"
@onUploadDone={{action "setImage"}}
@onUploadDeleted={{action "removeImage"}}
@class="no-repeat contain-image"
/>
<div class="control-instructions">
<p class="help">{{i18n "admin.badges.image_help"}}</p>
</div>
{{else if this.iconSelectorSelected}}
<IconPicker @name="icon" @value={{this.buffered.icon}} @options={{hash maximum=1}} @onChange={{action (mut this.buffered.icon)}} />
<IconPicker
@name="icon"
@value={{this.buffered.icon}}
@options={{hash maximum=1}}
@onChange={{action (mut this.buffered.icon)}}
/>
{{/if}}
</div>
<div class="control-group">
<label for="badge_type_id">{{i18n "admin.badges.badge_type"}}</label>
<ComboBox @name="badge_type_id" @value={{this.buffered.badge_type_id}} @content={{this.badgeTypes}} @onChange={{action (mut this.buffered.badge_type_id)}} @options={{hash
disabled=this.readOnly
}} />
<ComboBox
@name="badge_type_id"
@value={{this.buffered.badge_type_id}}
@content={{this.badgeTypes}}
@onChange={{action (mut this.buffered.badge_type_id)}}
@options={{hash disabled=this.readOnly}}
/>
</div>
<div class="control-group">
<label for="badge_grouping_id">{{i18n "admin.badges.badge_grouping"}}</label>
<label for="badge_grouping_id">{{i18n
"admin.badges.badge_grouping"
}}</label>
<div class="badge-grouping-control">
<ComboBox @name="badge_grouping_id" @value={{this.buffered.badge_grouping_id}} @content={{this.badgeGroupings}} @class="badge-selector" @nameProperty="name" @onChange={{action (mut this.buffered.badge_grouping_id)}} />
<DButton @class="btn-default" @action={{route-action "editGroupings"}} @icon="pencil-alt" />
<ComboBox
@name="badge_grouping_id"
@value={{this.buffered.badge_grouping_id}}
@content={{this.badgeGroupings}}
@class="badge-selector"
@nameProperty="name"
@onChange={{action (mut this.buffered.badge_grouping_id)}}
/>
<DButton
@class="btn-default"
@action={{route-action "editGroupings"}}
@icon="pencil-alt"
/>
</div>
</div>
<div class="control-group">
<label for="description">{{i18n "admin.badges.description"}}</label>
{{#if this.buffered.system}}
<Textarea name="description" @value={{this.buffered.description}} disabled={{true}} />
<Textarea
name="description"
@value={{this.buffered.description}}
disabled={{true}}
/>
<p class="help">
<LinkTo @route="adminSiteText" @query={{hash q=(concat this.textCustomizationPrefix "description")}}>
<LinkTo
@route="adminSiteText"
@query={{hash
q=(concat this.textCustomizationPrefix "description")
}}
>
{{i18n "admin.badges.read_only_setting_help"}}
</LinkTo>
</p>
@ -68,52 +126,89 @@
</div>
<div class="control-group">
<label for="long_description">{{i18n "admin.badges.long_description"}}</label>
<label for="long_description">{{i18n
"admin.badges.long_description"
}}</label>
{{#if this.buffered.system}}
<Textarea name="long_description" @value={{this.buffered.long_description}} disabled={{true}} />
<Textarea
name="long_description"
@value={{this.buffered.long_description}}
disabled={{true}}
/>
<p class="help">
<LinkTo @route="adminSiteText" @query={{hash q=(concat this.textCustomizationPrefix "long_description")}}>
<LinkTo
@route="adminSiteText"
@query={{hash
q=(concat this.textCustomizationPrefix "long_description")
}}
>
{{i18n "admin.badges.read_only_setting_help"}}
</LinkTo>
</p>
{{else}}
<Textarea name="long_description" @value={{this.buffered.long_description}} />
<Textarea
name="long_description"
@value={{this.buffered.long_description}}
/>
{{/if}}
</div>
{{#if this.siteSettings.enable_badge_sql}}
<div class="control-group">
<label for="query">{{i18n "admin.badges.query"}}</label>
<AceEditor @content={{this.buffered.query}} @mode="sql" @disabled={{this.readOnly}} />
<AceEditor
@content={{this.buffered.query}}
@mode="sql"
@disabled={{this.readOnly}}
/>
</div>
{{#if this.hasQuery}}
<a href {{on "click" (fn this.showPreview this.buffered "false")}}>{{i18n "admin.badges.preview.link_text"}}</a>
<a
href
{{on "click" (fn this.showPreview this.buffered "false")}}
>{{i18n "admin.badges.preview.link_text"}}</a>
|
<a href {{on "click" (fn this.showPreview this.buffered "true")}}>{{i18n "admin.badges.preview.plan_text"}}</a>
<a href {{on "click" (fn this.showPreview this.buffered "true")}}>{{i18n
"admin.badges.preview.plan_text"
}}</a>
{{#if this.preview_loading}}
{{i18n "loading"}}
{{/if}}
<div class="control-group">
<label>
<Input name="auto_revoke" @type="checkbox" @checked={{this.buffered.auto_revoke}} disabled={{this.readOnly}} />
<Input
name="auto_revoke"
@type="checkbox"
@checked={{this.buffered.auto_revoke}}
disabled={{this.readOnly}}
/>
{{i18n "admin.badges.auto_revoke"}}
</label>
</div>
<div class="control-group">
<label>
<Input name="target_posts" @type="checkbox" @checked={{this.buffered.target_posts}} disabled={{this.readOnly}} />
<Input
name="target_posts"
@type="checkbox"
@checked={{this.buffered.target_posts}}
disabled={{this.readOnly}}
/>
{{i18n "admin.badges.target_posts"}}
</label>
</div>
<div class="control-group">
<label for="trigger">{{i18n "admin.badges.trigger"}}</label>
<ComboBox name="trigger" @value={{this.buffered.trigger}} @content={{this.badgeTriggers}} @onChange={{action (mut this.buffered.trigger)}} @options={{hash
disabled=this.readOnly
}} />
<ComboBox
name="trigger"
@value={{this.buffered.trigger}}
@content={{this.badgeTriggers}}
@onChange={{action (mut this.buffered.trigger)}}
@options={{hash disabled=this.readOnly}}
/>
</div>
{{/if}}
{{/if}}
@ -128,21 +223,33 @@
<div>
<label>
<Input @type="checkbox" @checked={{this.buffered.multiple_grant}} disabled={{this.readOnly}} />
<Input
@type="checkbox"
@checked={{this.buffered.multiple_grant}}
disabled={{this.readOnly}}
/>
{{i18n "admin.badges.multiple_grant"}}
</label>
</div>
<div>
<label>
<Input @type="checkbox" @checked={{this.buffered.listable}} disabled={{this.readOnly}} />
<Input
@type="checkbox"
@checked={{this.buffered.listable}}
disabled={{this.readOnly}}
/>
{{i18n "admin.badges.listable"}}
</label>
</div>
<div>
<label>
<Input @type="checkbox" @checked={{this.buffered.show_posts}} disabled={{this.readOnly}} />
<Input
@type="checkbox"
@checked={{this.buffered.show_posts}}
disabled={{this.readOnly}}
/>
{{i18n "admin.badges.show_posts"}}
</label>
</div>
@ -156,10 +263,20 @@
</div>
<div class="buttons">
<DButton @class="btn-primary" @action={{action "save"}} @type="submit" @disabled={{this.saving}} @label="admin.badges.save" />
<DButton
@class="btn-primary"
@action={{action "save"}}
@type="submit"
@disabled={{this.saving}}
@label="admin.badges.save"
/>
<span class="saving">{{this.savingStatus}}</span>
{{#unless this.readOnly}}
<DButton @action={{action "destroyBadge"}} @class="btn-danger" @label="admin.badges.delete" />
<DButton
@action={{action "destroyBadge"}}
@class="btn-danger"
@label="admin.badges.delete"
/>
{{/unless}}
</div>
</form>
@ -168,7 +285,10 @@
{{#if this.grant_count}}
<div class="content-body current-badge-actions">
<div>
<LinkTo @route="badges.show" @model={{this}}>{{i18n "badges.granted" count=this.grant_count}}</LinkTo>
<LinkTo @route="badges.show" @model={{this}}>{{i18n
"badges.granted"
count=this.grant_count
}}</LinkTo>
</div>
</div>
{{/if}}
{{/if}}

View File

@ -5,7 +5,10 @@
<ul class="nav nav-pills">
<NavItem @route="admin.dashboard" @label="admin.dashboard.title" />
{{#if this.currentUser.admin}}
<NavItem @route="adminSiteSettings" @label="admin.site_settings.title" />
<NavItem
@route="adminSiteSettings"
@label="admin.site_settings.title"
/>
{{/if}}
<NavItem @route="adminUsers" @label="admin.users.title" />
{{#if this.showGroups}}
@ -37,4 +40,4 @@
</div>
</div>
</div>
</AdminWrapper>
</AdminWrapper>

View File

@ -1,4 +1,9 @@
<DButton @class="btn-primary" @action={{route-action "new"}} @icon="plus" @label="admin.api.new_key" />
<DButton
@class="btn-primary"
@action={{route-action "new"}}
@icon="plus"
@label="admin.api.new_key"
/>
{{#if this.model}}
<LoadMore @selector=".api-keys tr" @action={{action "loadMore"}}>
@ -44,11 +49,26 @@
{{/if}}
</td>
<td class="key-controls">
<DButton @action={{route-action "show" k}} @icon="far-eye" @title="admin.api.show_details" />
<DButton
@action={{route-action "show" k}}
@icon="far-eye"
@title="admin.api.show_details"
/>
{{#if k.revoked_at}}
<DButton @action={{action "undoRevokeKey"}} @actionParam={{k}} @icon="undo" @title="admin.api.undo_revoke" />
<DButton
@action={{action "undoRevokeKey"}}
@actionParam={{k}}
@icon="undo"
@title="admin.api.undo_revoke"
/>
{{else}}
<DButton @class="btn-danger" @action={{action "revokeKey"}} @actionParam={{k}} @icon="times" @title="admin.api.revoke" />
<DButton
@class="btn-danger"
@action={{action "revokeKey"}}
@actionParam={{k}}
@icon="times"
@title="admin.api.revoke"
/>
{{/if}}
</td>
</tr>
@ -60,4 +80,4 @@
<ConditionalLoadingSpinner @condition={{this.loading}} />
{{else}}
<p>{{i18n "admin.api.none"}}</p>
{{/if}}
{{/if}}

View File

@ -12,28 +12,49 @@
{{i18n "admin.api.not_shown_again"}}
</AdminFormRow>
<AdminFormRow>
<DButton @icon="angle-right" @label="admin.api.continue" @action={{action "continue"}} @class="btn-primary" />
<DButton
@icon="angle-right"
@label="admin.api.continue"
@action={{action "continue"}}
@class="btn-primary"
/>
</AdminFormRow>
{{else}}
<AdminFormRow @label="admin.api.description">
<Input @value={{this.model.description}} maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} />
<Input
@value={{this.model.description}}
maxlength="255"
placeholder={{i18n "admin.api.description_placeholder"}}
/>
</AdminFormRow>
<AdminFormRow @label="admin.api.user_mode">
<ComboBox @content={{this.userModes}} @value={{this.userMode}} @onChange={{action "changeUserMode"}} />
<ComboBox
@content={{this.userModes}}
@value={{this.userMode}}
@onChange={{action "changeUserMode"}}
/>
</AdminFormRow>
{{#if this.showUserSelector}}
<AdminFormRow @label="admin.api.user">
<EmailGroupUserChooser @value={{this.model.username}} @onChange={{action "updateUsername"}} @options={{hash
<EmailGroupUserChooser
@value={{this.model.username}}
@onChange={{action "updateUsername"}}
@options={{hash
maximum=1
filterPlaceholder="admin.api.user_placeholder"
}} />
}}
/>
</AdminFormRow>
{{/if}}
<AdminFormRow @label="admin.api.scope_mode">
<ComboBox @content={{this.scopeModes}} @value={{this.scopeMode}} @onChange={{action "changeScopeMode"}} />
<ComboBox
@content={{this.scopeModes}}
@value={{this.scopeMode}}
@onChange={{action "changeScopeMode"}}
/>
{{#if (eq this.scopeMode "read_only")}}
<p>{{i18n "admin.api.scopes.descriptions.global.read"}}</p>
@ -67,16 +88,31 @@
<td><Input @type="checkbox" @checked={{act.selected}} /></td>
<td>
<div class="scope-name">{{act.name}}</div>
<span class="scope-tooltip" data-tooltip={{i18n (concat "admin.api.scopes.descriptions." resource "." act.key)}}>
<span
class="scope-tooltip"
data-tooltip={{i18n
(concat
"admin.api.scopes.descriptions." resource "." act.key
)
}}
>
{{d-icon "question-circle"}}
</span>
</td>
<td>
<DButton @icon="link" @action={{action "showURLs" act.urls}} @class="btn-info" />
<DButton
@icon="link"
@action={{action "showURLs" act.urls}}
@class="btn-info"
/>
</td>
<td>
{{#each act.params as |p|}}
<Input maxlength="255" @value={{get act p}} placeholder={{p}} />
<Input
maxlength="255"
@value={{get act p}}
placeholder={{p}}
/>
{{/each}}
</td>
</tr>
@ -86,6 +122,12 @@
</table>
{{/if}}
<DButton @icon="check" @label="admin.api.save" @action={{action "save"}} @class="btn-primary" @disabled={{this.saveDisabled}} />
<DButton
@icon="check"
@label="admin.api.save"
@action={{action "save"}}
@class="btn-primary"
@disabled={{this.saveDisabled}}
/>
{{/if}}
</div>
</div>

View File

@ -11,19 +11,39 @@
<AdminFormRow @label="admin.api.description">
{{#if this.editingDescription}}
<Input @value={{this.buffered.description}} maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} />
<Input
@value={{this.buffered.description}}
maxlength="255"
placeholder={{i18n "admin.api.description_placeholder"}}
/>
{{else}}
<span>
{{if this.model.description this.model.description (i18n "admin.api.no_description")}}
{{if
this.model.description
this.model.description
(i18n "admin.api.no_description")
}}
</span>
{{/if}}
<div class="controls">
{{#if this.editingDescription}}
<DButton @class="ok" @action={{action "saveDescription"}} @icon="check" />
<DButton @class="cancel" @action={{action "editDescription"}} @icon="times" />
<DButton
@class="ok"
@action={{action "saveDescription"}}
@icon="check"
/>
<DButton
@class="cancel"
@action={{action "editDescription"}}
@icon="times"
/>
{{else}}
<DButton @class="btn-default" @action={{action "editDescription"}} @icon="pencil-alt" />
<DButton
@class="btn-default"
@action={{action "editDescription"}}
@icon="pencil-alt"
/>
{{/if}}
</div>
</AdminFormRow>
@ -31,7 +51,8 @@
<AdminFormRow @label="admin.api.user">
{{#if this.model.user}}
<LinkTo @route="adminUser" @model={{this.model.user}}>
{{avatar this.model.user imageSize="small"}} {{this.model.user.username}}
{{avatar this.model.user imageSize="small"}}
{{this.model.user.username}}
</LinkTo>
{{else}}
{{i18n "admin.api.all_users"}}
@ -62,10 +83,27 @@
{{/if}}
<div class="controls">
{{#if this.model.revoked_at}}
<DButton @action={{action "undoRevokeKey"}} @actionParam={{this.model}} @icon="undo" @label="admin.api.undo_revoke" />
<DButton @action={{action "deleteKey"}} @actionParam={{this.model}} @icon="trash-alt" @label="admin.api.delete" @class="btn-danger" />
<DButton
@action={{action "undoRevokeKey"}}
@actionParam={{this.model}}
@icon="undo"
@label="admin.api.undo_revoke"
/>
<DButton
@action={{action "deleteKey"}}
@actionParam={{this.model}}
@icon="trash-alt"
@label="admin.api.delete"
@class="btn-danger"
/>
{{else}}
<DButton @class="btn-danger" @action={{action "revokeKey"}} @actionParam={{this.model}} @icon="times" @label="admin.api.revoke" />
<DButton
@class="btn-danger"
@action={{action "revokeKey"}}
@actionParam={{this.model}}
@icon="times"
@label="admin.api.revoke"
/>
{{/if}}
</div>
</AdminFormRow>
@ -90,12 +128,24 @@
{{scope.action}}
<span
class="scope-tooltip"
data-tooltip={{i18n (concat "admin.api.scopes.descriptions." scope.resource "." scope.key)}}>
data-tooltip={{i18n
(concat
"admin.api.scopes.descriptions."
scope.resource
"."
scope.key
)
}}
>
{{d-icon "question-circle"}}
</span>
</td>
<td>
<DButton @icon="link" @action={{action "showURLs" scope.urls}} @class="btn-info" />
<DButton
@icon="link"
@action={{action "showURLs" scope.urls}}
@class="btn-info"
/>
</td>
<td>
{{#each scope.parameters as |p|}}
@ -114,4 +164,4 @@
</tbody>
</table>
{{/if}}
</div>
</div>

View File

@ -5,4 +5,4 @@
<div class="admin-container">
{{outlet}}
</div>
</div>

View File

@ -1,18 +1,38 @@
<div class="backup-options">
{{#if this.localBackupStorage}}
<UppyBackupUploader @done={{route-action "uploadSuccess"}} @localBackupStorage={{this.localBackupStorage}} />
<UppyBackupUploader
@done={{route-action "uploadSuccess"}}
@localBackupStorage={{this.localBackupStorage}}
/>
{{else}}
<UppyBackupUploader @done={{route-action "remoteUploadSuccess"}} />
{{/if}}
{{#if this.site.isReadOnly}}
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{this.status.isOperationRunning}} @title="admin.backups.read_only.disable.title" @label="admin.backups.read_only.disable.label" />
<DButton
@class="btn-default"
@icon="far-eye"
@action={{action "toggleReadOnlyMode"}}
@disabled={{this.status.isOperationRunning}}
@title="admin.backups.read_only.disable.title"
@label="admin.backups.read_only.disable.label"
/>
{{else}}
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{this.status.isOperationRunning}} @title="admin.backups.read_only.enable.title" @label="admin.backups.read_only.enable.label" />
<DButton
@class="btn-default"
@icon="far-eye"
@action={{action "toggleReadOnlyMode"}}
@disabled={{this.status.isOperationRunning}}
@title="admin.backups.read_only.enable.title"
@label="admin.backups.read_only.enable.label"
/>
{{/if}}
<div class="backup-message">
{{#if this.status.restoreDisabled}}
<a href="site_settings/category/all_results?filter=allow_restore">{{d-icon "info-circle"}} {{i18n "admin.backups.operations.restore.is_disabled"}}</a>
<a href="site_settings/category/all_results?filter=allow_restore">{{d-icon
"info-circle"
}}
{{i18n "admin.backups.operations.restore.is_disabled"}}</a>
{{/if}}
</div>
</div>
@ -29,13 +49,49 @@
<td class="backup-size">{{human-size backup.size}}</td>
<td class="backup-controls">
<div>
<DButton @class="btn-default download" @action={{action "download"}} @actionParam={{backup}} @icon="download" @title="admin.backups.operations.download.title" @label="admin.backups.operations.download.label" />
<DButton
@class="btn-default download"
@action={{action "download"}}
@actionParam={{backup}}
@icon="download"
@title="admin.backups.operations.download.title"
@label="admin.backups.operations.download.label"
/>
{{#if this.status.isOperationRunning}}
<DButton @icon="far-trash-alt" @action={{route-action "destroyBackup"}} @actionParam={{backup}} @class="btn-danger" @disabled="true" @title="admin.backups.operations.is_running" />
<DButton @icon="play" @action={{route-action "startRestore"}} @actionParam={{backup}} @disabled={{this.status.restoreDisabled}} @class="btn-default" @title={{this.restoreTitle}} @label="admin.backups.operations.restore.label" />
<DButton
@icon="far-trash-alt"
@action={{route-action "destroyBackup"}}
@actionParam={{backup}}
@class="btn-danger"
@disabled="true"
@title="admin.backups.operations.is_running"
/>
<DButton
@icon="play"
@action={{route-action "startRestore"}}
@actionParam={{backup}}
@disabled={{this.status.restoreDisabled}}
@class="btn-default"
@title={{this.restoreTitle}}
@label="admin.backups.operations.restore.label"
/>
{{else}}
<DButton @icon="far-trash-alt" @action={{route-action "destroyBackup"}} @actionParam={{backup}} @class="btn-danger" @title="admin.backups.operations.destroy.title" />
<DButton @icon="play" @action={{route-action "startRestore"}} @actionParam={{backup}} @disabled={{this.status.restoreDisabled}} @class="btn-default btn-restore" @title={{this.restoreTitle}} @label="admin.backups.operations.restore.label" />
<DButton
@icon="far-trash-alt"
@action={{route-action "destroyBackup"}}
@actionParam={{backup}}
@class="btn-danger"
@title="admin.backups.operations.destroy.title"
/>
<DButton
@icon="play"
@action={{route-action "startRestore"}}
@actionParam={{backup}}
@disabled={{this.status.restoreDisabled}}
@class="btn-default btn-restore"
@title={{this.restoreTitle}}
@label="admin.backups.operations.restore.label"
/>
{{/if}}
</div>
</td>
@ -48,4 +104,4 @@
</tr>
{{/each}}
</tbody>
</table>
</table>

View File

@ -1 +1 @@
<AdminBackupsLogs @logs={{this.logs}} @status={{this.status}} />
<AdminBackupsLogs @logs={{this.logs}} @status={{this.status}} />

View File

@ -2,17 +2,39 @@
<div class="admin-controls">
<nav>
<ul class="nav nav-pills">
<NavItem @route="admin.backups.index" @label="admin.backups.menu.backups" />
<NavItem
@route="admin.backups.index"
@label="admin.backups.menu.backups"
/>
<NavItem @route="admin.backups.logs" @label="admin.backups.menu.logs" />
<PluginOutlet @name="downloader" @connectorTagName="div" />
<div class="admin-actions">
{{#if this.model.canRollback}}
<DButton @action={{route-action "rollback"}} @class="btn-default btn-rollback" @label="admin.backups.operations.rollback.label" @title="admin.backups.operations.rollback.title" @icon="ambulance" @disabled={{this.rollbackDisabled}} />
<DButton
@action={{route-action "rollback"}}
@class="btn-default btn-rollback"
@label="admin.backups.operations.rollback.label"
@title="admin.backups.operations.rollback.title"
@icon="ambulance"
@disabled={{this.rollbackDisabled}}
/>
{{/if}}
{{#if this.model.isOperationRunning}}
<DButton @action={{route-action "cancelOperation"}} @class="btn-danger" @title="admin.backups.operations.cancel.title" @label="admin.backups.operations.cancel.label" @icon="times" />
<DButton
@action={{route-action "cancelOperation"}}
@class="btn-danger"
@title="admin.backups.operations.cancel.title"
@label="admin.backups.operations.cancel.label"
@icon="times"
/>
{{else}}
<DButton @action={{route-action "showStartBackupModal"}} @class="btn-primary" @title="admin.backups.operations.backup.title" @label="admin.backups.operations.backup.label" @icon="rocket" />
<DButton
@action={{route-action "showStartBackupModal"}}
@class="btn-primary"
@title="admin.backups.operations.backup.title"
@label="admin.backups.operations.backup.label"
@icon="rocket"
/>
{{/if}}
</div>
</ul>
@ -24,4 +46,4 @@
<div class="admin-container">
{{outlet}}
</div>
</div>
</div>

View File

@ -1 +1 @@
<div class="ace">{{this.content}}</div>
<div class="ace">{{this.content}}</div>

View File

@ -5,4 +5,4 @@
{{/if}}
{{#if this.showLoadingSpinner}}
<div class="spinner small"></div>
{{/if}}
{{/if}}

View File

@ -1,7 +1,11 @@
<div class="field">{{i18n this.name}}</div>
<div class="value">
{{#if this.editing}}
<TextField @value={{this.buffer}} @autofocus="autofocus" @autocomplete="off" />
<TextField
@value={{this.buffer}}
@autofocus="autofocus"
@autocomplete="off"
/>
{{else}}
<a href {{on "click" this.edit}} class="inline-editable-field">
<span>{{this.value}}</span>
@ -10,9 +14,17 @@
</div>
<div class="controls">
{{#if this.editing}}
<DButton @class="btn-default" @action={{action "save"}} @label="admin.user_fields.save" />
<DButton
@class="btn-default"
@action={{action "save"}}
@label="admin.user_fields.save"
/>
<a href {{on "click" this.edit}}>{{i18n "cancel"}}</a>
{{else}}
<DButton @class="btn-default" @action={{action "edit"}} @icon="pencil-alt" />
<DButton
@class="btn-default"
@action={{action "edit"}}
@icon="pencil-alt"
/>
{{/if}}
</div>
</div>

View File

@ -11,4 +11,4 @@
{{else}}
{{yield}}
{{/if}}
</div>
</div>

View File

@ -4,4 +4,4 @@
{{yield}}
</ul>
</nav>
</div>
</div>

View File

@ -1,8 +1,14 @@
<div class="suspended-count {{this.suspendedCountClass}}" title={{i18n "admin.user.last_six_months"}}>
<div
class="suspended-count {{this.suspendedCountClass}}"
title={{i18n "admin.user.last_six_months"}}
>
<label>{{i18n "admin.user.suspended_count"}}</label>
<span>{{this.user.penalty_counts.suspended}}</span>
</div>
<div class="silenced-count {{this.silencedCountClass}}" title={{i18n "admin.user.last_six_months"}}>
<div
class="silenced-count {{this.silencedCountClass}}"
title={{i18n "admin.user.last_six_months"}}
>
<label>{{i18n "admin.user.silenced_count"}}</label>
<span>{{this.user.penalty_counts.silenced}}</span>
</div>
</div>

View File

@ -4,11 +4,15 @@
{{html-safe (i18n "admin.user.penalty_post_actions")}}
</div>
</label>
<ComboBox @value={{this.postAction}} @content={{this.penaltyActions}} @onChange={{action "penaltyChanged"}} />
<ComboBox
@value={{this.postAction}}
@content={{this.penaltyActions}}
@onChange={{action "penaltyChanged"}}
/>
</div>
{{#if this.editing}}
<div class="penalty-post-edit">
<Textarea @value={{this.postEdit}} class="post-editor" />
</div>
{{/if}}
{{/if}}

View File

@ -1,18 +1,40 @@
<div class="penalty-reason-controls">
{{#if (eq @penaltyType "suspend")}}
<label class="suspend-reason-title">{{i18n "admin.user.suspend_reason_title"}}</label>
<ComboBox @content={{this.reasons}} @value={{this.selectedReason}} @class="suspend-reason" @onChange={{this.setSelectedReason}} />
<label class="suspend-reason-title">{{i18n
"admin.user.suspend_reason_title"
}}</label>
<ComboBox
@content={{this.reasons}}
@value={{this.selectedReason}}
@class="suspend-reason"
@onChange={{this.setSelectedReason}}
/>
{{#if this.isCustomReason}}
<TextField @value={{this.customReason}} @class="suspend-reason" @onChange={{this.setCustomReason}} />
<TextField
@value={{this.customReason}}
@class="suspend-reason"
@onChange={{this.setCustomReason}}
/>
{{/if}}
{{else if (eq @penaltyType "silence")}}
<label class="silence-reason-title">{{html-safe (i18n "admin.user.silence_reason_label")}}</label>
<TextField @value={{this.customReason}} @class="silence-reason" @onChange={{this.setCustomReason}} @placeholderKey="admin.user.silence_reason_placeholder" />
<label class="silence-reason-title">{{html-safe
(i18n "admin.user.silence_reason_label")
}}</label>
<TextField
@value={{this.customReason}}
@class="silence-reason"
@onChange={{this.setCustomReason}}
@placeholderKey="admin.user.silence_reason_placeholder"
/>
{{/if}}
</div>
<div class="penalty-message-controls">
<label>{{i18n "admin.user.suspend_message"}}</label>
<Textarea @value={{this.message}} class="suspend-message" placeholder={{i18n "admin.user.suspend_message_placeholder"}} />
</div>
<Textarea
@value={{this.message}}
class="suspend-message"
placeholder={{i18n "admin.user.suspend_message_placeholder"}}
/>
</div>

View File

@ -1,6 +1,11 @@
<div class="penalty-similar-users">
<p class="alert alert-warning">
{{html-safe (i18n "admin.user.other_matches" (hash count=this.user.similar_users_count username=this.user.username))}}
{{html-safe
(i18n
"admin.user.other_matches"
(hash count=this.user.similar_users_count username=this.user.username)
)
}}
</p>
<table class="table">
@ -20,7 +25,11 @@
{{#each this.user.similar_users as |user|}}
<tr>
<td>
<Input @type="checkbox" disabled={{not (get user this.penaltyField)}} {{on "click" (action "selectUserId" user.id)}} />
<Input
@type="checkbox"
disabled={{not (get user this.penaltyField)}}
{{on "click" (action "selectUserId" user.id)}}
/>
</td>
<td>{{avatar user imageSize="small"}} {{user.username}}</td>
<td>{{format-duration user.last_seen_age}}</td>
@ -32,4 +41,4 @@
{{/each}}
</tbody>
</table>
</div>
</div>

View File

@ -1,3 +1,3 @@
<div class="chart-canvas-container">
<canvas class="chart-canvas"></canvas>
</div>
</div>

View File

@ -7,18 +7,29 @@
<div class="cell value today-count">{{number this.model.todayCount}}</div>
<div class="cell value yesterday-count {{this.model.yesterdayTrend}}" title={{this.model.yesterdayCountTitle}}>
{{number this.model.yesterdayCount}} {{d-icon this.model.yesterdayTrendIcon}}
<div
class="cell value yesterday-count {{this.model.yesterdayTrend}}"
title={{this.model.yesterdayCountTitle}}
>
{{number this.model.yesterdayCount}}
{{d-icon this.model.yesterdayTrendIcon}}
</div>
<div class="cell value sevendays-count {{this.model.sevenDaysTrend}}" title={{this.model.sevenDaysCountTitle}}>
{{number this.model.lastSevenDaysCount}} {{d-icon this.model.sevenDaysTrendIcon}}
<div
class="cell value sevendays-count {{this.model.sevenDaysTrend}}"
title={{this.model.sevenDaysCountTitle}}
>
{{number this.model.lastSevenDaysCount}}
{{d-icon this.model.sevenDaysTrendIcon}}
</div>
<div class="cell value thirty-days-count {{this.model.thirtyDaysTrend}}" title={{this.model.thirtyDaysCountTitle}}>
<div
class="cell value thirty-days-count {{this.model.thirtyDaysTrend}}"
title={{this.model.thirtyDaysCountTitle}}
>
{{number this.model.lastThirtyDaysCount}}
{{#if this.model.canDisplayTrendIcon}}
{{d-icon this.model.thirtyDaysTrendIcon}}
{{/if}}
</div>
</div>

View File

@ -7,18 +7,30 @@
<td class="value">{{number this.report.todayCount}}</td>
<td class="value {{this.report.yesterdayTrend}}" title={{this.report.yesterdayCountTitle}}>
{{number this.report.yesterdayCount}} {{d-icon this.report.yesterdayTrendIcon}}
<td
class="value {{this.report.yesterdayTrend}}"
title={{this.report.yesterdayCountTitle}}
>
{{number this.report.yesterdayCount}}
{{d-icon this.report.yesterdayTrendIcon}}
</td>
<td class="value {{this.report.sevenDaysTrend}}" title={{this.report.sevenDaysCountTitle}}>
{{number this.report.lastSevenDaysCount}} {{d-icon this.report.sevenDaysTrendIcon}}
<td
class="value {{this.report.sevenDaysTrend}}"
title={{this.report.sevenDaysCountTitle}}
>
{{number this.report.lastSevenDaysCount}}
{{d-icon this.report.sevenDaysTrendIcon}}
</td>
<td class="value {{this.report.thirtyDaysTrend}}" title={{this.report.thirtyDaysCountTitle}}>
{{number this.report.lastThirtyDaysCount}} {{d-icon this.report.thirtyDaysTrendIcon}}
<td
class="value {{this.report.thirtyDaysTrend}}"
title={{this.report.thirtyDaysCountTitle}}
>
{{number this.report.lastThirtyDaysCount}}
{{d-icon this.report.thirtyDaysTrendIcon}}
</td>
{{#if this.allTime}}
<td class="value">{{number this.report.total}}</td>
{{/if}}
{{/if}}

View File

@ -12,4 +12,4 @@
</span>
</a>
{{/each}}
</div>
</div>

View File

@ -1,6 +1,8 @@
<td class="title"><a href={{this.report.reportUrl}}>{{this.report.title}}</a></td>
<td class="title"><a
href={{this.report.reportUrl}}
>{{this.report.title}}</a></td>
<td class="value">{{this.report.todayCount}}</td>
<td class="value">{{this.report.yesterdayCount}}</td>
<td class="value">{{this.report.sevenDaysAgoCount}}</td>
<td class="value">{{this.report.thirtyDaysAgoCount}}</td>
<td class="value"></td>
<td class="value"></td>

View File

@ -1,3 +1,3 @@
<div class="chart-canvas-container">
<canvas class="chart-canvas"></canvas>
</div>
</div>

View File

@ -1,33 +1,54 @@
{{#if this.showBackupStats}}
<div class="backups">
<h3 class="storage-stats-title">
<a href={{get-url "/admin/backups"}}>{{d-icon "archive"}} {{i18n "admin.dashboard.backups"}}</a>
<a href={{get-url "/admin/backups"}}>{{d-icon "archive"}}
{{i18n "admin.dashboard.backups"}}</a>
</h3>
<p>
{{#if this.backupStats.free_bytes}}
{{i18n "admin.dashboard.space_used_and_free" usedSize=this.usedBackupSpace freeSize=this.freeBackupSpace}}
{{i18n
"admin.dashboard.space_used_and_free"
usedSize=this.usedBackupSpace
freeSize=this.freeBackupSpace
}}
{{else}}
{{i18n "admin.dashboard.space_used" usedSize=this.usedBackupSpace}}
{{/if}}
<br>
{{i18n "admin.dashboard.backup_count" count=this.backupStats.count location=this.backupLocationName}}
<br />
{{i18n
"admin.dashboard.backup_count"
count=this.backupStats.count
location=this.backupLocationName
}}
{{#if this.backupStats.last_backup_taken_at}}
<br>
{{html-safe (i18n "admin.dashboard.lastest_backup" date=(format-date this.backupStats.last_backup_taken_at leaveAgo="true"))}}
<br />
{{html-safe
(i18n
"admin.dashboard.lastest_backup"
date=(format-date
this.backupStats.last_backup_taken_at leaveAgo="true"
)
)
}}
{{/if}}
</p>
</div>
{{/if}}
<div class="uploads">
<h3 class="storage-stats-title">{{d-icon "upload"}} {{i18n "admin.dashboard.uploads"}}</h3>
<h3 class="storage-stats-title">{{d-icon "upload"}}
{{i18n "admin.dashboard.uploads"}}</h3>
<p>
{{#if this.uploadStats.free_bytes}}
{{i18n "admin.dashboard.space_used_and_free" usedSize=this.usedUploadSpace freeSize=this.freeUploadSpace}}
{{i18n
"admin.dashboard.space_used_and_free"
usedSize=this.usedUploadSpace
freeSize=this.freeUploadSpace
}}
{{else}}
{{i18n "admin.dashboard.space_used" usedSize=this.usedUploadSpace}}
{{/if}}
</p>
</div>
</div>

View File

@ -1 +1 @@
{{html-safe this.formattedValue}}
{{html-safe this.formattedValue}}

View File

@ -1,9 +1,13 @@
{{#if this.showSortingUI}}
<DButton @action={{this.sortByLabel}} @icon={{this.sortIcon}} @class="sort-btn" />
<DButton
@action={{this.sortByLabel}}
@icon={{this.sortIcon}}
@class="sort-btn"
/>
{{/if}}
{{#if this.label.htmlTitle}}
<span class="title">{{html-safe this.label.htmlTitle}}</span>
{{else}}
<span class="title">{{this.label.title}}</span>
{{/if}}
{{/if}}

View File

@ -1,3 +1,7 @@
{{#each this.labels as |label|}}
<AdminReportTableCell @label={{label}} @data={{this.data}} @options={{this.options}} />
{{/each}}
<AdminReportTableCell
@label={{label}}
@data={{this.data}}
@options={{this.options}}
/>
{{/each}}

View File

@ -3,7 +3,13 @@
<tr>
{{#if this.model.computedLabels}}
{{#each this.model.computedLabels as |label|}}
<AdminReportTableHeader @showSortingUI={{this.showSortingUI}} @currentSortDirection={{this.sortDirection}} @currentSortLabel={{this.sortLabel}} @label={{label}} @sortByLabel={{action "sortByLabel" label}} />
<AdminReportTableHeader
@showSortingUI={{this.showSortingUI}}
@currentSortDirection={{this.sortDirection}}
@currentSortLabel={{this.sortLabel}}
@label={{label}}
@sortByLabel={{action "sortByLabel" label}}
/>
{{/each}}
{{else}}
{{#each this.model.data as |data|}}
@ -14,7 +20,11 @@
</thead>
<tbody>
{{#each this.paginatedData as |data|}}
<AdminReportTableRow @data={{data}} @labels={{this.model.computedLabels}} @options={{this.options}} />
<AdminReportTableRow
@data={{data}}
@labels={{this.model.computedLabels}}
@options={{this.options}}
/>
{{/each}}
{{#if this.showTotalForSample}}
@ -40,7 +50,9 @@
</tr>
<tr class="admin-report-table-row">
<td class="admin-report-table-cell date x">—</td>
<td class="admin-report-table-cell number y">{{number this.model.total}}</td>
<td class="admin-report-table-cell number y">{{number
this.model.total
}}</td>
</tr>
{{/if}}
@ -52,7 +64,9 @@
</tr>
<tr class="admin-report-table-row">
<td class="admin-report-table-cell date x">—</td>
<td class="admin-report-table-cell number y">{{number this.averageForSample}}</td>
<td class="admin-report-table-cell number y">{{number
this.averageForSample
}}</td>
</tr>
{{/if}}
</tbody>
@ -60,6 +74,11 @@
<div class="pagination">
{{#each this.pages as |pageState|}}
<DButton @translatedLabel={{pageState.page}} @action={{action "changePage"}} @actionParam={{pageState.index}} @class={{pageState.class}} />
<DButton
@translatedLabel={{pageState.page}}
@action={{action "changePage"}}
@actionParam={{pageState.index}}
@class={{pageState.class}}
/>
{{/each}}
</div>
</div>

View File

@ -1,6 +1,16 @@
<td class="title">{{this.report.title}}</td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="newuser">{{number (value-at-tl this.report.data level="0")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="basic">{{number (value-at-tl this.report.data level="1")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="member">{{number (value-at-tl this.report.data level="2")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="regular">{{number (value-at-tl this.report.data level="3")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="leader">{{number (value-at-tl this.report.data level="4")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="newuser">{{number
(value-at-tl this.report.data level="0")
}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="basic">{{number
(value-at-tl this.report.data level="1")
}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="member">{{number
(value-at-tl this.report.data level="2")
}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="regular">{{number
(value-at-tl this.report.data level="3")
}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="leader">{{number
(value-at-tl this.report.data level="4")
}}</LinkTo></td>

View File

@ -25,11 +25,20 @@
{{#if this.model.description}}
{{#if this.model.description_link}}
<a target="_blank" rel="noopener noreferrer" href={{this.model.description_link}} class="info" data-tooltip={{this.model.description}}>
<a
target="_blank"
rel="noopener noreferrer"
href={{this.model.description_link}}
class="info"
data-tooltip={{this.model.description}}
>
{{d-icon "question-circle"}}
</a>
{{else}}
<span class="info" data-tooltip={{this.model.description}}>
<span
class="info"
data-tooltip={{this.model.description}}
>
{{d-icon "question-circle"}}
</span>
{{/if}}
@ -43,9 +52,13 @@
<div class="trend {{this.model.trend}}">
<span class="value" title={{this.model.trendTitle}}>
{{#if this.model.average}}
{{number this.model.currentAverage}}{{#if this.model.percent}}%{{/if}}
{{number this.model.currentAverage}}{{#if
this.model.percent
}}%{{/if}}
{{else}}
{{number this.model.currentTotal noTitle="true"}}{{#if this.model.percent}}%{{/if}}
{{number this.model.currentTotal noTitle="true"}}{{#if
this.model.percent
}}%{{/if}}
{{/if}}
{{#if this.model.trendIcon}}
@ -83,10 +96,17 @@
{{else}}
{{#if this.hasData}}
{{#if this.currentMode}}
{{component this.modeComponent model=this.model options=this.options}}
{{component
this.modeComponent
model=this.model
options=this.options
}}
{{#if this.model.relatedReport}}
<AdminReport @showFilteringUI={{false}} @dataSourceName={{this.model.relatedReport.type}} />
<AdminReport
@showFilteringUI={{false}}
@dataSourceName={{this.model.relatedReport.type}}
/>
{{/if}}
{{/if}}
{{else}}
@ -102,7 +122,8 @@
<a href={{this.model.reportUrl}} class="report-url">
<span>
{{#if this.model.title}}
{{this.model.title}}
{{this.model.title}}
{{/if}}
{{i18n "admin.dashboard.reports.no_data"}}
</span>
@ -121,7 +142,12 @@
{{#if this.showModes}}
<div class="modes">
{{#each this.displayedModes as |displayedMode|}}
<DButton @action={{action "onChangeMode"}} @actionParam={{displayedMode.mode}} @class={{displayedMode.cssClass}} @icon={{displayedMode.icon}} />
<DButton
@action={{action "onChangeMode"}}
@actionParam={{displayedMode.mode}}
@class={{displayedMode.cssClass}}
@icon={{displayedMode.icon}}
/>
{{/each}}
</div>
{{/if}}
@ -134,7 +160,12 @@
{{/if}}
<div class="chart-groupings">
{{#each this.chartGroupings as |chartGrouping|}}
<DButton @label={{chartGrouping.label}} @action={{action "changeGrouping" chartGrouping.id}} @class={{chartGrouping.class}} @disabled={{chartGrouping.disabled}} />
<DButton
@label={{chartGrouping.label}}
@action={{action "changeGrouping" chartGrouping.id}}
@class={{chartGrouping.class}}
@disabled={{chartGrouping.disabled}}
/>
{{/each}}
</div>
{{/if}}
@ -146,7 +177,13 @@
</span>
<div class="input">
<DateTimeInputRange @from={{this.startDate}} @to={{this.endDate}} @onChange={{action "onChangeDateRange"}} @showFromTime={{false}} @showToTime={{false}} />
<DateTimeInputRange
@from={{this.startDate}}
@to={{this.endDate}}
@onChange={{action "onChangeDateRange"}}
@showFromTime={{false}}
@showToTime={{false}}
/>
</div>
</div>
{{/if}}
@ -154,7 +191,11 @@
{{#each this.model.available_filters as |filter|}}
<div class="control">
<span class="label">
{{i18n (concat "admin.dashboard.reports.filters." filter.id ".label")}}
{{i18n
(concat
"admin.dashboard.reports.filters." filter.id ".label"
)
}}
</span>
<div class="input">
@ -162,21 +203,32 @@
(concat "report-filters/" filter.type)
model=this.model
filter=filter
applyFilter=(action "applyFilter")}}
applyFilter=(action "applyFilter")
}}
</div>
</div>
{{/each}}
<div class="control">
<div class="input">
<DButton @class="btn-default export-csv-btn" @action={{action "exportCsv"}} @label="admin.export_csv.button_text" @icon="download" />
<DButton
@class="btn-default export-csv-btn"
@action={{action "exportCsv"}}
@label="admin.export_csv.button_text"
@icon="download"
/>
</div>
</div>
{{#if this.showRefresh}}
<div class="control">
<div class="input">
<DButton @class="refresh-report-btn btn-primary" @action={{action "refreshReport"}} @label="admin.dashboard.reports.refresh_report" @icon="sync" />
<DButton
@class="refresh-report-btn btn-primary"
@action={{action "refreshReport"}}
@label="admin.dashboard.reports.refresh_report"
@icon="sync"
/>
</div>
</div>
{{/if}}
@ -189,4 +241,4 @@
{{html-safe this.disabledLabel}}
</div>
{{/if}}
{{/unless}}
{{/unless}}

View File

@ -3,7 +3,13 @@
<ul class="nav nav-pills target">
{{#each this.visibleTargets as |target|}}
<li>
<LinkTo @route={{this.editRouteName}} @models={{array this.theme.id target.name this.fieldName}} @replace={{true}} title={{this.field.title}} class={{if target.edited "edited" "blank"}}>
<LinkTo
@route={{this.editRouteName}}
@models={{array this.theme.id target.name this.fieldName}}
@replace={{true}}
title={{this.field.title}}
class={{if target.edited "edited" "blank"}}
>
{{#if target.error}}{{d-icon "exclamation-triangle"}}{{/if}}
{{#if target.icon}}{{d-icon target.icon}}{{/if}}
{{i18n (concat "admin.customize.theme." target.name)}}
@ -13,18 +19,34 @@
{{#if this.allowAdvanced}}
<li>
<a {{on "click" this.toggleShowAdvanced}}
<a
{{on "click" this.toggleShowAdvanced}}
href
title={{i18n (concat "admin.customize.theme." (if this.showAdvanced "hide_advanced" "show_advanced"))}}
class="no-text">
{{d-icon (if this.showAdvanced "angle-double-left" "angle-double-right")}}
title={{i18n
(concat
"admin.customize.theme."
(if this.showAdvanced "hide_advanced" "show_advanced")
)
}}
class="no-text"
>
{{d-icon
(if this.showAdvanced "angle-double-left" "angle-double-right")
}}
</a>
</li>
{{/if}}
<li class="spacer"></li>
<li>
<label>
<Input @type="checkbox" @checked={{this.onlyOverridden}} {{on "click" (action "onlyOverriddenChanged" value="target.checked")}} />
<Input
@type="checkbox"
@checked={{this.onlyOverridden}}
{{on
"click"
(action "onlyOverriddenChanged" value="target.checked")
}}
/>
{{i18n "admin.customize.theme.hide_unused_fields"}}
</label>
</li>
@ -37,7 +59,13 @@
<ul class="nav nav-pills fields">
{{#each this.visibleFields as |field|}}
<li>
<LinkTo @route={{this.editRouteName}} @models={{array this.theme.id this.currentTargetName field.name}} @replace={{true}} title={{field.title}} class={{if field.edited "edited" "blank"}}>
<LinkTo
@route={{this.editRouteName}}
@models={{array this.theme.id this.currentTargetName field.name}}
@replace={{true}}
title={{field.title}}
class={{if field.edited "edited" "blank"}}
>
{{#if field.error}}{{d-icon "exclamation-triangle"}}{{/if}}
{{#if field.icon}}{{d-icon field.icon}}{{/if}}
{{field.translatedName}}
@ -48,9 +76,22 @@
{{#if this.showAddField}}
<li>
{{#if this.addingField}}
<Input @type={{this.text}} @value={{this.newFieldName}} @enter={{action "addField"}} @escape-press={{action "cancelAddField"}} />
<DButton @class="ok" @action={{action "addField" this.newFieldName}} @icon="check" />
<DButton @class="cancel" @action={{action "cancelAddField"}} @icon="times" />
<Input
@type={{this.text}}
@value={{this.newFieldName}}
@enter={{action "addField"}}
@escape-press={{action "cancelAddField"}}
/>
<DButton
@class="ok"
@action={{action "addField" this.newFieldName}}
@icon="check"
/>
<DButton
@class="cancel"
@action={{action "cancelAddField"}}
@icon="times"
/>
{{else}}
<a href {{on "click" this.toggleAddField}} class="no-text">
{{d-icon "plus"}}
@ -77,4 +118,13 @@
<pre class="field-warning">{{html-safe this.warning}}</pre>
{{/if}}
<AceEditor @content={{this.activeSection}} @editorId={{this.editorId}} @mode={{this.activeSectionMode}} @autofocus="true" @placeholder={{this.placeholder}} @htmlPlaceholder={{true}} @save={{action "save"}} @setWarning={{action "setWarning"}} />
<AceEditor
@content={{this.activeSection}}
@editorId={{this.editorId}}
@mode={{this.activeSectionMode}}
@autofocus="true"
@placeholder={{this.placeholder}}
@htmlPlaceholder={{true}}
@save={{action "save"}}
@setWarning={{action "setWarning"}}
/>

View File

@ -1,15 +1,27 @@
<div class="user-field">
{{#if (or this.isEditing (not this.userField.id))}}
<AdminFormRow @label="admin.user_fields.type">
<ComboBox @content={{this.fieldTypes}} @value={{this.buffered.field_type}} @onChange={{action (mut this.buffered.field_type)}} />
<ComboBox
@content={{this.fieldTypes}}
@value={{this.buffered.field_type}}
@onChange={{action (mut this.buffered.field_type)}}
/>
</AdminFormRow>
<AdminFormRow @label="admin.user_fields.name">
<Input @value={{this.buffered.name}} class="user-field-name" maxlength="255" />
<Input
@value={{this.buffered.name}}
class="user-field-name"
maxlength="255"
/>
</AdminFormRow>
<AdminFormRow @label="admin.user_fields.description">
<Input @value={{this.buffered.description}} class="user-field-desc" maxlength="255" />
<Input
@value={{this.buffered.description}}
class="user-field-desc"
maxlength="255"
/>
</AdminFormRow>
{{#if this.bufferedFieldType.hasOptions}}
@ -19,44 +31,84 @@
{{/if}}
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{this.buffered.editable}} /> <span>{{i18n "admin.user_fields.editable.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.editable}} />
<span>{{i18n "admin.user_fields.editable.title"}}</span>
</AdminFormRow>
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{this.buffered.required}} /> <span>{{i18n "admin.user_fields.required.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.required}} />
<span>{{i18n "admin.user_fields.required.title"}}</span>
</AdminFormRow>
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{this.buffered.show_on_profile}} /> <span>{{i18n "admin.user_fields.show_on_profile.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.show_on_profile}} />
<span>{{i18n "admin.user_fields.show_on_profile.title"}}</span>
</AdminFormRow>
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{this.buffered.show_on_user_card}} /> <span>{{i18n "admin.user_fields.show_on_user_card.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.show_on_user_card}} />
<span>{{i18n "admin.user_fields.show_on_user_card.title"}}</span>
</AdminFormRow>
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{this.buffered.searchable}} /> <span>{{i18n "admin.user_fields.searchable.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.searchable}} />
<span>{{i18n "admin.user_fields.searchable.title"}}</span>
</AdminFormRow>
<AdminFormRow>
<DButton @action={{action "save"}} @class="btn-primary save" @icon="check" @label="admin.user_fields.save" />
<DButton @action={{action "cancel"}} @class="btn-danger cancel" @icon="times" @label="admin.user_fields.cancel" />
<DButton
@action={{action "save"}}
@class="btn-primary save"
@icon="check"
@label="admin.user_fields.save"
/>
<DButton
@action={{action "cancel"}}
@class="btn-danger cancel"
@icon="times"
@label="admin.user_fields.cancel"
/>
</AdminFormRow>
{{else}}
<div class="row">
<div class="form-display">
<b class="name">{{this.userField.name}}</b>
<br>
<span class="description">{{html-safe this.userField.description}}</span>
<br />
<span class="description">{{html-safe
this.userField.description
}}</span>
</div>
<div class="form-display field-type">{{this.fieldName}}</div>
<div class="form-element controls">
<DButton @action={{action "edit"}} @class="btn-default edit" @icon="pencil-alt" @label="admin.user_fields.edit" />
<DButton @action={{this.destroyAction}} @actionParam={{this.userField}} @class="btn-danger cancel" @icon="far-trash-alt" @label="admin.user_fields.delete" />
<DButton @action={{this.moveUpAction}} @actionParam={{this.userField}} @class="btn-default" @icon="arrow-up" @disabled={{this.cantMoveUp}} />
<DButton @action={{this.moveDownAction}} @actionParam={{this.userField}} @class="btn-default" @icon="arrow-down" @disabled={{this.cantMoveDown}} />
<DButton
@action={{action "edit"}}
@class="btn-default edit"
@icon="pencil-alt"
@label="admin.user_fields.edit"
/>
<DButton
@action={{this.destroyAction}}
@actionParam={{this.userField}}
@class="btn-danger cancel"
@icon="far-trash-alt"
@label="admin.user_fields.delete"
/>
<DButton
@action={{this.moveUpAction}}
@actionParam={{this.userField}}
@class="btn-default"
@icon="arrow-up"
@disabled={{this.cantMoveUp}}
/>
<DButton
@action={{this.moveDownAction}}
@actionParam={{this.userField}}
@class="btn-default"
@icon="arrow-down"
@disabled={{this.cantMoveDown}}
/>
</div>
</div>
<div class="row">{{this.flags}}</div>
{{/if}}
</div>
</div>

View File

@ -1,6 +1,12 @@
<span role="button" onclick={{action "deleteWord"}} class="delete-word-record">{{d-icon "times"}}</span> {{this.word.word}}
<span
role="button"
onclick={{action "deleteWord"}}
class="delete-word-record"
>{{d-icon "times"}}</span>
{{this.word.word}}
{{#if (or this.isReplace this.isLink)}}
&rarr; <span class="replacement">{{this.word.replacement}}</span>
&rarr;
<span class="replacement">{{this.word.replacement}}</span>
{{else if this.isTag}}
&rarr;
{{#each this.tags as |tag|}}
@ -8,5 +14,7 @@
{{/each}}
{{/if}}
{{#if this.isCaseSensitive}}
<span class="case-sensitive">{{i18n "admin.watched_words.case_sensitive"}}</span>
{{/if}}
<span class="case-sensitive">{{i18n
"admin.watched_words.case_sensitive"
}}</span>
{{/if}}

View File

@ -3,11 +3,15 @@
<div class="new-feature-content">
<div class="header">
{{#if this.item.link}}
<a href={{this.item.link}} target="_blank" rel="noopener noreferrer">{{this.item.title}}</a>
<a
href={{this.item.link}}
target="_blank"
rel="noopener noreferrer"
>{{this.item.title}}</a>
{{else}}
{{this.item.title}}
{{/if}}
</div>
<div class="feature-description">{{this.item.description}}</div>
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
{{#if this.newFeatures}}
<div class="section-title">
<h2>{{replace-emoji (i18n "admin.dashboard.new_features.title") }}</h2>
<h2>{{replace-emoji (i18n "admin.dashboard.new_features.title")}}</h2>
</div>
<div class="section-body {{this.columnCountClass}}">
@ -10,10 +10,19 @@
</div>
<div class="section-footer">
{{#if this.releaseNotesLink}}
<a rel="noopener noreferrer" target="_blank" href={{this.releaseNotesLink}} class="btn btn-primary new-features-release-notes">
<a
rel="noopener noreferrer"
target="_blank"
href={{this.releaseNotesLink}}
class="btn btn-primary new-features-release-notes"
>
{{i18n "admin.dashboard.new_features.learn_more"}}
</a>
{{/if}}
<DButton @label="admin.dashboard.new_features.dismiss" @class="btn-default new-features-dismiss" @action={{this.dismissNewFeatures}} />
<DButton
@label="admin.dashboard.new_features.dismiss"
@class="btn-default new-features-dismiss"
@action={{this.dismissNewFeatures}}
/>
</div>
{{/if}}
{{/if}}

View File

@ -13,8 +13,15 @@
<div class="problem-messages priority-high">
<ul>
{{#each this.highPriorityProblems as |problem|}}
<li class={{concat "dashboard-problem " "priority-" problem.priority}}>
{{d-icon "exclamation-triangle"}} {{html-safe problem.message}}
<li
class={{concat
"dashboard-problem "
"priority-"
problem.priority
}}
>
{{d-icon "exclamation-triangle"}}
{{html-safe problem.message}}
</li>
{{/each}}
</ul>
@ -24,16 +31,28 @@
<div class="problem-messages priority-low">
<ul>
{{#each this.lowPriorityProblems as |problem|}}
<li class={{concat "dashboard-problem " "priority-" problem.priority}}>{{html-safe problem.message}}</li>
<li
class={{concat
"dashboard-problem "
"priority-"
problem.priority
}}
>{{html-safe problem.message}}</li>
{{/each}}
</ul>
</div>
<p class="actions">
<DButton @action={{this.refreshProblems}} @class="btn-default" @icon="sync" @label="admin.dashboard.refresh_problems" />
{{i18n "admin.dashboard.last_checked"}}: {{this.problemsTimestamp}}
<DButton
@action={{this.refreshProblems}}
@class="btn-default"
@icon="sync"
@label="admin.dashboard.refresh_problems"
/>
{{i18n "admin.dashboard.last_checked"}}:
{{this.problemsTimestamp}}
</p>
</ConditionalLoadingSection>
</div>
</div>
{{/if}}
{{/if}}

View File

@ -2,17 +2,35 @@
<div class="admin-controls">
<nav>
<ul class="nav nav-pills">
<li><LinkTo @route="adminCustomizeEmailStyle.edit" @model="html" @replace={{true}}>{{i18n "admin.customize.email_style.html"}}</LinkTo></li>
<li><LinkTo @route="adminCustomizeEmailStyle.edit" @model="css" @replace={{true}}>{{i18n "admin.customize.email_style.css"}}</LinkTo></li>
<li><LinkTo
@route="adminCustomizeEmailStyle.edit"
@model="html"
@replace={{true}}
>{{i18n "admin.customize.email_style.html"}}</LinkTo></li>
<li><LinkTo
@route="adminCustomizeEmailStyle.edit"
@model="css"
@replace={{true}}
>{{i18n "admin.customize.email_style.css"}}</LinkTo></li>
</ul>
</nav>
</div>
</div>
<AceEditor @content={{this.editorContents}} @mode={{this.currentEditorMode}} @editorId={{this.editorId}} @save={{action "save"}} />
<AceEditor
@content={{this.editorContents}}
@mode={{this.currentEditorMode}}
@editorId={{this.editorId}}
@save={{action "save"}}
/>
<div class="admin-footer">
<div class="buttons">
<DButton @action={{action "reset"}} @disabled={{this.resetDisabled}} @class="btn-default" @label="admin.customize.email_style.reset" />
<DButton
@action={{action "reset"}}
@disabled={{this.resetDisabled}}
@class="btn-default"
@label="admin.customize.email_style.reset"
/>
</div>
</div>
</div>

View File

@ -1,31 +1,73 @@
{{#if this.editing}}
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.host"}}</div>
<Input @value={{this.buffered.host}} placeholder="example.com" @enter={{action "save"}} class="host-name" autofocus={{true}} />
<Input
@value={{this.buffered.host}}
placeholder="example.com"
@enter={{action "save"}}
class="host-name"
autofocus={{true}}
/>
</td>
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.class_name"}}</div>
<Input @value={{this.buffered.class_name}} placeholder="class" @enter={{action "save"}} class="class-name" />
<Input
@value={{this.buffered.class_name}}
placeholder="class"
@enter={{action "save"}}
class="class-name"
/>
</td>
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>
<Input @value={{this.buffered.allowed_paths}} placeholder="/blog/.*" @enter={{action "save"}} class="path-allowlist" />
<Input
@value={{this.buffered.allowed_paths}}
placeholder="/blog/.*"
@enter={{action "save"}}
class="path-allowlist"
/>
</td>
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.category"}}</div>
<CategoryChooser @value={{this.categoryId}} @class="small" @onChange={{action (mut this.categoryId)}} />
<CategoryChooser
@value={{this.categoryId}}
@class="small"
@onChange={{action (mut this.categoryId)}}
/>
</td>
<td class="editing-controls">
<DButton @icon="check" @action={{action "save"}} @class="btn-primary" @disabled={{this.cantSave}} />
<DButton @icon="times" @action={{action "cancel"}} @class="btn-danger" @disabled={{this.host.isSaving}} />
<DButton
@icon="check"
@action={{action "save"}}
@class="btn-primary"
@disabled={{this.cantSave}}
/>
<DButton
@icon="times"
@action={{action "cancel"}}
@class="btn-danger"
@disabled={{this.host.isSaving}}
/>
</td>
{{else}}
<td><div class="label">{{i18n "admin.embedding.host"}}</div>{{this.host.host}}</td>
<td><div class="label">{{i18n "admin.embedding.class_name"}}</div>{{this.host.class_name}}</td>
<td><div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>{{this.host.allowed_paths}}</td>
<td><div class="label">{{i18n "admin.embedding.category"}}</div>{{category-badge this.host.category allowUncategorized=true}}</td>
<td><div class="label">{{i18n
"admin.embedding.host"
}}</div>{{this.host.host}}</td>
<td><div class="label">{{i18n
"admin.embedding.class_name"
}}</div>{{this.host.class_name}}</td>
<td><div class="label">{{i18n
"admin.embedding.allowed_paths"
}}</div>{{this.host.allowed_paths}}</td>
<td><div class="label">{{i18n
"admin.embedding.category"
}}</div>{{category-badge this.host.category allowUncategorized=true}}</td>
<td class="controls">
<DButton @icon="pencil-alt" @action={{action "edit"}} />
<DButton @icon="far-trash-alt" @action={{action "delete"}} @class="btn-danger" />
<DButton
@icon="far-trash-alt"
@action={{action "delete"}}
@class="btn-danger"
/>
</td>
{{/if}}
{{/if}}

View File

@ -5,7 +5,11 @@
</label>
{{else}}
<label for={{this.inputId}}>{{i18n this.translationKey}}</label>
<Input @value={{this.value}} id={{this.inputId}} placeholder={{this.placeholder}} />
<Input
@value={{this.value}}
id={{this.inputId}}
placeholder={{this.placeholder}}
/>
{{/if}}
<div class="clearfix"></div>
<div class="clearfix"></div>

View File

@ -2,16 +2,41 @@
<ul class="values emoji-value-list">
{{#each this.collection as |data index|}}
<li class="value" data-index={{index}}>
<DButton @action={{action "removeValue"}} @actionParam={{data}} @icon="times" @class="remove-value-btn btn-small" @disabled={{not data.isEditable}} />
<DButton
@action={{action "removeValue"}}
@actionParam={{data}}
@icon="times"
@class="remove-value-btn btn-small"
@disabled={{not data.isEditable}}
/>
<div class="value-input emoji-details {{if data.isEditable "can-edit"}} {{if data.isEditing "d-editor-textarea-wrapper"}}" {{on "click" (fn this.editValue index)}} role="button">
<img height="15px" width="15px" src={{data.emojiUrl}} class="emoji-list-emoji">
<div
class="value-input emoji-details
{{if data.isEditable 'can-edit'}}
{{if data.isEditing 'd-editor-textarea-wrapper'}}"
{{on "click" (fn this.editValue index)}}
role="button"
>
<img
height="15px"
width="15px"
src={{data.emojiUrl}}
class="emoji-list-emoji"
/>
<span class="emoji-name">{{data.value}}</span>
</div>
{{#if this.showUpDownButtons}}
<DButton @action={{action "shift" -1 index}} @icon="arrow-up" @class="shift-up-value-btn btn-small" />
<DButton @action={{action "shift" 1 index}} @icon="arrow-down" @class="shift-down-value-btn btn-small" />
<DButton
@action={{action "shift" -1 index}}
@icon="arrow-up"
@class="shift-up-value-btn btn-small"
/>
<DButton
@action={{action "shift" 1 index}}
@icon="arrow-down"
@class="shift-down-value-btn btn-small"
/>
{{/if}}
</li>
{{/each}}
@ -19,9 +44,20 @@
{{/if}}
<div class="value">
<DButton @action={{action "editValue"}} @actionParam={{this.data}} @icon="discourse-emojis" @class="add-emoji-button d-editor-textarea-wrapper" @label="admin.site_settings.emoji_list.add_emoji_button.label" />
<DButton
@action={{action "editValue"}}
@actionParam={{this.data}}
@icon="discourse-emojis"
@class="add-emoji-button d-editor-textarea-wrapper"
@label="admin.site_settings.emoji_list.add_emoji_button.label"
/>
</div>
<EmojiPicker @isActive={{this.emojiPickerIsActive}} @isEditorFocused={{this.isEditorFocused}} @emojiSelected={{action "emojiSelected"}} @onEmojiPickerClose={{action "closeEmojiPicker"}} />
<EmojiPicker
@isActive={{this.emojiPickerIsActive}}
@isEditorFocused={{this.isEditorFocused}}
@emojiSelected={{action "emojiSelected"}}
@onEmojiPickerClose={{action "closeEmojiPicker"}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -6,9 +6,16 @@
{{#each this.flaggedPost.post_actions as |postAction|}}
<FlagUser @user={{postAction.user}} @date={{postAction.created_at}}>
<div class="flagger-flag-type">
{{post-action-title postAction.post_action_type_id postAction.name_key}}
{{post-action-title
postAction.post_action_type_id
postAction.name_key
}}
</div>
<UserFlagPercentage @agreed={{postAction.user.flags_agreed}} @disagreed={{postAction.user.flags_disagreed}} @ignored={{postAction.user.flags_ignored}} />
<UserFlagPercentage
@agreed={{postAction.user.flags_agreed}}
@disagreed={{postAction.user.flags_disagreed}}
@ignored={{postAction.user.flags_ignored}}
/>
</FlagUser>
{{/each}}
</div>
@ -21,7 +28,10 @@
</div>
<div class="flag-users">
{{#each this.flaggedPost.post_actions as |postAction|}}
<FlagUser @user={{postAction.disposed_by}} @date={{postAction.disposed_at}}>
<FlagUser
@user={{postAction.disposed_by}}
@date={{postAction.disposed_at}}
>
{{disposition-icon postAction.disposition}}
{{#if postAction.staff_took_action}}
{{d-icon "gavel" title="admin.flags.took_action"}}
@ -30,4 +40,4 @@
{{/each}}
</div>
</div>
{{/if}}
{{/if}}

View File

@ -1,10 +1,18 @@
<div class="flag-user">
<LinkTo @route="adminUser" @models={{array this.user.id this.user.username}} class="flag-user-avatar">
<LinkTo
@route="adminUser"
@models={{array this.user.id this.user.username}}
class="flag-user-avatar"
>
{{avatar this.user imageSize="small"}}
</LinkTo>
<div class="flag-user-details">
<div class="flag-user-who">
<LinkTo @route="adminUser" @models={{array this.user.id this.user.username}} class="flag-user-username">
<LinkTo
@route="adminUser"
@models={{array this.user.id this.user.username}}
class="flag-user-username"
>
{{this.user.username}}
</LinkTo>
<div title={{raw-date this.date}} class="flag-user-date">
@ -15,4 +23,4 @@
{{yield}}
</div>
</div>
</div>
</div>

View File

@ -1 +1 @@
<pre><code class={{this.lang}}>{{this.code}}</code></pre>
<pre><code class={{this.lang}}>{{this.code}}</code></pre>

View File

@ -3,6 +3,14 @@
{{i18n this.labelKey}}
</label>
{{#if this.changed}}
<DButton @action={{action "apply"}} @class="btn-primary btn-small submit-edit" @icon="check" />
<DButton @action={{action "cancel"}} @class="btn-small cancel-edit" @icon="times" />
{{/if}}
<DButton
@action={{action "apply"}}
@class="btn-primary btn-small submit-edit"
@icon="check"
/>
<DButton
@action={{action "cancel"}}
@class="btn-small cancel-edit"
@icon="times"
/>
{{/if}}

View File

@ -1,8 +1,13 @@
<RadioButton @name="install-items" @id={{this.value}} @value={{this.value}} @selection={{this.selection}} />
<RadioButton
@name="install-items"
@id={{this.value}}
@value={{this.value}}
@selection={{this.selection}}
/>
<label class="radio" for={{this.value}}>
{{#if this.showIcon}}
{{d-icon "plus"}}
{{/if}}
{{i18n this.label}}
</label>
{{d-icon "caret-right"}}
{{d-icon "caret-right"}}

View File

@ -1,13 +1,28 @@
{{#if this.ip}}
<DButton @class="btn-default" @action={{action "lookup"}} @icon="globe" @label="admin.user.ip_lookup" />
<DButton
@class="btn-default"
@action={{action "lookup"}}
@icon="globe"
@label="admin.user.ip_lookup"
/>
{{/if}}
{{#if this.show}}
<div class="location-box">
<a href class="close pull-right" {{on "click" this.hide}}>{{d-icon "times"}}</a>
<a href class="close pull-right" {{on "click" this.hide}}>{{d-icon
"times"
}}</a>
{{#if this.copied}}
<DButton @class="btn-hover pull-right" @icon="copy" @label="ip_lookup.copied" />
<DButton
@class="btn-hover pull-right"
@icon="copy"
@label="ip_lookup.copied"
/>
{{else}}
<DButton @action={{action "copy"}} @class="pull-right no-text" @icon="copy" />
<DButton
@action={{action "copy"}}
@class="pull-right no-text"
@icon="copy"
/>
{{/if}}
<h4>{{i18n "ip_lookup.title"}}</h4>
<p class="powered-by">{{html-safe (i18n "ip_lookup.powered_by")}}</p>
@ -21,7 +36,11 @@
<dt>{{i18n "ip_lookup.location"}}</dt>
<dd>
{{#if this.location.location}}
<a href="https://maps.google.com/maps?q={{this.location.latitude}},{{this.location.longitude}}" rel="noopener noreferrer" target="_blank">
<a
href="https://maps.google.com/maps?q={{this.location.latitude}},{{this.location.longitude}}"
rel="noopener noreferrer"
target="_blank"
>
{{this.location.location}}
</a>
{{else}}
@ -41,11 +60,22 @@
{{i18n "ip_lookup.other_accounts"}}
<strong>{{this.totalOthersWithSameIP}}</strong>
{{#if this.other_accounts.length}}
<DButton @class="btn-danger pull-right" @action={{action "deleteOtherAccounts"}} @icon="exclamation-triangle" @translatedLabel={{i18n "ip_lookup.delete_other_accounts" count=this.otherAccountsToDelete}} />
<DButton
@class="btn-danger pull-right"
@action={{action "deleteOtherAccounts"}}
@icon="exclamation-triangle"
@translatedLabel={{i18n
"ip_lookup.delete_other_accounts"
count=this.otherAccountsToDelete
}}
/>
{{/if}}
</dt>
<ConditionalLoadingSpinner @size="small" @condition={{this.otherAccountsLoading}}>
<ConditionalLoadingSpinner
@size="small"
@condition={{this.otherAccountsLoading}}
>
{{#if this.other_accounts.length}}
<dd class="other-accounts">
<table class="table table-condensed table-hover">
@ -63,7 +93,11 @@
<tr>
<td>
<LinkTo @route="adminUser" @model={{a}}>
{{avatar a usernamePath="user.username" imageSize="small"}}
{{avatar
a
usernamePath="user.username"
imageSize="small"
}}
&nbsp;
<span>{{a.username}}</span>
</LinkTo>
@ -81,4 +115,4 @@
</ConditionalLoadingSpinner>
</dl>
</div>
{{/if}}
{{/if}}

View File

@ -2,12 +2,37 @@
<div class="inline-form">
<label>{{i18n "admin.permalink.form.label"}}</label>
<TextField @value={{this.url}} @disabled={{this.formSubmitted}} @class="permalink-url" @placeholderKey="admin.permalink.url" @autocorrect="off" @autocapitalize="off" />
<TextField
@value={{this.url}}
@disabled={{this.formSubmitted}}
@class="permalink-url"
@placeholderKey="admin.permalink.url"
@autocorrect="off"
@autocapitalize="off"
/>
<ComboBox @content={{this.permalinkTypes}} @value={{this.permalinkType}} @onChange={{action (mut this.permalinkType)}} @class="permalink-type" />
<ComboBox
@content={{this.permalinkTypes}}
@value={{this.permalinkType}}
@onChange={{action (mut this.permalinkType)}}
@class="permalink-type"
/>
<TextField @value={{this.permalinkTypeValue}} @disabled={{this.formSubmitted}} @class="permalink-destination" @placeholderKey={{this.permalinkTypePlaceholder}} @autocorrect="off" @autocapitalize="off" @keyDown={{action "submitFormOnEnter"}} />
<TextField
@value={{this.permalinkTypeValue}}
@disabled={{this.formSubmitted}}
@class="permalink-destination"
@placeholderKey={{this.permalinkTypePlaceholder}}
@autocorrect="off"
@autocapitalize="off"
@keyDown={{action "submitFormOnEnter"}}
/>
<DButton @action={{action "onSubmit"}} @disabled={{this.formSubmitted}} @class="permalink-add" @label="admin.permalink.form.add" />
<DButton
@action={{action "onSubmit"}}
@disabled={{this.formSubmitted}}
@class="permalink-add"
@label="admin.permalink.form.add"
/>
</div>
</div>
</div>

View File

@ -1 +1,5 @@
<Input @type="checkbox" @checked={{this.checked}} {{on "click" (action "onChange")}} />
<Input
@type="checkbox"
@checked={{this.checked}}
{{on "click" (action "onChange")}}
/>

View File

@ -1 +1,5 @@
<SearchAdvancedCategoryChooser @value={{this.category}} @onChange={{action "onChange"}} @options={{hash filterable=true}} />
<SearchAdvancedCategoryChooser
@value={{this.category}}
@onChange={{action "onChange"}}
@options={{hash filterable=true}}
/>

View File

@ -1,5 +1,11 @@
<ComboBox @valueProperty="value" @content={{this.groupOptions}} @value={{this.groupId}} @onChange={{action "onChange"}} @options={{hash
<ComboBox
@valueProperty="value"
@content={{this.groupOptions}}
@value={{this.groupId}}
@onChange={{action "onChange"}}
@options={{hash
allowAny=this.filter.allow_any
filterable=true
none="admin.dashboard.reports.groups"
}} />
}}
/>

View File

@ -1,5 +1,10 @@
<ComboBox @content={{this.filter.choices}} @value={{this.filter.default}} @onChange={{action "onChange"}} @options={{hash
<ComboBox
@content={{this.filter.choices}}
@value={{this.filter.default}}
@onChange={{action "onChange"}}
@options={{hash
allowAny=this.filter.allow_any
filterable=true
none="admin.dashboard.report_filter_any"
}} />
}}
/>

View File

@ -1,3 +1,3 @@
{{this.uploadingIcon}}
<span class="ru-label">{{this.text}}</span>
<span style={{this.progressBar}} class="ru-progress"></span>
<span style={{this.progressBar}} class="ru-progress"></span>

View File

@ -1,6 +1,23 @@
<label>{{i18n "admin.logs.screened_ips.form.label"}}</label>
<TextField @value={{this.ip_address}} @disabled={{this.formSubmitted}} @class="ip-address-input" @placeholderKey="admin.logs.screened_ips.form.ip_address" @autocorrect="off" @autocapitalize="off" />
<TextField
@value={{this.ip_address}}
@disabled={{this.formSubmitted}}
@class="ip-address-input"
@placeholderKey="admin.logs.screened_ips.form.ip_address"
@autocorrect="off"
@autocapitalize="off"
/>
<ComboBox @content={{this.actionNames}} @value={{this.actionName}} @onChange={{action (mut this.actionName)}} />
<ComboBox
@content={{this.actionNames}}
@value={{this.actionName}}
@onChange={{action (mut this.actionName)}}
/>
<DButton @type="submit" @class="btn-default" @action={{action "submit"}} @disabled={{this.formSubmitted}} @label="admin.logs.screened_ips.form.add" />
<DButton
@type="submit"
@class="btn-default"
@action={{action "submit"}}
@disabled={{this.formSubmitted}}
@label="admin.logs.screened_ips.form.add"
/>

View File

@ -2,18 +2,45 @@
<div class="values">
{{#each this.collection as |value index|}}
<div class="value" data-index={{index}}>
<DButton @action={{action "removeValue"}} @actionParam={{value}} @icon="times" @class="remove-value-btn btn-small" />
<Input @value={{value.key}} class="value-input" {{on "focusout" (fn (action "changeKey") index)}} />
<Input @value={{value.secret}} class="value-input" @type={{if this.isSecret "password" "text"}} {{on "focusout" (fn (action "changeSecret") index)}} />
<DButton
@action={{action "removeValue"}}
@actionParam={{value}}
@icon="times"
@class="remove-value-btn btn-small"
/>
<Input
@value={{value.key}}
class="value-input"
{{on "focusout" (fn (action "changeKey") index)}}
/>
<Input
@value={{value.secret}}
class="value-input"
@type={{if this.isSecret "password" "text"}}
{{on "focusout" (fn (action "changeSecret") index)}}
/>
</div>
{{/each}}
</div>
{{/if}}
<div class="value">
<TextField @value={{this.newKey}} @class="new-value-input key" @placeholder={{this.setting.placeholder.key}} />
<Input @type="password" @value={{this.newSecret}} class="new-value-input secret" placeholder={{this.setting.placeholder.value}} />
<DButton @action={{action "addValue"}} @icon="plus" @class="add-value-btn btn-small" />
<TextField
@value={{this.newKey}}
@class="new-value-input key"
@placeholder={{this.setting.placeholder.key}}
/>
<Input
@type="password"
@value={{this.newSecret}}
class="new-value-input secret"
placeholder={{this.setting.placeholder.value}}
/>
<DButton
@action={{action "addValue"}}
@icon="plus"
@class="add-value-btn btn-small"
/>
</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,4 +1,4 @@
<div class="validation-error {{unless this.message "hidden"}}">
<div class="validation-error {{unless this.message 'hidden'}}">
{{d-icon "times"}}
{{this.message}}
</div>
</div>

View File

@ -4,7 +4,11 @@
{{html-safe (i18n "admin.user.silence_reason_label")}}
</div>
</label>
<TextField @value={{this.reason}} @class="silence-reason" @placeholderKey="admin.user.silence_reason_placeholder" />
<TextField
@value={{this.reason}}
@class="silence-reason"
@placeholderKey="admin.user.silence_reason_placeholder"
/>
</div>
<label>
@ -12,4 +16,8 @@
{{i18n "admin.user.silence_message"}}
</div>
</label>
<Textarea @value={{this.message}} class="silence-message" placeholder={{i18n "admin.user.silence_message_placeholder"}} />
<Textarea
@value={{this.message}}
class="silence-message"
placeholder={{i18n "admin.user.silence_message_placeholder"}}
/>

View File

@ -2,13 +2,31 @@
<div class="values">
{{#each this.collection as |value index|}}
<div data-index={{index}} class="value">
<DButton @action={{action "removeValue"}} @actionParam={{value}} @icon="times" @class="remove-value-btn btn-small" />
<DButton
@action={{action "removeValue"}}
@actionParam={{value}}
@icon="times"
@class="remove-value-btn btn-small"
/>
<Input title={{value}} @value={{value}} class="value-input" {{on "focusout" (fn (action "changeValue") index)}} />
<Input
title={{value}}
@value={{value}}
class="value-input"
{{on "focusout" (fn (action "changeValue") index)}}
/>
{{#if this.showUpDownButtons}}
<DButton @action={{action "shift" -1 index}} @icon="arrow-up" @class="shift-up-value-btn btn-small" />
<DButton @action={{action "shift" 1 index}} @icon="arrow-down" @class="shift-down-value-btn btn-small" />
<DButton
@action={{action "shift" -1 index}}
@icon="arrow-up"
@class="shift-up-value-btn btn-small"
/>
<DButton
@action={{action "shift" 1 index}}
@icon="arrow-down"
@class="shift-down-value-btn btn-small"
/>
{{/if}}
</div>
{{/each}}
@ -16,7 +34,21 @@
{{/if}}
<div class="simple-list-input">
<Input @type="text" @value={{this.newValue}} placeholder={{i18n "admin.site_settings.simple_list.add_item"}} class="add-value-input" autocomplete="off" autocorrect="off" autocapitalize="off" />
<Input
@type="text"
@value={{this.newValue}}
placeholder={{i18n "admin.site_settings.simple_list.add_item"}}
class="add-value-input"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
/>
<DButton @action={{action "addValue"}} @actionParam={{this.newValue}} @disabled={{this.inputEmpty}} @icon="plus" @class="add-value-btn btn-small" />
</div>
<DButton
@action={{action "addValue"}}
@actionParam={{this.newValue}}
@disabled={{this.inputEmpty}}
@icon="plus"
@class="add-value-btn btn-small"
/>
</div>

View File

@ -1,18 +1,55 @@
<section class="field">
<b>{{i18n "admin.customize.enabled"}}</b>: {{this.change.enabled}}
<b>{{i18n "admin.customize.enabled"}}</b>:
{{this.change.enabled}}
</section>
<SiteCustomizationChangeField @field={{this.change.stylesheet}} @name="admin.customize.css" />
<SiteCustomizationChangeField @icon="mobile" @field={{this.change.mobile_stylesheet}} @name="admin.customize.css" />
<SiteCustomizationChangeField
@field={{this.change.stylesheet}}
@name="admin.customize.css"
/>
<SiteCustomizationChangeField
@icon="mobile"
@field={{this.change.mobile_stylesheet}}
@name="admin.customize.css"
/>
<SiteCustomizationChangeField @field={{this.change.header}} @name="admin.customize.header" />
<SiteCustomizationChangeField @icon="mobile" @field={{this.change.mobile_header}} @name="admin.customize.header" />
<SiteCustomizationChangeField
@field={{this.change.header}}
@name="admin.customize.header"
/>
<SiteCustomizationChangeField
@icon="mobile"
@field={{this.change.mobile_header}}
@name="admin.customize.header"
/>
<SiteCustomizationChangeField @field={{this.change.top}} @name="admin.customize.top" />
<SiteCustomizationChangeField @icon="mobile" @field={{this.change.mobile_top}} @name="admin.customize.top" />
<SiteCustomizationChangeField
@field={{this.change.top}}
@name="admin.customize.top"
/>
<SiteCustomizationChangeField
@icon="mobile"
@field={{this.change.mobile_top}}
@name="admin.customize.top"
/>
<SiteCustomizationChangeField @field={{this.change.footer}} @name="admin.customize.footer" />
<SiteCustomizationChangeField @icon="mobile" @field={{this.change.mobile_footer}} @name="admin.customize.footer" />
<SiteCustomizationChangeField
@field={{this.change.footer}}
@name="admin.customize.footer"
/>
<SiteCustomizationChangeField
@icon="mobile"
@field={{this.change.mobile_footer}}
@name="admin.customize.footer"
/>
<SiteCustomizationChangeField @icon="file-text-o" @field={{this.change.head_tag}} @name="admin.customize.head_tag.text" />
<SiteCustomizationChangeField @icon="file-text-o" @field={{this.change.body_tag}} @name="admin.customize.body_tag.text" />
<SiteCustomizationChangeField
@icon="file-text-o"
@field={{this.change.head_tag}}
@name="admin.customize.head_tag.text"
/>
<SiteCustomizationChangeField
@icon="file-text-o"
@field={{this.change.body_tag}}
@name="admin.customize.body_tag.text"
/>

View File

@ -1,7 +1,10 @@
{{#if this.field}}
<section class="field">
<b>{{i18n this.name}}</b>: ({{i18n "character_count" count=this.field.length}})
<br>
<b>{{i18n this.name}}</b>: ({{i18n
"character_count"
count=this.field.length
}})
<br />
<Textarea @value={{this.field}} class="plain" />
</section>
{{/if}}
{{/if}}

View File

@ -2,7 +2,11 @@
<h3>
{{#if this.staffLogFilter}}
{{this.settingName}}
<LinkTo @route="adminLogs.staffActionLogs" @query={{hash filters=this.staffLogFilter force_refresh=true}} title={{i18n "admin.settings.history"}}>
<LinkTo
@route="adminLogs.staffActionLogs"
@query={{hash filters=this.staffLogFilter force_refresh=true}}
title={{i18n "admin.settings.history"}}
>
<span class="history-icon">
{{d-icon "history"}}
</span>
@ -12,11 +16,22 @@
{{/if}}
</h3>
{{#if this.defaultIsAvailable}}
<a href onClick={{action "setDefaultValues"}}>{{this.setting.setDefaultValuesLabel}}</a>
<a
href
onClick={{action "setDefaultValues"}}
>{{this.setting.setDefaultValuesLabel}}</a>
{{/if}}
</div>
<div class="setting-value">
{{component this.componentName setting=this.setting value=this.buffered.value validationMessage=this.validationMessage preview=this.preview isSecret=this.isSecret allowAny=this.allowAny}}
{{component
this.componentName
setting=this.setting
value=this.buffered.value
validationMessage=this.validationMessage
preview=this.preview
isSecret=this.isSecret
allowAny=this.allowAny
}}
</div>
{{#if this.dirty}}
<div class="setting-controls">
@ -27,5 +42,10 @@
{{#if this.setting.secret}}
<DButton @action={{action "toggleSecret"}} @icon="far-eye-slash" />
{{/if}}
<DButton @class="btn-default undo" @action={{action "resetDefault"}} @icon="undo" @label="admin.settings.reset" />
{{/if}}
<DButton
@class="btn-default undo"
@action={{action "resetDefault"}}
@icon="undo"
@label="admin.settings.reset"
/>
{{/if}}

View File

@ -3,4 +3,4 @@
<span>{{html-safe this.setting.description}}</span>
</label>
<SettingValidationMessage @message={{this.validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,4 +1,7 @@
<CategorySelector @categories={{this.selectedCategories}} @onChange={{action "onChangeSelectedCategories"}} />
<CategorySelector
@categories={{this.selectedCategories}}
@onChange={{action "onChangeSelectedCategories"}}
/>
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,6 +1,7 @@
<CategoryChooser @value={{this.value}} @onChange={{action (mut this.value)}} @options={{hash
allowUncategorized=true
none=(eq this.setting.default "")
}} />
<CategoryChooser
@value={{this.value}}
@onChange={{action (mut this.value)}}
@options={{hash allowUncategorized=true none=(eq this.setting.default "")}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,9 @@
<ColorInput @hexValue={{readonly this.value}} @valid={{this.valid}} @onlyHex={{false}} @styleSelection={{false}} @onChangeColor={{action "onChangeColor"}} />
<ColorInput
@hexValue={{readonly this.value}}
@valid={{this.valid}}
@onlyHex={{false}}
@styleSelection={{false}}
@onChangeColor={{action "onChangeColor"}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,6 +1,11 @@
<ListSetting @value={{this.settingValue}} @settingName={{this.setting.setting}} @choices={{this.settingChoices}} @onChange={{action "onChangeListSetting"}} @onChangeChoices={{action "onChangeChoices"}} @options={{hash
allowAny=this.allowAny
}} />
<ListSetting
@value={{this.settingValue}}
@settingName={{this.setting.setting}}
@choices={{this.settingChoices}}
@onChange={{action "onChangeListSetting"}}
@onChangeChoices={{action "onChangeChoices"}}
@options={{hash allowAny=this.allowAny}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,3 @@
<EmojiValueList @setting={{this.setting}} @values={{this.value}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,7 +1,11 @@
<ComboBox @content={{this.setting.validValues}} @value={{this.value}} @onChange={{action (mut this.value)}} @valueProperty={{this.setting.computedValueProperty}} @nameProperty={{this.setting.computedNameProperty}} @options={{hash
castInteger=true
allowAny=this.setting.allowsNone
}} />
<ComboBox
@content={{this.setting.validValues}}
@value={{this.value}}
@onChange={{action (mut this.value)}}
@valueProperty={{this.setting.computedValueProperty}}
@nameProperty={{this.setting.computedNameProperty}}
@options={{hash castInteger=true allowAny=this.setting.allowsNone}}
/>
{{this.preview}}
@ -9,4 +13,4 @@
<div class="desc">
{{html-safe this.setting.description}}
</div>
</div>

View File

@ -1,3 +1,10 @@
<ListSetting @value={{this.settingValue}} @choices={{this.groupChoices}} @settingName="name" @nameProperty={{this.nameProperty}} @valueProperty={{this.valueProperty}} @onChange={{action "onChangeGroupListSetting"}} />
<ListSetting
@value={{this.settingValue}}
@choices={{this.groupChoices}}
@settingName="name"
@nameProperty={{this.nameProperty}}
@valueProperty={{this.valueProperty}}
@onChange={{action "onChangeGroupListSetting"}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,6 +1,10 @@
<ListSetting @value={{this.settingValue}} @settingName={{this.setting.setting}} @choices={{this.settingValue}} @onChange={{action "onChange"}} @options={{hash
allowAny=this.allowAny
}} />
<ListSetting
@value={{this.settingValue}}
@settingName={{this.setting.setting}}
@choices={{this.settingValue}}
@onChange={{action "onChange"}}
@options={{hash allowAny=this.allowAny}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,7 @@
<ValueList @values={{this.value}} @inputDelimiter="|" @choices={{this.setting.choices}} />
<ValueList
@values={{this.value}}
@inputDelimiter="|"
@choices={{this.setting.choices}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,6 +1,12 @@
<ListSetting @value={{this.settingValue}} @settingName={{this.setting.setting}} @choices={{this.settingChoices}} @nameProperty="name" @valueProperty="value" @onChange={{action "onChangeListSetting"}} @options={{hash
allowAny=this.allowAny
}} />
<ListSetting
@value={{this.settingValue}}
@settingName={{this.setting.setting}}
@choices={{this.settingChoices}}
@nameProperty="name"
@valueProperty="value"
@onChange={{action "onChangeListSetting"}}
@options={{hash allowAny=this.allowAny}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,7 @@
<SecretValueList @setting={{this.setting}} @values={{this.value}} @isSecret={{this.isSecret}} />
<SecretValueList
@setting={{this.setting}}
@values={{this.value}}
@isSecret={{this.isSecret}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,7 @@
<SimpleList @values={{this.value}} @inputDelimiter={{this.inputDelimiter}} @onChange={{action "onChange"}} />
<SimpleList
@values={{this.value}}
@inputDelimiter={{this.inputDelimiter}}
@onChange={{action "onChange"}}
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,7 +1,11 @@
{{#if this.setting.textarea}}
<Textarea @value={{this.value}} class="input-setting-textarea" />
{{else if this.setting.json_schema}}
<DButton @action={{action "launchJsonEditorModal"}} @icon="pencil-alt" @label="admin.site_settings.json_schema.edit" />
<DButton
@action={{action "launchJsonEditorModal"}}
@icon="pencil-alt"
@label="admin.site_settings.json_schema.edit"
/>
{{else if this.isSecret}}
<Input @type="password" @value={{this.value}} class="input-setting-string" />
{{else}}
@ -9,4 +13,4 @@
{{/if}}
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,5 +1,9 @@
<TagChooser @tags={{this.selectedTags}} @onChange={{action "changeSelectedTags"}} @everyTag={{true}} @unlimitedTagCount={{true}} @options={{hash
allowAny=false
}} />
<TagChooser
@tags={{this.selectedTags}}
@onChange={{action "changeSelectedTags"}}
@everyTag={{true}}
@unlimitedTagCount={{true}}
@options={{hash allowAny=false}}
/>
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,3 +1,9 @@
<UppyImageUploader @imageUrl={{this.value}} @placeholderUrl={{this.setting.placeholder}} @additionalParams={{hash for_site_setting=true}} @type="site_setting" @id={{concat "site-setting-image-uploader-" this.setting.setting}} />
<UppyImageUploader
@imageUrl={{this.value}}
@placeholderUrl={{this.setting.placeholder}}
@additionalParams={{hash for_site_setting=true}}
@type="site_setting"
@id={{concat "site-setting-image-uploader-" this.setting.setting}}
/>
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,3 +1,7 @@
<DButton @label="admin.site_settings.uploaded_image_list.label" @action={{action "showUploadModal"}} @actionParam={{hash value=this.value setting=this.setting}} />
<DButton
@label="admin.site_settings.uploaded_image_list.label"
@action={{action "showUploadModal"}}
@actionParam={{hash value=this.value setting=this.setting}}
/>
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,3 +1,3 @@
<ValueList @values={{this.value}} @addKey="admin.site_settings.add_url" />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,3 @@
<ValueList @values={{this.value}} />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,5 +1,10 @@
<DButton @label="admin.site_text.edit" @class="btn-default edit" @action={{this.editAction}} @actionParam={{this.siteText}} />
<DButton
@label="admin.site_text.edit"
@class="btn-default edit"
@action={{this.editAction}}
@actionParam={{this.siteText}}
/>
<h3 class="site-text-id">{{this.siteText.id}}</h3>
<div class="site-text-value">{{this.siteText.value}}</div>
<div class="clearfix"></div>
<div class="clearfix"></div>

View File

@ -1,4 +1,4 @@
{{!-- template-lint-disable no-invalid-interactive --}}
{{! template-lint-disable no-invalid-interactive }}
<div class="table staff-actions" {{on "click" this.openLinks}}>
{{yield}}
</div>
</div>

View File

@ -1,6 +1,11 @@
<label class="btn btn-default {{if this.addDisabled "disabled"}}">
<label class="btn btn-default {{if this.addDisabled 'disabled'}}">
{{d-icon "upload"}}
{{i18n "admin.watched_words.form.upload"}}
<input class="hidden-upload-field" disabled={{this.addDisabled}} type="file" accept="text/plain,text/csv">
<input
class="hidden-upload-field"
disabled={{this.addDisabled}}
type="file"
accept="text/plain,text/csv"
/>
</label>
<span class="instructions">{{i18n "tagging.upload_instructions"}}</span>
<span class="instructions">{{i18n "tagging.upload_instructions"}}</span>

View File

@ -1,5 +1,10 @@
<div class="inner-wrapper">
<PluginOutlet @name="admin-customize-themes-list-item" @tagName="span" @connectorTagName="span" @args={{hash theme=this.theme}} />
<PluginOutlet
@name="admin-customize-themes-list-item"
@tagName="span"
@connectorTagName="span"
@args={{hash theme=this.theme}}
/>
<div class="info">
<span class="name">
@ -11,16 +16,32 @@
{{d-icon "caret-right"}}
{{else}}
{{#if this.theme.default}}
{{d-icon "check" class="default-indicator" title="admin.customize.theme.default_theme_tooltip"}}
{{d-icon
"check"
class="default-indicator"
title="admin.customize.theme.default_theme_tooltip"
}}
{{/if}}
{{#if this.theme.isPendingUpdates}}
{{d-icon "sync" title="admin.customize.theme.updates_available_tooltip" class="light-grey-icon"}}
{{d-icon
"sync"
title="admin.customize.theme.updates_available_tooltip"
class="light-grey-icon"
}}
{{/if}}
{{#if this.theme.isBroken}}
{{d-icon "exclamation-circle" class="broken-indicator" title="admin.customize.theme.broken_theme_tooltip"}}
{{d-icon
"exclamation-circle"
class="broken-indicator"
title="admin.customize.theme.broken_theme_tooltip"
}}
{{/if}}
{{#unless this.theme.enabled}}
{{d-icon "ban" class="light-grey-icon" title="admin.customize.theme.disabled_component_tooltip"}}
{{d-icon
"ban"
class="light-grey-icon"
title="admin.customize.theme.disabled_component_tooltip"
}}
{{/unless}}
{{/if}}
</span>
@ -41,4 +62,4 @@
{{/if}}
</div>
{{/if}}
</div>
</div>

View File

@ -1,19 +1,43 @@
<div class="themes-list-header">
<DButton @action={{action "changeView"}} @actionParam={{this.THEMES}} @class={{concat "themes-tab " "tab " (if this.themesTabActive "active" "")}} @label="admin.customize.theme.title" />
<DButton @action={{action "changeView"}} @actionParam={{this.COMPONENTS}} @class={{concat "components-tab " "tab " (if this.componentsTabActive "active" "")}} @label="admin.customize.theme.components" @icon="puzzle-piece" />
<DButton
@action={{action "changeView"}}
@actionParam={{this.THEMES}}
@class={{concat "themes-tab " "tab " (if this.themesTabActive "active" "")}}
@label="admin.customize.theme.title"
/>
<DButton
@action={{action "changeView"}}
@actionParam={{this.COMPONENTS}}
@class={{concat
"components-tab "
"tab "
(if this.componentsTabActive "active" "")
}}
@label="admin.customize.theme.components"
@icon="puzzle-piece"
/>
</div>
<div class="themes-list-container">
{{#if this.showFilter}}
<div class="themes-list-filter themes-list-item">
<Input class="filter-input" placeholder={{i18n "admin.customize.theme.filter_placeholder"}} autocomplete="off" @type="search" @value={{mut this.filterTerm}} />
<Input
class="filter-input"
placeholder={{i18n "admin.customize.theme.filter_placeholder"}}
autocomplete="off"
@type="search"
@value={{mut this.filterTerm}}
/>
{{d-icon "search"}}
</div>
{{/if}}
{{#if this.hasThemes}}
{{#if this.hasActiveThemes}}
{{#each this.activeThemes as |theme|}}
<ThemesListItem @theme={{theme}} @navigateToTheme={{action "navigateToTheme" theme}} />
<ThemesListItem
@theme={{theme}}
@navigateToTheme={{action "navigateToTheme" theme}}
/>
{{/each}}
{{#if this.hasInactiveThemes}}
@ -31,7 +55,10 @@
{{#if this.hasInactiveThemes}}
{{#each this.inactiveThemes as |theme|}}
<ThemesListItem @theme={{theme}} @navigateToTheme={{action "navigateToTheme" theme}} />
<ThemesListItem
@theme={{theme}}
@navigateToTheme={{action "navigateToTheme" theme}}
/>
{{/each}}
{{/if}}
{{else}}
@ -42,5 +69,10 @@
</div>
<div class="create-actions">
<DButton @action={{this.installModal}} @icon="upload" @label="admin.customize.install" @class="btn-primary" />
</div>
<DButton
@action={{this.installModal}}
@icon="upload"
@label="admin.customize.install"
@class="btn-primary"
/>
</div>

View File

@ -2,20 +2,42 @@
<div class="values">
{{#each this.collection as |value index|}}
<div data-index={{index}} class="value">
<DButton @action={{action "removeValue"}} @actionParam={{value}} @icon="times" @class="remove-value-btn btn-small" />
<DButton
@action={{action "removeValue"}}
@actionParam={{value}}
@icon="times"
@class="remove-value-btn btn-small"
/>
<Input title={{value}} @value={{value}} class="value-input" {{on "focusout" (fn (action "changeValue") index)}} />
<Input
title={{value}}
@value={{value}}
class="value-input"
{{on "focusout" (fn (action "changeValue") index)}}
/>
{{#if this.showUpDownButtons}}
<DButton @action={{action "shift" -1 index}} @icon="arrow-up" @class="shift-up-value-btn btn-small" />
<DButton @action={{action "shift" 1 index}} @icon="arrow-down" @class="shift-down-value-btn btn-small" />
<DButton
@action={{action "shift" -1 index}}
@icon="arrow-up"
@class="shift-up-value-btn btn-small"
/>
<DButton
@action={{action "shift" 1 index}}
@icon="arrow-down"
@class="shift-down-value-btn btn-small"
/>
{{/if}}
</div>
{{/each}}
</div>
{{/if}}
<ComboBox @valueProperty={{null}} @nameProperty={{null}} @value={{this.newValue}} @content={{this.filteredChoices}} @onChange={{action "selectChoice"}} @options={{hash
allowAny=true
none=this.noneKey
}} />
<ComboBox
@valueProperty={{null}}
@nameProperty={{null}}
@value={{this.newValue}}
@content={{this.filteredChoices}}
@onChange={{action "selectChoice"}}
@options={{hash allowAny=true none=this.noneKey}}
/>

View File

@ -6,7 +6,7 @@
<div
class="dashboard-stats version-check
{{if this.versionCheck.critical_updates "critical" "normal"}}"
{{if this.versionCheck.critical_updates 'critical' 'normal'}}"
>
<div class="version-number">
<h4>
@ -18,7 +18,11 @@
{{#if this.versionCheck.gitLink}}
<div class="sha-link">
(
<a href={{this.versionCheck.gitLink}} rel="noopener noreferrer" target="_blank">
<a
href={{this.versionCheck.gitLink}}
rel="noopener noreferrer"
target="_blank"
>
{{this.versionCheck.shortSha}}
</a>
)
@ -99,8 +103,8 @@
class="icon
{{if
this.versionCheck.critical_updates
"critical-updates-available"
"updates-available"
'critical-updates-available'
'updates-available'
}}"
>
{{#if this.versionCheck.behindByOneVersion}}
@ -126,5 +130,10 @@
</div>
</div>
{{/if}}
<CustomHtml @name="upgrade-header" @versionCheck={{this.versionCheck}} @tagName="div" @classNames="upgrade-header" />
</div>
<CustomHtml
@name="upgrade-header"
@versionCheck={{this.versionCheck}}
@tagName="div"
@classNames="upgrade-header"
/>
</div>

View File

@ -1,42 +1,89 @@
<div class="watched-word-input">
<label for="watched-word">{{i18n "admin.watched_words.form.label"}}</label>
<TextField @id="watched-word" @value={{this.word}} @disabled={{this.formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey={{this.placeholderKey}} @title={{i18n this.placeholderKey}} />
<TextField
@id="watched-word"
@value={{this.word}}
@disabled={{this.formSubmitted}}
@class="watched-word-input-field"
@autocorrect="off"
@autocapitalize="off"
@placeholderKey={{this.placeholderKey}}
@title={{i18n this.placeholderKey}}
/>
</div>
{{#if this.canReplace}}
<div class="watched-word-input">
<label for="watched-replacement">{{i18n "admin.watched_words.form.replace_label"}}</label>
<TextField @id="watched-replacement" @value={{this.replacement}} @disabled={{this.formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey="admin.watched_words.form.replace_placeholder" />
<label for="watched-replacement">{{i18n
"admin.watched_words.form.replace_label"
}}</label>
<TextField
@id="watched-replacement"
@value={{this.replacement}}
@disabled={{this.formSubmitted}}
@class="watched-word-input-field"
@autocorrect="off"
@autocapitalize="off"
@placeholderKey="admin.watched_words.form.replace_placeholder"
/>
</div>
{{/if}}
{{#if this.canTag}}
<div class="watched-word-input">
<label for="watched-tag">{{i18n "admin.watched_words.form.tag_label"}}</label>
<TagChooser @id="watched-tag" @class="watched-word-input-field" @tags={{this.selectedTags}} @onChange={{action "changeSelectedTags"}} @everyTag={{true}} @options={{hash
allowAny=true
disabled=this.formSubmitted
}} />
<label for="watched-tag">{{i18n
"admin.watched_words.form.tag_label"
}}</label>
<TagChooser
@id="watched-tag"
@class="watched-word-input-field"
@tags={{this.selectedTags}}
@onChange={{action "changeSelectedTags"}}
@everyTag={{true}}
@options={{hash allowAny=true disabled=this.formSubmitted}}
/>
</div>
{{/if}}
{{#if this.canLink}}
<div class="watched-word-input">
<label for="watched-link">{{i18n "admin.watched_words.form.link_label"}}</label>
<TextField @id="watched-link" @value={{this.replacement}} @disabled={{this.formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey="admin.watched_words.form.link_placeholder" />
<label for="watched-link">{{i18n
"admin.watched_words.form.link_label"
}}</label>
<TextField
@id="watched-link"
@value={{this.replacement}}
@disabled={{this.formSubmitted}}
@class="watched-word-input-field"
@autocorrect="off"
@autocapitalize="off"
@placeholderKey="admin.watched_words.form.link_placeholder"
/>
</div>
{{/if}}
<div class="watched-word-input">
<label for="watched-case-sensitivity">{{i18n "admin.watched_words.form.case_sensitivity_label"}}</label>
<label for="watched-case-sensitivity">{{i18n
"admin.watched_words.form.case_sensitivity_label"
}}</label>
<label class="case-sensitivity-checkbox">
<Input @type="checkbox" @checked={{this.isCaseSensitive}} disabled={{this.formSubmitted}} />
<Input
@type="checkbox"
@checked={{this.isCaseSensitive}}
disabled={{this.formSubmitted}}
/>
{{i18n "admin.watched_words.form.case_sensitivity_description"}}
</label>
</div>
<DButton @type="submit" @class="btn btn-primary" @action={{action "submit"}} @disabled={{this.submitDisabled}} @label="admin.watched_words.form.add" />
<DButton
@type="submit"
@class="btn btn-primary"
@action={{action "submit"}}
@disabled={{this.submitDisabled}}
@label="admin.watched_words.form.add"
/>
{{#if this.showMessage}}
<span class="success-message">{{this.message}}</span>
{{/if}}
{{/if}}

View File

@ -1,5 +1,9 @@
<label class="btn btn-default {{if this.addDisabled "disabled"}}">
<label class="btn btn-default {{if this.addDisabled 'disabled'}}">
{{d-icon "upload"}}
{{i18n "admin.watched_words.form.upload"}}
<input class="hidden-upload-field" disabled={{this.addDisabled}} type="file">
</label>
<input
class="hidden-upload-field"
disabled={{this.addDisabled}}
type="file"
/>
</label>

View File

@ -1 +1 @@
<p class="about">{{i18n "admin.customize.colors.about"}}</p>
<p class="about">{{i18n "admin.customize.colors.about"}}</p>

View File

@ -1,20 +1,48 @@
<div class="color-scheme show-current-style">
<div class="admin-container">
<h1>{{#if this.model.theme_id}}{{this.model.name}}{{else}}<TextField @class="style-name" @value={{this.model.name}} />{{/if}}</h1>
<h1>{{#if this.model.theme_id}}{{this.model.name}}{{else}}<TextField
@class="style-name"
@value={{this.model.name}}
/>{{/if}}</h1>
<div class="controls">
{{#unless this.model.theme_id}}
<DButton @class="btn-primary" @action={{action "save"}} @disabled={{this.model.disableSave}} @label="admin.customize.save" />
<DButton
@class="btn-primary"
@action={{action "save"}}
@disabled={{this.model.disableSave}}
@label="admin.customize.save"
/>
{{/unless}}
<DButton @class="btn-default" @action={{action "copy" this.model}} @icon="copy" @label="admin.customize.copy" />
<DButton @class="btn-default copy-to-clipboard" @action={{action "copyToClipboard" this.model}} @icon="far-clipboard" @label="admin.customize.copy_to_clipboard" />
<span class="saving {{unless this.model.savingStatus "hidden"}}">{{this.model.savingStatus}}</span>
<DButton
@class="btn-default"
@action={{action "copy" this.model}}
@icon="copy"
@label="admin.customize.copy"
/>
<DButton
@class="btn-default copy-to-clipboard"
@action={{action "copyToClipboard" this.model}}
@icon="far-clipboard"
@label="admin.customize.copy_to_clipboard"
/>
<span
class="saving {{unless this.model.savingStatus 'hidden'}}"
>{{this.model.savingStatus}}</span>
{{#if this.model.theme_id}}
<span class="not-editable">
{{i18n "admin.customize.theme_owner"}}
<LinkTo @route="adminCustomizeThemes.show" @model={{this.model.theme_id}}>{{this.model.theme_name}}</LinkTo>
<LinkTo
@route="adminCustomizeThemes.show"
@model={{this.model.theme_id}}
>{{this.model.theme_name}}</LinkTo>
</span>
{{else}}
<DButton @action={{action "destroy"}} @class="btn-danger" @icon="far-trash-alt" @label="admin.customize.delete" />
<DButton
@action={{action "destroy"}}
@class="btn-danger"
@icon="far-trash-alt"
@label="admin.customize.delete"
/>
{{/if}}
</div>
@ -30,7 +58,12 @@
<div>
{{#if this.model.theme_id}}
<InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.color_scheme_user_selectable" @checked={{this.model.user_selectable}} @modelId={{this.model.id}} />
<InlineEditCheckbox
@action={{action "applyUserSelectable"}}
@labelKey="admin.customize.theme.color_scheme_user_selectable"
@checked={{this.model.user_selectable}}
@modelId={{this.model.id}}
/>
{{else}}
<label>
<Input @type="checkbox" @checked={{this.model.user_selectable}} />
@ -51,16 +84,39 @@
</thead>
<tbody>
{{#each this.colors as |c|}}
<tr class="{{if c.changed "changed"}} {{if c.valid "valid" "invalid"}}">
<tr
class="{{if c.changed 'changed'}}
{{if c.valid 'valid' 'invalid'}}"
>
<td class="name" title={{c.name}}>
<h3>{{c.translatedName}}</h3>
<p class="description">{{c.description}}</p>
</td>
<td class="hex"><ColorInput @hexValue={{c.hex}} @brightnessValue={{c.brightness}} @valid={{c.valid}} /></td>
<td class="hex"><ColorInput
@hexValue={{c.hex}}
@brightnessValue={{c.brightness}}
@valid={{c.valid}}
/></td>
<td class="actions">
{{#unless this.model.theme_id}}
<DButton @class={{concat "btn-default revert " (unless c.savedIsOverriden "invisible")}} @action={{action "revert" c}} @title="admin.customize.colors.revert_title" @label="revert" />
<DButton @class={{concat "btn-default undo " (unless c.changed "invisible")}} @action={{action "undo" c}} @title="admin.customize.colors.undo_title" @label="undo" />
<DButton
@class={{concat
"btn-default revert "
(unless c.savedIsOverriden "invisible")
}}
@action={{action "revert" c}}
@title="admin.customize.colors.revert_title"
@label="revert"
/>
<DButton
@class={{concat
"btn-default undo "
(unless c.changed "invisible")
}}
@action={{action "undo" c}}
@title="admin.customize.colors.undo_title"
@label="undo"
/>
{{/unless}}
</td>
</tr>
@ -71,4 +127,4 @@
<p>{{i18n "search.no_results"}}</p>
{{/if}}
</div>
</div>
</div>

View File

@ -5,7 +5,11 @@
{{#each this.model as |scheme|}}
{{#unless scheme.is_base}}
<li>
<LinkTo @route="adminCustomize.colors.show" @model={{scheme}} @replace={{true}}>
<LinkTo
@route="adminCustomize.colors.show"
@model={{scheme}}
@replace={{true}}
>
{{d-icon "paint-brush"}}
{{scheme.description}}
</LinkTo>
@ -14,9 +18,14 @@
{{/each}}
</ul>
<DButton @class="btn-default" @action={{action "newColorScheme"}} @icon="plus" @label="admin.customize.new" />
<DButton
@class="btn-default"
@action={{action "newColorScheme"}}
@icon="plus"
@label="admin.customize.new"
/>
</div>
{{outlet}}
<div class="clearfix"></div>
<div class="clearfix"></div>

View File

@ -1,7 +1,16 @@
<EmailStylesEditor @styles={{this.model}} @fieldName={{this.fieldName}} @save={{action "save"}} />
<EmailStylesEditor
@styles={{this.model}}
@fieldName={{this.fieldName}}
@save={{action "save"}}
/>
<div class="admin-footer">
<div class="buttons">
<DButton @action={{action "save"}} @disabled={{this.saveDisabled}} @class="btn-primary" @translatedLabel={{this.saveButtonText}} />
<DButton
@action={{action "save"}}
@disabled={{this.saveDisabled}}
@class="btn-primary"
@translatedLabel={{this.saveButtonText}}
/>
</div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More