mirror of
https://github.com/discourse/discourse.git
synced 2024-11-21 16:38:15 -06:00
DEV: Various bulk-select dropdown tweaks (#26424)
* DEV: Various bulk-select dropdown tweaks - Setting is no longer hidden - descriptions have been moved to the modal - Removed ... from one of the dropdown titles
This commit is contained in:
parent
74d55f14fe
commit
ba806eec74
@ -262,6 +262,7 @@ export default class BulkTopicActions extends Component {
|
||||
<template>
|
||||
<DModal
|
||||
@title={{@model.title}}
|
||||
@subtitle={{@model.description}}
|
||||
@closeModal={{@closeModal}}
|
||||
class="topic-bulk-actions-modal -large"
|
||||
>
|
||||
|
@ -12,8 +12,6 @@
|
||||
{{~#if canDoBulkActions}}
|
||||
{{~#if experimentalTopicBulkActionsEnabled }}
|
||||
{{raw "topic-bulk-select-dropdown" bulkSelectHelper=bulkSelectHelper}}
|
||||
{{! Just showing both buttons for now for development}}
|
||||
<button class='btn btn-icon no-text bulk-select-actions'>{{d-icon "cog"}}​</button>
|
||||
{{else}}
|
||||
<button class='btn btn-icon no-text bulk-select-actions'>{{d-icon "cog"}}​</button>
|
||||
{{/if ~}}
|
||||
|
@ -49,27 +49,21 @@ export default DropdownSelectBoxComponent.extend({
|
||||
id: "update-category",
|
||||
icon: "pencil-alt",
|
||||
name: i18n("topic_bulk_actions.update_category.name"),
|
||||
description: i18n("topic_bulk_actions.update_category.description"),
|
||||
},
|
||||
{
|
||||
id: "update-notifications",
|
||||
icon: "d-regular",
|
||||
name: i18n("topic_bulk_actions.update_notifications.name"),
|
||||
description: i18n(
|
||||
"topic_bulk_actions.update_notifications.description"
|
||||
),
|
||||
},
|
||||
{
|
||||
id: "reset-bump-dates",
|
||||
icon: "anchor",
|
||||
name: i18n("topic_bulk_actions.reset_bump_dates.name"),
|
||||
description: i18n("topic_bulk_actions.reset_bump_dates.description"),
|
||||
},
|
||||
{
|
||||
id: "defer",
|
||||
icon: "circle",
|
||||
name: i18n("topic_bulk_actions.defer.name"),
|
||||
description: i18n("topic_bulk_actions.defer.description"),
|
||||
visible: ({ currentUser }) => currentUser.user_option.enable_defer,
|
||||
},
|
||||
{
|
||||
@ -144,6 +138,7 @@ export default DropdownSelectBoxComponent.extend({
|
||||
let allowSilent = false;
|
||||
let initialAction = null;
|
||||
let initialActionLabel = null;
|
||||
let description = null;
|
||||
if (opts.allowSilent === true) {
|
||||
allowSilent = true;
|
||||
}
|
||||
@ -156,11 +151,15 @@ export default DropdownSelectBoxComponent.extend({
|
||||
} else {
|
||||
title = i18n(`topics.bulk.${title}`);
|
||||
}
|
||||
if (opts.description) {
|
||||
description = opts.description;
|
||||
}
|
||||
|
||||
this.modal.show(BulkTopicActions, {
|
||||
model: {
|
||||
action: actionName,
|
||||
title,
|
||||
description,
|
||||
bulkSelectHelper: this.bulkSelectHelper,
|
||||
refreshClosure: () => this.router.refresh(),
|
||||
allowSilent,
|
||||
@ -174,10 +173,16 @@ export default DropdownSelectBoxComponent.extend({
|
||||
onSelect(id) {
|
||||
switch (id) {
|
||||
case "update-category":
|
||||
this.showBulkTopicActionsModal(id, "change_category");
|
||||
this.showBulkTopicActionsModal(id, "change_category", {
|
||||
description: i18n(`topic_bulk_actions.update_category.description`),
|
||||
});
|
||||
break;
|
||||
case "update-notifications":
|
||||
this.showBulkTopicActionsModal(id, "notification_level");
|
||||
this.showBulkTopicActionsModal(id, "notification_level", {
|
||||
description: i18n(
|
||||
`topic_bulk_actions.update_notifications.description`
|
||||
),
|
||||
});
|
||||
break;
|
||||
case "close-topics":
|
||||
this.showBulkTopicActionsModal("close", "close_topics", {
|
||||
@ -206,10 +211,14 @@ export default DropdownSelectBoxComponent.extend({
|
||||
this.showBulkTopicActionsModal("delete", "delete");
|
||||
break;
|
||||
case "reset-bump-dates":
|
||||
this.showBulkTopicActionsModal(id, "reset_bump_dates");
|
||||
this.showBulkTopicActionsModal(id, "reset_bump_dates", {
|
||||
description: i18n(`topic_bulk_actions.reset_bump_dates.description`),
|
||||
});
|
||||
break;
|
||||
case "defer":
|
||||
this.showBulkTopicActionsModal(id, "defer");
|
||||
this.showBulkTopicActionsModal(id, "defer", {
|
||||
description: i18n(`topic_bulk_actions.defer.description`),
|
||||
});
|
||||
break;
|
||||
default:
|
||||
if (_customOnSelection[id]) {
|
||||
|
@ -3037,7 +3037,7 @@ en:
|
||||
name: "Defer Topics"
|
||||
description: "Mark topics as unread"
|
||||
update_notifications:
|
||||
name: "Update Notifications…"
|
||||
name: "Update Notifications"
|
||||
description: "Change notification level to Watching, Tracking, Normal, or Muted"
|
||||
|
||||
topic:
|
||||
|
@ -2584,6 +2584,7 @@ en:
|
||||
experimental_form_templates: "EXPERIMENTAL: Enable the form templates feature. <b>After enabled,</b> manage the templates at <a href='%{base_path}/admin/customize/form-templates'>Customize / Templates</a>."
|
||||
admin_sidebar_enabled_groups: "EXPERIMENTAL: Enable sidebar navigation for the admin UI for the specified groups, which replaces the top-level admin navigation buttons."
|
||||
lazy_load_categories_groups: "EXPERIMENTAL: Lazy load category information only for users of these groups. This improves performance on sites with many categories."
|
||||
experimental_topic_bulk_actions_enabled_groups: "EXPERIMENTAL: Enable the new bulk actions dropdown."
|
||||
|
||||
page_loading_indicator: "Configure the loading indicator which appears during page navigations within Discourse. 'Spinner' is a full page indicator. 'Slider' shows a narrow bar at the top of the screen."
|
||||
show_user_menu_avatars: "Show user avatars in the user menu"
|
||||
|
@ -2362,7 +2362,6 @@ developer:
|
||||
hidden: true
|
||||
experimental_topic_bulk_actions_enabled_groups:
|
||||
default: ""
|
||||
hidden: true
|
||||
type: group_list
|
||||
list_type: compact
|
||||
allow_any: false
|
||||
|
Loading…
Reference in New Issue
Block a user