No implicit this codemod (#17235)

* Run no-implicit-this codemod for app templates
* Run tagless-ember-components-codemod for plugins
* Turn on no-implicit-this lint
This commit is contained in:
Peter Wagenet 2022-07-05 10:41:31 -07:00 committed by GitHub
parent fbc1bc4255
commit 371bbadb92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
635 changed files with 4626 additions and 4634 deletions

View File

@ -19,7 +19,11 @@ module.exports = {
"no-inline-styles": false, "no-inline-styles": false,
"no-input-block": true, "no-input-block": true,
"no-input-tagname": true, "no-input-tagname": true,
"no-implicit-this": false, "no-implicit-this": {
allow: [
'loading-spinner'
]
},
"no-invalid-interactive": true, "no-invalid-interactive": true,
"no-invalid-link-text": true, "no-invalid-link-text": true,
"no-invalid-meta": true, "no-invalid-meta": true,

View File

@ -4,24 +4,24 @@
<div class="admin-main-nav"> <div class="admin-main-nav">
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<NavItem @route="admin.dashboard" @label="admin.dashboard.title" /> <NavItem @route="admin.dashboard" @label="admin.dashboard.title" />
{{#if currentUser.admin}} {{#if this.currentUser.admin}}
<NavItem @route="adminSiteSettings" @label="admin.site_settings.title" /> <NavItem @route="adminSiteSettings" @label="admin.site_settings.title" />
{{/if}} {{/if}}
<NavItem @route="adminUsers" @label="admin.users.title" /> <NavItem @route="adminUsers" @label="admin.users.title" />
{{#if showGroups}} {{#if this.showGroups}}
<NavItem @route="groups" @label="admin.groups.title" /> <NavItem @route="groups" @label="admin.groups.title" />
{{/if}} {{/if}}
{{#if showBadges}} {{#if this.showBadges}}
<NavItem @route="adminBadges" @label="admin.badges.title" /> <NavItem @route="adminBadges" @label="admin.badges.title" />
{{/if}} {{/if}}
{{#if currentUser.admin}} {{#if this.currentUser.admin}}
<NavItem @route="adminEmail" @label="admin.email.title" /> <NavItem @route="adminEmail" @label="admin.email.title" />
{{/if}} {{/if}}
<NavItem @route="adminLogs" @label="admin.logs.title" /> <NavItem @route="adminLogs" @label="admin.logs.title" />
<NavItem @route="adminCustomize" @label="admin.customize.title" /> <NavItem @route="adminCustomize" @label="admin.customize.title" />
{{#if currentUser.admin}} {{#if this.currentUser.admin}}
<NavItem @route="adminApi" @label="admin.api.title" /> <NavItem @route="adminApi" @label="admin.api.title" />
{{#if siteSettings.enable_backups}} {{#if this.siteSettings.enable_backups}}
<NavItem @route="admin.backups" @label="admin.backups.title" /> <NavItem @route="admin.backups" @label="admin.backups.title" />
{{/if}} {{/if}}
{{/if}} {{/if}}
@ -31,7 +31,7 @@
</div> </div>
<div class="boxed white admin-content"> <div class="boxed white admin-content">
<div class="admin-contents {{adminContentsClassName}}"> <div class="admin-contents {{this.adminContentsClassName}}">
{{outlet}} {{outlet}}
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
<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 model}} {{#if this.model}}
<LoadMore @selector=".api-keys tr" @action={{action "loadMore"}}> <LoadMore @selector=".api-keys tr" @action={{action "loadMore"}}>
<table class="api-keys grid"> <table class="api-keys grid">
<thead> <thead>
@ -12,7 +12,7 @@
<th>&nbsp;</th> <th>&nbsp;</th>
</thead> </thead>
<tbody> <tbody>
{{#each model as |k|}} {{#each this.model as |k|}}
<tr class={{if k.revoked_at "revoked"}}> <tr class={{if k.revoked_at "revoked"}}>
<td class="key"> <td class="key">
{{#if k.revoked_at}}{{d-icon "times-circle"}}{{/if}} {{#if k.revoked_at}}{{d-icon "times-circle"}}{{/if}}
@ -57,7 +57,7 @@
</table> </table>
</LoadMore> </LoadMore>
<ConditionalLoadingSpinner @condition={{loading}} /> <ConditionalLoadingSpinner @condition={{this.loading}} />
{{else}} {{else}}
<p>{{i18n "admin.api.none"}}</p> <p>{{i18n "admin.api.none"}}</p>
{{/if}} {{/if}}

View File

@ -4,9 +4,9 @@
</LinkTo> </LinkTo>
<div class="api-key api-key-new"> <div class="api-key api-key-new">
{{#if model.id}} {{#if this.model.id}}
<AdminFormRow @label="admin.api.key"> <AdminFormRow @label="admin.api.key">
<div>{{model.key}}</div> <div>{{this.model.key}}</div>
</AdminFormRow> </AdminFormRow>
<AdminFormRow> <AdminFormRow>
{{i18n "admin.api.not_shown_again"}} {{i18n "admin.api.not_shown_again"}}
@ -16,16 +16,16 @@
</AdminFormRow> </AdminFormRow>
{{else}} {{else}}
<AdminFormRow @label="admin.api.description"> <AdminFormRow @label="admin.api.description">
<Input @value={{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>
<AdminFormRow @label="admin.api.user_mode"> <AdminFormRow @label="admin.api.user_mode">
<ComboBox @content={{userModes}} @value={{userMode}} @onChange={{action "changeUserMode"}} /> <ComboBox @content={{this.userModes}} @value={{this.userMode}} @onChange={{action "changeUserMode"}} />
</AdminFormRow> </AdminFormRow>
{{#if showUserSelector}} {{#if this.showUserSelector}}
<AdminFormRow @label="admin.api.user"> <AdminFormRow @label="admin.api.user">
<EmailGroupUserChooser @value={{model.username}} @onChange={{action "updateUsername"}} @options={{hash <EmailGroupUserChooser @value={{this.model.username}} @onChange={{action "updateUsername"}} @options={{hash
maximum=1 maximum=1
filterPlaceholder="admin.api.user_placeholder" filterPlaceholder="admin.api.user_placeholder"
}} /> }} />
@ -33,16 +33,16 @@
{{/if}} {{/if}}
<AdminFormRow @label="admin.api.scope_mode"> <AdminFormRow @label="admin.api.scope_mode">
<ComboBox @content={{scopeModes}} @value={{scopeMode}} @onChange={{action "changeScopeMode"}} /> <ComboBox @content={{this.scopeModes}} @value={{this.scopeMode}} @onChange={{action "changeScopeMode"}} />
{{#if (eq scopeMode "read_only")}} {{#if (eq this.scopeMode "read_only")}}
<p>{{i18n "admin.api.scopes.descriptions.global.read"}}</p> <p>{{i18n "admin.api.scopes.descriptions.global.read"}}</p>
{{else if (eq scopeMode "global")}} {{else if (eq this.scopeMode "global")}}
<p>{{i18n "admin.api.scopes.global_description"}}</p> <p>{{i18n "admin.api.scopes.global_description"}}</p>
{{/if}} {{/if}}
</AdminFormRow> </AdminFormRow>
{{#if (eq scopeMode "granular")}} {{#if (eq this.scopeMode "granular")}}
<h2 class="scopes-title">{{i18n "admin.api.scopes.title"}}</h2> <h2 class="scopes-title">{{i18n "admin.api.scopes.title"}}</h2>
<p>{{i18n "admin.api.scopes.description"}}</p> <p>{{i18n "admin.api.scopes.description"}}</p>
<table class="scopes-table grid"> <table class="scopes-table grid">
@ -55,7 +55,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{#each-in scopes as |resource actions|}} {{#each-in this.scopes as |resource actions|}}
<tr class="scope-resource-name"> <tr class="scope-resource-name">
<td><b>{{resource}}</b></td> <td><b>{{resource}}</b></td>
<td></td> <td></td>
@ -86,6 +86,6 @@
</table> </table>
{{/if}} {{/if}}
<DButton @icon="check" @label="admin.api.save" @action={{action "save"}} @class="btn-primary" @disabled={{saveDisabled}} /> <DButton @icon="check" @label="admin.api.save" @action={{action "save"}} @class="btn-primary" @disabled={{this.saveDisabled}} />
{{/if}} {{/if}}
</div> </div>

View File

@ -5,21 +5,21 @@
<div class="api-key api-key-show"> <div class="api-key api-key-show">
<AdminFormRow @label="admin.api.key"> <AdminFormRow @label="admin.api.key">
{{#if model.revoked_at}}{{d-icon "times-circle"}}{{/if}} {{#if this.model.revoked_at}}{{d-icon "times-circle"}}{{/if}}
{{model.truncatedKey}} {{this.model.truncatedKey}}
</AdminFormRow> </AdminFormRow>
<AdminFormRow @label="admin.api.description"> <AdminFormRow @label="admin.api.description">
{{#if editingDescription}} {{#if this.editingDescription}}
<Input @value={{buffered.description}} @maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} /> <Input @value={{this.buffered.description}} @maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} />
{{else}} {{else}}
<span> <span>
{{if model.description model.description (i18n "admin.api.no_description")}} {{if this.model.description this.model.description (i18n "admin.api.no_description")}}
</span> </span>
{{/if}} {{/if}}
<div class="controls"> <div class="controls">
{{#if editingDescription}} {{#if this.editingDescription}}
<DButton @class="ok" @action={{action "saveDescription"}} @icon="check" /> <DButton @class="ok" @action={{action "saveDescription"}} @icon="check" />
<DButton @class="cancel" @action={{action "editDescription"}} @icon="times" /> <DButton @class="cancel" @action={{action "editDescription"}} @icon="times" />
{{else}} {{else}}
@ -29,9 +29,9 @@
</AdminFormRow> </AdminFormRow>
<AdminFormRow @label="admin.api.user"> <AdminFormRow @label="admin.api.user">
{{#if model.user}} {{#if this.model.user}}
<LinkTo @route="adminUser" @model={{model.user}}> <LinkTo @route="adminUser" @model={{this.model.user}}>
{{avatar model.user imageSize="small"}} {{model.user.username}} {{avatar this.model.user imageSize="small"}} {{this.model.user.username}}
</LinkTo> </LinkTo>
{{else}} {{else}}
{{i18n "admin.api.all_users"}} {{i18n "admin.api.all_users"}}
@ -39,38 +39,38 @@
</AdminFormRow> </AdminFormRow>
<AdminFormRow @label="admin.api.created"> <AdminFormRow @label="admin.api.created">
{{format-date model.created_at leaveAgo="true"}} {{format-date this.model.created_at leaveAgo="true"}}
</AdminFormRow> </AdminFormRow>
<AdminFormRow @label="admin.api.updated"> <AdminFormRow @label="admin.api.updated">
{{format-date model.updated_at leaveAgo="true"}} {{format-date this.model.updated_at leaveAgo="true"}}
</AdminFormRow> </AdminFormRow>
<AdminFormRow @label="admin.api.last_used"> <AdminFormRow @label="admin.api.last_used">
{{#if model.last_used_at}} {{#if this.model.last_used_at}}
{{format-date model.last_used_at leaveAgo="true"}} {{format-date this.model.last_used_at leaveAgo="true"}}
{{else}} {{else}}
{{i18n "admin.api.never_used"}} {{i18n "admin.api.never_used"}}
{{/if}} {{/if}}
</AdminFormRow> </AdminFormRow>
<AdminFormRow @label="admin.api.revoked"> <AdminFormRow @label="admin.api.revoked">
{{#if model.revoked_at}} {{#if this.model.revoked_at}}
{{format-date model.revoked_at leaveAgo="true"}} {{format-date this.model.revoked_at leaveAgo="true"}}
{{else}} {{else}}
<span>{{i18n "no_value"}}</span> <span>{{i18n "no_value"}}</span>
{{/if}} {{/if}}
<div class="controls"> <div class="controls">
{{#if model.revoked_at}} {{#if this.model.revoked_at}}
<DButton @action={{action "undoRevokeKey"}} @actionParam={{model}} @icon="undo" @label="admin.api.undo_revoke" /> <DButton @action={{action "undoRevokeKey"}} @actionParam={{this.model}} @icon="undo" @label="admin.api.undo_revoke" />
<DButton @action={{action "deleteKey"}} @actionParam={{model}} @icon="trash-alt" @label="admin.api.delete" @class="btn-danger" /> <DButton @action={{action "deleteKey"}} @actionParam={{this.model}} @icon="trash-alt" @label="admin.api.delete" @class="btn-danger" />
{{else}} {{else}}
<DButton @class="btn-danger" @action={{action "revokeKey"}} @actionParam={{model}} @icon="times" @label="admin.api.revoke" /> <DButton @class="btn-danger" @action={{action "revokeKey"}} @actionParam={{this.model}} @icon="times" @label="admin.api.revoke" />
{{/if}} {{/if}}
</div> </div>
</AdminFormRow> </AdminFormRow>
{{#if model.api_key_scopes.length}} {{#if this.model.api_key_scopes.length}}
<h2 class="scopes-title">{{i18n "admin.api.scopes.title"}}</h2> <h2 class="scopes-title">{{i18n "admin.api.scopes.title"}}</h2>
<table class="scopes-table grid"> <table class="scopes-table grid">
@ -83,7 +83,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{#each model.api_key_scopes as |scope|}} {{#each this.model.api_key_scopes as |scope|}}
<tr> <tr>
<td>{{scope.resource}}</td> <td>{{scope.resource}}</td>
<td> <td>

View File

@ -1,17 +1,17 @@
<div class="backup-options"> <div class="backup-options">
{{#if localBackupStorage}} {{#if this.localBackupStorage}}
<UppyBackupUploader @done={{route-action "uploadSuccess"}} @localBackupStorage={{localBackupStorage}} /> <UppyBackupUploader @done={{route-action "uploadSuccess"}} @localBackupStorage={{this.localBackupStorage}} />
{{else}} {{else}}
<UppyBackupUploader @done={{route-action "remoteUploadSuccess"}} /> <UppyBackupUploader @done={{route-action "remoteUploadSuccess"}} />
{{/if}} {{/if}}
{{#if site.isReadOnly}} {{#if this.site.isReadOnly}}
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{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}} {{else}}
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{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}} {{/if}}
<div class="backup-message"> <div class="backup-message">
{{#if status.restoreDisabled}} {{#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}} {{/if}}
</div> </div>
@ -23,19 +23,19 @@
<th></th> <th></th>
</thead> </thead>
<tbody> <tbody>
{{#each model as |backup|}} {{#each this.model as |backup|}}
<tr> <tr>
<td class="backup-filename">{{backup.filename}}</td> <td class="backup-filename">{{backup.filename}}</td>
<td class="backup-size">{{human-size backup.size}}</td> <td class="backup-size">{{human-size backup.size}}</td>
<td class="backup-controls"> <td class="backup-controls">
<div> <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 status.isOperationRunning}} {{#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="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={{status.restoreDisabled}} @class="btn-default" @title={{restoreTitle}} @label="admin.backups.operations.restore.label" /> <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}} {{else}}
<DButton @icon="far-trash-alt" @action={{route-action "destroyBackup"}} @actionParam={{backup}} @class="btn-danger" @title="admin.backups.operations.destroy.title" /> <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={{status.restoreDisabled}} @class="btn-default btn-restore" @title={{restoreTitle}} @label="admin.backups.operations.restore.label" /> <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}} {{/if}}
</div> </div>
</td> </td>

View File

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

View File

@ -6,10 +6,10 @@
<NavItem @route="admin.backups.logs" @label="admin.backups.menu.logs" /> <NavItem @route="admin.backups.logs" @label="admin.backups.menu.logs" />
<PluginOutlet @name="downloader" @connectorTagName="div" /> <PluginOutlet @name="downloader" @connectorTagName="div" />
<div class="admin-actions"> <div class="admin-actions">
{{#if model.canRollback}} {{#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={{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}}
{{#if model.isOperationRunning}} {{#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}} {{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" />

View File

@ -2,12 +2,12 @@
<h1>{{i18n "admin.badges.mass_award.title"}}</h1> <h1>{{i18n "admin.badges.mass_award.title"}}</h1>
<p>{{i18n "admin.badges.mass_award.description"}}</p> <p>{{i18n "admin.badges.mass_award.description"}}</p>
{{#if model}} {{#if this.model}}
<form class="form-horizontal"> <form class="form-horizontal">
<div class="badge-preview control-group"> <div class="badge-preview control-group">
{{#if model}} {{#if this.model}}
{{icon-or-image model}} {{icon-or-image this.model}}
<span class="badge-display-name">{{model.name}}</span> <span class="badge-display-name">{{this.model.name}}</span>
{{else}} {{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}} {{/if}}
@ -18,47 +18,47 @@
</div> </div>
<div class="control-group"> <div class="control-group">
<label> <label>
<Input @type="checkbox" @checked={{replaceBadgeOwners}} /> <Input @type="checkbox" @checked={{this.replaceBadgeOwners}} />
{{i18n "admin.badges.mass_award.replace_owners"}} {{i18n "admin.badges.mass_award.replace_owners"}}
</label> </label>
{{#if model.multiple_grant}} {{#if this.model.multiple_grant}}
<label class="grant-existing-holders"> <label class="grant-existing-holders">
<Input @type="checkbox" @checked={{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"}} {{i18n "admin.badges.mass_award.grant_existing_holders"}}
</label> </label>
{{/if}} {{/if}}
</div> </div>
<DButton @class="btn-primary" @action={{action "massAward"}} @type="submit" @disabled={{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"> <LinkTo @route="adminBadges.index" class="btn btn-normal">
{{d-icon "times"}} {{d-icon "times"}}
<span>{{i18n "cancel"}}</span> <span>{{i18n "cancel"}}</span>
</LinkTo> </LinkTo>
</form> </form>
{{#if saving}} {{#if this.saving}}
{{i18n "uploading"}} {{i18n "uploading"}}
{{/if}} {{/if}}
{{#if resultsMessage}} {{#if this.resultsMessage}}
<p> <p>
{{#if success}} {{#if this.success}}
{{d-icon "check" class="bulk-award-status-icon success"}} {{d-icon "check" class="bulk-award-status-icon success"}}
{{else}} {{else}}
{{d-icon "times" class="bulk-award-status-icon failure"}} {{d-icon "times" class="bulk-award-status-icon failure"}}
{{/if}} {{/if}}
{{resultsMessage}} {{this.resultsMessage}}
</p> </p>
{{#if unmatchedEntries.length}} {{#if this.unmatchedEntries.length}}
<p> <p>
{{d-icon "exclamation-triangle" class="bulk-award-status-icon failure"}} {{d-icon "exclamation-triangle" class="bulk-award-status-icon failure"}}
<span> <span>
{{#if unmatchedEntriesTruncated}} {{#if this.unmatchedEntriesTruncated}}
{{i18n "admin.badges.mass_award.csv_has_unmatched_users_truncated_list" count=unmatchedEntriesCount}} {{i18n "admin.badges.mass_award.csv_has_unmatched_users_truncated_list" count=this.unmatchedEntriesCount}}
{{else}} {{else}}
{{i18n "admin.badges.mass_award.csv_has_unmatched_users"}} {{i18n "admin.badges.mass_award.csv_has_unmatched_users"}}
{{/if}} {{/if}}
</span> </span>
</p> </p>
<ul> <ul>
{{#each unmatchedEntries as |entry|}} {{#each this.unmatchedEntries as |entry|}}
<li>{{entry}}</li> <li>{{entry}}</li>
{{/each}} {{/each}}
</ul> </ul>

View File

@ -1,10 +1,10 @@
<DSection @class="current-badges"> <DSection @class="current-badges">
<div class="badge-intro admin-intro"> <div class="badge-intro admin-intro">
<img src={{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"> <div class="content-wrapper">
<h1>{{i18n "admin.badges.badge_intro.title"}}</h1> <h1>{{i18n "admin.badges.badge_intro.title"}}</h1>
<div class="external-resources"> <div class="external-resources">
{{#each badgeIntroLinks as |link|}} {{#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}} {{d-icon link.icon}}
<span>{{i18n link.text}}</span> <span>{{i18n link.text}}</span>

View File

@ -2,15 +2,15 @@
<form class="form-horizontal"> <form class="form-horizontal">
<div class="control-group"> <div class="control-group">
<label for="name">{{i18n "admin.badges.name"}}</label> <label for="name">{{i18n "admin.badges.name"}}</label>
{{#if readOnly}} {{#if this.readOnly}}
<Input @type="text" @name="name" @value={{buffered.name}} @disabled={{true}} /> <Input @type="text" @name="name" @value={{this.buffered.name}} @disabled={{true}} />
<p class="help"> <p class="help">
<LinkTo @route="adminSiteText" @query={{hash q=(concat textCustomizationPrefix "name")}}> <LinkTo @route="adminSiteText" @query={{hash q=(concat this.textCustomizationPrefix "name")}}>
{{i18n "admin.badges.read_only_setting_help"}} {{i18n "admin.badges.read_only_setting_help"}}
</LinkTo> </LinkTo>
</p> </p>
{{else}} {{else}}
<Input @type="text" @name="name" @value={{buffered.name}} /> <Input @type="text" @name="name" @value={{this.buffered.name}} />
{{/if}} {{/if}}
</div> </div>
@ -18,29 +18,29 @@
<label for="graphic">{{i18n "admin.badges.graphic"}}</label> <label for="graphic">{{i18n "admin.badges.graphic"}}</label>
<div class="radios inline-form full-width"> <div class="radios inline-form full-width">
<label class="radio-label" for="badge-icon"> <label class="radio-label" for="badge-icon">
<RadioButton @name="badge-icon" @id="badge-icon" @value="icon" @selection={{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> <span>{{i18n "admin.badges.select_an_icon"}}</span>
</label> </label>
<label class="radio-label" for="badge-image"> <label class="radio-label" for="badge-image">
<RadioButton @name="badge-image" @id="badge-image" @value="image" @selection={{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> <span>{{i18n "admin.badges.upload_an_image"}}</span>
</label> </label>
</div> </div>
{{#if imageUploaderSelected}} {{#if this.imageUploaderSelected}}
<UppyImageUploader @id="badge-image-uploader" @imageUrl={{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"> <div class="control-instructions">
<p class="help">{{i18n "admin.badges.image_help"}}</p> <p class="help">{{i18n "admin.badges.image_help"}}</p>
</div> </div>
{{else if iconSelectorSelected}} {{else if this.iconSelectorSelected}}
<IconPicker @name="icon" @value={{buffered.icon}} @options={{hash maximum=1}} @onChange={{action (mut buffered.icon)}} /> <IconPicker @name="icon" @value={{this.buffered.icon}} @options={{hash maximum=1}} @onChange={{action (mut this.buffered.icon)}} />
{{/if}} {{/if}}
</div> </div>
<div class="control-group"> <div class="control-group">
<label for="badge_type_id">{{i18n "admin.badges.badge_type"}}</label> <label for="badge_type_id">{{i18n "admin.badges.badge_type"}}</label>
<ComboBox @name="badge_type_id" @value={{buffered.badge_type_id}} @content={{badgeTypes}} @onChange={{action (mut buffered.badge_type_id)}} @options={{hash <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=readOnly disabled=this.readOnly
}} /> }} />
</div> </div>
@ -48,71 +48,71 @@
<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"> <div class="badge-grouping-control">
<ComboBox @name="badge_grouping_id" @value={{buffered.badge_grouping_id}} @content={{badgeGroupings}} @class="badge-selector" @nameProperty="name" @onChange={{action (mut buffered.badge_grouping_id)}} /> <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" /> <DButton @class="btn-default" @action={{route-action "editGroupings"}} @icon="pencil-alt" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label for="description">{{i18n "admin.badges.description"}}</label> <label for="description">{{i18n "admin.badges.description"}}</label>
{{#if buffered.system}} {{#if this.buffered.system}}
<Textarea @name="description" @value={{buffered.description}} @disabled={{true}} /> <Textarea @name="description" @value={{this.buffered.description}} @disabled={{true}} />
<p class="help"> <p class="help">
<LinkTo @route="adminSiteText" @query={{hash q=(concat textCustomizationPrefix "description")}}> <LinkTo @route="adminSiteText" @query={{hash q=(concat this.textCustomizationPrefix "description")}}>
{{i18n "admin.badges.read_only_setting_help"}} {{i18n "admin.badges.read_only_setting_help"}}
</LinkTo> </LinkTo>
</p> </p>
{{else}} {{else}}
<Textarea @name="description" @value={{buffered.description}} /> <Textarea @name="description" @value={{this.buffered.description}} />
{{/if}} {{/if}}
</div> </div>
<div class="control-group"> <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 buffered.system}} {{#if this.buffered.system}}
<Textarea @name="long_description" @value={{buffered.long_description}} @disabled={{true}} /> <Textarea @name="long_description" @value={{this.buffered.long_description}} @disabled={{true}} />
<p class="help"> <p class="help">
<LinkTo @route="adminSiteText" @query={{hash q=(concat textCustomizationPrefix "long_description")}}> <LinkTo @route="adminSiteText" @query={{hash q=(concat this.textCustomizationPrefix "long_description")}}>
{{i18n "admin.badges.read_only_setting_help"}} {{i18n "admin.badges.read_only_setting_help"}}
</LinkTo> </LinkTo>
</p> </p>
{{else}} {{else}}
<Textarea @name="long_description" @value={{buffered.long_description}} /> <Textarea @name="long_description" @value={{this.buffered.long_description}} />
{{/if}} {{/if}}
</div> </div>
{{#if siteSettings.enable_badge_sql}} {{#if this.siteSettings.enable_badge_sql}}
<div class="control-group"> <div class="control-group">
<label for="query">{{i18n "admin.badges.query"}}</label> <label for="query">{{i18n "admin.badges.query"}}</label>
<AceEditor @content={{buffered.query}} @mode="sql" @disabled={{readOnly}} /> <AceEditor @content={{this.buffered.query}} @mode="sql" @disabled={{this.readOnly}} />
</div> </div>
{{#if hasQuery}} {{#if this.hasQuery}}
<a href {{action "preview" buffered "false"}}>{{i18n "admin.badges.preview.link_text"}}</a> <a href {{action "preview" this.buffered "false"}}>{{i18n "admin.badges.preview.link_text"}}</a>
| |
<a href {{action "preview" buffered "true"}}>{{i18n "admin.badges.preview.plan_text"}}</a> <a href {{action "preview" this.buffered "true"}}>{{i18n "admin.badges.preview.plan_text"}}</a>
{{#if preview_loading}} {{#if this.preview_loading}}
{{i18n "loading"}} {{i18n "loading"}}
{{/if}} {{/if}}
<div class="control-group"> <div class="control-group">
<label> <label>
<Input @type="checkbox" @checked={{buffered.auto_revoke}} @disabled={{readOnly}} /> <Input @type="checkbox" @checked={{this.buffered.auto_revoke}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.auto_revoke"}} {{i18n "admin.badges.auto_revoke"}}
</label> </label>
</div> </div>
<div class="control-group"> <div class="control-group">
<label> <label>
<Input @type="checkbox" @checked={{buffered.target_posts}} @disabled={{readOnly}} /> <Input @type="checkbox" @checked={{this.buffered.target_posts}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.target_posts"}} {{i18n "admin.badges.target_posts"}}
</label> </label>
</div> </div>
<div class="control-group"> <div class="control-group">
<label for="trigger">{{i18n "admin.badges.trigger"}}</label> <label for="trigger">{{i18n "admin.badges.trigger"}}</label>
<ComboBox @name="trigger" @value={{buffered.trigger}} @content={{badgeTriggers}} @onChange={{action (mut buffered.trigger)}} @options={{hash <ComboBox @name="trigger" @value={{this.buffered.trigger}} @content={{this.badgeTriggers}} @onChange={{action (mut this.buffered.trigger)}} @options={{hash
disabled=readOnly disabled=this.readOnly
}} /> }} />
</div> </div>
{{/if}} {{/if}}
@ -121,54 +121,54 @@
<div class="control-group"> <div class="control-group">
<div> <div>
<label> <label>
<Input @type="checkbox" @checked={{buffered.allow_title}} /> <Input @type="checkbox" @checked={{this.buffered.allow_title}} />
{{i18n "admin.badges.allow_title"}} {{i18n "admin.badges.allow_title"}}
</label> </label>
</div> </div>
<div> <div>
<label> <label>
<Input @type="checkbox" @checked={{buffered.multiple_grant}} @disabled={{readOnly}} /> <Input @type="checkbox" @checked={{this.buffered.multiple_grant}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.multiple_grant"}} {{i18n "admin.badges.multiple_grant"}}
</label> </label>
</div> </div>
<div> <div>
<label> <label>
<Input @type="checkbox" @checked={{buffered.listable}} @disabled={{readOnly}} /> <Input @type="checkbox" @checked={{this.buffered.listable}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.listable"}} {{i18n "admin.badges.listable"}}
</label> </label>
</div> </div>
<div> <div>
<label> <label>
<Input @type="checkbox" @checked={{buffered.show_posts}} @disabled={{readOnly}} /> <Input @type="checkbox" @checked={{this.buffered.show_posts}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.show_posts"}} {{i18n "admin.badges.show_posts"}}
</label> </label>
</div> </div>
<div> <div>
<label> <label>
<Input @type="checkbox" @checked={{buffered.enabled}} /> <Input @type="checkbox" @checked={{this.buffered.enabled}} />
{{i18n "admin.badges.enabled"}} {{i18n "admin.badges.enabled"}}
</label> </label>
</div> </div>
</div> </div>
<div class="buttons"> <div class="buttons">
<DButton @class="btn-primary" @action={{action "save"}} @type="submit" @disabled={{saving}} @label="admin.badges.save" /> <DButton @class="btn-primary" @action={{action "save"}} @type="submit" @disabled={{this.saving}} @label="admin.badges.save" />
<span class="saving">{{savingStatus}}</span> <span class="saving">{{this.savingStatus}}</span>
{{#unless readOnly}} {{#unless this.readOnly}}
<DButton @action={{action "destroy"}} @class="btn-danger" @label="admin.badges.delete" /> <DButton @action={{action "destroy"}} @class="btn-danger" @label="admin.badges.delete" />
{{/unless}} {{/unless}}
</div> </div>
</form> </form>
</DSection> </DSection>
{{#if grant_count}} {{#if this.grant_count}}
<div class="content-body current-badge-actions"> <div class="content-body current-badge-actions">
<div> <div>
<LinkTo @route="badges.show" @model={{this}}>{{i18n "badges.granted" count=grant_count}}</LinkTo> <LinkTo @route="badges.show" @model={{this}}>{{i18n "badges.granted" count=this.grant_count}}</LinkTo>
</div> </div>
</div> </div>
{{/if}} {{/if}}

View File

@ -15,9 +15,9 @@
</div> </div>
<div class="content-list"> <div class="content-list">
<ul class="admin-badge-list"> <ul class="admin-badge-list">
{{#each model as |badge|}} {{#each this.model as |badge|}}
<li class="admin-badge-list-item"> <li class="admin-badge-list-item">
<LinkTo @route={{selectedRoute}} @model={{badge.id}}> <LinkTo @route={{this.selectedRoute}} @model={{badge.id}}>
<BadgeButton @badge={{badge}} /> <BadgeButton @badge={{badge}} />
{{#if badge.newBadge}} {{#if badge.newBadge}}
<span class="list-badge">{{i18n "filters.new.lower_title"}}</span> <span class="list-badge">{{i18n "filters.new.lower_title"}}</span>

View File

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

View File

@ -1,8 +1,8 @@
{{#if hasFormattedLogs}} {{#if this.hasFormattedLogs}}
<pre>{{formattedLogs}}</pre> <pre>{{this.formattedLogs}}</pre>
{{else}} {{else}}
<p>{{noLogsMessage}}</p> <p>{{this.noLogsMessage}}</p>
{{/if}} {{/if}}
{{#if showLoadingSpinner}} {{#if this.showLoadingSpinner}}
<div class="spinner small"></div> <div class="spinner small"></div>
{{/if}} {{/if}}

View File

@ -1,15 +1,15 @@
<div class="field">{{i18n name}}</div> <div class="field">{{i18n this.name}}</div>
<div class="value"> <div class="value">
{{#if editing}} {{#if this.editing}}
<TextField @value={{buffer}} @autofocus="autofocus" @autocomplete="off" /> <TextField @value={{this.buffer}} @autofocus="autofocus" @autocomplete="off" />
{{else}} {{else}}
<a href {{action "edit"}} class="inline-editable-field"> <a href {{action "edit"}} class="inline-editable-field">
<span>{{value}}</span> <span>{{this.value}}</span>
</a> </a>
{{/if}} {{/if}}
</div> </div>
<div class="controls"> <div class="controls">
{{#if editing}} {{#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 {{action "edit"}}>{{i18n "cancel"}}</a> <a href {{action "edit"}}>{{i18n "cancel"}}</a>
{{else}} {{else}}

View File

@ -1,12 +1,12 @@
<div class="form-element label-area"> <div class="form-element label-area">
{{#if label}} {{#if this.label}}
<label>{{i18n label}}</label> <label>{{i18n this.label}}</label>
{{else}} {{else}}
&nbsp; &nbsp;
{{/if}} {{/if}}
</div> </div>
<div class="form-element input-area"> <div class="form-element input-area">
{{#if wrapLabel}} {{#if this.wrapLabel}}
<label>{{yield}}</label> <label>{{yield}}</label>
{{else}} {{else}}
{{yield}} {{yield}}

View File

@ -1,8 +1,8 @@
<div class="suspended-count {{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> <label>{{i18n "admin.user.suspended_count"}}</label>
<span>{{user.penalty_counts.suspended}}</span> <span>{{this.user.penalty_counts.suspended}}</span>
</div> </div>
<div class="silenced-count {{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> <label>{{i18n "admin.user.silenced_count"}}</label>
<span>{{user.penalty_counts.silenced}}</span> <span>{{this.user.penalty_counts.silenced}}</span>
</div> </div>

View File

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

View File

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

View File

@ -1,5 +1,5 @@
<div class="table-container"> <div class="table-container">
{{#each model.data as |data|}} {{#each this.model.data as |data|}}
<a class="table-cell user-{{data.key}}" href={{data.url}}> <a class="table-cell user-{{data.key}}" href={{data.url}}>
<span class="label"> <span class="label">
{{#if data.icon}} {{#if data.icon}}

View File

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

View File

@ -1,21 +1,21 @@
{{#if showBackupStats}} {{#if this.showBackupStats}}
<div class="backups"> <div class="backups">
<h3 class="storage-stats-title"> <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> </h3>
<p> <p>
{{#if backupStats.free_bytes}} {{#if this.backupStats.free_bytes}}
{{i18n "admin.dashboard.space_used_and_free" usedSize=usedBackupSpace freeSize=freeBackupSpace}} {{i18n "admin.dashboard.space_used_and_free" usedSize=this.usedBackupSpace freeSize=this.freeBackupSpace}}
{{else}} {{else}}
{{i18n "admin.dashboard.space_used" usedSize=usedBackupSpace}} {{i18n "admin.dashboard.space_used" usedSize=this.usedBackupSpace}}
{{/if}} {{/if}}
<br> <br>
{{i18n "admin.dashboard.backup_count" count=backupStats.count location=backupLocationName}} {{i18n "admin.dashboard.backup_count" count=this.backupStats.count location=this.backupLocationName}}
{{#if backupStats.last_backup_taken_at}} {{#if this.backupStats.last_backup_taken_at}}
<br> <br>
{{html-safe (i18n "admin.dashboard.lastest_backup" date=(format-date backupStats.last_backup_taken_at leaveAgo="true"))}} {{html-safe (i18n "admin.dashboard.lastest_backup" date=(format-date this.backupStats.last_backup_taken_at leaveAgo="true"))}}
{{/if}} {{/if}}
</p> </p>
</div> </div>
@ -24,10 +24,10 @@
<div class="uploads"> <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> <p>
{{#if uploadStats.free_bytes}} {{#if this.uploadStats.free_bytes}}
{{i18n "admin.dashboard.space_used_and_free" usedSize=usedUploadSpace freeSize=freeUploadSpace}} {{i18n "admin.dashboard.space_used_and_free" usedSize=this.usedUploadSpace freeSize=this.freeUploadSpace}}
{{else}} {{else}}
{{i18n "admin.dashboard.space_used" usedSize=usedUploadSpace}} {{i18n "admin.dashboard.space_used" usedSize=this.usedUploadSpace}}
{{/if}} {{/if}}
</p> </p>
</div> </div>

View File

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

View File

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

View File

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

View File

@ -1,30 +1,30 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
{{#if model.computedLabels}} {{#if this.model.computedLabels}}
{{#each model.computedLabels as |label|}} {{#each this.model.computedLabels as |label|}}
<AdminReportTableHeader @showSortingUI={{showSortingUI}} @currentSortDirection={{sortDirection}} @currentSortLabel={{sortLabel}} @label={{label}} @sortByLabel={{action "sortByLabel" label}} /> <AdminReportTableHeader @showSortingUI={{this.showSortingUI}} @currentSortDirection={{this.sortDirection}} @currentSortLabel={{this.sortLabel}} @label={{label}} @sortByLabel={{action "sortByLabel" label}} />
{{/each}} {{/each}}
{{else}} {{else}}
{{#each model.data as |data|}} {{#each this.model.data as |data|}}
<th>{{data.x}}</th> <th>{{data.x}}</th>
{{/each}} {{/each}}
{{/if}} {{/if}}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{#each paginatedData as |data|}} {{#each this.paginatedData as |data|}}
<AdminReportTableRow @data={{data}} @labels={{model.computedLabels}} @options={{options}} /> <AdminReportTableRow @data={{data}} @labels={{this.model.computedLabels}} @options={{this.options}} />
{{/each}} {{/each}}
{{#if showTotalForSample}} {{#if this.showTotalForSample}}
<tr class="total-row"> <tr class="total-row">
<td colspan={{totalsForSample.length}}> <td colspan={{this.totalsForSample.length}}>
{{i18n "admin.dashboard.reports.totals_for_sample"}} {{i18n "admin.dashboard.reports.totals_for_sample"}}
</td> </td>
</tr> </tr>
<tr class="admin-report-table-row"> <tr class="admin-report-table-row">
{{#each totalsForSample as |total|}} {{#each this.totalsForSample as |total|}}
<td class="admin-report-table-cell {{total.type}} {{total.property}}"> <td class="admin-report-table-cell {{total.type}} {{total.property}}">
{{total.formattedValue}} {{total.formattedValue}}
</td> </td>
@ -32,7 +32,7 @@
</tr> </tr>
{{/if}} {{/if}}
{{#if showTotal}} {{#if this.showTotal}}
<tr class="total-row"> <tr class="total-row">
<td colspan="2"> <td colspan="2">
{{i18n "admin.dashboard.reports.total"}} {{i18n "admin.dashboard.reports.total"}}
@ -40,11 +40,11 @@
</tr> </tr>
<tr class="admin-report-table-row"> <tr class="admin-report-table-row">
<td class="admin-report-table-cell date x">—</td> <td class="admin-report-table-cell date x">—</td>
<td class="admin-report-table-cell number y">{{number model.total}}</td> <td class="admin-report-table-cell number y">{{number this.model.total}}</td>
</tr> </tr>
{{/if}} {{/if}}
{{#if showAverage}} {{#if this.showAverage}}
<tr class="total-row"> <tr class="total-row">
<td colspan="2"> <td colspan="2">
{{i18n "admin.dashboard.reports.average_for_sample"}} {{i18n "admin.dashboard.reports.average_for_sample"}}
@ -52,14 +52,14 @@
</tr> </tr>
<tr class="admin-report-table-row"> <tr class="admin-report-table-row">
<td class="admin-report-table-cell date x">—</td> <td class="admin-report-table-cell date x">—</td>
<td class="admin-report-table-cell number y">{{number averageForSample}}</td> <td class="admin-report-table-cell number y">{{number this.averageForSample}}</td>
</tr> </tr>
{{/if}} {{/if}}
</tbody> </tbody>
</table> </table>
<div class="pagination"> <div class="pagination">
{{#each pages as |pageState|}} {{#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}} {{/each}}
</div> </div>

View File

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

View File

@ -1,35 +1,35 @@
{{#unless isHidden}} {{#unless this.isHidden}}
{{#if isEnabled}} {{#if this.isEnabled}}
<ConditionalLoadingSection @isLoading={{isLoading}}> <ConditionalLoadingSection @isLoading={{this.isLoading}}>
{{#if showHeader}} {{#if this.showHeader}}
<div class="header"> <div class="header">
{{#if showTitle}} {{#if this.showTitle}}
<ul class="breadcrumb"> <ul class="breadcrumb">
{{#if showAllReportsLink}} {{#if this.showAllReportsLink}}
<li class="item all-reports"> <li class="item all-reports">
<LinkTo @route="admin.dashboardReports" class="report-url"> <LinkTo @route="admin.dashboardReports" class="report-url">
{{i18n "admin.dashboard.all_reports"}} {{i18n "admin.dashboard.all_reports"}}
</LinkTo> </LinkTo>
</li> </li>
{{#unless showNotFoundError}} {{#unless this.showNotFoundError}}
<li class="item separator">|</li> <li class="item separator">|</li>
{{/unless}} {{/unless}}
{{/if}} {{/if}}
{{#unless showNotFoundError}} {{#unless this.showNotFoundError}}
<li class="item report"> <li class="item report">
<a href={{model.reportUrl}} class="report-url"> <a href={{this.model.reportUrl}} class="report-url">
{{model.title}} {{this.model.title}}
</a> </a>
{{#if model.description}} {{#if this.model.description}}
{{#if model.description_link}} {{#if this.model.description_link}}
<a target="_blank" rel="noopener noreferrer" href={{model.description_link}} class="info" data-tooltip={{model.description}}> <a target="_blank" rel="noopener noreferrer" href={{this.model.description_link}} class="info" data-tooltip={{this.model.description}}>
{{d-icon "question-circle"}} {{d-icon "question-circle"}}
</a> </a>
{{else}} {{else}}
<span class="info" data-tooltip={{model.description}}> <span class="info" data-tooltip={{this.model.description}}>
{{d-icon "question-circle"}} {{d-icon "question-circle"}}
</span> </span>
{{/if}} {{/if}}
@ -39,17 +39,17 @@
</ul> </ul>
{{/if}} {{/if}}
{{#if shouldDisplayTrend}} {{#if this.shouldDisplayTrend}}
<div class="trend {{model.trend}}"> <div class="trend {{this.model.trend}}">
<span class="value" title={{model.trendTitle}}> <span class="value" title={{this.model.trendTitle}}>
{{#if model.average}} {{#if this.model.average}}
{{number model.currentAverage}}{{#if model.percent}}%{{/if}} {{number this.model.currentAverage}}{{#if this.model.percent}}%{{/if}}
{{else}} {{else}}
{{number model.currentTotal noTitle="true"}}{{#if model.percent}}%{{/if}} {{number this.model.currentTotal noTitle="true"}}{{#if this.model.percent}}%{{/if}}
{{/if}} {{/if}}
{{#if model.trendIcon}} {{#if this.model.trendIcon}}
{{d-icon model.trendIcon class="icon"}} {{d-icon this.model.trendIcon class="icon"}}
{{/if}} {{/if}}
</span> </span>
</div> </div>
@ -59,50 +59,50 @@
<div class="body"> <div class="body">
<div class="main"> <div class="main">
{{#if showError}} {{#if this.showError}}
{{#if showTimeoutError}} {{#if this.showTimeoutError}}
<div class="alert alert-error report-alert timeout"> <div class="alert alert-error report-alert timeout">
{{d-icon "exclamation-triangle"}} {{d-icon "exclamation-triangle"}}
<span>{{i18n "admin.dashboard.timeout_error"}}</span> <span>{{i18n "admin.dashboard.timeout_error"}}</span>
</div> </div>
{{/if}} {{/if}}
{{#if showExceptionError}} {{#if this.showExceptionError}}
<div class="alert alert-error report-alert exception"> <div class="alert alert-error report-alert exception">
{{d-icon "exclamation-triangle"}} {{d-icon "exclamation-triangle"}}
<span>{{i18n "admin.dashboard.exception_error"}}</span> <span>{{i18n "admin.dashboard.exception_error"}}</span>
</div> </div>
{{/if}} {{/if}}
{{#if showNotFoundError}} {{#if this.showNotFoundError}}
<div class="alert alert-error report-alert not-found"> <div class="alert alert-error report-alert not-found">
{{d-icon "exclamation-triangle"}} {{d-icon "exclamation-triangle"}}
<span>{{i18n "admin.dashboard.not_found_error"}}</span> <span>{{i18n "admin.dashboard.not_found_error"}}</span>
</div> </div>
{{/if}} {{/if}}
{{else}} {{else}}
{{#if hasData}} {{#if this.hasData}}
{{#if currentMode}} {{#if this.currentMode}}
{{component modeComponent model=model options=options}} {{component this.modeComponent model=this.model options=this.options}}
{{#if model.relatedReport}} {{#if this.model.relatedReport}}
<AdminReport @showFilteringUI={{false}} @dataSourceName={{model.relatedReport.type}} /> <AdminReport @showFilteringUI={{false}} @dataSourceName={{this.model.relatedReport.type}} />
{{/if}} {{/if}}
{{/if}} {{/if}}
{{else}} {{else}}
{{#if rateLimitationString}} {{#if this.rateLimitationString}}
<div class="alert alert-error report-alert rate-limited"> <div class="alert alert-error report-alert rate-limited">
{{d-icon "thermometer-three-quarters"}} {{d-icon "thermometer-three-quarters"}}
<span>{{rateLimitationString}}</span> <span>{{this.rateLimitationString}}</span>
</div> </div>
{{else}} {{else}}
<div class="alert alert-info report-alert no-data"> <div class="alert alert-info report-alert no-data">
{{d-icon "chart-pie"}} {{d-icon "chart-pie"}}
{{#if model.reportUrl}} {{#if this.model.reportUrl}}
<a href={{model.reportUrl}} class="report-url"> <a href={{this.model.reportUrl}} class="report-url">
<span> <span>
{{#if model.title}} {{#if this.model.title}}
{{model.title}} {{this.model.title}}
{{/if}} {{/if}}
{{i18n "admin.dashboard.reports.no_data"}} {{i18n "admin.dashboard.reports.no_data"}}
</span> </span>
@ -116,42 +116,42 @@
{{/if}} {{/if}}
</div> </div>
{{#if showFilteringUI}} {{#if this.showFilteringUI}}
<div class="filters"> <div class="filters">
{{#if showModes}} {{#if this.showModes}}
<div class="modes"> <div class="modes">
{{#each displayedModes as |displayedMode|}} {{#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}} {{/each}}
</div> </div>
{{/if}} {{/if}}
{{#if isChartMode}} {{#if this.isChartMode}}
{{#if model.average}} {{#if this.model.average}}
<span class="average-chart"> <span class="average-chart">
{{i18n "admin.dashboard.reports.average_chart_label"}} {{i18n "admin.dashboard.reports.average_chart_label"}}
</span> </span>
{{/if}} {{/if}}
<div class="chart-groupings"> <div class="chart-groupings">
{{#each chartGroupings as |chartGrouping|}} {{#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}} {{/each}}
</div> </div>
{{/if}} {{/if}}
{{#if showDatesOptions}} {{#if this.showDatesOptions}}
<div class="control"> <div class="control">
<span class="label"> <span class="label">
{{i18n "admin.dashboard.reports.dates"}} {{i18n "admin.dashboard.reports.dates"}}
</span> </span>
<div class="input"> <div class="input">
<DateTimeInputRange @from={{startDate}} @to={{endDate}} @onChange={{action "onChangeDateRange"}} @showFromTime={{false}} @showToTime={{false}} /> <DateTimeInputRange @from={{this.startDate}} @to={{this.endDate}} @onChange={{action "onChangeDateRange"}} @showFromTime={{false}} @showToTime={{false}} />
</div> </div>
</div> </div>
{{/if}} {{/if}}
{{#each model.available_filters as |filter|}} {{#each this.model.available_filters as |filter|}}
<div class="control"> <div class="control">
<span class="label"> <span class="label">
{{i18n (concat "admin.dashboard.reports.filters." filter.id ".label")}} {{i18n (concat "admin.dashboard.reports.filters." filter.id ".label")}}
@ -160,7 +160,7 @@
<div class="input"> <div class="input">
{{component {{component
(concat "report-filters/" filter.type) (concat "report-filters/" filter.type)
model=model model=this.model
filter=filter filter=filter
applyFilter=(action "applyFilter")}} applyFilter=(action "applyFilter")}}
</div> </div>
@ -173,7 +173,7 @@
</div> </div>
</div> </div>
{{#if showRefresh}} {{#if this.showRefresh}}
<div class="control"> <div class="control">
<div class="input"> <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" />
@ -186,7 +186,7 @@
</ConditionalLoadingSection> </ConditionalLoadingSection>
{{else}} {{else}}
<div class="alert alert-info"> <div class="alert alert-info">
{{html-safe disabledLabel}} {{html-safe this.disabledLabel}}
</div> </div>
{{/if}} {{/if}}
{{/unless}} {{/unless}}

View File

@ -1,9 +1,9 @@
<div class="edit-main-nav admin-controls"> <div class="edit-main-nav admin-controls">
<nav> <nav>
<ul class="nav nav-pills target"> <ul class="nav nav-pills target">
{{#each visibleTargets as |target|}} {{#each this.visibleTargets as |target|}}
<li> <li>
<LinkTo @route={{editRouteName}} @models={{array theme.id target.name fieldName}} @replace={{true}} @title={{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.error}}{{d-icon "exclamation-triangle"}}{{/if}}
{{#if target.icon}}{{d-icon target.icon}}{{/if}} {{#if target.icon}}{{d-icon target.icon}}{{/if}}
{{i18n (concat "admin.customize.theme." target.name)}} {{i18n (concat "admin.customize.theme." target.name)}}
@ -11,20 +11,20 @@
</li> </li>
{{/each}} {{/each}}
{{#if allowAdvanced}} {{#if this.allowAdvanced}}
<li> <li>
<a {{action "toggleShowAdvanced"}} <a {{action "toggleShowAdvanced"}}
href href
title={{i18n (concat "admin.customize.theme." (if showAdvanced "hide_advanced" "show_advanced"))}} title={{i18n (concat "admin.customize.theme." (if this.showAdvanced "hide_advanced" "show_advanced"))}}
class="no-text"> class="no-text">
{{d-icon (if showAdvanced "angle-double-left" "angle-double-right")}} {{d-icon (if this.showAdvanced "angle-double-left" "angle-double-right")}}
</a> </a>
</li> </li>
{{/if}} {{/if}}
<li class="spacer"></li> <li class="spacer"></li>
<li> <li>
<label> <label>
<Input @type="checkbox" @checked={{onlyOverridden}} @click={{action "onlyOverriddenChanged" value="target.checked"}} /> <Input @type="checkbox" @checked={{this.onlyOverridden}} @click={{action "onlyOverriddenChanged" value="target.checked"}} />
{{i18n "admin.customize.theme.hide_unused_fields"}} {{i18n "admin.customize.theme.hide_unused_fields"}}
</label> </label>
</li> </li>
@ -35,9 +35,9 @@
<div class="admin-controls"> <div class="admin-controls">
<nav> <nav>
<ul class="nav nav-pills fields"> <ul class="nav nav-pills fields">
{{#each visibleFields as |field|}} {{#each this.visibleFields as |field|}}
<li> <li>
<LinkTo @route={{editRouteName}} @models={{array theme.id 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.error}}{{d-icon "exclamation-triangle"}}{{/if}}
{{#if field.icon}}{{d-icon field.icon}}{{/if}} {{#if field.icon}}{{d-icon field.icon}}{{/if}}
{{field.translatedName}} {{field.translatedName}}
@ -45,14 +45,14 @@
</li> </li>
{{/each}} {{/each}}
{{#if showAddField}} {{#if this.showAddField}}
<li> <li>
{{#if addingField}} {{#if this.addingField}}
<Input @type={{text}} @value={{newFieldName}} @enter={{action "addField"}} @escape-press={{action "cancelAddField"}} /> <Input @type={{this.text}} @value={{this.newFieldName}} @enter={{action "addField"}} @escape-press={{action "cancelAddField"}} />
<DButton @class="ok" @action={{action "addField" newFieldName}} @icon="check" /> <DButton @class="ok" @action={{action "addField" this.newFieldName}} @icon="check" />
<DButton @class="cancel" @action={{action "cancelAddField"}} @icon="times" /> <DButton @class="cancel" @action={{action "cancelAddField"}} @icon="times" />
{{else}} {{else}}
<a href {{action "toggleAddField" currentTargetName}} class="no-text"> <a href {{action "toggleAddField" this.currentTargetName}} class="no-text">
{{d-icon "plus"}} {{d-icon "plus"}}
</a> </a>
{{/if}} {{/if}}
@ -62,19 +62,19 @@
<li class="spacer"></li> <li class="spacer"></li>
<li> <li>
<a href {{action "toggleMaximize"}} class="no-text"> <a href {{action "toggleMaximize"}} class="no-text">
{{d-icon maximizeIcon}} {{d-icon this.maximizeIcon}}
</a> </a>
</li> </li>
</ul> </ul>
</nav> </nav>
</div> </div>
{{#if error}} {{#if this.error}}
<pre class="field-error">{{error}}</pre> <pre class="field-error">{{this.error}}</pre>
{{/if}} {{/if}}
{{#if warning}} {{#if this.warning}}
<pre class="field-warning">{{html-safe warning}}</pre> <pre class="field-warning">{{html-safe this.warning}}</pre>
{{/if}} {{/if}}
<AceEditor @content={{activeSection}} @editorId={{editorId}} @mode={{activeSectionMode}} @autofocus="true" @placeholder={{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,41 +1,41 @@
<div class="user-field"> <div class="user-field">
{{#if (or isEditing (not userField.id))}} {{#if (or this.isEditing (not this.userField.id))}}
<AdminFormRow @label="admin.user_fields.type"> <AdminFormRow @label="admin.user_fields.type">
<ComboBox @content={{fieldTypes}} @value={{buffered.field_type}} @onChange={{action (mut buffered.field_type)}} /> <ComboBox @content={{this.fieldTypes}} @value={{this.buffered.field_type}} @onChange={{action (mut this.buffered.field_type)}} />
</AdminFormRow> </AdminFormRow>
<AdminFormRow @label="admin.user_fields.name"> <AdminFormRow @label="admin.user_fields.name">
<Input @value={{buffered.name}} class="user-field-name" @maxlength="255" /> <Input @value={{this.buffered.name}} class="user-field-name" @maxlength="255" />
</AdminFormRow> </AdminFormRow>
<AdminFormRow @label="admin.user_fields.description"> <AdminFormRow @label="admin.user_fields.description">
<Input @value={{buffered.description}} class="user-field-desc" @maxlength="255" /> <Input @value={{this.buffered.description}} class="user-field-desc" @maxlength="255" />
</AdminFormRow> </AdminFormRow>
{{#if bufferedFieldType.hasOptions}} {{#if this.bufferedFieldType.hasOptions}}
<AdminFormRow @label="admin.user_fields.options"> <AdminFormRow @label="admin.user_fields.options">
<ValueList @values={{buffered.options}} @inputType="array" /> <ValueList @values={{this.buffered.options}} @inputType="array" />
</AdminFormRow> </AdminFormRow>
{{/if}} {{/if}}
<AdminFormRow @wrapLabel="true"> <AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{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>
<AdminFormRow @wrapLabel="true"> <AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{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>
<AdminFormRow @wrapLabel="true"> <AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{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>
<AdminFormRow @wrapLabel="true"> <AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{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>
<AdminFormRow @wrapLabel="true"> <AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{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>
<AdminFormRow> <AdminFormRow>
@ -45,18 +45,18 @@
{{else}} {{else}}
<div class="row"> <div class="row">
<div class="form-display"> <div class="form-display">
<b class="name">{{userField.name}}</b> <b class="name">{{this.userField.name}}</b>
<br> <br>
<span class="description">{{html-safe userField.description}}</span> <span class="description">{{html-safe this.userField.description}}</span>
</div> </div>
<div class="form-display field-type">{{fieldName}}</div> <div class="form-display field-type">{{this.fieldName}}</div>
<div class="form-element controls"> <div class="form-element controls">
<DButton @action={{action "edit"}} @class="btn-default edit" @icon="pencil-alt" @label="admin.user_fields.edit" /> <DButton @action={{action "edit"}} @class="btn-default edit" @icon="pencil-alt" @label="admin.user_fields.edit" />
<DButton @action={{destroyAction}} @actionParam={{userField}} @class="btn-danger cancel" @icon="far-trash-alt" @label="admin.user_fields.delete" /> <DButton @action={{this.destroyAction}} @actionParam={{this.userField}} @class="btn-danger cancel" @icon="far-trash-alt" @label="admin.user_fields.delete" />
<DButton @action={{moveUpAction}} @actionParam={{userField}} @class="btn-default" @icon="arrow-up" @disabled={{cantMoveUp}} /> <DButton @action={{this.moveUpAction}} @actionParam={{this.userField}} @class="btn-default" @icon="arrow-up" @disabled={{this.cantMoveUp}} />
<DButton @action={{moveDownAction}} @actionParam={{userField}} @class="btn-default" @icon="arrow-down" @disabled={{cantMoveDown}} /> <DButton @action={{this.moveDownAction}} @actionParam={{this.userField}} @class="btn-default" @icon="arrow-down" @disabled={{this.cantMoveDown}} />
</div> </div>
</div> </div>
<div class="row">{{flags}}</div> <div class="row">{{this.flags}}</div>
{{/if}} {{/if}}
</div> </div>

View File

@ -1,9 +1,9 @@
<span role="button" onclick={{action "deleteWord"}} class="delete-word-record">{{d-icon "times"}}</span> {{word.word}} <span role="button" onclick={{action "deleteWord"}} class="delete-word-record">{{d-icon "times"}}</span> {{this.word.word}}
{{#if (or isReplace isLink)}} {{#if (or this.isReplace this.isLink)}}
&rarr; <span class="replacement">{{word.replacement}}</span> &rarr; <span class="replacement">{{this.word.replacement}}</span>
{{else if isTag}} {{else if this.isTag}}
&rarr; &rarr;
{{#each tags as |tag|}} {{#each this.tags as |tag|}}
<span class="tag">{{tag}}</span> <span class="tag">{{tag}}</span>
{{/each}} {{/each}}
{{/if}} {{/if}}

View File

@ -1,3 +1,3 @@
<Input @id={{typeName}} @type="checkbox" @name="event-choice" @checked={{enabled}} /> <Input @id={{this.typeName}} @type="checkbox" @name="event-choice" @checked={{this.enabled}} />
<label for={{typeName}}>{{name}}</label> <label for={{this.typeName}}>{{this.name}}</label>
<p>{{details}}</p> <p>{{this.details}}</p>

View File

@ -1,19 +1,19 @@
<div class="col first status"> <div class="col first status">
<span class={{statusColorClasses}}>{{model.status}}</span> <span class={{this.statusColorClasses}}>{{this.model.status}}</span>
</div> </div>
<div class="col event-id">{{model.id}}</div> <div class="col event-id">{{this.model.id}}</div>
<div class="col timestamp">{{createdAt}}</div> <div class="col timestamp">{{this.createdAt}}</div>
<div class="col completion">{{completion}}</div> <div class="col completion">{{this.completion}}</div>
<div class="col actions"> <div class="col actions">
<DButton @icon={{expandRequestIcon}} @action={{action "toggleRequest"}} @label="admin.web_hooks.events.request" /> <DButton @icon={{this.expandRequestIcon}} @action={{action "toggleRequest"}} @label="admin.web_hooks.events.request" />
<DButton @icon={{expandResponseIcon}} @action={{action "toggleResponse"}} @label="admin.web_hooks.events.response" /> <DButton @icon={{this.expandResponseIcon}} @action={{action "toggleResponse"}} @label="admin.web_hooks.events.response" />
<DButton @icon="sync" @action={{action "redeliver"}} @label="admin.web_hooks.events.redeliver" /> <DButton @icon="sync" @action={{action "redeliver"}} @label="admin.web_hooks.events.redeliver" />
</div> </div>
{{#if expandDetails}} {{#if this.expandDetails}}
<div class="details"> <div class="details">
<h3>{{i18n "admin.web_hooks.events.headers"}}</h3> <h3>{{i18n "admin.web_hooks.events.headers"}}</h3>
<pre><code>{{headers}}</code></pre> <pre><code>{{this.headers}}</code></pre>
<h3>{{bodyLabel}}</h3> <h3>{{this.bodyLabel}}</h3>
<pre><code>{{body}}</code></pre> <pre><code>{{this.body}}</code></pre>
</div> </div>
{{/if}} {{/if}}

View File

@ -1 +1 @@
{{circleIcon}} {{deliveryStatus}} {{this.circleIcon}} {{this.deliveryStatus}}

View File

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

View File

@ -1,19 +1,19 @@
{{#if newFeatures}} {{#if this.newFeatures}}
<div class="section-title"> <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>
<div class="section-body {{columnCountClass}}"> <div class="section-body {{this.columnCountClass}}">
{{#each newFeatures as |feature|}} {{#each this.newFeatures as |feature|}}
<DashboardNewFeatureItem @item={{feature}} @tagName="" /> <DashboardNewFeatureItem @item={{feature}} @tagName="" />
{{/each}} {{/each}}
</div> </div>
<div class="section-footer"> <div class="section-footer">
{{#if releaseNotesLink}} {{#if this.releaseNotesLink}}
<a rel="noopener noreferrer" target="_blank" href={{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"}} {{i18n "admin.dashboard.new_features.learn_more"}}
</a> </a>
{{/if}} {{/if}}
<DButton @label="admin.dashboard.new_features.dismiss" @class="btn-default new-features-dismiss" @action={{dismissNewFeatures}} /> <DButton @label="admin.dashboard.new_features.dismiss" @class="btn-default new-features-dismiss" @action={{this.dismissNewFeatures}} />
</div> </div>
{{/if}} {{/if}}

View File

@ -1,4 +1,4 @@
{{#if foundProblems}} {{#if this.foundProblems}}
<div class="section dashboard-problems"> <div class="section dashboard-problems">
<div class="section-title"> <div class="section-title">
<h2> <h2>
@ -8,11 +8,11 @@
</div> </div>
<div class="section-body"> <div class="section-body">
<ConditionalLoadingSection @isLoading={{loadingProblems}}> <ConditionalLoadingSection @isLoading={{this.loadingProblems}}>
{{#if highPriorityProblems.length}} {{#if this.highPriorityProblems.length}}
<div class="problem-messages priority-high"> <div class="problem-messages priority-high">
<ul> <ul>
{{#each highPriorityProblems as |problem|}} {{#each this.highPriorityProblems as |problem|}}
<li class={{concat "dashboard-problem " "priority-" problem.priority}}> <li class={{concat "dashboard-problem " "priority-" problem.priority}}>
{{d-icon "exclamation-triangle"}} {{html-safe problem.message}} {{d-icon "exclamation-triangle"}} {{html-safe problem.message}}
</li> </li>
@ -23,15 +23,15 @@
<div class="problem-messages priority-low"> <div class="problem-messages priority-low">
<ul> <ul>
{{#each lowPriorityProblems as |problem|}} {{#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}} {{/each}}
</ul> </ul>
</div> </div>
<p class="actions"> <p class="actions">
<DButton @action={{refreshProblems}} @class="btn-default" @icon="sync" @label="admin.dashboard.refresh_problems" /> <DButton @action={{this.refreshProblems}} @class="btn-default" @icon="sync" @label="admin.dashboard.refresh_problems" />
{{i18n "admin.dashboard.last_checked"}}: {{problemsTimestamp}} {{i18n "admin.dashboard.last_checked"}}: {{this.problemsTimestamp}}
</p> </p>
</ConditionalLoadingSection> </ConditionalLoadingSection>
</div> </div>

View File

@ -9,10 +9,10 @@
</div> </div>
</div> </div>
<AceEditor @content={{editorContents}} @mode={{currentEditorMode}} @editorId={{editorId}} @save={{action "save"}} /> <AceEditor @content={{this.editorContents}} @mode={{this.currentEditorMode}} @editorId={{this.editorId}} @save={{action "save"}} />
<div class="admin-footer"> <div class="admin-footer">
<div class="buttons"> <div class="buttons">
<DButton @action={{action "reset"}} @disabled={{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> </div>

View File

@ -1,29 +1,29 @@
{{#if editing}} {{#if this.editing}}
<td class="editing-input"> <td class="editing-input">
<div class="label">{{i18n "admin.embedding.host"}}</div> <div class="label">{{i18n "admin.embedding.host"}}</div>
<Input @value={{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>
<td class="editing-input"> <td class="editing-input">
<div class="label">{{i18n "admin.embedding.class_name"}}</div> <div class="label">{{i18n "admin.embedding.class_name"}}</div>
<Input @value={{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>
<td class="editing-input"> <td class="editing-input">
<div class="label">{{i18n "admin.embedding.allowed_paths"}}</div> <div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>
<Input @value={{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>
<td class="editing-input"> <td class="editing-input">
<div class="label">{{i18n "admin.embedding.category"}}</div> <div class="label">{{i18n "admin.embedding.category"}}</div>
<CategoryChooser @value={{categoryId}} @class="small" @onChange={{action (mut categoryId)}} /> <CategoryChooser @value={{this.categoryId}} @class="small" @onChange={{action (mut this.categoryId)}} />
</td> </td>
<td class="editing-controls"> <td class="editing-controls">
<DButton @icon="check" @action={{action "save"}} @class="btn-primary" @disabled={{cantSave}} /> <DButton @icon="check" @action={{action "save"}} @class="btn-primary" @disabled={{this.cantSave}} />
<DButton @icon="times" @action={{action "cancel"}} @class="btn-danger" @disabled={{host.isSaving}} /> <DButton @icon="times" @action={{action "cancel"}} @class="btn-danger" @disabled={{this.host.isSaving}} />
</td> </td>
{{else}} {{else}}
<td><div class="label">{{i18n "admin.embedding.host"}}</div>{{host.host}}</td> <td><div class="label">{{i18n "admin.embedding.host"}}</div>{{this.host.host}}</td>
<td><div class="label">{{i18n "admin.embedding.class_name"}}</div>{{host.class_name}}</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>{{host.allowed_paths}}</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 host.category allowUncategorized=true}}</td> <td><div class="label">{{i18n "admin.embedding.category"}}</div>{{category-badge this.host.category allowUncategorized=true}}</td>
<td class="controls"> <td class="controls">
<DButton @icon="pencil-alt" @action={{action "edit"}} /> <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" />

View File

@ -1,11 +1,11 @@
{{#if isCheckbox}} {{#if this.isCheckbox}}
<label for={{inputId}}> <label for={{this.inputId}}>
<Input @checked={{checked}} @id={{inputId}} @type="checkbox" /> <Input @checked={{this.checked}} @id={{this.inputId}} @type="checkbox" />
{{i18n translationKey}} {{i18n this.translationKey}}
</label> </label>
{{else}} {{else}}
<label for={{inputId}}>{{i18n translationKey}}</label> <label for={{this.inputId}}>{{i18n this.translationKey}}</label>
<Input @value={{value}} @id={{inputId}} placeholder={{placeholder}} /> <Input @value={{this.value}} @id={{this.inputId}} placeholder={{this.placeholder}} />
{{/if}} {{/if}}
<div class="clearfix"></div> <div class="clearfix"></div>

View File

@ -1,6 +1,6 @@
{{#if collection}} {{#if this.collection}}
<ul class="values emoji-value-list"> <ul class="values emoji-value-list">
{{#each collection as |data index|}} {{#each this.collection as |data index|}}
<li class="value" data-index={{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}} />
@ -9,7 +9,7 @@
<span class="emoji-name">{{data.value}}</span> <span class="emoji-name">{{data.value}}</span>
</div> </div>
{{#if showUpDownButtons}} {{#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-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-down" @class="shift-down-value-btn btn-small" />
{{/if}} {{/if}}
@ -19,9 +19,9 @@
{{/if}} {{/if}}
<div class="value"> <div class="value">
<DButton @action={{action "editValue"}} @actionParam={{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> </div>
<EmojiPicker @isActive={{emojiPickerIsActive}} @isEditorFocused={{isEditorFocused}} @emojiSelected={{action "emojiSelected"}} @onEmojiPickerClose={{action "closeEmojiPicker"}} /> <EmojiPicker @isActive={{this.emojiPickerIsActive}} @isEditorFocused={{this.isEditorFocused}} @emojiSelected={{action "emojiSelected"}} @onEmojiPickerClose={{action "closeEmojiPicker"}} />
<SettingValidationMessage @message={{validationMessage}} /> <SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -3,7 +3,7 @@
{{i18n "admin.flags.flagged_by"}} {{i18n "admin.flags.flagged_by"}}
</div> </div>
<div class="flag-users"> <div class="flag-users">
{{#each flaggedPost.post_actions as |postAction|}} {{#each this.flaggedPost.post_actions as |postAction|}}
<FlagUser @user={{postAction.user}} @date={{postAction.created_at}}> <FlagUser @user={{postAction.user}} @date={{postAction.created_at}}>
<div class="flagger-flag-type"> <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}}
@ -14,13 +14,13 @@
</div> </div>
</div> </div>
{{#if showResolvedBy}} {{#if this.showResolvedBy}}
<div class="flagged-post-resolved-by"> <div class="flagged-post-resolved-by">
<div class="user-list-title"> <div class="user-list-title">
{{i18n "admin.flags.resolved_by"}} {{i18n "admin.flags.resolved_by"}}
</div> </div>
<div class="flag-users"> <div class="flag-users">
{{#each flaggedPost.post_actions as |postAction|}} {{#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}} {{disposition-icon postAction.disposition}}
{{#if postAction.staff_took_action}} {{#if postAction.staff_took_action}}

View File

@ -1,14 +1,14 @@
<div class="flag-user"> <div class="flag-user">
<LinkTo @route="adminUser" @models={{array user.id user.username}} class="flag-user-avatar"> <LinkTo @route="adminUser" @models={{array this.user.id this.user.username}} class="flag-user-avatar">
{{avatar user imageSize="small"}} {{avatar this.user imageSize="small"}}
</LinkTo> </LinkTo>
<div class="flag-user-details"> <div class="flag-user-details">
<div class="flag-user-who"> <div class="flag-user-who">
<LinkTo @route="adminUser" @models={{array user.id user.username}} class="flag-user-username"> <LinkTo @route="adminUser" @models={{array this.user.id this.user.username}} class="flag-user-username">
{{user.username}} {{this.user.username}}
</LinkTo> </LinkTo>
<div title={{raw-date date}} class="flag-user-date"> <div title={{raw-date this.date}} class="flag-user-date">
{{format-age date}} {{format-age this.date}}
</div> </div>
</div> </div>
<div class="flag-user-extra"> <div class="flag-user-extra">

View File

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

View File

@ -1,8 +1,8 @@
<label class="checkbox-label"> <label class="checkbox-label">
<Input @type="checkbox" @disabled={{disabled}} @checked={{buffer}} /> <Input @type="checkbox" @disabled={{this.disabled}} @checked={{this.buffer}} />
{{i18n labelKey}} {{i18n this.labelKey}}
</label> </label>
{{#if changed}} {{#if this.changed}}
<DButton @action={{action "apply"}} @class="btn-primary btn-small submit-edit" @icon="check" /> <DButton @action={{action "apply"}} @class="btn-primary btn-small submit-edit" @icon="check" />
<DButton @action={{action "cancel"}} @class="btn-small cancel-edit" @icon="times" /> <DButton @action={{action "cancel"}} @class="btn-small cancel-edit" @icon="times" />
{{/if}} {{/if}}

View File

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

View File

@ -1,10 +1,10 @@
{{#if ip}} {{#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}}
{{#if show}} {{#if this.show}}
<div class="location-box"> <div class="location-box">
<a href class="close pull-right" {{action "hide"}}>{{d-icon "times"}}</a> <a href class="close pull-right" {{action "hide"}}>{{d-icon "times"}}</a>
{{#if copied}} {{#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}} {{else}}
<DButton @action={{action "copy"}} @class="pull-right no-text" @icon="copy" /> <DButton @action={{action "copy"}} @class="pull-right no-text" @icon="copy" />
@ -12,26 +12,26 @@
<h4>{{i18n "ip_lookup.title"}}</h4> <h4>{{i18n "ip_lookup.title"}}</h4>
<p class="powered-by">{{html-safe (i18n "ip_lookup.powered_by")}}</p> <p class="powered-by">{{html-safe (i18n "ip_lookup.powered_by")}}</p>
<dl> <dl>
{{#if location}} {{#if this.location}}
{{#if location.hostname}} {{#if this.location.hostname}}
<dt>{{i18n "ip_lookup.hostname"}}</dt> <dt>{{i18n "ip_lookup.hostname"}}</dt>
<dd>{{location.hostname}}</dd> <dd>{{this.location.hostname}}</dd>
{{/if}} {{/if}}
<dt>{{i18n "ip_lookup.location"}}</dt> <dt>{{i18n "ip_lookup.location"}}</dt>
<dd> <dd>
{{#if location.location}} {{#if this.location.location}}
<a href="https://maps.google.com/maps?q={{location.latitude}},{{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">
{{location.location}} {{this.location.location}}
</a> </a>
{{else}} {{else}}
{{i18n "ip_lookup.location_not_found"}} {{i18n "ip_lookup.location_not_found"}}
{{/if}} {{/if}}
</dd> </dd>
{{#if location.organization}} {{#if this.location.organization}}
<dt>{{i18n "ip_lookup.organisation"}}</dt> <dt>{{i18n "ip_lookup.organisation"}}</dt>
<dd>{{location.organization}}</dd> <dd>{{this.location.organization}}</dd>
{{/if}} {{/if}}
{{else}} {{else}}
{{loading-spinner size="small"}} {{loading-spinner size="small"}}
@ -39,14 +39,14 @@
<dt> <dt>
{{i18n "ip_lookup.other_accounts"}} {{i18n "ip_lookup.other_accounts"}}
<strong>{{totalOthersWithSameIP}}</strong> <strong>{{this.totalOthersWithSameIP}}</strong>
{{#if other_accounts.length}} {{#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=otherAccountsToDelete}} /> <DButton @class="btn-danger pull-right" @action={{action "deleteOtherAccounts"}} @icon="exclamation-triangle" @translatedLabel={{i18n "ip_lookup.delete_other_accounts" count=this.otherAccountsToDelete}} />
{{/if}} {{/if}}
</dt> </dt>
<ConditionalLoadingSpinner @size="small" @condition={{otherAccountsLoading}}> <ConditionalLoadingSpinner @size="small" @condition={{this.otherAccountsLoading}}>
{{#if other_accounts.length}} {{#if this.other_accounts.length}}
<dd class="other-accounts"> <dd class="other-accounts">
<table class="table table-condensed table-hover"> <table class="table table-condensed table-hover">
<thead> <thead>
@ -59,7 +59,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{#each other_accounts as |a|}} {{#each this.other_accounts as |a|}}
<tr> <tr>
<td> <td>
<LinkTo @route="adminUser" @model={{a}}> <LinkTo @route="adminUser" @model={{a}}>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
<label>{{i18n "admin.logs.screened_ips.form.label"}}</label> <label>{{i18n "admin.logs.screened_ips.form.label"}}</label>
<TextField @value={{ip_address}} @disabled={{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={{actionNames}} @value={{actionName}} @onChange={{action (mut actionName)}} /> <ComboBox @content={{this.actionNames}} @value={{this.actionName}} @onChange={{action (mut this.actionName)}} />
<DButton @class="btn-default" @action={{action "submit"}} @disabled={{formSubmitted}} @label="admin.logs.screened_ips.form.add" /> <DButton @class="btn-default" @action={{action "submit"}} @disabled={{this.formSubmitted}} @label="admin.logs.screened_ips.form.add" />

View File

@ -1,19 +1,19 @@
{{#if collection}} {{#if this.collection}}
<div class="values"> <div class="values">
{{#each collection as |value index|}} {{#each this.collection as |value index|}}
<div class="value" data-index={{index}}> <div class="value" data-index={{index}}>
<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 @value={{value.key}} class="value-input" @focus-out={{action "changeKey" index}} /> <Input @value={{value.key}} class="value-input" @focus-out={{action "changeKey" index}} />
<Input @value={{value.secret}} class="value-input" @focus-out={{action "changeSecret" index}} @type={{if isSecret "password" "text"}} /> <Input @value={{value.secret}} class="value-input" @focus-out={{action "changeSecret" index}} @type={{if this.isSecret "password" "text"}} />
</div> </div>
{{/each}} {{/each}}
</div> </div>
{{/if}} {{/if}}
<div class="value"> <div class="value">
<TextField @value={{newKey}} @class="new-value-input key" @placeholder={{setting.placeholder.key}} /> <TextField @value={{this.newKey}} @class="new-value-input key" @placeholder={{this.setting.placeholder.key}} />
<Input @type="password" @value={{newSecret}} class="new-value-input secret" placeholder={{setting.placeholder.value}} /> <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" /> <DButton @action={{action "addValue"}} @icon="plus" @class="add-value-btn btn-small" />
</div> </div>
<SettingValidationMessage @message={{validationMessage}} /> <SettingValidationMessage @message={{this.validationMessage}} />

View File

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

View File

@ -4,7 +4,7 @@
{{html-safe (i18n "admin.user.silence_reason_label")}} {{html-safe (i18n "admin.user.silence_reason_label")}}
</div> </div>
</label> </label>
<TextField @value={{reason}} @class="silence-reason" @placeholderKey="admin.user.silence_reason_placeholder" /> <TextField @value={{this.reason}} @class="silence-reason" @placeholderKey="admin.user.silence_reason_placeholder" />
</div> </div>
<label> <label>
@ -12,4 +12,4 @@
{{i18n "admin.user.silence_message"}} {{i18n "admin.user.silence_message"}}
</div> </div>
</label> </label>
<Textarea @value={{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

@ -1,12 +1,12 @@
{{#if collection}} {{#if this.collection}}
<div class="values"> <div class="values">
{{#each collection as |value index|}} {{#each this.collection as |value index|}}
<div data-index={{index}} class="value"> <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" @focus-out={{action "changeValue" index}} /> <Input @title={{value}} @value={{value}} class="value-input" @focus-out={{action "changeValue" index}} />
{{#if showUpDownButtons}} {{#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-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-down" @class="shift-down-value-btn btn-small" />
{{/if}} {{/if}}
@ -18,7 +18,7 @@
{{/if}} {{/if}}
<div class="simple-list-input"> <div class="simple-list-input">
<Input @type="text" @value={{newValue}} @placeholderKey="admin.site_settings.simple_list.add_item" class="add-value-input" @autocomplete="off" @autocorrect="off" @autocapitalize="off" /> <Input @type="text" @value={{this.newValue}} @placeholderKey="admin.site_settings.simple_list.add_item" class="add-value-input" @autocomplete="off" @autocorrect="off" @autocapitalize="off" />
<DButton @action={{action "addValue"}} @actionParam={{newValue}} @disabled={{inputEmpty}} @icon="plus" @class="add-value-btn btn-small" /> <DButton @action={{action "addValue"}} @actionParam={{this.newValue}} @disabled={{this.inputEmpty}} @icon="plus" @class="add-value-btn btn-small" />
</div> </div>

View File

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

View File

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

View File

@ -1,30 +1,30 @@
<div class="setting-label"> <div class="setting-label">
<h3> <h3>
{{#if staffLogFilter}} {{#if this.staffLogFilter}}
{{settingName}} {{this.settingName}}
<LinkTo @route="adminLogs.staffActionLogs" @query={{hash filters=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"> <span class="history-icon">
{{d-icon "history"}} {{d-icon "history"}}
</span> </span>
</LinkTo> </LinkTo>
{{else}} {{else}}
{{settingName}} {{this.settingName}}
{{/if}} {{/if}}
</h3> </h3>
{{#if defaultIsAvailable}} {{#if this.defaultIsAvailable}}
<a href onClick={{action "setDefaultValues"}}>{{setting.setDefaultValuesLabel}}</a> <a href onClick={{action "setDefaultValues"}}>{{this.setting.setDefaultValuesLabel}}</a>
{{/if}} {{/if}}
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{component componentName setting=setting value=buffered.value validationMessage=validationMessage preview=preview isSecret=isSecret allowAny=allowAny}} {{component this.componentName setting=this.setting value=this.buffered.value validationMessage=this.validationMessage preview=this.preview isSecret=this.isSecret allowAny=this.allowAny}}
</div> </div>
{{#if dirty}} {{#if this.dirty}}
<div class="setting-controls"> <div class="setting-controls">
<DButton @class="ok" @action={{action "update"}} @icon="check" /> <DButton @class="ok" @action={{action "update"}} @icon="check" />
<DButton @class="cancel" @action={{action "cancel"}} @icon="times" /> <DButton @class="cancel" @action={{action "cancel"}} @icon="times" />
</div> </div>
{{else if setting.overridden}} {{else if this.setting.overridden}}
{{#if setting.secret}} {{#if this.setting.secret}}
<DButton @action={{action "toggleSecret"}} @icon="far-eye-slash" /> <DButton @action={{action "toggleSecret"}} @icon="far-eye-slash" />
{{/if}} {{/if}}
<DButton @class="btn-default undo" @action={{action "resetDefault"}} @icon="undo" @label="admin.settings.reset" /> <DButton @class="btn-default undo" @action={{action "resetDefault"}} @icon="undo" @label="admin.settings.reset" />

View File

@ -1,6 +1,6 @@
<label> <label>
<Input @type="checkbox" @checked={{enabled}} /> <Input @type="checkbox" @checked={{this.enabled}} />
<span>{{html-safe setting.description}}</span> <span>{{html-safe this.setting.description}}</span>
</label> </label>
<SettingValidationMessage @message={{validationMessage}} /> <SettingValidationMessage @message={{this.validationMessage}} />

View File

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

View File

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

View File

@ -1,3 +1,3 @@
<ColorInput @hexValue={{readonly value}} @valid={{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={{validationMessage}} /> <SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div> <div class="desc">{{html-safe this.setting.description}}</div>

View File

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

View File

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

View File

@ -1,12 +1,12 @@
<ComboBox @content={{setting.validValues}} @value={{value}} @onChange={{action (mut value)}} @valueProperty={{setting.computedValueProperty}} @nameProperty={{setting.computedNameProperty}} @options={{hash <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 castInteger=true
allowAny=setting.allowsNone allowAny=this.setting.allowsNone
}} /> }} />
{{preview}} {{this.preview}}
<SettingValidationMessage @message={{validationMessage}} /> <SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc"> <div class="desc">
{{html-safe setting.description}} {{html-safe this.setting.description}}
</div> </div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,12 @@
{{#if setting.textarea}} {{#if this.setting.textarea}}
<Textarea @value={{value}} @classNames="input-setting-textarea" /> <Textarea @value={{this.value}} @classNames="input-setting-textarea" />
{{else if setting.json_schema}} {{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 isSecret}} {{else if this.isSecret}}
<Input @type="password" @value={{value}} @classNames="input-setting-string" /> <Input @type="password" @value={{this.value}} @classNames="input-setting-string" />
{{else}} {{else}}
<TextField @value={{value}} @classNames="input-setting-string" /> <TextField @value={{this.value}} @classNames="input-setting-string" />
{{/if}} {{/if}}
<SettingValidationMessage @message={{validationMessage}} /> <SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div> <div class="desc">{{html-safe this.setting.description}}</div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<div class="reason-controls"> <div class="reason-controls">
<label> <label>
<div class="suspend-reason-label"> <div class="suspend-reason-label">
{{#if siteSettings.hide_suspension_reasons}} {{#if this.siteSettings.hide_suspension_reasons}}
{{html-safe (i18n "admin.user.suspend_reason_hidden_label")}} {{html-safe (i18n "admin.user.suspend_reason_hidden_label")}}
{{else}} {{else}}
{{html-safe (i18n "admin.user.suspend_reason_label")}} {{html-safe (i18n "admin.user.suspend_reason_label")}}
@ -11,9 +11,9 @@
<label> <label>
{{i18n "admin.user.suspend_reason_title"}} {{i18n "admin.user.suspend_reason_title"}}
</label> </label>
<ComboBox @content={{reasons}} @value={{selectedReason}} @class="suspend-reason" @onChange={{action setSelectedReason}} /> <ComboBox @content={{this.reasons}} @value={{this.selectedReason}} @class="suspend-reason" @onChange={{action this.setSelectedReason}} />
{{#if isCustomReason}} {{#if this.isCustomReason}}
<TextField @value={{customReason}} @class="suspend-reason" @onChange={{action setCustomReason}} /> <TextField @value={{this.customReason}} @class="suspend-reason" @onChange={{action this.setCustomReason}} />
{{/if}} {{/if}}
</div> </div>
@ -22,4 +22,4 @@
{{i18n "admin.user.suspend_message"}} {{i18n "admin.user.suspend_message"}}
</div> </div>
</label> </label>
<Textarea @value={{message}} class="suspend-message" placeholder={{i18n "admin.user.suspend_message_placeholder"}} /> <Textarea @value={{this.message}} class="suspend-message" placeholder={{i18n "admin.user.suspend_message_placeholder"}} />

View File

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

View File

@ -1,41 +1,41 @@
<div class="inner-wrapper"> <div class="inner-wrapper">
<PluginOutlet @name="admin-customize-themes-list-item" @tagName="span" @connectorTagName="span" @args={{hash theme=theme}} /> <PluginOutlet @name="admin-customize-themes-list-item" @tagName="span" @connectorTagName="span" @args={{hash theme=this.theme}} />
<div class="info"> <div class="info">
<span class="name"> <span class="name">
{{theme.name}} {{this.theme.name}}
</span> </span>
<span class="icons"> <span class="icons">
{{#if theme.selected}} {{#if this.theme.selected}}
{{d-icon "caret-right"}} {{d-icon "caret-right"}}
{{else}} {{else}}
{{#if theme.default}} {{#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}}
{{#if theme.isPendingUpdates}} {{#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}}
{{#if theme.isBroken}} {{#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}} {{/if}}
{{#unless theme.enabled}} {{#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}} {{/unless}}
{{/if}} {{/if}}
</span> </span>
</div> </div>
{{#if displayComponents}} {{#if this.displayComponents}}
<div class="components-list"> <div class="components-list">
<span class="components">{{html-safe childrenString}}</span> <span class="components">{{html-safe this.childrenString}}</span>
{{#if displayHasMore}} {{#if this.displayHasMore}}
<a href {{action "toggleChildrenExpanded"}} class="others-count"> <a href {{action "toggleChildrenExpanded"}} class="others-count">
{{#if childrenExpanded}} {{#if this.childrenExpanded}}
{{i18n "admin.customize.theme.collapse"}} {{i18n "admin.customize.theme.collapse"}}
{{else}} {{else}}
{{i18n "admin.customize.theme.and_x_more" count=moreCount}} {{i18n "admin.customize.theme.and_x_more" count=this.moreCount}}
{{/if}} {{/if}}
</a> </a>
{{/if}} {{/if}}

View File

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

View File

@ -1,12 +1,12 @@
{{#if collection}} {{#if this.collection}}
<div class="values"> <div class="values">
{{#each collection as |value index|}} {{#each this.collection as |value index|}}
<div data-index={{index}} class="value"> <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" @focus-out={{action "changeValue" index}} /> <Input @title={{value}} @value={{value}} class="value-input" @focus-out={{action "changeValue" index}} />
{{#if showUpDownButtons}} {{#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-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-down" @class="shift-down-value-btn btn-small" />
{{/if}} {{/if}}
@ -15,7 +15,7 @@
</div> </div>
{{/if}} {{/if}}
<ComboBox @valueProperty={{null}} @nameProperty={{null}} @value={{newValue}} @content={{filteredChoices}} @onChange={{action "selectChoice"}} @options={{hash <ComboBox @valueProperty={{null}} @nameProperty={{null}} @value={{this.newValue}} @content={{this.filteredChoices}} @onChange={{action "selectChoice"}} @options={{hash
allowAny=true allowAny=true
none=noneKey none=this.noneKey
}} /> }} />

View File

@ -6,26 +6,26 @@
<div <div
class="dashboard-stats version-check class="dashboard-stats version-check
{{if versionCheck.critical_updates "critical" "normal"}}" {{if this.versionCheck.critical_updates "critical" "normal"}}"
> >
<div class="version-number"> <div class="version-number">
<h4> <h4>
{{i18n "admin.dashboard.installed_version"}} {{i18n "admin.dashboard.installed_version"}}
</h4> </h4>
<h3> <h3>
{{dash-if-empty versionCheck.installed_version}} {{dash-if-empty this.versionCheck.installed_version}}
</h3> </h3>
{{#if versionCheck.gitLink}} {{#if this.versionCheck.gitLink}}
<div class="sha-link"> <div class="sha-link">
( (
<a href={{versionCheck.gitLink}} rel="noopener noreferrer" target="_blank"> <a href={{this.versionCheck.gitLink}} rel="noopener noreferrer" target="_blank">
{{versionCheck.shortSha}} {{this.versionCheck.shortSha}}
</a> </a>
) )
</div> </div>
{{/if}} {{/if}}
</div> </div>
{{#if versionCheck.noCheckPerformed}} {{#if this.versionCheck.noCheckPerformed}}
<div class="version-number"> <div class="version-number">
<h4> <h4>
{{i18n "admin.dashboard.latest_version"}} {{i18n "admin.dashboard.latest_version"}}
@ -46,20 +46,20 @@
</span> </span>
</div> </div>
</div> </div>
{{else if versionCheck.stale_data}} {{else if this.versionCheck.stale_data}}
<div class="version-number"> <div class="version-number">
<h4> <h4>
{{i18n "admin.dashboard.latest_version"}} {{i18n "admin.dashboard.latest_version"}}
</h4> </h4>
<h3> <h3>
{{#if versionCheck.version_check_pending}} {{#if this.versionCheck.version_check_pending}}
{{dash-if-empty versionCheck.installed_version}} {{dash-if-empty this.versionCheck.installed_version}}
{{/if}} {{/if}}
</h3> </h3>
</div> </div>
<div class="version-status"> <div class="version-status">
<div class="face"> <div class="face">
{{#if versionCheck.version_check_pending}} {{#if this.versionCheck.version_check_pending}}
<span class="icon up-to-date"> <span class="icon up-to-date">
{{d-icon "far-smile"}} {{d-icon "far-smile"}}
</span> </span>
@ -71,7 +71,7 @@
</div> </div>
<div class="version-notes"> <div class="version-notes">
<span class="normal-note"> <span class="normal-note">
{{#if versionCheck.version_check_pending}} {{#if this.versionCheck.version_check_pending}}
{{i18n "admin.dashboard.version_check_pending"}} {{i18n "admin.dashboard.version_check_pending"}}
{{else}} {{else}}
{{i18n "admin.dashboard.stale_data"}} {{i18n "admin.dashboard.stale_data"}}
@ -85,12 +85,12 @@
{{i18n "admin.dashboard.latest_version"}} {{i18n "admin.dashboard.latest_version"}}
</h4> </h4>
<h3> <h3>
{{dash-if-empty versionCheck.latest_version}} {{dash-if-empty this.versionCheck.latest_version}}
</h3> </h3>
</div> </div>
<div class="version-status"> <div class="version-status">
<div class="face"> <div class="face">
{{#if versionCheck.upToDate}} {{#if this.versionCheck.upToDate}}
<span class="icon up-to-date"> <span class="icon up-to-date">
{{d-icon "far-smile"}} {{d-icon "far-smile"}}
</span> </span>
@ -98,12 +98,12 @@
<span <span
class="icon class="icon
{{if {{if
versionCheck.critical_updates this.versionCheck.critical_updates
"critical-updates-available" "critical-updates-available"
"updates-available" "updates-available"
}}" }}"
> >
{{#if versionCheck.behindByOneVersion}} {{#if this.versionCheck.behindByOneVersion}}
{{d-icon "far-meh"}} {{d-icon "far-meh"}}
{{else}} {{else}}
{{d-icon "far-frown"}} {{d-icon "far-frown"}}
@ -112,7 +112,7 @@
{{/if}} {{/if}}
</div> </div>
<div class="version-notes"> <div class="version-notes">
{{#if versionCheck.upToDate}} {{#if this.versionCheck.upToDate}}
{{i18n "admin.dashboard.up_to_date"}} {{i18n "admin.dashboard.up_to_date"}}
{{else}} {{else}}
<span class="critical-note"> <span class="critical-note">
@ -126,5 +126,5 @@
</div> </div>
</div> </div>
{{/if}} {{/if}}
<CustomHtml @name="upgrade-header" @versionCheck={{versionCheck}} @tagName="div" @classNames="upgrade-header" /> <CustomHtml @name="upgrade-header" @versionCheck={{this.versionCheck}} @tagName="div" @classNames="upgrade-header" />
</div> </div>

View File

@ -1,34 +1,34 @@
<div class="watched-word-input"> <div class="watched-word-input">
<label for="watched-word">{{i18n "admin.watched_words.form.label"}}</label> <label for="watched-word">{{i18n "admin.watched_words.form.label"}}</label>
<TextField @id="watched-word" @value={{word}} @disabled={{formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey={{placeholderKey}} @title={{i18n 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> </div>
{{#if canReplace}} {{#if this.canReplace}}
<div class="watched-word-input"> <div class="watched-word-input">
<label for="watched-replacement">{{i18n "admin.watched_words.form.replace_label"}}</label> <label for="watched-replacement">{{i18n "admin.watched_words.form.replace_label"}}</label>
<TextField @id="watched-replacement" @value={{replacement}} @disabled={{formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey="admin.watched_words.form.replace_placeholder" /> <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> </div>
{{/if}} {{/if}}
{{#if canTag}} {{#if this.canTag}}
<div class="watched-word-input"> <div class="watched-word-input">
<label for="watched-tag">{{i18n "admin.watched_words.form.tag_label"}}</label> <label for="watched-tag">{{i18n "admin.watched_words.form.tag_label"}}</label>
<TagChooser @id="watched-tag" @class="watched-word-input-field" @tags={{selectedTags}} @onChange={{action "changeSelectedTags"}} @everyTag={{true}} @options={{hash <TagChooser @id="watched-tag" @class="watched-word-input-field" @tags={{this.selectedTags}} @onChange={{action "changeSelectedTags"}} @everyTag={{true}} @options={{hash
allowAny=true allowAny=true
disabled=formSubmitted disabled=this.formSubmitted
}} /> }} />
</div> </div>
{{/if}} {{/if}}
{{#if canLink}} {{#if this.canLink}}
<div class="watched-word-input"> <div class="watched-word-input">
<label for="watched-replacement">{{i18n "admin.watched_words.form.link_label"}}</label> <label for="watched-replacement">{{i18n "admin.watched_words.form.link_label"}}</label>
<TextField @id="watched-replacement" @value={{replacement}} @disabled={{formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey="admin.watched_words.form.link_placeholder" /> <TextField @id="watched-replacement" @value={{this.replacement}} @disabled={{this.formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey="admin.watched_words.form.link_placeholder" />
</div> </div>
{{/if}} {{/if}}
<DButton @class="btn btn-primary" @action={{action "submit"}} @disabled={{formSubmitted}} @label="admin.watched_words.form.add" /> <DButton @class="btn btn-primary" @action={{action "submit"}} @disabled={{this.formSubmitted}} @label="admin.watched_words.form.add" />
{{#if showMessage}} {{#if this.showMessage}}
<span class="success-message">{{message}}</span> <span class="success-message">{{this.message}}</span>
{{/if}} {{/if}}

View File

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

View File

@ -1,17 +1,17 @@
<div class="color-scheme show-current-style"> <div class="color-scheme show-current-style">
<div class="admin-container"> <div class="admin-container">
<h1>{{#if model.theme_id}}{{model.name}}{{else}}<TextField @class="style-name" @value={{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"> <div class="controls">
{{#unless model.theme_id}} {{#unless this.model.theme_id}}
<DButton @class="btn-primary" @action={{action "save"}} @disabled={{model.disableSave}} @label="admin.customize.save" /> <DButton @class="btn-primary" @action={{action "save"}} @disabled={{this.model.disableSave}} @label="admin.customize.save" />
{{/unless}} {{/unless}}
<DButton @class="btn-default" @action={{action "copy" model}} @icon="copy" @label="admin.customize.copy" /> <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" model}} @icon="far-clipboard" @label="admin.customize.copy_to_clipboard" /> <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 model.savingStatus "hidden"}}">{{model.savingStatus}}</span> <span class="saving {{unless this.model.savingStatus "hidden"}}">{{this.model.savingStatus}}</span>
{{#if model.theme_id}} {{#if this.model.theme_id}}
<span class="not-editable"> <span class="not-editable">
{{i18n "admin.customize.theme_owner"}} {{i18n "admin.customize.theme_owner"}}
<LinkTo @route="adminCustomizeThemes.show" @model={{model.theme_id}}>{{model.theme_name}}</LinkTo> <LinkTo @route="adminCustomizeThemes.show" @model={{this.model.theme_id}}>{{this.model.theme_name}}</LinkTo>
</span> </span>
{{else}} {{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" />
@ -19,28 +19,28 @@
</div> </div>
<div class="admin-controls"> <div class="admin-controls">
{{#unless model.theme_id}} {{#unless this.model.theme_id}}
<div class="pull-right"> <div class="pull-right">
<label> <label>
<Input @type="checkbox" @checked={{onlyOverridden}} /> <Input @type="checkbox" @checked={{this.onlyOverridden}} />
{{i18n "admin.settings.show_overriden"}} {{i18n "admin.settings.show_overriden"}}
</label> </label>
</div> </div>
{{/unless}} {{/unless}}
<div> <div>
{{#if model.theme_id}} {{#if this.model.theme_id}}
<InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.color_scheme_user_selectable" @checked={{model.user_selectable}} @modelId={{model.id}} /> <InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.color_scheme_user_selectable" @checked={{this.model.user_selectable}} @modelId={{this.model.id}} />
{{else}} {{else}}
<label> <label>
<Input @type="checkbox" @checked={{model.user_selectable}} /> <Input @type="checkbox" @checked={{this.model.user_selectable}} />
{{i18n "admin.customize.theme.color_scheme_user_selectable"}} {{i18n "admin.customize.theme.color_scheme_user_selectable"}}
</label> </label>
{{/if}} {{/if}}
</div> </div>
</div> </div>
{{#if colors.length}} {{#if this.colors.length}}
<table class="table colors"> <table class="table colors">
<thead> <thead>
<tr> <tr>
@ -50,7 +50,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{#each colors as |c|}} {{#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}}> <td class="name" title={{c.name}}>
<h3>{{c.translatedName}}</h3> <h3>{{c.translatedName}}</h3>
@ -58,7 +58,7 @@
</td> </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"> <td class="actions">
{{#unless model.theme_id}} {{#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 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 undo " (unless c.changed "invisible")}} @action={{action "undo" c}} @title="admin.customize.colors.undo_title" @label="undo" />
{{/unless}} {{/unless}}

View File

@ -2,7 +2,7 @@
<h3>{{i18n "admin.customize.colors.long_title"}}</h3> <h3>{{i18n "admin.customize.colors.long_title"}}</h3>
<ul> <ul>
{{#each model as |scheme|}} {{#each this.model as |scheme|}}
{{#unless scheme.is_base}} {{#unless scheme.is_base}}
<li> <li>
<LinkTo @route="adminCustomize.colors.show" @model={{scheme}} @replace={{true}}> <LinkTo @route="adminCustomize.colors.show" @model={{scheme}} @replace={{true}}>

View File

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

View File

@ -1,19 +1,19 @@
<ComboBox @value={{emailTemplate.id}} @content={{adminCustomizeEmailTemplates.sortedTemplates}} @onChange={{adminCustomizeEmailTemplates.onSelectTemplate}} @nameProperty="title" /> <ComboBox @value={{this.emailTemplate.id}} @content={{this.adminCustomizeEmailTemplates.sortedTemplates}} @onChange={{this.adminCustomizeEmailTemplates.onSelectTemplate}} @nameProperty="title" />
<div class="email-template"> <div class="email-template">
<label>{{i18n "admin.customize.email_templates.subject"}}</label> <label>{{i18n "admin.customize.email_templates.subject"}}</label>
{{#if hasMultipleSubjects}} {{#if this.hasMultipleSubjects}}
<h3><LinkTo @route="adminSiteText" @query={{hash q=hasMultipleSubjects}}>{{i18n "admin.customize.email_templates.multiple_subjects"}}</LinkTo></h3> <h3><LinkTo @route="adminSiteText" @query={{hash q=this.hasMultipleSubjects}}>{{i18n "admin.customize.email_templates.multiple_subjects"}}</LinkTo></h3>
{{else}} {{else}}
<Input @value={{buffered.subject}} /> <Input @value={{this.buffered.subject}} />
{{/if}} {{/if}}
<br> <br>
<label>{{i18n "admin.customize.email_templates.body"}}</label> <label>{{i18n "admin.customize.email_templates.body"}}</label>
<DEditor @value={{buffered.body}} /> <DEditor @value={{this.buffered.body}} />
<SaveControls @model={{emailTemplate}} @action={{action "saveChanges"}} @saved={{saved}} @saveDisabled={{saveDisabled}}> <SaveControls @model={{this.emailTemplate}} @action={{action "saveChanges"}} @saved={{this.saved}} @saveDisabled={{this.saveDisabled}}>
{{#if emailTemplate.can_revert}} {{#if this.emailTemplate.can_revert}}
<DButton @action={{action "revertChanges"}} @label="admin.customize.email_templates.revert" /> <DButton @action={{action "revertChanges"}} @label="admin.customize.email_templates.revert" />
{{/if}} {{/if}}
</SaveControls> </SaveControls>

View File

@ -1,13 +1,13 @@
<div class="robots-txt-edit"> <div class="robots-txt-edit">
<h3>{{i18n "admin.customize.robots.title"}}</h3> <h3>{{i18n "admin.customize.robots.title"}}</h3>
<p>{{i18n "admin.customize.robots.warning"}}</p> <p>{{i18n "admin.customize.robots.warning"}}</p>
{{#if model.overridden}} {{#if this.model.overridden}}
<div class="overridden"> <div class="overridden">
{{i18n "admin.customize.robots.overridden"}} {{i18n "admin.customize.robots.overridden"}}
</div> </div>
{{/if}} {{/if}}
<Textarea @value={{buffered.robots_txt}} class="robots-txt-input" /> <Textarea @value={{this.buffered.robots_txt}} class="robots-txt-input" />
<SaveControls @model={{this}} @action={{action "save"}} @saved={{saved}} @saveDisabled={{saveDisabled}}> <SaveControls @model={{this}} @action={{action "save"}} @saved={{this.saved}} @saveDisabled={{this.saveDisabled}}>
<DButton @class="btn-default" @disabled={{resetDisabled}} @icon="undo" @action={{action "reset"}} @label="admin.settings.reset" /> <DButton @class="btn-default" @disabled={{this.resetDisabled}} @icon="undo" @action={{action "reset"}} @label="admin.settings.reset" />
</SaveControls> </SaveControls>
</div> </div>

View File

@ -1,23 +1,23 @@
<div class="current-style {{if maximized "maximized"}}"> <div class="current-style {{if this.maximized "maximized"}}">
<div class="wrapper"> <div class="wrapper">
<div class="editor-information"> <div class="editor-information">
<DButton @title="go_back" @action={{action "goBack"}} @icon="chevron-left" @class="btn-small editor-back-button" /> <DButton @title="go_back" @action={{action "goBack"}} @icon="chevron-left" @class="btn-small editor-back-button" />
<span class="editor-theme-name-wrapper"> <span class="editor-theme-name-wrapper">
{{i18n "admin.customize.theme.edit_css_html"}} {{i18n "admin.customize.theme.edit_css_html"}}
<LinkTo @route={{showRouteName}} @model={{model.id}} @replace={{true}} class="editor-theme-name"> <LinkTo @route={{this.showRouteName}} @model={{this.model.id}} @replace={{true}} class="editor-theme-name">
{{model.name}} {{this.model.name}}
</LinkTo> </LinkTo>
</span> </span>
</div> </div>
<AdminThemeEditor @theme={{model}} @editRouteName={{editRouteName}} @currentTargetName={{currentTargetName}} @fieldName={{fieldName}} @fieldAdded={{action "fieldAdded"}} @maximized={{maximized}} @onlyOverriddenChanged={{action "onlyOverriddenChanged"}} @save={{action "save"}} /> <AdminThemeEditor @theme={{this.model}} @editRouteName={{this.editRouteName}} @currentTargetName={{this.currentTargetName}} @fieldName={{this.fieldName}} @fieldAdded={{action "fieldAdded"}} @maximized={{this.maximized}} @onlyOverriddenChanged={{action "onlyOverriddenChanged"}} @save={{action "save"}} />
<div class="admin-footer"> <div class="admin-footer">
<div class="status-actions"> <div class="status-actions">
{{#unless model.changed}} {{#unless this.model.changed}}
<a <a
href={{previewUrl}} href={{this.previewUrl}}
rel="noopener noreferrer" rel="noopener noreferrer"
title={{i18n "admin.customize.explain_preview"}} title={{i18n "admin.customize.explain_preview"}}
class="preview-link" class="preview-link"
@ -29,7 +29,7 @@
</div> </div>
<div class="buttons"> <div class="buttons">
<DButton @action={{action "save"}} @disabled={{saveDisabled}} @class="btn-primary" @translatedLabel={{saveButtonText}} /> <DButton @action={{action "save"}} @disabled={{this.saveDisabled}} @class="btn-primary" @translatedLabel={{this.saveButtonText}} />
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,12 +1,12 @@
<div class="themes-intro admin-intro"> <div class="themes-intro admin-intro">
<img src={{womanArtistEmojiURL}} alt={{i18n "admin.customize.theme.themes_intro_emoji"}}> <img src={{this.womanArtistEmojiURL}} alt={{i18n "admin.customize.theme.themes_intro_emoji"}}>
<div class="content-wrapper"> <div class="content-wrapper">
<h1>{{i18n "admin.customize.theme.themes_intro"}}</h1> <h1>{{i18n "admin.customize.theme.themes_intro"}}</h1>
<div class="create-actions"> <div class="create-actions">
<DButton @action={{route-action "installModal"}} @icon="upload" @label="admin.customize.install" @class="btn-primary" /> <DButton @action={{route-action "installModal"}} @icon="upload" @label="admin.customize.install" @class="btn-primary" />
</div> </div>
<div class="external-resources"> <div class="external-resources">
{{#each externalResources as |resource|}} {{#each this.externalResources as |resource|}}
<a href={{resource.link}} class="external-link" rel="noopener noreferrer" target="_blank"> <a href={{resource.link}} class="external-link" rel="noopener noreferrer" target="_blank">
{{d-icon resource.icon}} {{d-icon resource.icon}}
{{i18n resource.key}} {{i18n resource.key}}

View File

@ -1,41 +1,41 @@
<div class="show-current-style"> <div class="show-current-style">
<PluginOutlet @name="admin-customize-themes-show-top" @tagName="span" @connectorTagName="div" @args={{hash theme=model}} /> <PluginOutlet @name="admin-customize-themes-show-top" @tagName="span" @connectorTagName="div" @args={{hash theme=this.model}} />
<div class="title"> <div class="title">
{{#if editingName}} {{#if this.editingName}}
<TextField @value={{model.name}} @autofocus="true" /> <TextField @value={{this.model.name}} @autofocus="true" />
<DButton @action={{action "finishedEditingName"}} @class="btn-primary btn-small submit-edit" @icon="check" /> <DButton @action={{action "finishedEditingName"}} @class="btn-primary btn-small submit-edit" @icon="check" />
<DButton @action={{action "cancelEditingName"}} @class="btn-small cancel-edit" @icon="times" /> <DButton @action={{action "cancelEditingName"}} @class="btn-small cancel-edit" @icon="times" />
{{else}} {{else}}
<span>{{model.name}}</span> <span>{{this.model.name}}</span>
<DButton @action={{action "startEditingName"}} @icon="pencil-alt" @class="btn-small" /> <DButton @action={{action "startEditingName"}} @icon="pencil-alt" @class="btn-small" />
{{/if}} {{/if}}
</div> </div>
{{#each model.errors as |error|}} {{#each this.model.errors as |error|}}
<div class="alert alert-error">{{error}}</div> <div class="alert alert-error">{{error}}</div>
{{/each}} {{/each}}
{{#unless model.supported}} {{#unless this.model.supported}}
<div class="alert alert-error"> <div class="alert alert-error">
{{i18n "admin.customize.theme.required_version.error"}} {{i18n "admin.customize.theme.required_version.error"}}
{{#if model.remote_theme.minimum_discourse_version}} {{#if this.model.remote_theme.minimum_discourse_version}}
{{i18n "admin.customize.theme.required_version.minimum" version=model.remote_theme.minimum_discourse_version}} {{i18n "admin.customize.theme.required_version.minimum" version=this.model.remote_theme.minimum_discourse_version}}
{{/if}} {{/if}}
{{#if model.remote_theme.maximum_discourse_version}} {{#if this.model.remote_theme.maximum_discourse_version}}
{{i18n "admin.customize.theme.required_version.maximum" version=model.remote_theme.maximum_discourse_version}} {{i18n "admin.customize.theme.required_version.maximum" version=this.model.remote_theme.maximum_discourse_version}}
{{/if}} {{/if}}
</div> </div>
{{/unless}} {{/unless}}
{{#unless model.enabled}} {{#unless this.model.enabled}}
<div class="alert alert-error"> <div class="alert alert-error">
{{#if model.disabled_by}} {{#if this.model.disabled_by}}
{{i18n "admin.customize.theme.disabled_by"}} {{i18n "admin.customize.theme.disabled_by"}}
<UserLink @user={{model.disabled_by}}> <UserLink @user={{this.model.disabled_by}}>
{{avatar model.disabled_by imageSize="tiny"}} {{avatar this.model.disabled_by imageSize="tiny"}}
{{model.disabled_by.username}} {{this.model.disabled_by.username}}
</UserLink> </UserLink>
{{format-date model.disabled_at leaveAgo="true"}} {{format-date this.model.disabled_at leaveAgo="true"}}
{{else}} {{else}}
{{i18n "admin.customize.theme.disabled"}} {{i18n "admin.customize.theme.disabled"}}
{{/if}} {{/if}}
@ -44,72 +44,72 @@
{{/unless}} {{/unless}}
<div class="metadata control-unit"> <div class="metadata control-unit">
{{#if model.remote_theme}} {{#if this.model.remote_theme}}
{{#if model.remote_theme.remote_url}} {{#if this.model.remote_theme.remote_url}}
{{#if sourceIsHttp}} {{#if this.sourceIsHttp}}
<a class="remote-url" href={{remoteThemeLink}}>{{i18n "admin.customize.theme.source_url"}}{{d-icon "link"}}</a> <a class="remote-url" href={{this.remoteThemeLink}}>{{i18n "admin.customize.theme.source_url"}}{{d-icon "link"}}</a>
{{else}} {{else}}
<div class="remote-url"> <div class="remote-url">
<code>{{model.remote_theme.remote_url}}</code> <code>{{this.model.remote_theme.remote_url}}</code>
{{#if model.remote_theme.branch}} {{#if this.model.remote_theme.branch}}
(<code>{{model.remote_theme.branch}}</code>) (<code>{{this.model.remote_theme.branch}}</code>)
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if model.remote_theme.about_url}} {{#if this.model.remote_theme.about_url}}
<a class="url about-url" href={{model.remote_theme.about_url}}>{{i18n "admin.customize.theme.about_theme"}}{{d-icon "link"}}</a> <a class="url about-url" href={{this.model.remote_theme.about_url}}>{{i18n "admin.customize.theme.about_theme"}}{{d-icon "link"}}</a>
{{/if}} {{/if}}
{{#if model.remote_theme.license_url}} {{#if this.model.remote_theme.license_url}}
<a class="url license-url" href={{model.remote_theme.license_url}}>{{i18n "admin.customize.theme.license"}}{{d-icon "link"}}</a> <a class="url license-url" href={{this.model.remote_theme.license_url}}>{{i18n "admin.customize.theme.license"}}{{d-icon "link"}}</a>
{{/if}} {{/if}}
{{#if model.description}} {{#if this.model.description}}
<span class="theme-description">{{model.description}}</span> <span class="theme-description">{{this.model.description}}</span>
{{/if}} {{/if}}
{{#if model.remote_theme.authors}}<span class="authors"><span class="heading">{{i18n "admin.customize.theme.authors"}}</span> {{model.remote_theme.authors}}</span>{{/if}} {{#if this.model.remote_theme.authors}}<span class="authors"><span class="heading">{{i18n "admin.customize.theme.authors"}}</span> {{this.model.remote_theme.authors}}</span>{{/if}}
{{#if model.remote_theme.theme_version}}<span class="version"><span class="heading">{{i18n "admin.customize.theme.version"}}</span> {{model.remote_theme.theme_version}}</span>{{/if}} {{#if this.model.remote_theme.theme_version}}<span class="version"><span class="heading">{{i18n "admin.customize.theme.version"}}</span> {{this.model.remote_theme.theme_version}}</span>{{/if}}
<div class="control-unit"> <div class="control-unit">
{{#if model.remote_theme.is_git}} {{#if this.model.remote_theme.is_git}}
<div class="alert alert-info"> <div class="alert alert-info">
{{html-safe (i18n "admin.customize.theme.remote_theme_edits" repoURL=remoteThemeLink)}} {{html-safe (i18n "admin.customize.theme.remote_theme_edits" repoURL=this.remoteThemeLink)}}
</div> </div>
{{#if showRemoteError}} {{#if this.showRemoteError}}
<div class="error-message"> <div class="error-message">
{{d-icon "exclamation-triangle"}} {{i18n "admin.customize.theme.repo_unreachable"}} {{d-icon "exclamation-triangle"}} {{i18n "admin.customize.theme.repo_unreachable"}}
</div> </div>
<div class="raw-error"> <div class="raw-error">
<code>{{model.remoteError}}</code> <code>{{this.model.remoteError}}</code>
</div> </div>
{{/if}} {{/if}}
{{#if model.remote_theme.commits_behind}} {{#if this.model.remote_theme.commits_behind}}
<DButton @action={{action "updateToLatest"}} @icon="download" @class="btn-primary" @label="admin.customize.theme.update_to_latest" /> <DButton @action={{action "updateToLatest"}} @icon="download" @class="btn-primary" @label="admin.customize.theme.update_to_latest" />
{{else}} {{else}}
<DButton @action={{action "checkForThemeUpdates"}} @icon="sync" @class="btn-default" @label="admin.customize.theme.check_for_updates" /> <DButton @action={{action "checkForThemeUpdates"}} @icon="sync" @class="btn-default" @label="admin.customize.theme.check_for_updates" />
{{/if}} {{/if}}
<span class="status-message"> <span class="status-message">
{{#if updatingRemote}} {{#if this.updatingRemote}}
{{i18n "admin.customize.theme.updating"}} {{i18n "admin.customize.theme.updating"}}
{{else}} {{else}}
{{#if model.remote_theme.commits_behind}} {{#if this.model.remote_theme.commits_behind}}
{{#if hasOverwrittenHistory}} {{#if this.hasOverwrittenHistory}}
{{i18n "admin.customize.theme.has_overwritten_history"}} {{i18n "admin.customize.theme.has_overwritten_history"}}
{{else}} {{else}}
{{i18n "admin.customize.theme.commits_behind" count=model.remote_theme.commits_behind}} {{i18n "admin.customize.theme.commits_behind" count=this.model.remote_theme.commits_behind}}
{{/if}} {{/if}}
{{#if model.remote_theme.github_diff_link}} {{#if this.model.remote_theme.github_diff_link}}
<a href={{model.remote_theme.github_diff_link}}> <a href={{this.model.remote_theme.github_diff_link}}>
{{i18n "admin.customize.theme.compare_commits"}} {{i18n "admin.customize.theme.compare_commits"}}
</a> </a>
{{/if}} {{/if}}
{{else}} {{else}}
{{#unless showRemoteError}} {{#unless this.showRemoteError}}
{{i18n "admin.customize.theme.up_to_date"}} {{format-date model.remote_theme.updated_at leaveAgo="true"}} {{i18n "admin.customize.theme.up_to_date"}} {{format-date this.model.remote_theme.updated_at leaveAgo="true"}}
{{/unless}} {{/unless}}
{{/if}} {{/if}}
{{/if}} {{/if}}
@ -123,40 +123,40 @@
{{else}} {{else}}
<span class="heading">{{i18n "admin.customize.theme.creator"}}</span> <span class="heading">{{i18n "admin.customize.theme.creator"}}</span>
<span> <span>
<UserLink @user={{model.user}}> <UserLink @user={{this.model.user}}>
{{format-username model.user.username}} {{format-username this.model.user.username}}
</UserLink> </UserLink>
</span> </span>
{{/if}} {{/if}}
</div> </div>
{{#if showCheckboxes}} {{#if this.showCheckboxes}}
<div class="control-unit"> <div class="control-unit">
{{#unless model.component}} {{#unless this.model.component}}
<InlineEditCheckbox @action={{action "applyDefault"}} @labelKey="admin.customize.theme.is_default" @checked={{model.default}} @modelId={{model.id}} /> <InlineEditCheckbox @action={{action "applyDefault"}} @labelKey="admin.customize.theme.is_default" @checked={{this.model.default}} @modelId={{this.model.id}} />
<InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.user_selectable" @checked={{model.user_selectable}} @modelId={{model.id}} /> <InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.user_selectable" @checked={{this.model.user_selectable}} @modelId={{this.model.id}} />
{{/unless}} {{/unless}}
{{#if model.remote_theme}} {{#if this.model.remote_theme}}
<InlineEditCheckbox @action={{action "applyAutoUpdateable"}} @labelKey="admin.customize.theme.auto_update" @checked={{model.auto_update}} @modelId={{model.id}} /> <InlineEditCheckbox @action={{action "applyAutoUpdateable"}} @labelKey="admin.customize.theme.auto_update" @checked={{this.model.auto_update}} @modelId={{this.model.id}} />
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}
{{#unless model.component}} {{#unless this.model.component}}
<DSection @class="form-horizontal theme settings control-unit"> <DSection @class="form-horizontal theme settings control-unit">
<div class="row setting"> <div class="row setting">
<div class="setting-label"> <div class="setting-label">
{{i18n "admin.customize.theme.color_scheme"}} {{i18n "admin.customize.theme.color_scheme"}}
</div> </div>
<div class="setting-value"> <div class="setting-value">
<ColorPalettes @content={{colorSchemes}} @value={{colorSchemeId}} @icon="paint-brush" @options={{hash <ColorPalettes @content={{this.colorSchemes}} @value={{this.colorSchemeId}} @icon="paint-brush" @options={{hash
filterable=true filterable=true
}} /> }} />
<div class="desc">{{i18n "admin.customize.theme.color_scheme_select"}}</div> <div class="desc">{{i18n "admin.customize.theme.color_scheme_select"}}</div>
</div> </div>
<div class="setting-controls"> <div class="setting-controls">
{{#if colorSchemeChanged}} {{#if this.colorSchemeChanged}}
<DButton @action={{action "changeScheme"}} @class="ok submit-edit" @icon="check" /> <DButton @action={{action "changeScheme"}} @class="ok submit-edit" @icon="check" />
<DButton @action={{action "cancelChangeScheme"}} @class="cancel cancel-edit" @icon="times" /> <DButton @action={{action "cancelChangeScheme"}} @class="cancel cancel-edit" @icon="times" />
{{/if}} {{/if}}
@ -165,38 +165,38 @@
</DSection> </DSection>
{{/unless}} {{/unless}}
{{#if parentThemes}} {{#if this.parentThemes}}
<div class="control-unit"> <div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.component_of"}}</div> <div class="mini-title">{{i18n "admin.customize.theme.component_of"}}</div>
<ul> <ul>
{{#each parentThemes as |theme|}} {{#each this.parentThemes as |theme|}}
<li><LinkTo @route="adminCustomizeThemes.show" @model={{theme}} @replace={{true}}>{{theme.name}}</LinkTo></li> <li><LinkTo @route="adminCustomizeThemes.show" @model={{theme}} @replace={{true}}>{{theme.name}}</LinkTo></li>
{{/each}} {{/each}}
</ul> </ul>
</div> </div>
{{/if}} {{/if}}
{{#if model.component}} {{#if this.model.component}}
<DSection @class="form-horizontal theme settings control-unit"> <DSection @class="form-horizontal theme settings control-unit">
<div class="row setting"> <div class="row setting">
<ThemeSettingRelativesSelector @setting={{relativesSelectorSettingsForComponent}} @model={{model}} @class="theme-setting" /> <ThemeSettingRelativesSelector @setting={{this.relativesSelectorSettingsForComponent}} @model={{this.model}} @class="theme-setting" />
</div> </div>
</DSection> </DSection>
{{else}} {{else}}
<DSection @class="form-horizontal theme settings control-unit"> <DSection @class="form-horizontal theme settings control-unit">
<div class="row setting"> <div class="row setting">
<ThemeSettingRelativesSelector @setting={{relativesSelectorSettingsForTheme}} @model={{model}} @class="theme-setting" /> <ThemeSettingRelativesSelector @setting={{this.relativesSelectorSettingsForTheme}} @model={{this.model}} @class="theme-setting" />
</div> </div>
</DSection> </DSection>
{{/if}} {{/if}}
{{#unless model.remote_theme.is_git}} {{#unless this.model.remote_theme.is_git}}
<div class="control-unit"> <div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.css_html"}}</div> <div class="mini-title">{{i18n "admin.customize.theme.css_html"}}</div>
{{#if model.hasEditedFields}} {{#if this.model.hasEditedFields}}
<div class="description">{{i18n "admin.customize.theme.custom_sections"}}</div> <div class="description">{{i18n "admin.customize.theme.custom_sections"}}</div>
<ul> <ul>
{{#each editedFieldsFormatted as |field|}} {{#each this.editedFieldsFormatted as |field|}}
<li>{{field}}</li> <li>{{field}}</li>
{{/each}} {{/each}}
</ul> </ul>
@ -211,9 +211,9 @@
<div class="control-unit"> <div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.uploads"}}</div> <div class="mini-title">{{i18n "admin.customize.theme.uploads"}}</div>
{{#if model.uploads}} {{#if this.model.uploads}}
<ul class="removable-list"> <ul class="removable-list">
{{#each model.uploads as |upload|}} {{#each this.model.uploads as |upload|}}
<li> <li>
<span class="col">${{upload.name}}: <a href={{upload.url}} rel="noopener noreferrer" target="_blank">{{upload.filename}}</a></span> <span class="col">${{upload.name}}: <a href={{upload.url}} rel="noopener noreferrer" target="_blank">{{upload.filename}}</a></span>
<span class="col"> <span class="col">
@ -229,19 +229,19 @@
</div> </div>
{{/unless}} {{/unless}}
{{#if extraFiles.length}} {{#if this.extraFiles.length}}
<div class="control-unit"> <div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.extra_files"}}</div> <div class="mini-title">{{i18n "admin.customize.theme.extra_files"}}</div>
<details> <details>
<summary> <summary>
{{#if model.remote_theme}} {{#if this.model.remote_theme}}
{{i18n "admin.customize.theme.extra_files_remote"}} {{i18n "admin.customize.theme.extra_files_remote"}}
{{else}} {{else}}
{{i18n "admin.customize.theme.extra_files_upload"}} {{i18n "admin.customize.theme.extra_files_upload"}}
{{/if}} {{/if}}
</summary> </summary>
<ul> <ul>
{{#each extraFiles as |extraFile|}} {{#each this.extraFiles as |extraFile|}}
<li>{{extraFile.name}}</li> <li>{{extraFile.name}}</li>
{{/each}} {{/each}}
</ul> </ul>
@ -249,23 +249,23 @@
</div> </div>
{{/if}} {{/if}}
{{#if hasSettings}} {{#if this.hasSettings}}
<div class="control-unit"> <div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.theme_settings"}}</div> <div class="mini-title">{{i18n "admin.customize.theme.theme_settings"}}</div>
<DSection @class="form-horizontal theme settings control-unit"> <DSection @class="form-horizontal theme settings control-unit">
{{#each settings as |setting|}} {{#each this.settings as |setting|}}
<ThemeSettingEditor @setting={{setting}} @model={{model}} @class="theme-setting control-unit" /> <ThemeSettingEditor @setting={{setting}} @model={{this.model}} @class="theme-setting control-unit" />
{{/each}} {{/each}}
</DSection> </DSection>
</div> </div>
{{/if}} {{/if}}
{{#if hasTranslations}} {{#if this.hasTranslations}}
<div class="control-unit"> <div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.theme_translations"}}</div> <div class="mini-title">{{i18n "admin.customize.theme.theme_translations"}}</div>
<DSection @class="form-horizontal theme settings translations control-unit"> <DSection @class="form-horizontal theme settings translations control-unit">
{{#each translations as |translation|}} {{#each this.translations as |translation|}}
<ThemeTranslation @translation={{translation}} @model={{model}} @class="theme-translation" /> <ThemeTranslation @translation={{translation}} @model={{this.model}} @class="theme-translation" />
{{/each}} {{/each}}
</DSection> </DSection>
</div> </div>
@ -273,15 +273,15 @@
<div class="theme-controls"> <div class="theme-controls">
<a href={{previewUrl}} title={{i18n "admin.customize.explain_preview"}} rel="noopener noreferrer" target="_blank" class="btn btn-default">{{d-icon "desktop"}}{{i18n "admin.customize.theme.preview"}}</a> <a href={{this.previewUrl}} title={{i18n "admin.customize.explain_preview"}} rel="noopener noreferrer" target="_blank" class="btn btn-default">{{d-icon "desktop"}}{{i18n "admin.customize.theme.preview"}}</a>
<a class="btn btn-default export" rel="noopener noreferrer" target="_blank" href={{downloadUrl}}>{{d-icon "download"}} {{i18n "admin.export_json.button_text"}}</a> <a class="btn btn-default export" rel="noopener noreferrer" target="_blank" href={{this.downloadUrl}}>{{d-icon "download"}} {{i18n "admin.export_json.button_text"}}</a>
{{#if showConvert}} {{#if this.showConvert}}
<DButton @action={{action "switchType"}} @label="admin.customize.theme.convert" @icon={{convertIcon}} @class="btn-default btn-normal" @title={{convertTooltip}} /> <DButton @action={{action "switchType"}} @label="admin.customize.theme.convert" @icon={{this.convertIcon}} @class="btn-default btn-normal" @title={{this.convertTooltip}} />
{{/if}} {{/if}}
{{#if model.component}} {{#if this.model.component}}
{{#if model.enabled}} {{#if this.model.enabled}}
<DButton @class="btn-default" @action={{action "disableComponent"}} @icon="ban" @label="admin.customize.theme.disable" /> <DButton @class="btn-default" @action={{action "disableComponent"}} @icon="ban" @label="admin.customize.theme.disable" />
{{else}} {{else}}
<DButton @class="btn-default" @action={{action "enableComponent"}} @icon="check" @label="admin.customize.theme.enable" /> <DButton @class="btn-default" @action={{action "enableComponent"}} @icon="check" @label="admin.customize.theme.enable" />

View File

@ -1,5 +1,5 @@
{{#unless editingTheme}} {{#unless this.editingTheme}}
<ThemesList @themes={{fullThemes}} @components={{childThemes}} @currentTab={{currentTab}} @installModal={{route-action "installModal"}} /> <ThemesList @themes={{this.fullThemes}} @components={{this.childThemes}} @currentTab={{this.currentTab}} @installModal={{route-action "installModal"}} />
{{/unless}} {{/unless}}
{{outlet}} {{outlet}}

View File

@ -1,5 +1,5 @@
<AdminNav> <AdminNav>
{{#if currentUser.admin}} {{#if this.currentUser.admin}}
<NavItem @route="adminCustomizeThemes" @label="admin.customize.theme.title" @class="admin-customize-themes" /> <NavItem @route="adminCustomizeThemes" @label="admin.customize.theme.title" @class="admin-customize-themes" />
<NavItem @route="adminCustomize.colors" @label="admin.customize.colors.title" @class="admin-customize-colors" /> <NavItem @route="adminCustomize.colors" @label="admin.customize.colors.title" @class="admin-customize-colors" />
<NavItem @route="adminSiteText" @label="admin.site_text.title" @class="admin-customize-site-text" /> <NavItem @route="adminSiteText" @label="admin.site_text.title" @class="admin-customize-site-text" />

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