diff --git a/app/assets/javascripts/admin/addon/templates/admin.hbs b/app/assets/javascripts/admin/addon/templates/admin.hbs index 8a7c76a1065..cdfe1692918 100644 --- a/app/assets/javascripts/admin/addon/templates/admin.hbs +++ b/app/assets/javascripts/admin/addon/templates/admin.hbs @@ -1,32 +1,32 @@ -{{#admin-wrapper class="container"}} +
@@ -37,4 +37,4 @@
-{{/admin-wrapper}} +
diff --git a/app/assets/javascripts/admin/addon/templates/api-keys-index.hbs b/app/assets/javascripts/admin/addon/templates/api-keys-index.hbs index f5608434adb..24816b5d8da 100644 --- a/app/assets/javascripts/admin/addon/templates/api-keys-index.hbs +++ b/app/assets/javascripts/admin/addon/templates/api-keys-index.hbs @@ -1,11 +1,7 @@ -{{d-button - 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")}} + @@ -28,9 +24,9 @@ {{/each}}
{{i18n "admin.api.key"}}
{{i18n "admin.api.user"}}
{{#if k.user}} - {{#link-to "adminUser" k.user}} + {{avatar k.user imageSize="small"}} - {{/link-to}} + {{else}} {{i18n "admin.api.all_users"}} {{/if}} @@ -48,28 +44,20 @@ {{/if}}
- {{d-button 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"}} + {{else}} - {{d-button - class="btn-danger" - action=(action "revokeKey") - actionParam=k - icon="times" - title="admin.api.revoke"}} + {{/if}}
- {{/load-more}} +
- {{conditional-loading-spinner condition=loading}} + {{else}}

{{i18n "admin.api.none"}}

{{/if}} diff --git a/app/assets/javascripts/admin/addon/templates/api-keys-new.hbs b/app/assets/javascripts/admin/addon/templates/api-keys-new.hbs index 7f703c3bc21..d8dc05558e1 100644 --- a/app/assets/javascripts/admin/addon/templates/api-keys-new.hbs +++ b/app/assets/javascripts/admin/addon/templates/api-keys-new.hbs @@ -1,50 +1,46 @@ -{{#link-to "adminApiKeys.index" class="go-back"}} + {{d-icon "arrow-left"}} {{i18n "admin.api.all_api_keys"}} -{{/link-to}} +
{{#if model.id}} - {{#admin-form-row label="admin.api.key"}} +
{{model.key}}
- {{/admin-form-row}} - {{#admin-form-row}} +
+ {{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}} + + + + {{else}} - {{#admin-form-row label="admin.api.description"}} - {{input value=model.description maxlength="255" placeholder=(i18n "admin.api.description_placeholder")}} - {{/admin-form-row}} + + + - {{#admin-form-row label="admin.api.user_mode"}} - {{combo-box content=userModes value=userMode onChange=(action "changeUserMode")}} - {{/admin-form-row}} + + + {{#if showUserSelector}} - {{#admin-form-row label="admin.api.user"}} - {{email-group-user-chooser - value=model.username - onChange=(action "updateUsername") - options=(hash + + + {{/if}} - {{#admin-form-row label="admin.api.scope_mode"}} - {{combo-box content=scopeModes value=scopeMode onChange=(action "changeScopeMode")}} + + {{#if (eq scopeMode "read_only")}}

{{i18n "admin.api.scopes.descriptions.global.read"}}

{{else if (eq scopeMode "global")}}

{{i18n "admin.api.scopes.global_description"}}

{{/if}} - {{/admin-form-row}} +
{{#if (eq scopeMode "granular")}}

{{i18n "admin.api.scopes.title"}}

@@ -68,7 +64,7 @@ {{#each actions as |act|}} - {{input type="checkbox" checked=act.selected}} +
{{act.name}}
@@ -76,11 +72,11 @@ - {{d-button icon="link" action=(action "showURLs" act.urls) class="btn-info"}} + {{#each act.params as |p|}} - {{input maxlength="255" value=(get act p) placeholder=p}} + {{/each}} @@ -90,6 +86,6 @@ {{/if}} - {{d-button icon="check" label="admin.api.save" action=(action "save") class="btn-primary" disabled=saveDisabled}} + {{/if}}
diff --git a/app/assets/javascripts/admin/addon/templates/api-keys-show.hbs b/app/assets/javascripts/admin/addon/templates/api-keys-show.hbs index 436e0cf0048..5707d4cf3e9 100644 --- a/app/assets/javascripts/admin/addon/templates/api-keys-show.hbs +++ b/app/assets/javascripts/admin/addon/templates/api-keys-show.hbs @@ -1,17 +1,17 @@ -{{#link-to "adminApiKeys.index" class="go-back"}} + {{d-icon "arrow-left"}} {{i18n "admin.api.all_api_keys"}} -{{/link-to}} +
- {{#admin-form-row label="admin.api.key"}} + {{#if model.revoked_at}}{{d-icon "times-circle"}}{{/if}} {{model.truncatedKey}} - {{/admin-form-row}} + - {{#admin-form-row label="admin.api.description"}} + {{#if editingDescription}} - {{input value=buffered.description maxlength="255" placeholder=(i18n "admin.api.description_placeholder")}} + {{else}} {{if model.description model.description (i18n "admin.api.no_description")}} @@ -20,41 +20,41 @@
{{#if editingDescription}} - {{d-button class="ok" action=(action "saveDescription") icon="check"}} - {{d-button class="cancel" action=(action "editDescription") icon="times"}} + + {{else}} - {{d-button class="btn-default" action=(action "editDescription") icon="pencil-alt"}} + {{/if}}
- {{/admin-form-row}} +
- {{#admin-form-row label="admin.api.user"}} + {{#if model.user}} - {{#link-to "adminUser" model.user}} + {{avatar model.user imageSize="small"}} {{model.user.username}} - {{/link-to}} + {{else}} {{i18n "admin.api.all_users"}} {{/if}} - {{/admin-form-row}} + - {{#admin-form-row label="admin.api.created"}} + {{format-date model.created_at leaveAgo="true"}} - {{/admin-form-row}} + - {{#admin-form-row label="admin.api.updated"}} + {{format-date model.updated_at leaveAgo="true"}} - {{/admin-form-row}} + - {{#admin-form-row 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}} + - {{#admin-form-row label="admin.api.revoked"}} + {{#if model.revoked_at}} {{format-date model.revoked_at leaveAgo="true"}} {{else}} @@ -62,25 +62,13 @@ {{/if}}
{{#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"}} + + {{else}} - {{d-button - class="btn-danger" - action=(action "revokeKey") - actionParam=model - icon="times" - label="admin.api.revoke"}} + {{/if}}
- {{/admin-form-row}} +
{{#if model.api_key_scopes.length}}

{{i18n "admin.api.scopes.title"}}

@@ -107,7 +95,7 @@ - {{d-button icon="link" action=(action "showURLs" scope.urls) class="btn-info"}} + {{#each scope.parameters as |p|}} diff --git a/app/assets/javascripts/admin/addon/templates/api.hbs b/app/assets/javascripts/admin/addon/templates/api.hbs index 288bbc71fe8..fd55893fb90 100644 --- a/app/assets/javascripts/admin/addon/templates/api.hbs +++ b/app/assets/javascripts/admin/addon/templates/api.hbs @@ -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}} + + + +
{{outlet}} diff --git a/app/assets/javascripts/admin/addon/templates/backups-index.hbs b/app/assets/javascripts/admin/addon/templates/backups-index.hbs index cf84d858f81..732b8f308b0 100644 --- a/app/assets/javascripts/admin/addon/templates/backups-index.hbs +++ b/app/assets/javascripts/admin/addon/templates/backups-index.hbs @@ -1,26 +1,14 @@
{{#if localBackupStorage}} - {{uppy-backup-uploader done=(route-action "uploadSuccess") localBackupStorage=localBackupStorage}} + {{else}} - {{uppy-backup-uploader 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"}} + {{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"}} + {{/if}}
{{#if status.restoreDisabled}} @@ -41,41 +29,13 @@ {{human-size backup.size}}
- {{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"}} + {{#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"}} + + {{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"}} + + {{/if}}
diff --git a/app/assets/javascripts/admin/addon/templates/backups-logs.hbs b/app/assets/javascripts/admin/addon/templates/backups-logs.hbs index 34ec15f84a7..1f4a77418d0 100644 --- a/app/assets/javascripts/admin/addon/templates/backups-logs.hbs +++ b/app/assets/javascripts/admin/addon/templates/backups-logs.hbs @@ -1 +1 @@ -{{admin-backups-logs logs=logs status=status}} + diff --git a/app/assets/javascripts/admin/addon/templates/backups.hbs b/app/assets/javascripts/admin/addon/templates/backups.hbs index 2a5e08ce255..ca33af1c50c 100644 --- a/app/assets/javascripts/admin/addon/templates/backups.hbs +++ b/app/assets/javascripts/admin/addon/templates/backups.hbs @@ -2,37 +2,24 @@
- {{plugin-outlet name="before-backup-list" connectorTagName="div"}} +
{{outlet}} diff --git a/app/assets/javascripts/admin/addon/templates/badges-award.hbs b/app/assets/javascripts/admin/addon/templates/badges-award.hbs index 1020f6369df..b91297be450 100644 --- a/app/assets/javascripts/admin/addon/templates/badges-award.hbs +++ b/app/assets/javascripts/admin/addon/templates/badges-award.hbs @@ -1,4 +1,4 @@ -{{#d-section class="award-badge"}} +

{{i18n "admin.badges.mass_award.title"}}

{{i18n "admin.badges.mass_award.description"}}

@@ -18,27 +18,21 @@
{{#if model.multiple_grant}} {{/if}}
- {{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"}} + + {{d-icon "times"}} {{i18n "cancel"}} - {{/link-to}} + {{#if saving}} {{i18n "uploading"}} @@ -73,4 +67,4 @@ {{else}} {{i18n "admin.badges.mass_award.no_badge_selected"}} {{/if}} -{{/d-section}} + diff --git a/app/assets/javascripts/admin/addon/templates/badges-index.hbs b/app/assets/javascripts/admin/addon/templates/badges-index.hbs index 4f26fde7f30..240428ab45f 100644 --- a/app/assets/javascripts/admin/addon/templates/badges-index.hbs +++ b/app/assets/javascripts/admin/addon/templates/badges-index.hbs @@ -1,4 +1,4 @@ -{{#d-section class="current-badges"}} +
{{i18n
@@ -13,4 +13,4 @@
-{{/d-section}} + diff --git a/app/assets/javascripts/admin/addon/templates/badges-show.hbs b/app/assets/javascripts/admin/addon/templates/badges-show.hbs index 524a53c8121..75e1803afdd 100644 --- a/app/assets/javascripts/admin/addon/templates/badges-show.hbs +++ b/app/assets/javascripts/admin/addon/templates/badges-show.hbs @@ -1,16 +1,16 @@ -{{#d-section class="current-badge content-body"}} +
{{#if readOnly}} - {{input type="text" name="name" value=buffered.name disabled=true}} +

- {{#link-to "adminSiteText" (query-params q=(concat textCustomizationPrefix "name"))}} + {{i18n "admin.badges.read_only_setting_help"}} - {{/link-to}} +

{{else}} - {{input type="text" name="name" value=buffered.name}} + {{/if}}
@@ -18,114 +18,73 @@
{{#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" - }} +

{{i18n "admin.badges.image_help"}}

{{else if iconSelectorSelected}} - {{icon-picker - name="icon" - value=buffered.icon - options=(hash maximum=1) - onChange=(action (mut buffered.icon)) - }} + {{/if}}
- {{combo-box - name="badge_type_id" - value=buffered.badge_type_id - content=badgeTypes - onChange=(action (mut buffered.badge_type_id)) - options=(hash +
- {{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" - }} + +
{{#if buffered.system}} - {{textarea name="description" value=buffered.description disabled=true}} + - {{d-button - action=(action "copyToClipboard") - class="backup-codes-copy-btn" - icon="copy" - aria-label="user.second_factor_backup.copy_to_clipboard" - title="user.second_factor_backup.copy_to_clipboard"}} + {{else}} - {{d-button - icon="far-star" - class="favorite-btn" - action=onFavoriteClick - title=(if canFavoriteMoreBadges "badges.favorite_max_not_reached" "badges.favorite_max_reached") - disabled=(not canFavoriteMoreBadges) - }} + {{/if}} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/components/badge-title.hbs b/app/assets/javascripts/discourse/app/templates/components/badge-title.hbs index 6df7fc0a24b..d32973e1dd7 100644 --- a/app/assets/javascripts/discourse/app/templates/components/badge-title.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/badge-title.hbs @@ -9,23 +9,13 @@
- {{combo-box - value=_selectedUserBadgeId - nameProperty="badge.name" - content=selectableUserBadges - onChange=(action (mut _selectedUserBadgeId)) - }} +
- {{d-button - class="btn-primary" - action=(action "saveBadgeTitle") - disabled=_isSaving - label=(if _isSaving "saving" "save") - }} + {{#if _isSaved}} {{i18n "saved"}} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/components/basic-topic-list.hbs b/app/assets/javascripts/discourse/app/templates/components/basic-topic-list.hbs index db3c4d9fcd2..87f36da3851 100644 --- a/app/assets/javascripts/discourse/app/templates/components/basic-topic-list.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/basic-topic-list.hbs @@ -1,20 +1,6 @@ -{{#conditional-loading-spinner condition=loading}} + {{#if topics}} - {{topic-list - showPosters=showPosters - hideCategory=hideCategory - topics=topics - expandExcerpts=expandExcerpts - bulkSelectEnabled=bulkSelectEnabled - bulkSelectAction=bulkSelectAction - canBulkSelect=canBulkSelect - selected=selected - tagsForUser=tagsForUser - onScroll=onScroll - scrollOnLoad=scrollOnLoad - toggleBulkSelect=toggleBulkSelect - updateAutoAddTopicsToBulkSelect=updateAutoAddTopicsToBulkSelect - }} + {{else}} {{#unless loadingMore}}
@@ -22,4 +8,4 @@
{{/unless}} {{/if}} -{{/conditional-loading-spinner}} +
diff --git a/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs b/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs index c7954015474..7f1daf30654 100644 --- a/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs @@ -1,5 +1,5 @@ -{{#conditional-loading-spinner condition=loading}} - {{#load-more selector=".bookmark-list .bookmark-list-item" action=loadMore}} + + {{#unless site.mobileView}} @@ -32,7 +32,7 @@ {{d-icon "thumbtack" class="bookmark-pinned"}} {{/if}} {{#if bookmark.bookmarkableTopicAlike}} - {{~topic-status topic=bookmark.topicStatus~}} + {{topic-link bookmark.topicForList}} {{else}}
{{#unless c.isMuted}} {{#if c.uploaded_logo.url}} - {{cdn-img - src=c.uploaded_logo.url - class="logo" - width=c.uploaded_logo.width - height=c.uploaded_logo.height - alt="" - }} + {{/if}} {{/unless}}

- {{category-title-before category=c}} + {{#if c.read_restricted}} {{d-icon lockIcon}} {{/if}} @@ -30,14 +24,14 @@ {{#if c.topics}}
    {{#each c.topics as |topic|}} - {{categories-boxes-topic topic=topic}} + {{/each}}
{{/if}}

{{/unless}} - {{plugin-outlet name="category-box-below-each-category" args=(hash category=c)}} +
{{/each}} diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs index 95758c17e50..b1da9f26f32 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs @@ -1,18 +1,12 @@ {{#each categories as |c|}} - {{plugin-outlet name="category-box-before-each-box" args=(hash category=c)}} +
{{#unless c.isMuted}} {{/unless}} @@ -21,7 +15,7 @@

- {{category-title-before category=c}} + {{#if c.read_restricted}} {{d-icon lockIcon}} {{/if}} @@ -39,13 +33,13 @@ {{#each c.subcategories as |subcategory|}} - {{plugin-outlet name="category-box-after-each-box" args=(hash category=c)}} + {{/each}} -{{plugin-outlet name="category-boxes-after-boxes" args=(hash category=c)}} + diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-only.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-only.hbs index b98eb836296..0a7c9889bb5 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-only.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-only.hbs @@ -12,7 +12,7 @@ {{#each categories as |category|}} - {{parent-category-row category=category showTopics=showTopics}} + {{/each}} @@ -38,7 +38,7 @@ {{#each categories as |category|}} - {{parent-category-row category=category showTopics=showTopics listType="muted"}} + {{/each}} @@ -46,4 +46,4 @@ {{/if}} {{/if}} -{{plugin-outlet name="below-categories-only" connectorTagName="div" args=(hash categories=categories showTopics=showTopics)}} + diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-topic-list.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-topic-list.hbs index b5125ff0892..b25ccba1a07 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-topic-list.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-topic-list.hbs @@ -1,11 +1,11 @@
{{i18n (concat "filters." filter ".title")}} - {{plugin-outlet name="categories-topics-table-heading" connectorTagName="div"}} +
{{#if topics}} {{#each topics as |t|}} - {{latest-topic-list-item topic=t}} + {{/each}}
{{i18n "more"}} diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-with-featured-topics.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-with-featured-topics.hbs index b62e4a8fb54..75eaa9bb810 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-with-featured-topics.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-with-featured-topics.hbs @@ -1,2 +1 @@ -{{categories-only categories=categories - showTopics="true"}} + diff --git a/app/assets/javascripts/discourse/app/templates/components/category-name-fields.hbs b/app/assets/javascripts/discourse/app/templates/components/category-name-fields.hbs index 7bcefbbe18b..c470ef1f2bf 100644 --- a/app/assets/javascripts/discourse/app/templates/components/category-name-fields.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/category-name-fields.hbs @@ -2,11 +2,11 @@ {{#unless category.isUncategorizedCategory}}
- {{text-field value=category.name placeholderKey="category.name_placeholder" maxlength="50" class="category-name"}} +
{{/unless}}
- {{text-field value=category.slug placeholderKey="category.slug_placeholder" maxlength="255"}} +
diff --git a/app/assets/javascripts/discourse/app/templates/components/category-permission-row.hbs b/app/assets/javascripts/discourse/app/templates/components/category-permission-row.hbs index b3ac950558c..975c455d177 100644 --- a/app/assets/javascripts/discourse/app/templates/components/category-permission-row.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/category-permission-row.hbs @@ -5,25 +5,9 @@ - {{d-button - icon="check-square" - class="btn btn-flat see" - disabled=true - }} + - {{d-button - icon=canReplyIcon - action=(action "setPermissionReply") - translatedTitle=replyTooltip - class=(concat "btn btn-flat reply-toggle " replyGranted) - disabled=replyDisabled - }} + - {{d-button - icon=canCreateIcon - action=(action "setPermissionFull") - translatedTitle=createTooltip - class=(concat "btn btn-flat create-toggle " createGranted) - disabled=createDisabled - }} + diff --git a/app/assets/javascripts/discourse/app/templates/components/category-title-before.hbs b/app/assets/javascripts/discourse/app/templates/components/category-title-before.hbs index 99761e59b2d..b4cc2ca52cf 100644 --- a/app/assets/javascripts/discourse/app/templates/components/category-title-before.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/category-title-before.hbs @@ -1 +1 @@ -{{plugin-outlet name="category-title-before" args=(hash category=category)}} + diff --git a/app/assets/javascripts/discourse/app/templates/components/category-title-link.hbs b/app/assets/javascripts/discourse/app/templates/components/category-title-link.hbs index 43cec199dc2..0ca2df142c1 100644 --- a/app/assets/javascripts/discourse/app/templates/components/category-title-link.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/category-title-link.hbs @@ -1,17 +1,12 @@
- {{category-title-before category=category}} + {{#if category.read_restricted}} {{d-icon lockIcon}} {{/if}} {{dir-span category.name}}
{{#if category.uploaded_logo.url}} - {{cdn-img - src=category.uploaded_logo.url - class="category-logo" - width=category.uploaded_logo.width - height=category.uploaded_logo.height - alt=""}} + {{/if}}
diff --git a/app/assets/javascripts/discourse/app/templates/components/choose-message.hbs b/app/assets/javascripts/discourse/app/templates/components/choose-message.hbs index f8005caa4ad..6561946c4e9 100644 --- a/app/assets/javascripts/discourse/app/templates/components/choose-message.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/choose-message.hbs @@ -1,6 +1,6 @@ -{{text-field value=messageTitle placeholderKey="choose_message.title.placeholder" id="choose-message-title"}} + {{#if loading}}

{{i18n "loading"}}

diff --git a/app/assets/javascripts/discourse/app/templates/components/choose-topic.hbs b/app/assets/javascripts/discourse/app/templates/components/choose-topic.hbs index 60c99d75417..fcd59e1ed26 100644 --- a/app/assets/javascripts/discourse/app/templates/components/choose-topic.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/choose-topic.hbs @@ -5,11 +5,7 @@ {{i18n labelText}} -{{text-field - value=topicTitle - placeholderKey="choose_topic.title.placeholder" - id="choose-topic-title" -}} + {{#if loading}}

{{i18n "loading"}}

@@ -21,14 +17,8 @@ {{#each topics as |t|}}
- {{conditional-loading-spinner condition=loading}} - {{d-textarea - autocomplete="off" - tabindex=tabindex - value=value - class="d-editor-input" - placeholder=placeholderTranslated - aria-label=placeholderTranslated - disabled=disabled - input=change - focusIn=(action "focusIn") - focusOut=(action "focusOut") - }} - {{popup-input-tip validation=validation}} - {{plugin-outlet name="after-d-editor" connectorTagName="div" args=outletArgs}} + + + +

@@ -65,14 +35,8 @@ {{html-safe preview}} {{/unless}}
- {{plugin-outlet name="editor-preview" tagName="span" connectorTagName="div" classNames="d-editor-plugin" args=outletArgs}} +
-{{emoji-picker - isActive=emojiPickerIsActive - isEditorFocused=isEditorFocused - initialFilter=this.emojiFilter - emojiSelected=(action "emojiSelected") - onEmojiPickerClose=onEmojiPickerClose -}} + diff --git a/app/assets/javascripts/discourse/app/templates/components/d-modal.hbs b/app/assets/javascripts/discourse/app/templates/components/d-modal.hbs index 961d37e8245..b0ce07b0c03 100644 --- a/app/assets/javascripts/discourse/app/templates/components/d-modal.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/d-modal.hbs @@ -3,12 +3,7 @@ @@ -153,7 +133,7 @@ - {{text-field value=category.minimum_required_tags id="category-minimum-tags" type="number" min="0"}} + {{/if}} @@ -161,7 +141,7 @@ - {{text-field value=category.custom_fields.num_auto_bump_daily id="category-number-daily-bump" type="number"}} + @@ -173,15 +153,9 @@ {{i18n "category.default_view"}}
- {{combo-box - valueProperty="value" - id="category-default-view" - content=availableViews - value=category.default_view - options=(hash +
@@ -190,15 +164,9 @@ {{i18n "category.default_top_period"}}
- {{combo-box - valueProperty="value" - id="category-default-period" - content=availableTopPeriods - value=category.default_top_period - options=(hash +
@@ -207,26 +175,14 @@ {{i18n "category.sort_order"}}
- {{combo-box - valueProperty="value" - content=availableSorts - value=category.sort_order - options=(hash + {{#unless isDefaultSortOrder}} - {{combo-box - valueProperty="value" - content=sortAscendingOptions - value=sortAscendingOption - options=(hash + {{/unless}}
@@ -236,19 +192,14 @@ {{i18n "category.default_list_filter"}}
- {{combo-box - id="category-default-filter" - valueProperty="value" - content=availableListFilters - value=category.default_list_filter - }} +
{{#if isParentCategory}}
@@ -259,28 +210,17 @@ - {{combo-box - valueProperty="value" - id="subcategory-list-style" - content=availableSubcategoryListStyles - value=category.subcategory_list_style - options=(hash + {{/if}}
- {{text-field - valueProperty="value" - id="read-only-message" - value=category.read_only_banner - options=(hash +
@@ -293,24 +233,24 @@ {{d-icon "far-envelope"}} {{i18n "category.email_in"}} - {{text-field id="category-email-in" class="email-in" value=category.email_in}} +
- {{plugin-outlet name="category-email-in" tagName="span" connectorTagName="div" args=(hash category=category)}} + {{/if}} {{#unless emailInEnabled}} @@ -321,4 +261,4 @@ {{/unless}} -{{plugin-outlet name="category-custom-settings" args=(hash category=category) tagName="section"}} + diff --git a/app/assets/javascripts/discourse/app/templates/components/edit-category-tags.hbs b/app/assets/javascripts/discourse/app/templates/components/edit-category-tags.hbs index b093ec89e67..53ff16c71a6 100644 --- a/app/assets/javascripts/discourse/app/templates/components/edit-category-tags.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/edit-category-tags.hbs @@ -1,31 +1,19 @@
- {{tag-chooser - id="category-allowed-tags" - tags=category.allowed_tags - everyTag=true - excludeSynonyms=true - unlimitedTagCount=true - onChange=(action (mut category.allowed_tags)) - options=(hash +
- {{tag-group-chooser - id="category-allowed-tag-groups" - tagGroups=category.allowed_tag_groups - onChange=(action (mut category.allowed_tag_groups)) - }} - {{#link-to "tagGroups" class="manage-tag-groups"}}{{i18n "category.manage_tag_groups_link"}}{{/link-to}} + + {{i18n "category.manage_tag_groups_link"}}
@@ -42,26 +30,14 @@
{{#each category.required_tag_groups as |rtg|}}
- {{text-field value=rtg.min_count type="number" min="1"}} - {{tag-group-chooser - tagGroups=(if rtg.name (array rtg.name) (array)) - onChange=(action "onTagGroupChange" rtg) - options=(hash + + +
{{/each}} - {{d-button - label="category.required_tag_group.add" - action=(action "addRequiredTagGroup") - icon="plus" - class="add-required-tag-group"}} +
diff --git a/app/assets/javascripts/discourse/app/templates/components/edit-category-topic-template.hbs b/app/assets/javascripts/discourse/app/templates/components/edit-category-topic-template.hbs index 955616399b4..f3b1e414ef6 100644 --- a/app/assets/javascripts/discourse/app/templates/components/edit-category-topic-template.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/edit-category-topic-template.hbs @@ -1 +1 @@ -{{d-editor value=category.topic_template showLink=showInsertLinkButton}} + diff --git a/app/assets/javascripts/discourse/app/templates/components/edit-topic-timer-form.hbs b/app/assets/javascripts/discourse/app/templates/components/edit-topic-timer-form.hbs index c9d6d28ed77..48d1e020629 100644 --- a/app/assets/javascripts/discourse/app/templates/components/edit-topic-timer-form.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/edit-topic-timer-form.hbs @@ -1,38 +1,23 @@
- {{combo-box - class="timer-type" - onChange=onChangeStatusType - content=timerTypes - value=statusType - }} +
{{#if publishToCategory}}
- {{category-chooser - value=topicTimer.category_id - onChange=(action (mut topicTimer.category_id)) - options=(hash +
{{/if}} {{#if showFutureDateInput}} - {{time-shortcut-picker - timeShortcuts=timeOptions - prefilledDatetime=topicTimer.execute_at - onTimeSelected=onTimeSelected - hiddenOptions=hiddenTimeShortcutOptions - _itsatrap=_itsatrap - }} + {{/if}} {{#if useDuration}}
- {{relative-time-picker onChange=(action "durationChanged") durationMinutes=(readonly topicTimer.duration_minutes)}} +
{{/if}} {{#if willCloseImmediately}} @@ -43,13 +28,7 @@ {{/if}} {{#if showTopicTimerInfo}} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs b/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs index fd2a31b4854..3611e0b1c37 100644 --- a/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs @@ -9,7 +9,7 @@ {{/if}} - {{emoji-group-buttons onCategorySelection=(action "onCategorySelection") tagName=""}} + {{#each-in customEmojis as |group emojis|}}
diff --git a/app/assets/javascripts/discourse/app/templates/components/featured-topic.hbs b/app/assets/javascripts/discourse/app/templates/components/featured-topic.hbs index 39b208a3058..c3aa110c1bf 100644 --- a/app/assets/javascripts/discourse/app/templates/components/featured-topic.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/featured-topic.hbs @@ -1,5 +1,5 @@ {{raw "topic-status" topic=topic}} {{html-safe topic.fancyTitle}} -{{topic-post-badges unreadPosts=topic.unread_posts unseen=topic.unseen url=topic.lastUnreadUrl}} + {{format-age topic.last_posted_at}} diff --git a/app/assets/javascripts/discourse/app/templates/components/flag-action-type.hbs b/app/assets/javascripts/discourse/app/templates/components/flag-action-type.hbs index 88166064c09..50299bac97b 100644 --- a/app/assets/javascripts/discourse/app/templates/components/flag-action-type.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/flag-action-type.hbs @@ -7,7 +7,7 @@
{{html-safe flag.description}} {{#if showMessageInput}} - {{textarea name="message" class="flag-message" placeholder=customPlaceholder value=message}} +