DEV: Run angle-brackets codemod (#17286)

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
This commit is contained in:
Jarek Radosz 2022-06-30 12:30:50 +02:00 committed by GitHub
parent 02e148cbde
commit 16ea7ab248
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
493 changed files with 2978 additions and 7134 deletions

View File

@ -1,32 +1,32 @@
{{#admin-wrapper class="container"}}
<AdminWrapper @class="container">
<div class="row">
<div class="full-width">
<div class="admin-main-nav">
<ul class="nav nav-pills">
{{nav-item route="admin.dashboard" label="admin.dashboard.title"}}
<NavItem @route="admin.dashboard" @label="admin.dashboard.title" />
{{#if currentUser.admin}}
{{nav-item route="adminSiteSettings" label="admin.site_settings.title"}}
<NavItem @route="adminSiteSettings" @label="admin.site_settings.title" />
{{/if}}
{{nav-item route="adminUsers" label="admin.users.title"}}
<NavItem @route="adminUsers" @label="admin.users.title" />
{{#if showGroups}}
{{nav-item route="groups" label="admin.groups.title"}}
<NavItem @route="groups" @label="admin.groups.title" />
{{/if}}
{{#if showBadges}}
{{nav-item route="adminBadges" label="admin.badges.title"}}
<NavItem @route="adminBadges" @label="admin.badges.title" />
{{/if}}
{{#if currentUser.admin}}
{{nav-item route="adminEmail" label="admin.email.title"}}
<NavItem @route="adminEmail" @label="admin.email.title" />
{{/if}}
{{nav-item route="adminLogs" label="admin.logs.title"}}
{{nav-item route="adminCustomize" label="admin.customize.title"}}
<NavItem @route="adminLogs" @label="admin.logs.title" />
<NavItem @route="adminCustomize" @label="admin.customize.title" />
{{#if currentUser.admin}}
{{nav-item route="adminApi" label="admin.api.title"}}
<NavItem @route="adminApi" @label="admin.api.title" />
{{#if siteSettings.enable_backups}}
{{nav-item route="admin.backups" label="admin.backups.title"}}
<NavItem @route="admin.backups" @label="admin.backups.title" />
{{/if}}
{{/if}}
{{nav-item route="adminPlugins" label="admin.plugins.title"}}
{{plugin-outlet name="admin-menu"}}
<NavItem @route="adminPlugins" @label="admin.plugins.title" />
<PluginOutlet @name="admin-menu" />
</ul>
</div>
@ -37,4 +37,4 @@
</div>
</div>
</div>
{{/admin-wrapper}}
</AdminWrapper>

View File

@ -1,11 +1,7 @@
{{d-button
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}}
{{#load-more selector=".api-keys tr" action=(action "loadMore")}}
<LoadMore @selector=".api-keys tr" @action={{action "loadMore"}}>
<table class="api-keys grid">
<thead>
<th>{{i18n "admin.api.key"}}</th>
@ -28,9 +24,9 @@
<td class="key-user">
<div class="label">{{i18n "admin.api.user"}}</div>
{{#if k.user}}
{{#link-to "adminUser" k.user}}
<LinkTo @route="adminUser" @model={{k.user}}>
{{avatar k.user imageSize="small"}}
{{/link-to}}
</LinkTo>
{{else}}
{{i18n "admin.api.all_users"}}
{{/if}}
@ -48,28 +44,20 @@
{{/if}}
</td>
<td class="key-controls">
{{d-button action=(route-action "show" k) icon="far-eye" title="admin.api.show_details"}}
<DButton @action={{route-action "show" k}} @icon="far-eye" @title="admin.api.show_details" />
{{#if k.revoked_at}}
{{d-button
action=(action "undoRevokeKey")
actionParam=k icon="undo"
title="admin.api.undo_revoke"}}
<DButton @action={{action "undoRevokeKey"}} @actionParam={{k}} @icon="undo" @title="admin.api.undo_revoke" />
{{else}}
{{d-button
class="btn-danger"
action=(action "revokeKey")
actionParam=k
icon="times"
title="admin.api.revoke"}}
<DButton @class="btn-danger" @action={{action "revokeKey"}} @actionParam={{k}} @icon="times" @title="admin.api.revoke" />
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{/load-more}}
</LoadMore>
{{conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}} />
{{else}}
<p>{{i18n "admin.api.none"}}</p>
{{/if}}

View File

@ -1,50 +1,46 @@
{{#link-to "adminApiKeys.index" class="go-back"}}
<LinkTo @route="adminApiKeys.index" class="go-back">
{{d-icon "arrow-left"}}
<span>{{i18n "admin.api.all_api_keys"}}</span>
{{/link-to}}
</LinkTo>
<div class="api-key api-key-new">
{{#if model.id}}
{{#admin-form-row label="admin.api.key"}}
<AdminFormRow @label="admin.api.key">
<div>{{model.key}}</div>
{{/admin-form-row}}
{{#admin-form-row}}
</AdminFormRow>
<AdminFormRow>
{{i18n "admin.api.not_shown_again"}}
{{/admin-form-row}}
{{#admin-form-row}}
{{d-button icon="angle-right" label="admin.api.continue" action=(action "continue") class="btn-primary"}}
{{/admin-form-row}}
</AdminFormRow>
<AdminFormRow>
<DButton @icon="angle-right" @label="admin.api.continue" @action={{action "continue"}} @class="btn-primary" />
</AdminFormRow>
{{else}}
{{#admin-form-row label="admin.api.description"}}
{{input value=model.description maxlength="255" placeholder=(i18n "admin.api.description_placeholder")}}
{{/admin-form-row}}
<AdminFormRow @label="admin.api.description">
<Input @value={{model.description}} @maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} />
</AdminFormRow>
{{#admin-form-row label="admin.api.user_mode"}}
{{combo-box content=userModes value=userMode onChange=(action "changeUserMode")}}
{{/admin-form-row}}
<AdminFormRow @label="admin.api.user_mode">
<ComboBox @content={{userModes}} @value={{userMode}} @onChange={{action "changeUserMode"}} />
</AdminFormRow>
{{#if showUserSelector}}
{{#admin-form-row label="admin.api.user"}}
{{email-group-user-chooser
value=model.username
onChange=(action "updateUsername")
options=(hash
<AdminFormRow @label="admin.api.user">
<EmailGroupUserChooser @value={{model.username}} @onChange={{action "updateUsername"}} @options={{hash
maximum=1
filterPlaceholder="admin.api.user_placeholder"
)
}}
{{/admin-form-row}}
}} />
</AdminFormRow>
{{/if}}
{{#admin-form-row label="admin.api.scope_mode"}}
{{combo-box content=scopeModes value=scopeMode onChange=(action "changeScopeMode")}}
<AdminFormRow @label="admin.api.scope_mode">
<ComboBox @content={{scopeModes}} @value={{scopeMode}} @onChange={{action "changeScopeMode"}} />
{{#if (eq scopeMode "read_only")}}
<p>{{i18n "admin.api.scopes.descriptions.global.read"}}</p>
{{else if (eq scopeMode "global")}}
<p>{{i18n "admin.api.scopes.global_description"}}</p>
{{/if}}
{{/admin-form-row}}
</AdminFormRow>
{{#if (eq scopeMode "granular")}}
<h2 class="scopes-title">{{i18n "admin.api.scopes.title"}}</h2>
@ -68,7 +64,7 @@
</tr>
{{#each actions as |act|}}
<tr>
<td>{{input type="checkbox" checked=act.selected}}</td>
<td><Input @type="checkbox" @checked={{act.selected}} /></td>
<td>
<div class="scope-name">{{act.name}}</div>
<span class="scope-tooltip" data-tooltip={{i18n (concat "admin.api.scopes.descriptions." resource "." act.key)}}>
@ -76,11 +72,11 @@
</span>
</td>
<td>
{{d-button icon="link" action=(action "showURLs" act.urls) class="btn-info"}}
<DButton @icon="link" @action={{action "showURLs" act.urls}} @class="btn-info" />
</td>
<td>
{{#each act.params as |p|}}
{{input maxlength="255" value=(get act p) placeholder=p}}
<Input @maxlength="255" @value={{get act p}} placeholder={{p}} />
{{/each}}
</td>
</tr>
@ -90,6 +86,6 @@
</table>
{{/if}}
{{d-button 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={{saveDisabled}} />
{{/if}}
</div>

View File

@ -1,17 +1,17 @@
{{#link-to "adminApiKeys.index" class="go-back"}}
<LinkTo @route="adminApiKeys.index" class="go-back">
{{d-icon "arrow-left"}}
{{i18n "admin.api.all_api_keys"}}
{{/link-to}}
</LinkTo>
<div class="api-key api-key-show">
{{#admin-form-row label="admin.api.key"}}
<AdminFormRow @label="admin.api.key">
{{#if model.revoked_at}}{{d-icon "times-circle"}}{{/if}}
{{model.truncatedKey}}
{{/admin-form-row}}
</AdminFormRow>
{{#admin-form-row label="admin.api.description"}}
<AdminFormRow @label="admin.api.description">
{{#if editingDescription}}
{{input value=buffered.description maxlength="255" placeholder=(i18n "admin.api.description_placeholder")}}
<Input @value={{buffered.description}} @maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} />
{{else}}
<span>
{{if model.description model.description (i18n "admin.api.no_description")}}
@ -20,41 +20,41 @@
<div class="controls">
{{#if editingDescription}}
{{d-button class="ok" action=(action "saveDescription") icon="check"}}
{{d-button class="cancel" action=(action "editDescription") icon="times"}}
<DButton @class="ok" @action={{action "saveDescription"}} @icon="check" />
<DButton @class="cancel" @action={{action "editDescription"}} @icon="times" />
{{else}}
{{d-button class="btn-default" action=(action "editDescription") icon="pencil-alt"}}
<DButton @class="btn-default" @action={{action "editDescription"}} @icon="pencil-alt" />
{{/if}}
</div>
{{/admin-form-row}}
</AdminFormRow>
{{#admin-form-row label="admin.api.user"}}
<AdminFormRow @label="admin.api.user">
{{#if model.user}}
{{#link-to "adminUser" model.user}}
<LinkTo @route="adminUser" @model={{model.user}}>
{{avatar model.user imageSize="small"}} {{model.user.username}}
{{/link-to}}
</LinkTo>
{{else}}
{{i18n "admin.api.all_users"}}
{{/if}}
{{/admin-form-row}}
</AdminFormRow>
{{#admin-form-row label="admin.api.created"}}
<AdminFormRow @label="admin.api.created">
{{format-date model.created_at leaveAgo="true"}}
{{/admin-form-row}}
</AdminFormRow>
{{#admin-form-row label="admin.api.updated"}}
<AdminFormRow @label="admin.api.updated">
{{format-date model.updated_at leaveAgo="true"}}
{{/admin-form-row}}
</AdminFormRow>
{{#admin-form-row label="admin.api.last_used"}}
<AdminFormRow @label="admin.api.last_used">
{{#if model.last_used_at}}
{{format-date model.last_used_at leaveAgo="true"}}
{{else}}
{{i18n "admin.api.never_used"}}
{{/if}}
{{/admin-form-row}}
</AdminFormRow>
{{#admin-form-row label="admin.api.revoked"}}
<AdminFormRow @label="admin.api.revoked">
{{#if model.revoked_at}}
{{format-date model.revoked_at leaveAgo="true"}}
{{else}}
@ -62,25 +62,13 @@
{{/if}}
<div class="controls">
{{#if model.revoked_at}}
{{d-button
action=(action "undoRevokeKey")
actionParam=model icon="undo"
label="admin.api.undo_revoke"}}
{{d-button
action=(action "deleteKey")
actionParam=model icon="trash-alt"
label="admin.api.delete"
class="btn-danger"}}
<DButton @action={{action "undoRevokeKey"}} @actionParam={{model}} @icon="undo" @label="admin.api.undo_revoke" />
<DButton @action={{action "deleteKey"}} @actionParam={{model}} @icon="trash-alt" @label="admin.api.delete" @class="btn-danger" />
{{else}}
{{d-button
class="btn-danger"
action=(action "revokeKey")
actionParam=model
icon="times"
label="admin.api.revoke"}}
<DButton @class="btn-danger" @action={{action "revokeKey"}} @actionParam={{model}} @icon="times" @label="admin.api.revoke" />
{{/if}}
</div>
{{/admin-form-row}}
</AdminFormRow>
{{#if model.api_key_scopes.length}}
<h2 class="scopes-title">{{i18n "admin.api.scopes.title"}}</h2>
@ -107,7 +95,7 @@
</span>
</td>
<td>
{{d-button icon="link" action=(action "showURLs" scope.urls) class="btn-info"}}
<DButton @icon="link" @action={{action "showURLs" scope.urls}} @class="btn-info" />
</td>
<td>
{{#each scope.parameters as |p|}}

View File

@ -1,7 +1,7 @@
{{#admin-nav}}
{{nav-item route="adminApiKeys" label="admin.api.title"}}
{{nav-item route="adminWebHooks" label="admin.web_hooks.title"}}
{{/admin-nav}}
<AdminNav>
<NavItem @route="adminApiKeys" @label="admin.api.title" />
<NavItem @route="adminWebHooks" @label="admin.web_hooks.title" />
</AdminNav>
<div class="admin-container">
{{outlet}}

View File

@ -1,26 +1,14 @@
<div class="backup-options">
{{#if localBackupStorage}}
{{uppy-backup-uploader done=(route-action "uploadSuccess") localBackupStorage=localBackupStorage}}
<UppyBackupUploader @done={{route-action "uploadSuccess"}} @localBackupStorage={{localBackupStorage}} />
{{else}}
{{uppy-backup-uploader done=(route-action "remoteUploadSuccess")}}
<UppyBackupUploader @done={{route-action "remoteUploadSuccess"}} />
{{/if}}
{{#if site.isReadOnly}}
{{d-button
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={{status.isOperationRunning}} @title="admin.backups.read_only.disable.title" @label="admin.backups.read_only.disable.label" />
{{else}}
{{d-button
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={{status.isOperationRunning}} @title="admin.backups.read_only.enable.title" @label="admin.backups.read_only.enable.label" />
{{/if}}
<div class="backup-message">
{{#if status.restoreDisabled}}
@ -41,41 +29,13 @@
<td class="backup-size">{{human-size backup.size}}</td>
<td class="backup-controls">
<div>
{{d-button 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}}
{{d-button
icon="far-trash-alt"
action=(route-action "destroyBackup")
actionParam=backup class="btn-danger"
disabled="true"
title="admin.backups.operations.is_running"}}
{{d-button
icon="play"
action=(route-action "startRestore")
actionParam=backup disabled=status.restoreDisabled
class="btn-default"
title=restoreTitle
label="admin.backups.operations.restore.label"}}
<DButton @icon="far-trash-alt" @action={{route-action "destroyBackup"}} @actionParam={{backup}} @class="btn-danger" @disabled="true" @title="admin.backups.operations.is_running" />
<DButton @icon="play" @action={{route-action "startRestore"}} @actionParam={{backup}} @disabled={{status.restoreDisabled}} @class="btn-default" @title={{restoreTitle}} @label="admin.backups.operations.restore.label" />
{{else}}
{{d-button
icon="far-trash-alt"
action=(route-action "destroyBackup")
actionParam=backup
class="btn-danger"
title="admin.backups.operations.destroy.title"}}
{{d-button
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="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" />
{{/if}}
</div>
</td>

View File

@ -1 +1 @@
{{admin-backups-logs logs=logs status=status}}
<AdminBackupsLogs @logs={{logs}} @status={{status}} />

View File

@ -2,37 +2,24 @@
<div class="admin-controls">
<nav>
<ul class="nav nav-pills">
{{nav-item route="admin.backups.index" label="admin.backups.menu.backups"}}
{{nav-item route="admin.backups.logs" label="admin.backups.menu.logs"}}
{{plugin-outlet name="downloader" connectorTagName="div"}}
<NavItem @route="admin.backups.index" @label="admin.backups.menu.backups" />
<NavItem @route="admin.backups.logs" @label="admin.backups.menu.logs" />
<PluginOutlet @name="downloader" @connectorTagName="div" />
<div class="admin-actions">
{{#if model.canRollback}}
{{d-button 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={{rollbackDisabled}} />
{{/if}}
{{#if model.isOperationRunning}}
{{d-button 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}}
{{d-button action=(route-action "showStartBackupModal")
class="btn-primary"
title="admin.backups.operations.backup.title"
label="admin.backups.operations.backup.label"
icon="rocket"}}
<DButton @action={{route-action "showStartBackupModal"}} @class="btn-primary" @title="admin.backups.operations.backup.title" @label="admin.backups.operations.backup.label" @icon="rocket" />
{{/if}}
</div>
</ul>
</nav>
</div>
{{plugin-outlet name="before-backup-list" connectorTagName="div"}}
<PluginOutlet @name="before-backup-list" @connectorTagName="div" />
<div class="admin-container">
{{outlet}}

View File

@ -1,4 +1,4 @@
{{#d-section class="award-badge"}}
<DSection @class="award-badge">
<h1>{{i18n "admin.badges.mass_award.title"}}</h1>
<p>{{i18n "admin.badges.mass_award.description"}}</p>
@ -18,27 +18,21 @@
</div>
<div class="control-group">
<label>
{{input type="checkbox" checked=replaceBadgeOwners}}
<Input @type="checkbox" @checked={{replaceBadgeOwners}} />
{{i18n "admin.badges.mass_award.replace_owners"}}
</label>
{{#if model.multiple_grant}}
<label class="grant-existing-holders">
{{input type="checkbox" checked=grantExistingHolders class="grant-existing-holders-checkbox"}}
<Input @type="checkbox" @checked={{grantExistingHolders}} class="grant-existing-holders-checkbox" />
{{i18n "admin.badges.mass_award.grant_existing_holders"}}
</label>
{{/if}}
</div>
{{d-button
class="btn-primary"
action=(action "massAward")
type="submit"
disabled=massAwardButtonDisabled
icon="certificate"
label="admin.badges.mass_award.perform"}}
{{#link-to "adminBadges.index" class="btn btn-normal"}}
<DButton @class="btn-primary" @action={{action "massAward"}} @type="submit" @disabled={{massAwardButtonDisabled}} @icon="certificate" @label="admin.badges.mass_award.perform" />
<LinkTo @route="adminBadges.index" class="btn btn-normal">
{{d-icon "times"}}
<span>{{i18n "cancel"}}</span>
{{/link-to}}
</LinkTo>
</form>
{{#if saving}}
{{i18n "uploading"}}
@ -73,4 +67,4 @@
{{else}}
<span class="badge-required">{{i18n "admin.badges.mass_award.no_badge_selected"}}</span>
{{/if}}
{{/d-section}}
</DSection>

View File

@ -1,4 +1,4 @@
{{#d-section class="current-badges"}}
<DSection @class="current-badges">
<div class="badge-intro admin-intro">
<img src={{badgeIntroEmoji}} class="badge-intro-emoji" alt={{i18n "admin.badges.badge_intro.emoji"}}>
<div class="content-wrapper">
@ -13,4 +13,4 @@
</div>
</div>
</div>
{{/d-section}}
</DSection>

View File

@ -1,16 +1,16 @@
{{#d-section class="current-badge content-body"}}
<DSection @class="current-badge content-body">
<form class="form-horizontal">
<div class="control-group">
<label for="name">{{i18n "admin.badges.name"}}</label>
{{#if readOnly}}
{{input type="text" name="name" value=buffered.name disabled=true}}
<Input @type="text" @name="name" @value={{buffered.name}} @disabled={{true}} />
<p class="help">
{{#link-to "adminSiteText" (query-params q=(concat textCustomizationPrefix "name"))}}
<LinkTo @route="adminSiteText" @query={{hash q=(concat textCustomizationPrefix "name")}}>
{{i18n "admin.badges.read_only_setting_help"}}
{{/link-to}}
</LinkTo>
</p>
{{else}}
{{input type="text" name="name" value=buffered.name}}
<Input @type="text" @name="name" @value={{buffered.name}} />
{{/if}}
</div>
@ -18,114 +18,73 @@
<label for="graphic">{{i18n "admin.badges.graphic"}}</label>
<div class="radios inline-form full-width">
<label class="radio-label" for="badge-icon">
{{radio-button
name="badge-icon"
id="badge-icon"
value="icon"
selection=selectedGraphicType
onChange=(action "changeGraphicType")
}}
<RadioButton @name="badge-icon" @id="badge-icon" @value="icon" @selection={{selectedGraphicType}} @onChange={{action "changeGraphicType"}} />
<span>{{i18n "admin.badges.select_an_icon"}}</span>
</label>
<label class="radio-label" for="badge-image">
{{radio-button
name="badge-image"
id="badge-image"
value="image"
selection=selectedGraphicType
onChange=(action "changeGraphicType")
}}
<RadioButton @name="badge-image" @id="badge-image" @value="image" @selection={{selectedGraphicType}} @onChange={{action "changeGraphicType"}} />
<span>{{i18n "admin.badges.upload_an_image"}}</span>
</label>
</div>
{{#if imageUploaderSelected}}
{{uppy-image-uploader
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={{buffered.image_url}} @type="badge_image" @onUploadDone={{action "setImage"}} @onUploadDeleted={{action "removeImage"}} @class="no-repeat contain-image" />
<div class="control-instructions">
<p class="help">{{i18n "admin.badges.image_help"}}</p>
</div>
{{else if iconSelectorSelected}}
{{icon-picker
name="icon"
value=buffered.icon
options=(hash maximum=1)
onChange=(action (mut buffered.icon))
}}
<IconPicker @name="icon" @value={{buffered.icon}} @options={{hash maximum=1}} @onChange={{action (mut buffered.icon)}} />
{{/if}}
</div>
<div class="control-group">
<label for="badge_type_id">{{i18n "admin.badges.badge_type"}}</label>
{{combo-box
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={{buffered.badge_type_id}} @content={{badgeTypes}} @onChange={{action (mut buffered.badge_type_id)}} @options={{hash
disabled=readOnly
)
}}
}} />
</div>
<div class="control-group">
<label for="badge_grouping_id">{{i18n "admin.badges.badge_grouping"}}</label>
<div class="badge-grouping-control">
{{combo-box
name="badge_grouping_id"
value=buffered.badge_grouping_id
content=badgeGroupings
class="badge-selector"
nameProperty="name"
onChange=(action (mut buffered.badge_grouping_id))
}}
{{d-button
class="btn-default"
action=(route-action "editGroupings")
icon="pencil-alt"
}}
<ComboBox @name="badge_grouping_id" @value={{buffered.badge_grouping_id}} @content={{badgeGroupings}} @class="badge-selector" @nameProperty="name" @onChange={{action (mut buffered.badge_grouping_id)}} />
<DButton @class="btn-default" @action={{route-action "editGroupings"}} @icon="pencil-alt" />
</div>
</div>
<div class="control-group">
<label for="description">{{i18n "admin.badges.description"}}</label>
{{#if buffered.system}}
{{textarea name="description" value=buffered.description disabled=true}}
<Textarea @name="description" @value={{buffered.description}} @disabled={{true}} />
<p class="help">
{{#link-to "adminSiteText" (query-params q=(concat textCustomizationPrefix "description"))}}
<LinkTo @route="adminSiteText" @query={{hash q=(concat textCustomizationPrefix "description")}}>
{{i18n "admin.badges.read_only_setting_help"}}
{{/link-to}}
</LinkTo>
</p>
{{else}}
{{textarea name="description" value=buffered.description}}
<Textarea @name="description" @value={{buffered.description}} />
{{/if}}
</div>
<div class="control-group">
<label for="long_description">{{i18n "admin.badges.long_description"}}</label>
{{#if buffered.system}}
{{textarea name="long_description" value=buffered.long_description disabled=true}}
<Textarea @name="long_description" @value={{buffered.long_description}} @disabled={{true}} />
<p class="help">
{{#link-to "adminSiteText" (query-params q=(concat textCustomizationPrefix "long_description"))}}
<LinkTo @route="adminSiteText" @query={{hash q=(concat textCustomizationPrefix "long_description")}}>
{{i18n "admin.badges.read_only_setting_help"}}
{{/link-to}}
</LinkTo>
</p>
{{else}}
{{textarea name="long_description" value=buffered.long_description}}
<Textarea @name="long_description" @value={{buffered.long_description}} />
{{/if}}
</div>
{{#if siteSettings.enable_badge_sql}}
<div class="control-group">
<label for="query">{{i18n "admin.badges.query"}}</label>
{{ace-editor content=buffered.query mode="sql" disabled=readOnly}}
<AceEditor @content={{buffered.query}} @mode="sql" @disabled={{readOnly}} />
</div>
{{#if hasQuery}}
@ -138,29 +97,23 @@
<div class="control-group">
<label>
{{input type="checkbox" checked=buffered.auto_revoke disabled=readOnly}}
<Input @type="checkbox" @checked={{buffered.auto_revoke}} @disabled={{readOnly}} />
{{i18n "admin.badges.auto_revoke"}}
</label>
</div>
<div class="control-group">
<label>
{{input type="checkbox" checked=buffered.target_posts disabled=readOnly}}
<Input @type="checkbox" @checked={{buffered.target_posts}} @disabled={{readOnly}} />
{{i18n "admin.badges.target_posts"}}
</label>
</div>
<div class="control-group">
<label for="trigger">{{i18n "admin.badges.trigger"}}</label>
{{combo-box
name="trigger"
value=buffered.trigger
content=badgeTriggers
onChange=(action (mut buffered.trigger))
options=(hash
<ComboBox @name="trigger" @value={{buffered.trigger}} @content={{badgeTriggers}} @onChange={{action (mut buffered.trigger)}} @options={{hash
disabled=readOnly
)
}}
}} />
</div>
{{/if}}
{{/if}}
@ -168,63 +121,54 @@
<div class="control-group">
<div>
<label>
{{input type="checkbox" checked=buffered.allow_title}}
<Input @type="checkbox" @checked={{buffered.allow_title}} />
{{i18n "admin.badges.allow_title"}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=buffered.multiple_grant disabled=readOnly}}
<Input @type="checkbox" @checked={{buffered.multiple_grant}} @disabled={{readOnly}} />
{{i18n "admin.badges.multiple_grant"}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=buffered.listable disabled=readOnly}}
<Input @type="checkbox" @checked={{buffered.listable}} @disabled={{readOnly}} />
{{i18n "admin.badges.listable"}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=buffered.show_posts disabled=readOnly}}
<Input @type="checkbox" @checked={{buffered.show_posts}} @disabled={{readOnly}} />
{{i18n "admin.badges.show_posts"}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=buffered.enabled}}
<Input @type="checkbox" @checked={{buffered.enabled}} />
{{i18n "admin.badges.enabled"}}
</label>
</div>
</div>
<div class="buttons">
{{d-button
class="btn-primary"
action=(action "save")
type="submit"
disabled=saving
label="admin.badges.save"}}
<DButton @class="btn-primary" @action={{action "save"}} @type="submit" @disabled={{saving}} @label="admin.badges.save" />
<span class="saving">{{savingStatus}}</span>
{{#unless readOnly}}
{{d-button
action=(action "destroy")
class="btn-danger"
label="admin.badges.delete"
}}
<DButton @action={{action "destroy"}} @class="btn-danger" @label="admin.badges.delete" />
{{/unless}}
</div>
</form>
{{/d-section}}
</DSection>
{{#if grant_count}}
<div class="content-body current-badge-actions">
<div>
{{#link-to "badges.show" this}}{{i18n "badges.granted" count=grant_count}}{{/link-to}}
<LinkTo @route="badges.show" @model={{this}}>{{i18n "badges.granted" count=grant_count}}</LinkTo>
</div>
</div>
{{/if}}

View File

@ -2,27 +2,27 @@
<div class="badges-header">
<h3 class="badges-heading">{{i18n "admin.badges.title"}}</h3>
<div class="create-new-badge">
{{#link-to "adminBadges.show" "new" class="btn btn-primary"}}
<LinkTo @route="adminBadges.show" @model="new" class="btn btn-primary">
{{d-icon "plus"}}
<span>{{i18n "admin.badges.new"}}</span>
{{/link-to}}
</LinkTo>
{{#link-to "adminBadges.award" "new" class="btn btn-default"}}
<LinkTo @route="adminBadges.award" @model="new" class="btn btn-default">
{{d-icon "upload"}}
<span>{{i18n "admin.badges.mass_award.title"}}</span>
{{/link-to}}
</LinkTo>
</div>
</div>
<div class="content-list">
<ul class="admin-badge-list">
{{#each model as |badge|}}
<li class="admin-badge-list-item">
{{#link-to selectedRoute badge.id}}
{{badge-button badge=badge}}
<LinkTo @route={{selectedRoute}} @model={{badge.id}}>
<BadgeButton @badge={{badge}} />
{{#if badge.newBadge}}
<span class="list-badge">{{i18n "filters.new.lower_title"}}</span>
{{/if}}
{{/link-to}}
</LinkTo>
</li>
{{/each}}
</ul>

View File

@ -1,7 +1,7 @@
<div class="field">{{i18n name}}</div>
<div class="value">
{{#if editing}}
{{text-field value=buffer autofocus="autofocus" autocomplete="off"}}
<TextField @value={{buffer}} @autofocus="autofocus" @autocomplete="off" />
{{else}}
<a href {{action "edit"}} class="inline-editable-field">
<span>{{value}}</span>
@ -10,9 +10,9 @@
</div>
<div class="controls">
{{#if editing}}
{{d-button 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>
{{else}}
{{d-button class="btn-default" action=(action "edit") icon="pencil-alt"}}
<DButton @class="btn-default" @action={{action "edit"}} @icon="pencil-alt" />
{{/if}}
</div>

View File

@ -1,5 +1,5 @@
{{#if showSortingUI}}
{{d-button action=sortByLabel icon=sortIcon class="sort-btn"}}
<DButton @action={{sortByLabel}} @icon={{sortIcon}} @class="sort-btn" />
{{/if}}
{{#if label.htmlTitle}}

View File

@ -1,3 +1,3 @@
{{#each labels as |label|}}
{{admin-report-table-cell label=label data=data options=options}}
<AdminReportTableCell @label={{label}} @data={{data}} @options={{options}} />
{{/each}}

View File

@ -3,12 +3,7 @@
<tr>
{{#if model.computedLabels}}
{{#each model.computedLabels as |label|}}
{{admin-report-table-header
showSortingUI=showSortingUI
currentSortDirection=sortDirection
currentSortLabel=sortLabel
label=label
sortByLabel=(action "sortByLabel" label)}}
<AdminReportTableHeader @showSortingUI={{showSortingUI}} @currentSortDirection={{sortDirection}} @currentSortLabel={{sortLabel}} @label={{label}} @sortByLabel={{action "sortByLabel" label}} />
{{/each}}
{{else}}
{{#each model.data as |data|}}
@ -19,7 +14,7 @@
</thead>
<tbody>
{{#each paginatedData as |data|}}
{{admin-report-table-row data=data labels=model.computedLabels options=options}}
<AdminReportTableRow @data={{data}} @labels={{model.computedLabels}} @options={{options}} />
{{/each}}
{{#if showTotalForSample}}
@ -65,10 +60,6 @@
<div class="pagination">
{{#each pages as |pageState|}}
{{d-button
translatedLabel=pageState.page
action=(action "changePage")
actionParam=pageState.index
class=pageState.class}}
<DButton @translatedLabel={{pageState.page}} @action={{action "changePage"}} @actionParam={{pageState.index}} @class={{pageState.class}} />
{{/each}}
</div>

View File

@ -1,6 +1,6 @@
<td class="title">{{report.title}}</td>
<td class="value">{{#link-to "adminUsersList.show" "newuser"}}{{number (value-at-tl report.data level="0")}}{{/link-to}}</td>
<td class="value">{{#link-to "adminUsersList.show" "basic"}}{{number (value-at-tl report.data level="1")}}{{/link-to}}</td>
<td class="value">{{#link-to "adminUsersList.show" "member"}}{{number (value-at-tl report.data level="2")}}{{/link-to}}</td>
<td class="value">{{#link-to "adminUsersList.show" "regular"}}{{number (value-at-tl report.data level="3")}}{{/link-to}}</td>
<td class="value">{{#link-to "adminUsersList.show" "leader"}}{{number (value-at-tl report.data level="4")}}{{/link-to}}</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="basic">{{number (value-at-tl 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="regular">{{number (value-at-tl 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>

View File

@ -1,15 +1,15 @@
{{#unless isHidden}}
{{#if isEnabled}}
{{#conditional-loading-section isLoading=isLoading}}
<ConditionalLoadingSection @isLoading={{isLoading}}>
{{#if showHeader}}
<div class="header">
{{#if showTitle}}
<ul class="breadcrumb">
{{#if showAllReportsLink}}
<li class="item all-reports">
{{#link-to "admin.dashboardReports" class="report-url"}}
<LinkTo @route="admin.dashboardReports" class="report-url">
{{i18n "admin.dashboard.all_reports"}}
{{/link-to}}
</LinkTo>
</li>
{{#unless showNotFoundError}}
@ -86,7 +86,7 @@
{{component modeComponent model=model options=options}}
{{#if model.relatedReport}}
{{admin-report showFilteringUI=false dataSourceName=model.relatedReport.type}}
<AdminReport @showFilteringUI={{false}} @dataSourceName={{model.relatedReport.type}} />
{{/if}}
{{/if}}
{{else}}
@ -121,11 +121,7 @@
{{#if showModes}}
<div class="modes">
{{#each displayedModes as |displayedMode|}}
{{d-button
action=(action "onChangeMode")
actionParam=displayedMode.mode
class=displayedMode.cssClass
icon=displayedMode.icon}}
<DButton @action={{action "onChangeMode"}} @actionParam={{displayedMode.mode}} @class={{displayedMode.cssClass}} @icon={{displayedMode.icon}} />
{{/each}}
</div>
{{/if}}
@ -138,12 +134,7 @@
{{/if}}
<div class="chart-groupings">
{{#each chartGroupings as |chartGrouping|}}
{{d-button
label=chartGrouping.label
action=(action "changeGrouping" chartGrouping.id)
class=chartGrouping.class
disabled=chartGrouping.disabled
}}
<DButton @label={{chartGrouping.label}} @action={{action "changeGrouping" chartGrouping.id}} @class={{chartGrouping.class}} @disabled={{chartGrouping.disabled}} />
{{/each}}
</div>
{{/if}}
@ -155,13 +146,7 @@
</span>
<div class="input">
{{date-time-input-range
from=startDate
to=endDate
onChange=(action "onChangeDateRange")
showFromTime=false
showToTime=false
}}
<DateTimeInputRange @from={{startDate}} @to={{endDate}} @onChange={{action "onChangeDateRange"}} @showFromTime={{false}} @showToTime={{false}} />
</div>
</div>
{{/if}}
@ -184,29 +169,21 @@
<div class="control">
<div class="input">
{{d-button
class="btn-default export-csv-btn"
action=(action "exportCsv")
label="admin.export_csv.button_text"
icon="download"}}
<DButton @class="btn-default export-csv-btn" @action={{action "exportCsv"}} @label="admin.export_csv.button_text" @icon="download" />
</div>
</div>
{{#if showRefresh}}
<div class="control">
<div class="input">
{{d-button
class="refresh-report-btn btn-primary"
action=(action "refreshReport")
label="admin.dashboard.reports.refresh_report"
icon="sync"}}
<DButton @class="refresh-report-btn btn-primary" @action={{action "refreshReport"}} @label="admin.dashboard.reports.refresh_report" @icon="sync" />
</div>
</div>
{{/if}}
</div>
{{/if}}
</div>
{{/conditional-loading-section}}
</ConditionalLoadingSection>
{{else}}
<div class="alert alert-info">
{{html-safe disabledLabel}}

View File

@ -3,18 +3,11 @@
<ul class="nav nav-pills target">
{{#each visibleTargets as |target|}}
<li>
{{#link-to editRouteName
theme.id
target.name
fieldName
replace=true
title=field.title
class=(if target.edited "edited" "blank")
}}
<LinkTo @route={{editRouteName}} @models={{array theme.id target.name fieldName}} @replace={{true}} @title={{field.title}} class={{if target.edited "edited" "blank"}}>
{{#if target.error}}{{d-icon "exclamation-triangle"}}{{/if}}
{{#if target.icon}}{{d-icon target.icon}}{{/if}}
{{i18n (concat "admin.customize.theme." target.name)}}
{{/link-to}}
</LinkTo>
</li>
{{/each}}
@ -31,7 +24,7 @@
<li class="spacer"></li>
<li>
<label>
{{input type="checkbox" checked=onlyOverridden click=(action "onlyOverriddenChanged" value="target.checked")}}
<Input @type="checkbox" @checked={{onlyOverridden}} @click={{action "onlyOverriddenChanged" value="target.checked"}} />
{{i18n "admin.customize.theme.hide_unused_fields"}}
</label>
</li>
@ -44,27 +37,20 @@
<ul class="nav nav-pills fields">
{{#each visibleFields as |field|}}
<li>
{{#link-to editRouteName
theme.id
currentTargetName
field.name
replace=true
title=field.title
class=(if field.edited "edited" "blank")
}}
<LinkTo @route={{editRouteName}} @models={{array theme.id currentTargetName field.name}} @replace={{true}} @title={{field.title}} class={{if field.edited "edited" "blank"}}>
{{#if field.error}}{{d-icon "exclamation-triangle"}}{{/if}}
{{#if field.icon}}{{d-icon field.icon}}{{/if}}
{{field.translatedName}}
{{/link-to}}
</LinkTo>
</li>
{{/each}}
{{#if showAddField}}
<li>
{{#if addingField}}
{{input type=text value=newFieldName enter=(action "addField") escape-press=(action "cancelAddField")}}
{{d-button class="ok" action=(action "addField" newFieldName) icon="check"}}
{{d-button class="cancel" action=(action "cancelAddField") icon="times"}}
<Input @type={{text}} @value={{newFieldName}} @enter={{action "addField"}} @escape-press={{action "cancelAddField"}} />
<DButton @class="ok" @action={{action "addField" newFieldName}} @icon="check" />
<DButton @class="cancel" @action={{action "cancelAddField"}} @icon="times" />
{{else}}
<a href {{action "toggleAddField" currentTargetName}} class="no-text">
{{d-icon "plus"}}
@ -91,13 +77,4 @@
<pre class="field-warning">{{html-safe warning}}</pre>
{{/if}}
{{ace-editor
content=activeSection
editorId=editorId
mode=activeSectionMode
autofocus="true"
placeholder=placeholder
htmlPlaceholder=true
save=(action "save")
setWarning=(action "setWarning")
}}
<AceEditor @content={{activeSection}} @editorId={{editorId}} @mode={{activeSectionMode}} @autofocus="true" @placeholder={{placeholder}} @htmlPlaceholder={{true}} @save={{action "save"}} @setWarning={{action "setWarning"}} />

View File

@ -1,51 +1,47 @@
<div class="user-field">
{{#if (or isEditing (not userField.id))}}
{{#admin-form-row label="admin.user_fields.type"}}
{{combo-box
content=fieldTypes
value=buffered.field_type
onChange=(action (mut buffered.field_type))
}}
{{/admin-form-row}}
<AdminFormRow @label="admin.user_fields.type">
<ComboBox @content={{fieldTypes}} @value={{buffered.field_type}} @onChange={{action (mut buffered.field_type)}} />
</AdminFormRow>
{{#admin-form-row label="admin.user_fields.name"}}
{{input value=buffered.name class="user-field-name" maxlength="255"}}
{{/admin-form-row}}
<AdminFormRow @label="admin.user_fields.name">
<Input @value={{buffered.name}} class="user-field-name" @maxlength="255" />
</AdminFormRow>
{{#admin-form-row label="admin.user_fields.description"}}
{{input value=buffered.description class="user-field-desc" maxlength="255"}}
{{/admin-form-row}}
<AdminFormRow @label="admin.user_fields.description">
<Input @value={{buffered.description}} class="user-field-desc" @maxlength="255" />
</AdminFormRow>
{{#if bufferedFieldType.hasOptions}}
{{#admin-form-row label="admin.user_fields.options"}}
{{value-list values=buffered.options inputType="array"}}
{{/admin-form-row}}
<AdminFormRow @label="admin.user_fields.options">
<ValueList @values={{buffered.options}} @inputType="array" />
</AdminFormRow>
{{/if}}
{{#admin-form-row wrapLabel="true"}}
{{input type="checkbox" checked=buffered.editable}} <span>{{i18n "admin.user_fields.editable.title"}}</span>
{{/admin-form-row}}
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.editable}} /> <span>{{i18n "admin.user_fields.editable.title"}}</span>
</AdminFormRow>
{{#admin-form-row wrapLabel="true"}}
{{input type="checkbox" checked=buffered.required}} <span>{{i18n "admin.user_fields.required.title"}}</span>
{{/admin-form-row}}
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.required}} /> <span>{{i18n "admin.user_fields.required.title"}}</span>
</AdminFormRow>
{{#admin-form-row wrapLabel="true"}}
{{input type="checkbox" checked=buffered.show_on_profile}} <span>{{i18n "admin.user_fields.show_on_profile.title"}}</span>
{{/admin-form-row}}
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.show_on_profile}} /> <span>{{i18n "admin.user_fields.show_on_profile.title"}}</span>
</AdminFormRow>
{{#admin-form-row wrapLabel="true"}}
{{input type="checkbox" checked=buffered.show_on_user_card}} <span>{{i18n "admin.user_fields.show_on_user_card.title"}}</span>
{{/admin-form-row}}
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.show_on_user_card}} /> <span>{{i18n "admin.user_fields.show_on_user_card.title"}}</span>
</AdminFormRow>
{{#admin-form-row wrapLabel="true"}}
{{input type="checkbox" checked=buffered.searchable}} <span>{{i18n "admin.user_fields.searchable.title"}}</span>
{{/admin-form-row}}
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.searchable}} /> <span>{{i18n "admin.user_fields.searchable.title"}}</span>
</AdminFormRow>
{{#admin-form-row}}
{{d-button action=(action "save") class="btn-primary save" icon="check" label="admin.user_fields.save"}}
{{d-button action=(action "cancel") class="btn-danger cancel" icon="times" label="admin.user_fields.cancel"}}
{{/admin-form-row}}
<AdminFormRow>
<DButton @action={{action "save"}} @class="btn-primary save" @icon="check" @label="admin.user_fields.save" />
<DButton @action={{action "cancel"}} @class="btn-danger cancel" @icon="times" @label="admin.user_fields.cancel" />
</AdminFormRow>
{{else}}
<div class="row">
<div class="form-display">
@ -55,10 +51,10 @@
</div>
<div class="form-display field-type">{{fieldName}}</div>
<div class="form-element controls">
{{d-button action=(action "edit") class="btn-default edit" icon="pencil-alt" label="admin.user_fields.edit"}}
{{d-button action=destroyAction actionParam=userField class="btn-danger cancel" icon="far-trash-alt" label="admin.user_fields.delete"}}
{{d-button action=moveUpAction actionParam=userField class="btn-default" icon="arrow-up" disabled=cantMoveUp}}
{{d-button action=moveDownAction actionParam=userField class="btn-default" icon="arrow-down" disabled=cantMoveDown}}
<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={{moveUpAction}} @actionParam={{userField}} @class="btn-default" @icon="arrow-up" @disabled={{cantMoveUp}} />
<DButton @action={{moveDownAction}} @actionParam={{userField}} @class="btn-default" @icon="arrow-down" @disabled={{cantMoveDown}} />
</div>
</div>
<div class="row">{{flags}}</div>

View File

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

View File

@ -5,9 +5,9 @@
<div class="col timestamp">{{createdAt}}</div>
<div class="col completion">{{completion}}</div>
<div class="col actions">
{{d-button icon=expandRequestIcon action=(action "toggleRequest") label="admin.web_hooks.events.request"}}
{{d-button icon=expandResponseIcon action=(action "toggleResponse") label="admin.web_hooks.events.response"}}
{{d-button icon="sync" action=(action "redeliver") label="admin.web_hooks.events.redeliver"}}
<DButton @icon={{expandRequestIcon}} @action={{action "toggleRequest"}} @label="admin.web_hooks.events.request" />
<DButton @icon={{expandResponseIcon}} @action={{action "toggleResponse"}} @label="admin.web_hooks.events.response" />
<DButton @icon="sync" @action={{action "redeliver"}} @label="admin.web_hooks.events.redeliver" />
</div>
{{#if expandDetails}}
<div class="details">

View File

@ -5,7 +5,7 @@
<div class="section-body {{columnCountClass}}">
{{#each newFeatures as |feature|}}
{{dashboard-new-feature-item item=feature tagName=""}}
<DashboardNewFeatureItem @item={{feature}} @tagName="" />
{{/each}}
</div>
<div class="section-footer">
@ -14,6 +14,6 @@
{{i18n "admin.dashboard.new_features.learn_more"}}
</a>
{{/if}}
{{d-button 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={{dismissNewFeatures}} />
</div>
{{/if}}

View File

@ -8,7 +8,7 @@
</div>
<div class="section-body">
{{#conditional-loading-section isLoading=loadingProblems}}
<ConditionalLoadingSection @isLoading={{loadingProblems}}>
{{#if highPriorityProblems.length}}
<div class="problem-messages priority-high">
<ul>
@ -30,10 +30,10 @@
</div>
<p class="actions">
{{d-button action=refreshProblems class="btn-default" icon="sync" label="admin.dashboard.refresh_problems"}}
<DButton @action={{refreshProblems}} @class="btn-default" @icon="sync" @label="admin.dashboard.refresh_problems" />
{{i18n "admin.dashboard.last_checked"}}: {{problemsTimestamp}}
</p>
{{/conditional-loading-section}}
</ConditionalLoadingSection>
</div>
</div>
{{/if}}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
{{radio-button name="install-items" id=value value=value selection=selection}}
<RadioButton @name="install-items" @id={{value}} @value={{value}} @selection={{selection}} />
<label class="radio" for={{value}}>
{{#if showIcon}}
{{d-icon "plus"}}

View File

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

View File

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

View File

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

View File

@ -1,5 +1 @@
{{search-advanced-category-chooser
value=category
onChange=(action "onChange")
options=(hash filterable=true)
}}
<SearchAdvancedCategoryChooser @value={{category}} @onChange={{action "onChange"}} @options={{hash filterable=true}} />

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,31 +2,13 @@
<div class="values">
{{#each collection as |value index|}}
<div data-index={{index}} class="value">
{{d-button
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}}
{{d-button
action=(action "shift" -1 index)
icon="arrow-up"
class="shift-up-value-btn btn-small"
}}
{{d-button
action=(action "shift" 1 index)
icon="arrow-down"
class="shift-down-value-btn btn-small"
}}
<DButton @action={{action "shift" -1 index}} @icon="arrow-up" @class="shift-up-value-btn btn-small" />
<DButton @action={{action "shift" 1 index}} @icon="arrow-down" @class="shift-down-value-btn btn-small" />
{{/if}}
</div>
@ -36,21 +18,7 @@
{{/if}}
<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={{newValue}} @placeholderKey="admin.site_settings.simple_list.add_item" class="add-value-input" @autocomplete="off" @autocorrect="off" @autocapitalize="off" />
{{d-button
action=(action "addValue")
actionParam=newValue
disabled=inputEmpty
icon="plus"
class="add-value-btn btn-small"
}}
<DButton @action={{action "addValue"}} @actionParam={{newValue}} @disabled={{inputEmpty}} @icon="plus" @class="add-value-btn btn-small" />
</div>

View File

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

View File

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

View File

@ -2,11 +2,11 @@
<h3>
{{#if staffLogFilter}}
{{settingName}}
{{#link-to "adminLogs.staffActionLogs" (query-params filters=staffLogFilter force_refresh=true) title=(i18n "admin.settings.history")}}
<LinkTo @route="adminLogs.staffActionLogs" @query={{hash filters=staffLogFilter force_refresh=true}} @title={{i18n "admin.settings.history"}}>
<span class="history-icon">
{{d-icon "history"}}
</span>
{{/link-to}}
</LinkTo>
{{else}}
{{settingName}}
{{/if}}
@ -20,12 +20,12 @@
</div>
{{#if dirty}}
<div class="setting-controls">
{{d-button class="ok" action=(action "update") icon="check"}}
{{d-button class="cancel" action=(action "cancel") icon="times"}}
<DButton @class="ok" @action={{action "update"}} @icon="check" />
<DButton @class="cancel" @action={{action "cancel"}} @icon="times" />
</div>
{{else if setting.overridden}}
{{#if setting.secret}}
{{d-button action=(action "toggleSecret") icon="far-eye-slash"}}
<DButton @action={{action "toggleSecret"}} @icon="far-eye-slash" />
{{/if}}
{{d-button 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" />
{{/if}}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,18 +1,11 @@
{{combo-box
content=setting.validValues
value=value
onChange=(action (mut value))
valueProperty=setting.computedValueProperty
nameProperty=setting.computedNameProperty
options=(hash
<ComboBox @content={{setting.validValues}} @value={{value}} @onChange={{action (mut value)}} @valueProperty={{setting.computedValueProperty}} @nameProperty={{setting.computedNameProperty}} @options={{hash
castInteger=true
allowAny=setting.allowsNone
)
}}
}} />
{{preview}}
{{setting-validation-message message=validationMessage}}
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">
{{html-safe setting.description}}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,3 @@
{{d-button 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=value setting=setting}} />
<div class="desc">{{html-safe setting.description}}</div>
{{setting-validation-message message=validationMessage}}
<SettingValidationMessage @message={{validationMessage}} />

View File

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

View File

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

View File

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

View File

@ -11,16 +11,9 @@
<label>
{{i18n "admin.user.suspend_reason_title"}}
</label>
{{combo-box
content=reasons
value=selectedReason
class="suspend-reason"
onChange=(action setSelectedReason)}}
<ComboBox @content={{reasons}} @value={{selectedReason}} @class="suspend-reason" @onChange={{action setSelectedReason}} />
{{#if isCustomReason}}
{{text-field
value=customReason
class="suspend-reason"
onChange=(action setCustomReason)}}
<TextField @value={{customReason}} @class="suspend-reason" @onChange={{action setCustomReason}} />
{{/if}}
</div>
@ -29,7 +22,4 @@
{{i18n "admin.user.suspend_message"}}
</div>
</label>
{{textarea
value=message
class="suspend-message"
placeholder=(i18n "admin.user.suspend_message_placeholder")}}
<Textarea @value={{message}} class="suspend-message" placeholder={{i18n "admin.user.suspend_message_placeholder"}} />

View File

@ -1,5 +1,5 @@
<div class="inner-wrapper">
{{plugin-outlet 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=theme}} />
<div class="info">
<span class="name">

View File

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

View File

@ -2,45 +2,20 @@
<div class="values">
{{#each collection as |value index|}}
<div data-index={{index}} class="value">
{{d-button
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}}
{{d-button
action=(action "shift" -1 index)
icon="arrow-up"
class="shift-up-value-btn btn-small"
}}
{{d-button
action=(action "shift" 1 index)
icon="arrow-down"
class="shift-down-value-btn btn-small"
}}
<DButton @action={{action "shift" -1 index}} @icon="arrow-up" @class="shift-up-value-btn btn-small" />
<DButton @action={{action "shift" 1 index}} @icon="arrow-down" @class="shift-down-value-btn btn-small" />
{{/if}}
</div>
{{/each}}
</div>
{{/if}}
{{combo-box
valueProperty=null
nameProperty=null
value=newValue
content=filteredChoices
onChange=(action "selectChoice")
options=(hash
<ComboBox @valueProperty={{null}} @nameProperty={{null}} @value={{newValue}} @content={{filteredChoices}} @onChange={{action "selectChoice"}} @options={{hash
allowAny=true
none=noneKey
)
}}
}} />

View File

@ -126,10 +126,5 @@
</div>
</div>
{{/if}}
{{custom-html
name="upgrade-header"
versionCheck=versionCheck
tagName="div"
classNames="upgrade-header"
}}
<CustomHtml @name="upgrade-header" @versionCheck={{versionCheck}} @tagName="div" @classNames="upgrade-header" />
</div>

View File

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

View File

@ -1,40 +1,20 @@
<div class="color-scheme show-current-style">
<div class="admin-container">
<h1>{{#if model.theme_id}}{{model.name}}{{else}}{{text-field class="style-name" value=model.name}}{{/if}}</h1>
<h1>{{#if model.theme_id}}{{model.name}}{{else}}<TextField @class="style-name" @value={{model.name}} />{{/if}}</h1>
<div class="controls">
{{#unless model.theme_id}}
{{d-button
class="btn-primary"
action=(action "save")
disabled=model.disableSave
label="admin.customize.save"
}}
<DButton @class="btn-primary" @action={{action "save"}} @disabled={{model.disableSave}} @label="admin.customize.save" />
{{/unless}}
{{d-button
class="btn-default"
action=(action "copy" model)
icon="copy"
label="admin.customize.copy"
}}
{{d-button
class="btn-default copy-to-clipboard"
action=(action "copyToClipboard" model)
icon="far-clipboard"
label="admin.customize.copy_to_clipboard"
}}
<DButton @class="btn-default" @action={{action "copy" 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" />
<span class="saving {{unless model.savingStatus "hidden"}}">{{model.savingStatus}}</span>
{{#if model.theme_id}}
<span class="not-editable">
{{i18n "admin.customize.theme_owner"}}
{{#link-to "adminCustomizeThemes.show" model.theme_id}}{{model.theme_name}}{{/link-to}}
<LinkTo @route="adminCustomizeThemes.show" @model={{model.theme_id}}>{{model.theme_name}}</LinkTo>
</span>
{{else}}
{{d-button
action=(action "destroy")
class="btn-danger"
icon="far-trash-alt"
label="admin.customize.delete"
}}
<DButton @action={{action "destroy"}} @class="btn-danger" @icon="far-trash-alt" @label="admin.customize.delete" />
{{/if}}
</div>
@ -42,7 +22,7 @@
{{#unless model.theme_id}}
<div class="pull-right">
<label>
{{input type="checkbox" checked=onlyOverridden}}
<Input @type="checkbox" @checked={{onlyOverridden}} />
{{i18n "admin.settings.show_overriden"}}
</label>
</div>
@ -50,10 +30,10 @@
<div>
{{#if model.theme_id}}
{{inline-edit-checkbox 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={{model.user_selectable}} @modelId={{model.id}} />
{{else}}
<label>
{{input type="checkbox" checked=model.user_selectable}}
<Input @type="checkbox" @checked={{model.user_selectable}} />
{{i18n "admin.customize.theme.color_scheme_user_selectable"}}
</label>
{{/if}}
@ -76,19 +56,11 @@
<h3>{{c.translatedName}}</h3>
<p class="description">{{c.description}}</p>
</td>
<td class="hex">{{color-input hexValue=c.hex brightnessValue=c.brightness valid=c.valid}}</td>
<td class="hex"><ColorInput @hexValue={{c.hex}} @brightnessValue={{c.brightness}} @valid={{c.valid}} /></td>
<td class="actions">
{{#unless model.theme_id}}
{{d-button
class=(concat "btn-default revert " (unless c.savedIsOverriden "invisible"))
action=(action "revert" c)
title="admin.customize.colors.revert_title"
label="revert"}}
{{d-button
class=(concat "btn-default undo " (unless c.changed "invisible"))
action=(action "undo" c)
title="admin.customize.colors.undo_title"
label="undo"}}
<DButton @class={{concat "btn-default revert " (unless c.savedIsOverriden "invisible")}} @action={{action "revert" c}} @title="admin.customize.colors.revert_title" @label="revert" />
<DButton @class={{concat "btn-default undo " (unless c.changed "invisible")}} @action={{action "undo" c}} @title="admin.customize.colors.undo_title" @label="undo" />
{{/unless}}
</td>
</tr>

View File

@ -5,20 +5,16 @@
{{#each model as |scheme|}}
{{#unless scheme.is_base}}
<li>
{{#link-to "adminCustomize.colors.show" scheme replace=true}}
<LinkTo @route="adminCustomize.colors.show" @model={{scheme}} @replace={{true}}>
{{d-icon "paint-brush"}}
{{scheme.description}}
{{/link-to}}
</LinkTo>
</li>
{{/unless}}
{{/each}}
</ul>
{{d-button
class="btn-default"
action=(action "newColorScheme")
icon="plus"
label="admin.customize.new"}}
<DButton @class="btn-default" @action={{action "newColorScheme"}} @icon="plus" @label="admin.customize.new" />
</div>
{{outlet}}

View File

@ -1,7 +1,7 @@
{{email-styles-editor styles=model fieldName=fieldName save=(action "save")}}
<EmailStylesEditor @styles={{model}} @fieldName={{fieldName}} @save={{action "save"}} />
<div class="admin-footer">
<div class="buttons">
{{d-button action=(action "save") disabled=saveDisabled class="btn-primary" translatedLabel=saveButtonText}}
<DButton @action={{action "save"}} @disabled={{saveDisabled}} @class="btn-primary" @translatedLabel={{saveButtonText}} />
</div>
</div>

View File

@ -1,25 +1,20 @@
{{combo-box
value=emailTemplate.id
content=adminCustomizeEmailTemplates.sortedTemplates
onChange=adminCustomizeEmailTemplates.onSelectTemplate
nameProperty="title"
}}
<ComboBox @value={{emailTemplate.id}} @content={{adminCustomizeEmailTemplates.sortedTemplates}} @onChange={{adminCustomizeEmailTemplates.onSelectTemplate}} @nameProperty="title" />
<div class="email-template">
<label>{{i18n "admin.customize.email_templates.subject"}}</label>
{{#if hasMultipleSubjects}}
<h3>{{#link-to "adminSiteText" (query-params q=hasMultipleSubjects)}}{{i18n "admin.customize.email_templates.multiple_subjects"}}{{/link-to}}</h3>
<h3><LinkTo @route="adminSiteText" @query={{hash q=hasMultipleSubjects}}>{{i18n "admin.customize.email_templates.multiple_subjects"}}</LinkTo></h3>
{{else}}
{{input value=buffered.subject}}
<Input @value={{buffered.subject}} />
{{/if}}
<br>
<label>{{i18n "admin.customize.email_templates.body"}}</label>
{{d-editor value=buffered.body}}
<DEditor @value={{buffered.body}} />
{{#save-controls model=emailTemplate action=(action "saveChanges") saved=saved saveDisabled=saveDisabled}}
<SaveControls @model={{emailTemplate}} @action={{action "saveChanges"}} @saved={{saved}} @saveDisabled={{saveDisabled}}>
{{#if emailTemplate.can_revert}}
{{d-button action=(action "revertChanges") label="admin.customize.email_templates.revert"}}
<DButton @action={{action "revertChanges"}} @label="admin.customize.email_templates.revert" />
{{/if}}
{{/save-controls}}
</SaveControls>
</div>

View File

@ -6,15 +6,8 @@
{{i18n "admin.customize.robots.overridden"}}
</div>
{{/if}}
{{textarea
value=buffered.robots_txt
class="robots-txt-input"}}
{{#save-controls model=this action=(action "save") saved=saved saveDisabled=saveDisabled}}
{{d-button
class="btn-default"
disabled=resetDisabled
icon="undo"
action=(action "reset")
label="admin.settings.reset"}}
{{/save-controls}}
<Textarea @value={{buffered.robots_txt}} class="robots-txt-input" />
<SaveControls @model={{this}} @action={{action "save"}} @saved={{saved}} @saveDisabled={{saveDisabled}}>
<DButton @class="btn-default" @disabled={{resetDisabled}} @icon="undo" @action={{action "reset"}} @label="admin.settings.reset" />
</SaveControls>
</div>

View File

@ -1,32 +1,17 @@
<div class="current-style {{if maximized "maximized"}}">
<div class="wrapper">
<div class="editor-information">
{{d-button
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">
{{i18n "admin.customize.theme.edit_css_html"}}
{{#link-to showRouteName model.id replace=true class="editor-theme-name"
}}
<LinkTo @route={{showRouteName}} @model={{model.id}} @replace={{true}} class="editor-theme-name">
{{model.name}}
{{/link-to}}
</LinkTo>
</span>
</div>
{{admin-theme-editor
theme=model
editRouteName=editRouteName
currentTargetName=currentTargetName
fieldName=fieldName
fieldAdded=(action "fieldAdded")
maximized=maximized
onlyOverriddenChanged=(action "onlyOverriddenChanged")
save=(action "save")
}}
<AdminThemeEditor @theme={{model}} @editRouteName={{editRouteName}} @currentTargetName={{currentTargetName}} @fieldName={{fieldName}} @fieldAdded={{action "fieldAdded"}} @maximized={{maximized}} @onlyOverriddenChanged={{action "onlyOverriddenChanged"}} @save={{action "save"}} />
<div class="admin-footer">
<div class="status-actions">
@ -44,12 +29,7 @@
</div>
<div class="buttons">
{{d-button
action=(action "save")
disabled=saveDisabled
class="btn-primary"
translatedLabel=saveButtonText
}}
<DButton @action={{action "save"}} @disabled={{saveDisabled}} @class="btn-primary" @translatedLabel={{saveButtonText}} />
</div>
</div>
</div>

View File

@ -3,7 +3,7 @@
<div class="content-wrapper">
<h1>{{i18n "admin.customize.theme.themes_intro"}}</h1>
<div class="create-actions">
{{d-button 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 class="external-resources">
{{#each externalResources as |resource|}}

View File

@ -1,17 +1,13 @@
<div class="show-current-style">
{{plugin-outlet 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=model}} />
<div class="title">
{{#if editingName}}
{{text-field value=model.name autofocus="true"}}
{{d-button action=(action "finishedEditingName") class="btn-primary btn-small submit-edit" icon="check"}}
{{d-button action=(action "cancelEditingName") class="btn-small cancel-edit" icon="times"}}
<TextField @value={{model.name}} @autofocus="true" />
<DButton @action={{action "finishedEditingName"}} @class="btn-primary btn-small submit-edit" @icon="check" />
<DButton @action={{action "cancelEditingName"}} @class="btn-small cancel-edit" @icon="times" />
{{else}}
<span>{{model.name}}</span>
{{d-button
action=(action "startEditingName")
icon="pencil-alt"
class="btn-small"
}}
<DButton @action={{action "startEditingName"}} @icon="pencil-alt" @class="btn-small" />
{{/if}}
</div>
@ -35,19 +31,15 @@
<div class="alert alert-error">
{{#if model.disabled_by}}
{{i18n "admin.customize.theme.disabled_by"}}
{{#user-link user=model.disabled_by}}
<UserLink @user={{model.disabled_by}}>
{{avatar model.disabled_by imageSize="tiny"}}
{{model.disabled_by.username}}
{{/user-link}}
</UserLink>
{{format-date model.disabled_at leaveAgo="true"}}
{{else}}
{{i18n "admin.customize.theme.disabled"}}
{{/if}}
{{d-button
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" />
</div>
{{/unless}}
@ -95,9 +87,9 @@
{{/if}}
{{#if model.remote_theme.commits_behind}}
{{d-button 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}}
{{d-button 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}}
<span class="status-message">
@ -131,9 +123,9 @@
{{else}}
<span class="heading">{{i18n "admin.customize.theme.creator"}}</span>
<span>
{{#user-link user=model.user}}
<UserLink @user={{model.user}}>
{{format-username model.user.username}}
{{/user-link}}
</UserLink>
</span>
{{/if}}
</div>
@ -141,41 +133,36 @@
{{#if showCheckboxes}}
<div class="control-unit">
{{#unless model.component}}
{{inline-edit-checkbox action=(action "applyDefault") labelKey="admin.customize.theme.is_default" checked=model.default modelId=model.id}}
{{inline-edit-checkbox action=(action "applyUserSelectable") labelKey="admin.customize.theme.user_selectable" checked=model.user_selectable modelId=model.id}}
<InlineEditCheckbox @action={{action "applyDefault"}} @labelKey="admin.customize.theme.is_default" @checked={{model.default}} @modelId={{model.id}} />
<InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.user_selectable" @checked={{model.user_selectable}} @modelId={{model.id}} />
{{/unless}}
{{#if model.remote_theme}}
{{inline-edit-checkbox 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={{model.auto_update}} @modelId={{model.id}} />
{{/if}}
</div>
{{/if}}
{{#unless model.component}}
{{#d-section class="form-horizontal theme settings control-unit"}}
<DSection @class="form-horizontal theme settings control-unit">
<div class="row setting">
<div class="setting-label">
{{i18n "admin.customize.theme.color_scheme"}}
</div>
<div class="setting-value">
{{color-palettes
content=colorSchemes
value=colorSchemeId
icon="paint-brush"
options=(hash
<ColorPalettes @content={{colorSchemes}} @value={{colorSchemeId}} @icon="paint-brush" @options={{hash
filterable=true
)
}}
}} />
<div class="desc">{{i18n "admin.customize.theme.color_scheme_select"}}</div>
</div>
<div class="setting-controls">
{{#if colorSchemeChanged}}
{{d-button action=(action "changeScheme") class="ok submit-edit" icon="check"}}
{{d-button action=(action "cancelChangeScheme") class="cancel cancel-edit" icon="times"}}
<DButton @action={{action "changeScheme"}} @class="ok submit-edit" @icon="check" />
<DButton @action={{action "cancelChangeScheme"}} @class="cancel cancel-edit" @icon="times" />
{{/if}}
</div>
</div>
{{/d-section}}
</DSection>
{{/unless}}
{{#if parentThemes}}
@ -183,24 +170,24 @@
<div class="mini-title">{{i18n "admin.customize.theme.component_of"}}</div>
<ul>
{{#each parentThemes as |theme|}}
<li>{{#link-to "adminCustomizeThemes.show" theme replace=true}}{{theme.name}}{{/link-to}}</li>
<li><LinkTo @route="adminCustomizeThemes.show" @model={{theme}} @replace={{true}}>{{theme.name}}</LinkTo></li>
{{/each}}
</ul>
</div>
{{/if}}
{{#if model.component}}
{{#d-section class="form-horizontal theme settings control-unit"}}
<DSection @class="form-horizontal theme settings control-unit">
<div class="row setting">
{{theme-setting-relatives-selector setting=relativesSelectorSettingsForComponent model=model class="theme-setting"}}
<ThemeSettingRelativesSelector @setting={{relativesSelectorSettingsForComponent}} @model={{model}} @class="theme-setting" />
</div>
{{/d-section}}
</DSection>
{{else}}
{{#d-section class="form-horizontal theme settings control-unit"}}
<DSection @class="form-horizontal theme settings control-unit">
<div class="row setting">
{{theme-setting-relatives-selector setting=relativesSelectorSettingsForTheme model=model class="theme-setting"}}
<ThemeSettingRelativesSelector @setting={{relativesSelectorSettingsForTheme}} @model={{model}} @class="theme-setting" />
</div>
{{/d-section}}
</DSection>
{{/if}}
{{#unless model.remote_theme.is_git}}
@ -219,10 +206,7 @@
</div>
{{/if}}
{{d-button
class="btn-default edit"
action=(action "editTheme")
label="admin.customize.theme.edit_css_html"}}
<DButton @class="btn-default edit" @action={{action "editTheme"}} @label="admin.customize.theme.edit_css_html" />
</div>
<div class="control-unit">
@ -233,7 +217,7 @@
<li>
<span class="col">${{upload.name}}: <a href={{upload.url}} rel="noopener noreferrer" target="_blank">{{upload.filename}}</a></span>
<span class="col">
{{d-button action=(action "removeUpload") actionParam=upload class="second btn-default btn-default cancel-edit" icon="times"}}
<DButton @action={{action "removeUpload"}} @actionParam={{upload}} @class="second btn-default btn-default cancel-edit" @icon="times" />
</span>
</li>
{{/each}}
@ -241,7 +225,7 @@
{{else}}
<div class="description">{{i18n "admin.customize.theme.no_uploads"}}</div>
{{/if}}
{{d-button action=(action "addUploadModal") class="btn-default" icon="plus" label="admin.customize.theme.add"}}
<DButton @action={{action "addUploadModal"}} @class="btn-default" @icon="plus" @label="admin.customize.theme.add" />
</div>
{{/unless}}
@ -268,22 +252,22 @@
{{#if hasSettings}}
<div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.theme_settings"}}</div>
{{#d-section class="form-horizontal theme settings control-unit"}}
<DSection @class="form-horizontal theme settings control-unit">
{{#each settings as |setting|}}
{{theme-setting-editor setting=setting model=model class="theme-setting control-unit"}}
<ThemeSettingEditor @setting={{setting}} @model={{model}} @class="theme-setting control-unit" />
{{/each}}
{{/d-section}}
</DSection>
</div>
{{/if}}
{{#if hasTranslations}}
<div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.theme_translations"}}</div>
{{#d-section class="form-horizontal theme settings translations control-unit"}}
<DSection @class="form-horizontal theme settings translations control-unit">
{{#each translations as |translation|}}
{{theme-translation translation=translation model=model class="theme-translation"}}
<ThemeTranslation @translation={{translation}} @model={{model}} @class="theme-translation" />
{{/each}}
{{/d-section}}
</DSection>
</div>
{{/if}}
@ -293,26 +277,18 @@
<a class="btn btn-default export" rel="noopener noreferrer" target="_blank" href={{downloadUrl}}>{{d-icon "download"}} {{i18n "admin.export_json.button_text"}}</a>
{{#if showConvert}}
{{d-button 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={{convertIcon}} @class="btn-default btn-normal" @title={{convertTooltip}} />
{{/if}}
{{#if model.component}}
{{#if model.enabled}}
{{d-button
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}}
{{d-button
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" />
{{/if}}
{{/if}}
{{d-button action=(action "destroy") label="admin.customize.delete" icon="trash-alt" class="btn-danger"}}
<DButton @action={{action "destroy"}} @label="admin.customize.delete" @icon="trash-alt" @class="btn-danger" />
</div>

View File

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

View File

@ -1,17 +1,17 @@
{{#admin-nav}}
<AdminNav>
{{#if currentUser.admin}}
{{nav-item route="adminCustomizeThemes" label="admin.customize.theme.title" class="admin-customize-themes"}}
{{nav-item route="adminCustomize.colors" label="admin.customize.colors.title" class="admin-customize-colors"}}
{{nav-item route="adminSiteText" label="admin.site_text.title" class="admin-customize-site-text"}}
{{nav-item route="adminCustomizeEmailTemplates" label="admin.customize.email_templates.title" class="admin-customize-email-templates"}}
{{nav-item route="adminCustomizeEmailStyle" label="admin.customize.email_style.title" class="admin-customize-email-styles"}}
{{nav-item route="adminUserFields" label="admin.user_fields.title" class="admin-customize-user-fields"}}
{{nav-item route="adminEmojis" label="admin.emoji.title" class="admin-customize-emojis"}}
{{nav-item route="adminPermalinks" label="admin.permalink.title" class="admin-customize-permalinks"}}
{{nav-item route="adminEmbedding" label="admin.embedding.title" class="admin-customize-embedding"}}
<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="adminSiteText" @label="admin.site_text.title" @class="admin-customize-site-text" />
<NavItem @route="adminCustomizeEmailTemplates" @label="admin.customize.email_templates.title" @class="admin-customize-email-templates" />
<NavItem @route="adminCustomizeEmailStyle" @label="admin.customize.email_style.title" @class="admin-customize-email-styles" />
<NavItem @route="adminUserFields" @label="admin.user_fields.title" @class="admin-customize-user-fields" />
<NavItem @route="adminEmojis" @label="admin.emoji.title" @class="admin-customize-emojis" />
<NavItem @route="adminPermalinks" @label="admin.permalink.title" @class="admin-customize-permalinks" />
<NavItem @route="adminEmbedding" @label="admin.embedding.title" @class="admin-customize-embedding" />
{{/if}}
{{nav-item route="adminWatchedWords" label="admin.watched_words.title" class="admin-customize-watched-words"}}
{{/admin-nav}}
<NavItem @route="adminWatchedWords" @label="admin.watched_words.title" @class="admin-customize-watched-words" />
</AdminNav>
<div class="admin-container">
{{outlet}}

View File

@ -1,56 +1,49 @@
{{plugin-outlet name="admin-dashboard-top" tagName="span" connectorTagName="div"}}
<PluginOutlet @name="admin-dashboard-top" @tagName="span" @connectorTagName="div" />
{{#if showVersionChecks}}
<div class="section-top">
<div class="version-checks">
{{version-checks versionCheck=versionCheck tagName=""}}
<VersionChecks @versionCheck={{versionCheck}} @tagName="" />
</div>
</div>
{{/if}}
{{dashboard-problems
loadingProblems=loadingProblems
foundProblems=foundProblems
lowPriorityProblems=lowPriorityProblems
highPriorityProblems=highPriorityProblems
problemsTimestamp=problemsTimestamp
refreshProblems=(action "refreshProblems")
}}
<DashboardProblems @loadingProblems={{loadingProblems}} @foundProblems={{foundProblems}} @lowPriorityProblems={{lowPriorityProblems}} @highPriorityProblems={{highPriorityProblems}} @problemsTimestamp={{problemsTimestamp}} @refreshProblems={{action "refreshProblems"}} />
<ul class="navigation">
<li class="navigation-item general">
{{#link-to "admin.dashboard.general" class="navigation-link"}}
<LinkTo @route="admin.dashboard.general" class="navigation-link">
{{i18n "admin.dashboard.general_tab"}}
{{/link-to}}
</LinkTo>
</li>
{{#if isModerationTabVisible}}
<li class="navigation-item moderation">
{{#link-to "admin.dashboardModeration" class="navigation-link"}}
<LinkTo @route="admin.dashboardModeration" class="navigation-link">
{{i18n "admin.dashboard.moderation_tab"}}
{{/link-to}}
</LinkTo>
</li>
{{/if}}
{{#if isSecurityTabVisible}}
<li class="navigation-item security">
{{#link-to "admin.dashboardSecurity" class="navigation-link"}}
<LinkTo @route="admin.dashboardSecurity" class="navigation-link">
{{i18n "admin.dashboard.security_tab"}}
{{/link-to}}
</LinkTo>
</li>
{{/if}}
{{#if isReportsTabVisible}}
<li class="navigation-item reports">
{{#link-to "admin.dashboardReports" class="navigation-link"}}
<LinkTo @route="admin.dashboardReports" class="navigation-link">
{{i18n "admin.dashboard.reports_tab"}}
{{/link-to}}
</LinkTo>
</li>
{{/if}}
</ul>
{{outlet}}
{{dashboard-new-features tagName="div"}}
<DashboardNewFeatures @tagName="div" />
{{plugin-outlet name="admin-dashboard-bottom" tagName="span" connectorTagName="div"}}
<PluginOutlet @name="admin-dashboard-bottom" @tagName="span" @connectorTagName="div" />

View File

@ -1,5 +1,5 @@
{{#conditional-loading-spinner condition=isLoading}}
{{plugin-outlet name="admin-dashboard-general-top" tagName="span" connectorTagName="div"}}
<ConditionalLoadingSpinner @condition={{isLoading}}>
<PluginOutlet @name="admin-dashboard-general-top" @tagName="span" @connectorTagName="div" />
{{#if isCommunityHealthVisible}}
<div class="community-health section">
@ -10,55 +10,24 @@
{{i18n "admin.dashboard.community_health"}}
</a>
</h2>
{{period-chooser
period=period
action=(action "changePeriod")
content=availablePeriods
fullDay=false}}
<PeriodChooser @period={{period}} @action={{action "changePeriod"}} @content={{availablePeriods}} @fullDay={{false}} />
</div>
<div class="section-body">
<div class="charts">
{{admin-report
dataSourceName="consolidated_page_views"
forcedModes="stacked-chart"
filters=filters}}
<AdminReport @dataSourceName="consolidated_page_views" @forcedModes="stacked-chart" @filters={{filters}} />
{{admin-report
dataSourceName="signups"
showTrend=true
forcedModes="chart"
filters=filters}}
<AdminReport @dataSourceName="signups" @showTrend={{true}} @forcedModes="chart" @filters={{filters}} />
{{admin-report
dataSourceName="topics"
showTrend=true
forcedModes="chart"
filters=filters}}
<AdminReport @dataSourceName="topics" @showTrend={{true}} @forcedModes="chart" @filters={{filters}} />
{{admin-report
dataSourceName="posts"
showTrend=true
forcedModes="chart"
filters=filters}}
<AdminReport @dataSourceName="posts" @showTrend={{true}} @forcedModes="chart" @filters={{filters}} />
{{admin-report
dataSourceName="dau_by_mau"
showTrend=true
forcedModes="chart"
filters=filters}}
<AdminReport @dataSourceName="dau_by_mau" @showTrend={{true}} @forcedModes="chart" @filters={{filters}} />
{{admin-report
dataSourceName="daily_engaged_users"
showTrend=true
forcedModes="chart"
filters=filters}}
<AdminReport @dataSourceName="daily_engaged_users" @showTrend={{true}} @forcedModes="chart" @filters={{filters}} />
{{admin-report
dataSourceName="new_contributors"
showTrend=true
forcedModes="chart"
filters=filters}}
<AdminReport @dataSourceName="new_contributors" @showTrend={{true}} @forcedModes="chart" @filters={{filters}} />
</div>
</div>
</div>
@ -73,9 +42,9 @@
<div class="header">
<ul class="breadcrumb">
<li class="item report">
{{#link-to "adminReports" class="report-url"}}
<LinkTo @route="adminReports" class="report-url">
{{i18n "admin.dashboard.activity_metrics"}}
{{/link-to}}
</LinkTo>
</li>
</ul>
</div>
@ -90,11 +59,7 @@
</div>
{{#each activityMetrics as |metric|}}
{{admin-report
showHeader=false
filters=activityMetricsFilters
forcedModes="counters"
dataSourceName=metric}}
<AdminReport @showHeader={{false}} @filters={{activityMetricsFilters}} @forcedModes="counters" @dataSourceName={{metric}} />
{{/each}}
</div>
</div>
@ -103,22 +68,15 @@
{{/if}}
<div class="user-metrics">
{{#conditional-loading-section isLoading=isLoading}}
{{admin-report
forcedModes="inline-table"
dataSourceName="users_by_type"}}
<ConditionalLoadingSection @isLoading={{isLoading}}>
<AdminReport @forcedModes="inline-table" @dataSourceName="users_by_type" />
{{admin-report
forcedModes="inline-table"
dataSourceName="users_by_trust_level"}}
{{/conditional-loading-section}}
<AdminReport @forcedModes="inline-table" @dataSourceName="users_by_trust_level" />
</ConditionalLoadingSection>
</div>
<div class="misc">
{{admin-report
forcedModes="storage-stats"
dataSourceName="storage_stats"
showHeader=false}}
<AdminReport @forcedModes="storage-stats" @dataSourceName="storage_stats" @showHeader={{false}} />
<div class="last-dashboard-update">
<div>
@ -140,21 +98,13 @@
{{#if isSearchReportsVisible}}
<div class="section-column">
{{admin-report
filters=topReferredTopicsFilters
dataSourceName="top_referred_topics"
reportOptions=topReferredTopicsOptions}}
<AdminReport @filters={{topReferredTopicsFilters}} @dataSourceName="top_referred_topics" @reportOptions={{topReferredTopicsOptions}} />
{{admin-report
dataSourceName="trending_search"
reportOptions=trendingSearchOptions
filters=trendingSearchFilters
isEnabled=logSearchQueriesEnabled
disabledLabel=trendingSearchDisabledLabel}}
<AdminReport @dataSourceName="trending_search" @reportOptions={{trendingSearchOptions}} @filters={{trendingSearchFilters}} @isEnabled={{logSearchQueriesEnabled}} @disabledLabel={{trendingSearchDisabledLabel}} />
{{html-safe (i18n "admin.dashboard.reports.trending_search.more" basePath=(base-path))}}
</div>
{{/if}}
</div>
{{plugin-outlet name="admin-dashboard-general-bottom" tagName="span" connectorTagName="div"}}
{{/conditional-loading-spinner}}
<PluginOutlet @name="admin-dashboard-general-bottom" @tagName="span" @connectorTagName="div" />
</ConditionalLoadingSpinner>

View File

@ -1,5 +1,5 @@
<div class="sections">
{{plugin-outlet name="admin-dashboard-moderation-top" tagName="span" connectorTagName="div"}}
<PluginOutlet @name="admin-dashboard-moderation-top" @tagName="span" @connectorTagName="div" />
{{#if isModeratorsActivityVisible}}
<div class="moderators-activity section">
@ -9,37 +9,22 @@
{{i18n "admin.dashboard.moderators_activity"}}
</a>
</h2>
{{period-chooser
period=period
action=(action "changePeriod")
content=availablePeriods
fullDay=false}}
<PeriodChooser @period={{period}} @action={{action "changePeriod"}} @content={{availablePeriods}} @fullDay={{false}} />
</div>
<div class="section-body">
{{admin-report
filters=filters
showHeader=false
dataSourceName="moderators_activity"}}
<AdminReport @filters={{filters}} @showHeader={{false}} @dataSourceName="moderators_activity" />
</div>
</div>
{{/if}}
<div class="main-section">
{{admin-report
dataSourceName="flags_status"
reportOptions=flagsStatusOptions
filters=lastWeekfilters}}
<AdminReport @dataSourceName="flags_status" @reportOptions={{flagsStatusOptions}} @filters={{lastWeekfilters}} />
{{admin-report
dataSourceName="post_edits"
filters=lastWeekfilters}}
<AdminReport @dataSourceName="post_edits" @filters={{lastWeekfilters}} />
{{admin-report
dataSourceName="user_flagging_ratio"
filters=lastWeekfilters
reportOptions=userFlaggingRatioOptions}}
<AdminReport @dataSourceName="user_flagging_ratio" @filters={{lastWeekfilters}} @reportOptions={{userFlaggingRatioOptions}} />
{{plugin-outlet name="admin-dashboard-moderation-bottom" tagName="span" connectorTagName="div"}}
<PluginOutlet @name="admin-dashboard-moderation-bottom" @tagName="span" @connectorTagName="div" />
</div>
</div>

View File

@ -1,28 +1,23 @@
{{#conditional-loading-spinner condition=isLoading}}
<ConditionalLoadingSpinner @condition={{isLoading}}>
<div class="reports-index section">
<div class="section-title">
<h2>{{i18n "admin.reports.title"}}</h2>
{{input
class="filter-reports-input"
input=(action "filterReports" value="target.value")
placeholder=(i18n "admin.dashboard.filter_reports")
autofocus=true
}}
<Input class="filter-reports-input" @input={{action "filterReports" value="target.value"}} placeholder={{i18n "admin.dashboard.filter_reports"}} @autofocus={{true}} />
</div>
<ul class="reports-list">
{{#each filterReports as |report|}}
<li class="report">
{{#link-to "adminReports.show" report.type}}
<LinkTo @route="adminReports.show" @model={{report.type}}>
<h3 class="report-title">{{report.title}}</h3>
{{#if report.description}}
<p class="report-description">
{{report.description}}
</p>
{{/if}}
{{/link-to}}
</LinkTo>
</li>
{{/each}}
</ul>
</div>
{{/conditional-loading-spinner}}
</ConditionalLoadingSpinner>

View File

@ -1,15 +1,11 @@
<div class="sections">
{{plugin-outlet name="admin-dashboard-security-top" tagName="span" connectorTagName="div"}}
<PluginOutlet @name="admin-dashboard-security-top" @tagName="span" @connectorTagName="div" />
<div class="main-section">
{{admin-report
dataSourceName="suspicious_logins"
filters=lastWeekfilters}}
<AdminReport @dataSourceName="suspicious_logins" @filters={{lastWeekfilters}} />
{{admin-report
dataSourceName="staff_logins"
filters=lastWeekfilters}}
<AdminReport @dataSourceName="staff_logins" @filters={{lastWeekfilters}} />
{{plugin-outlet name="admin-dashboard-security-bottom" tagName="span" connectorTagName="div"}}
<PluginOutlet @name="admin-dashboard-security-bottom" @tagName="span" @connectorTagName="div" />
</div>
</div>

View File

@ -2,14 +2,11 @@
<div class="email-advanced-test">
<label for="email">{{i18n "admin.email.advanced_test.email"}}</label>
{{textarea name="email" value=email class="email-body"}}
{{d-button
action=(action "run")
label="admin.email.advanced_test.run"
}}
<Textarea @name="email" @value={{email}} class="email-body" />
<DButton @action={{action "run"}} @label="admin.email.advanced_test.run" />
</div>
{{#conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}}>
{{#if format}}
<hr>
<div class="text">
@ -22,4 +19,4 @@
<pre class="full-reason">{{html-safe elided}}</pre>
</div>
{{/if}}
{{/conditional-loading-spinner}}
</ConditionalLoadingSpinner>

View File

@ -1,4 +1,4 @@
{{#load-more selector=".email-list tr" action=(action "loadMore")}}
<LoadMore @selector=".email-list tr" @action={{action "loadMore"}}>
<table class="table email-list">
<thead>
<tr>
@ -11,9 +11,9 @@
<tbody>
<tr class="filters">
<td>{{i18n "admin.email.logs.filters.title"}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td colspan="2">{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
<td><TextField @value={{filter.user}} @placeholderKey="admin.email.logs.filters.user_placeholder" /></td>
<td><TextField @value={{filter.address}} @placeholderKey="admin.email.logs.filters.address_placeholder" /></td>
<td colspan="2"><TextField @value={{filter.type}} @placeholderKey="admin.email.logs.filters.type_placeholder" /></td>
</tr>
{{#each model as |l|}}
@ -21,8 +21,8 @@
<td>{{format-date l.created_at}}</td>
<td>
{{#if l.user}}
{{#link-to "adminUser" l.user}}{{avatar l.user imageSize="tiny"}}{{/link-to}}
{{#link-to "adminUser" l.user}}{{l.user.username}}{{/link-to}}
<LinkTo @route="adminUser" @model={{l.user}}>{{avatar l.user imageSize="tiny"}}</LinkTo>
<LinkTo @route="adminUser" @model={{l.user}}>{{l.user.username}}</LinkTo>
{{else}}
&mdash;
{{/if}}
@ -52,6 +52,6 @@
{{/each}}
</tbody>
</table>
{{/load-more}}
</LoadMore>
{{conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}} />

View File

@ -21,14 +21,8 @@
{{#if sendingEmail}}
{{i18n "admin.email.sending_test"}}
{{else}}
{{text-field value=testEmailAddress placeholderKey="admin.email.test_email_address"}}
{{d-button
class="btn-primary"
action=(action "sendTestEmail")
disabled=sendTestEmailDisabled
label="admin.email.send_test"
type="submit"
}}
<TextField @value={{testEmailAddress}} @placeholderKey="admin.email.test_email_address" />
<DButton @class="btn-primary" @action={{action "sendTestEmail"}} @disabled={{sendTestEmailDisabled}} @label="admin.email.send_test" @type="submit" />
{{#if sentTestEmailMessage}}
<span class="result-message">{{sentTestEmailMessage}}</span>
{{/if}}

View File

@ -4,20 +4,12 @@
<div class="controls">
<div class="inline-form">
<label for="last-seen">{{i18n "admin.email.last_seen_user"}}</label>
{{date-picker-past value=lastSeen id="last-seen"}}
<DatePickerPast @value={{lastSeen}} @id="last-seen" />
<label>{{i18n "admin.email.user"}}:</label>
{{email-group-user-chooser
value=username
onChange=(action "updateUsername")
options=(hash
<EmailGroupUserChooser @value={{username}} @onChange={{action "updateUsername"}} @options={{hash
maximum=1
)
}}
{{d-button
class="btn-primary digest-refresh-button"
action=(action "refresh")
label="admin.email.refresh"
}}
}} />
<DButton @class="btn-primary digest-refresh-button" @action={{action "refresh"}} @label="admin.email.refresh" />
<div class="toggle">
<label>{{i18n "admin.email.format"}}</label>
{{#if showHtml}}
@ -35,7 +27,7 @@
</div>
</div>
{{#conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}}>
<div class="email-preview-digest">
{{#if showSendEmailForm}}
@ -45,12 +37,8 @@
{{i18n "admin.email.sending_test"}}
{{else}}
<label>{{i18n "admin.email.send_digest_label"}}</label>
{{text-field value=email placeholderKey="admin.email.test_email_address"}}
{{d-button
class="btn-default"
action=(action "sendEmail")
disabled=sendEmailDisabled
label="admin.email.send_digest"}}
<TextField @value={{email}} @placeholderKey="admin.email.test_email_address" />
<DButton @class="btn-default" @action={{action "sendEmail"}} @disabled={{sendEmailDisabled}} @label="admin.email.send_digest" />
{{#if sentEmail}}
<span class="result-message">{{i18n "admin.email.sent_test"}}</span>
{{/if}}
@ -72,4 +60,4 @@
</div>
</div>
{{/conditional-loading-spinner}}
</ConditionalLoadingSpinner>

View File

@ -1,4 +1,4 @@
{{#load-more selector=".email-list tr" action=(action "loadMore")}}
<LoadMore @selector=".email-list tr" @action={{action "loadMore"}}>
<table class="table email-list">
<thead>
<tr>
@ -12,9 +12,9 @@
<tbody>
<tr class="filters">
<td>{{i18n "admin.email.logs.filters.title"}}</td>
<td>{{text-field value=filter.from placeholderKey="admin.email.incoming_emails.filters.from_placeholder"}}</td>
<td>{{text-field value=filter.to placeholderKey="admin.email.incoming_emails.filters.to_placeholder"}}</td>
<td>{{text-field value=filter.subject placeholderKey="admin.email.incoming_emails.filters.subject_placeholder"}}</td>
<td><TextField @value={{filter.from}} @placeholderKey="admin.email.incoming_emails.filters.from_placeholder" /></td>
<td><TextField @value={{filter.to}} @placeholderKey="admin.email.incoming_emails.filters.to_placeholder" /></td>
<td><TextField @value={{filter.subject}} @placeholderKey="admin.email.incoming_emails.filters.subject_placeholder" /></td>
</tr>
{{#each model as |email|}}
@ -23,10 +23,10 @@
<td class="username">
<div>
{{#if email.user}}
{{#link-to "adminUser" email.user}}
<LinkTo @route="adminUser" @model={{email.user}}>
{{avatar email.user imageSize="tiny"}}
{{email.from_address}}
{{/link-to}}
</LinkTo>
{{else}}
&mdash;
{{/if}}
@ -53,6 +53,6 @@
{{/each}}
</tbody>
</table>
{{/load-more}}
</LoadMore>
{{conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}} />

View File

@ -1,4 +1,4 @@
{{#load-more selector=".email-list tr" action=(action "loadMore")}}
<LoadMore @selector=".email-list tr" @action={{action "loadMore"}}>
<table class="table email-list">
<thead>
<tr>
@ -13,10 +13,10 @@
<tbody>
<tr class="filters">
<td>{{i18n "admin.email.logs.filters.title"}}</td>
<td>{{text-field value=filter.from placeholderKey="admin.email.incoming_emails.filters.from_placeholder"}}</td>
<td>{{text-field value=filter.to placeholderKey="admin.email.incoming_emails.filters.to_placeholder"}}</td>
<td>{{text-field value=filter.subject placeholderKey="admin.email.incoming_emails.filters.subject_placeholder"}}</td>
<td colspan="2">{{text-field value=filter.error placeholderKey="admin.email.incoming_emails.filters.error_placeholder"}}</td>
<td><TextField @value={{filter.from}} @placeholderKey="admin.email.incoming_emails.filters.from_placeholder" /></td>
<td><TextField @value={{filter.to}} @placeholderKey="admin.email.incoming_emails.filters.to_placeholder" /></td>
<td><TextField @value={{filter.subject}} @placeholderKey="admin.email.incoming_emails.filters.subject_placeholder" /></td>
<td colspan="2"><TextField @value={{filter.error}} @placeholderKey="admin.email.incoming_emails.filters.error_placeholder" /></td>
</tr>
{{#each model as |email|}}
@ -25,10 +25,10 @@
<td class="username">
<div>
{{#if email.user}}
{{#link-to "adminUser" email.user}}
<LinkTo @route="adminUser" @model={{email.user}}>
{{avatar email.user imageSize="tiny"}}
{{email.from_address}}
{{/link-to}}
</LinkTo>
{{else}}
{{#if email.from_address}}
<a href="mailto:{{email.from_address}}">{{email.from_address}}</a>
@ -61,6 +61,6 @@
{{/each}}
</tbody>
</table>
{{/load-more}}
</LoadMore>
{{conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}} />

View File

@ -1,4 +1,4 @@
{{#load-more selector=".email-list tr" action=(action "loadMore")}}
<LoadMore @selector=".email-list tr" @action={{action "loadMore"}}>
<table class="table email-list">
<thead>
<tr>
@ -12,10 +12,10 @@
<tbody>
<tr class="filters">
<td>{{i18n "admin.email.logs.filters.title"}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
<td>{{text-field value=filter.reply_key placeholderKey="admin.email.logs.filters.reply_key_placeholder"}}</td>
<td><TextField @value={{filter.user}} @placeholderKey="admin.email.logs.filters.user_placeholder" /></td>
<td><TextField @value={{filter.address}} @placeholderKey="admin.email.logs.filters.address_placeholder" /></td>
<td><TextField @value={{filter.type}} @placeholderKey="admin.email.logs.filters.type_placeholder" /></td>
<td><TextField @value={{filter.reply_key}} @placeholderKey="admin.email.logs.filters.reply_key_placeholder" /></td>
</tr>
{{#each model as |l|}}
@ -23,8 +23,8 @@
<td class="sent-email-date">{{format-date l.created_at}}</td>
<td class="sent-email-username">
{{#if l.user}}
{{#link-to "adminUser" l.user}}{{avatar l.user imageSize="tiny"}}{{/link-to}}
{{#link-to "adminUser" l.user}}{{l.user.username}}{{/link-to}}
<LinkTo @route="adminUser" @model={{l.user}}>{{avatar l.user imageSize="tiny"}}</LinkTo>
<LinkTo @route="adminUser" @model={{l.user}}>{{l.user.username}}</LinkTo>
{{else}}
&mdash;
{{/if}}
@ -50,6 +50,6 @@
{{/each}}
</tbody>
</table>
{{/load-more}}
</LoadMore>
{{conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}} />

View File

@ -1,4 +1,4 @@
{{#load-more selector=".email-list tr" action=(action "loadMore")}}
<LoadMore @selector=".email-list tr" @action={{action "loadMore"}}>
<table class="table email-list">
<thead>
<tr>
@ -12,9 +12,9 @@
<tbody>
<tr class="filters">
<td>{{i18n "admin.email.logs.filters.title"}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
<td><TextField @value={{filter.user}} @placeholderKey="admin.email.logs.filters.user_placeholder" /></td>
<td><TextField @value={{filter.address}} @placeholderKey="admin.email.logs.filters.address_placeholder" /></td>
<td><TextField @value={{filter.type}} @placeholderKey="admin.email.logs.filters.type_placeholder" /></td>
<td></td>
</tr>
@ -23,8 +23,8 @@
<td>{{format-date l.created_at}}</td>
<td>
{{#if l.user}}
{{#link-to "adminUser" l.user}}{{avatar l.user imageSize="tiny"}}{{/link-to}}
{{#link-to "adminUser" l.user}}{{l.user.username}}{{/link-to}}
<LinkTo @route="adminUser" @model={{l.user}}>{{avatar l.user imageSize="tiny"}}</LinkTo>
<LinkTo @route="adminUser" @model={{l.user}}>{{l.user.username}}</LinkTo>
{{else}}
&mdash;
{{/if}}
@ -46,6 +46,6 @@
{{/each}}
</tbody>
</table>
{{/load-more}}
</LoadMore>
{{conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}} />

View File

@ -1,14 +1,14 @@
{{#admin-nav}}
{{nav-item route="adminEmail.index" label="admin.email.settings"}}
{{nav-item route="adminEmail.previewDigest" label="admin.email.preview_digest"}}
{{nav-item route="adminEmail.advancedTest" label="admin.email.advanced_test.title"}}
{{nav-item route="adminCustomizeEmailTemplates" label="admin.email.templates"}}
{{nav-item route="adminEmail.sent" label="admin.email.sent"}}
{{nav-item route="adminEmail.skipped" label="admin.email.skipped"}}
{{nav-item route="adminEmail.bounced" label="admin.email.bounced"}}
{{nav-item route="adminEmail.received" label="admin.email.received"}}
{{nav-item route="adminEmail.rejected" label="admin.email.rejected"}}
{{/admin-nav}}
<AdminNav>
<NavItem @route="adminEmail.index" @label="admin.email.settings" />
<NavItem @route="adminEmail.previewDigest" @label="admin.email.preview_digest" />
<NavItem @route="adminEmail.advancedTest" @label="admin.email.advanced_test.title" />
<NavItem @route="adminCustomizeEmailTemplates" @label="admin.email.templates" />
<NavItem @route="adminEmail.sent" @label="admin.email.sent" />
<NavItem @route="adminEmail.skipped" @label="admin.email.skipped" />
<NavItem @route="adminEmail.bounced" @label="admin.email.bounced" />
<NavItem @route="adminEmail.received" @label="admin.email.received" />
<NavItem @route="adminEmail.rejected" @label="admin.email.rejected" />
</AdminNav>
<div class="admin-container">
{{outlet}}

View File

@ -10,7 +10,7 @@
</thead>
<tbody>
{{#each embedding.embeddable_hosts as |host|}}
{{embeddable-host host=host deleteHost=(action "deleteHost")}}
<EmbeddableHost @host={{host}} @deleteHost={{action "deleteHost"}} />
{{/each}}
</tbody>
</table>
@ -18,13 +18,13 @@
<p>{{i18n "admin.embedding.get_started"}}</p>
{{/if}}
{{d-button label="admin.embedding.add_host" action=(action "addHost") icon="plus" class="btn-primary add-host"}}
<DButton @label="admin.embedding.add_host" @action={{action "addHost"}} @icon="plus" @class="btn-primary add-host" />
</div>
{{#if showSecondary}}
<div class="embedding-secondary">
<p>{{html-safe (i18n "admin.embedding.sample")}}</p>
{{highlighted-code code=embeddingCode lang="html"}}
<HighlightedCode @code={{embeddingCode}} @lang="html" />
</div>
<hr>
@ -32,37 +32,26 @@
<div class="embedding-secondary">
<h3>{{i18n "admin.embedding.settings"}}</h3>
{{embedding-setting field="embed_by_username" value=embedding.embed_by_username}}
{{embedding-setting field="embed_post_limit" value=embedding.embed_post_limit}}
{{embedding-setting field="embed_title_scrubber"
value=embedding.embed_title_scrubber
placeholder="- site.com$"}}
{{embedding-setting field="embed_truncate" value=embedding.embed_truncate type="checkbox"}}
{{embedding-setting field="embed_unlisted" value=embedding.embed_unlisted type="checkbox"}}
<EmbeddingSetting @field="embed_by_username" @value={{embedding.embed_by_username}} />
<EmbeddingSetting @field="embed_post_limit" @value={{embedding.embed_post_limit}} />
<EmbeddingSetting @field="embed_title_scrubber" @value={{embedding.embed_title_scrubber}} @placeholder="- site.com$" />
<EmbeddingSetting @field="embed_truncate" @value={{embedding.embed_truncate}} @type="checkbox" />
<EmbeddingSetting @field="embed_unlisted" @value={{embedding.embed_unlisted}} @type="checkbox" />
</div>
<div class="embedding-secondary">
<h3>{{i18n "admin.embedding.crawling_settings"}}</h3>
<p class="description">{{i18n "admin.embedding.crawling_description"}}</p>
{{embedding-setting field="allowed_embed_selectors"
value=embedding.allowed_embed_selectors
placeholder="article, #story, .post"}}
<EmbeddingSetting @field="allowed_embed_selectors" @value={{embedding.allowed_embed_selectors}} @placeholder="article, #story, .post" />
{{embedding-setting field="blocked_embed_selectors"
value=embedding.blocked_embed_selectors
placeholder=".ad-unit, header"}}
<EmbeddingSetting @field="blocked_embed_selectors" @value={{embedding.blocked_embed_selectors}} @placeholder=".ad-unit, header" />
{{embedding-setting field="allowed_embed_classnames"
value=embedding.allowed_embed_classnames
placeholder="emoji, classname"}}
<EmbeddingSetting @field="allowed_embed_classnames" @value={{embedding.allowed_embed_classnames}} @placeholder="emoji, classname" />
</div>
<div class="embedding-secondary">
{{d-button label="admin.embedding.save"
action=(action "saveChanges")
class="btn-primary embed-save"
disabled=embedding.isSaving}}
<DButton @label="admin.embedding.save" @action={{action "saveChanges"}} @class="btn-primary embed-save" @disabled={{embedding.isSaving}} />
{{#if saved}}{{i18n "saved"}}{{/if}}
</div>

View File

@ -3,11 +3,7 @@
<p class="desc">{{i18n "admin.emoji.help"}}</p>
{{emoji-uploader
emojiGroups=emojiGroups
done=(action "emojiUploaded")
id="emoji-uploader"
}}
<EmojiUploader @emojiGroups={{emojiGroups}} @done={{action "emojiUploaded"}} @id="emoji-uploader" />
<hr>
@ -18,13 +14,7 @@
<th>{{i18n "admin.emoji.image"}}</th>
<th>{{i18n "admin.emoji.name"}}</th>
<th colspan="2">
{{combo-box
value=filter
content=sortingGroups
nameProperty=null
valueProperty=null
onChange=(action "filterGroups")
}}
<ComboBox @value={{filter}} @content={{sortingGroups}} @nameProperty={{null}} @valueProperty={{null}} @onChange={{action "filterGroups"}} />
</th>
</tr>
</thead>
@ -35,11 +25,7 @@
<td>:{{e.name}}:</td>
<td>{{e.group}}</td>
<td class="action">
{{d-button
action=(action "destroyEmoji" e)
class="btn-danger"
icon="far-trash-alt"
}}
<DButton @action={{action "destroyEmoji" e}} @class="btn-danger" @icon="far-trash-alt" />
</td>
</tr>
{{/each}}

View File

@ -1,13 +1,13 @@
{{#admin-nav}}
{{nav-item route="adminLogs.staffActionLogs" label="admin.logs.staff_actions.title"}}
{{nav-item route="adminLogs.screenedEmails" label="admin.logs.screened_emails.title"}}
{{nav-item route="adminLogs.screenedIpAddresses" label="admin.logs.screened_ips.title"}}
{{nav-item route="adminLogs.screenedUrls" label="admin.logs.screened_urls.title"}}
{{nav-item route="adminSearchLogs" label="admin.logs.search_logs.title"}}
<AdminNav>
<NavItem @route="adminLogs.staffActionLogs" @label="admin.logs.staff_actions.title" />
<NavItem @route="adminLogs.screenedEmails" @label="admin.logs.screened_emails.title" />
<NavItem @route="adminLogs.screenedIpAddresses" @label="admin.logs.screened_ips.title" />
<NavItem @route="adminLogs.screenedUrls" @label="admin.logs.screened_urls.title" />
<NavItem @route="adminSearchLogs" @label="admin.logs.search_logs.title" />
{{#if currentUser.admin}}
{{nav-item path="/logs" label="admin.logs.logster.title"}}
<NavItem @path="/logs" @label="admin.logs.logster.title" />
{{/if}}
{{/admin-nav}}
</AdminNav>
<div class="admin-container">
{{outlet}}

View File

@ -2,16 +2,11 @@
{{i18n "admin.logs.screened_emails.description"}}
</p>
{{d-button
class="btn-default screened-email-export"
action=(action "exportScreenedEmailList")
title="admin.export_csv.button_title.screened_email"
icon="download"
label="admin.export_csv.button_text"}}
<DButton @class="btn-default screened-email-export" @action={{action "exportScreenedEmailList"}} @title="admin.export_csv.button_title.screened_email" @icon="download" @label="admin.export_csv.button_text" />
<br>
{{#conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}}>
{{#if model.length}}
<table class="screened-emails grid">
@ -36,7 +31,7 @@
<td class="created_at"><div class="label">{{i18n "admin.logs.created_at"}}</div>{{age-with-tooltip item.created_at}}</td>
<td class="ip_address">{{item.ip_address}}</td>
<td class="action">
{{d-button action=(action "clearBlock") actionParam=item icon="check" label="admin.logs.screened_emails.actions.allow"}}
<DButton @action={{action "clearBlock"}} @actionParam={{item}} @icon="check" @label="admin.logs.screened_emails.actions.allow" />
</td>
</tr>
{{/each}}
@ -46,4 +41,4 @@
{{else}}
{{i18n "search.no_results"}}
{{/if}}
{{/conditional-loading-spinner}}
</ConditionalLoadingSpinner>

View File

@ -2,24 +2,14 @@
<div class="screened-ip-controls">
<div class="filter-screened-ip-address inline-form">
{{text-field
value=filter
class="ip-address-input"
placeholderKey="admin.logs.screened_ips.form.filter"
autocorrect="off"
autocapitalize="off"}}
{{d-button
class="btn-default"
action=(action "exportScreenedIpList")
icon="download"
title="admin.export_csv.button_title.screened_ip"
label="admin.export_csv.button_text"}}
<TextField @value={{filter}} @class="ip-address-input" @placeholderKey="admin.logs.screened_ips.form.filter" @autocorrect="off" @autocapitalize="off" />
<DButton @class="btn-default" @action={{action "exportScreenedIpList"}} @icon="download" @title="admin.export_csv.button_title.screened_ip" @label="admin.export_csv.button_text" />
</div>
{{screened-ip-address-form action=(action "recordAdded")}}
<ScreenedIpAddressForm @action={{action "recordAdded"}} />
</div>
{{#conditional-loading-spinner condition=loading}}
<ConditionalLoadingSpinner @condition={{loading}}>
{{#if model.length}}
<table class="admin-logs-table screened-ip-addresses grid">
<thead class="heading-container">
@ -35,7 +25,7 @@
<tr class="admin-list-item">
<td class="col first ip_address">
{{#if item.editing}}
{{text-field value=item.ip_address autofocus="autofocus"}}
<TextField @value={{item.ip_address}} @autofocus="autofocus" />
{{else}}
<a href {{action "edit" item}} class="inline-editable-field">
{{#if item.isRange}}
@ -72,39 +62,17 @@
</td>
<td class="col actions">
{{#if item.editing}}
{{d-button
class="btn-default"
action=(action "save")
actionParam=item
label="admin.logs.save"}}
<DButton @class="btn-default" @action={{action "save"}} @actionParam={{item}} @label="admin.logs.save" />
<a href {{action "cancel" item}} class="cancel-action">
{{i18n "cancel"}}
</a>
{{else}}
{{d-button
class="btn-default btn-danger"
action=(action "destroy")
actionParam=item
icon="far-trash-alt"}}
{{d-button
class="btn-default"
action=(action "edit")
actionParam=item
icon="pencil-alt"}}
<DButton @class="btn-default btn-danger" @action={{action "destroy"}} @actionParam={{item}} @icon="far-trash-alt" />
<DButton @class="btn-default" @action={{action "edit"}} @actionParam={{item}} @icon="pencil-alt" />
{{#if item.isBlocked}}
{{d-button
class="btn-default"
action=(action "allow")
actionParam=item
icon="check"
label="admin.logs.screened_ips.actions.do_nothing"}}
<DButton @class="btn-default" @action={{action "allow"}} @actionParam={{item}} @icon="check" @label="admin.logs.screened_ips.actions.do_nothing" />
{{else}}
{{d-button
class="btn-default"
action=(action "block")
actionParam=item
icon="ban"
label="admin.logs.screened_ips.actions.block"}}
<DButton @class="btn-default" @action={{action "block"}} @actionParam={{item}} @icon="ban" @label="admin.logs.screened_ips.actions.block" />
{{/if}}
{{/if}}
</td>
@ -115,4 +83,4 @@
{{else}}
{{i18n "search.no_results"}}
{{/if}}
{{/conditional-loading-spinner}}
</ConditionalLoadingSpinner>

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