DEV: Bump dependencies and fix linting (#630)
This commit is contained in:
parent
e213c7d6aa
commit
444440abda
|
@ -1,6 +1,6 @@
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import { classNames } from "@ember-decorators/component";
|
import { classNames } from "@ember-decorators/component";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
|
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
|
||||||
import { selectKitOptions } from "select-kit/components/select-kit";
|
import { selectKitOptions } from "select-kit/components/select-kit";
|
||||||
|
|
||||||
|
@ -22,16 +22,16 @@ export default class AssignActionsDropdown extends DropdownSelectBoxComponent {
|
||||||
{
|
{
|
||||||
id: "unassign",
|
id: "unassign",
|
||||||
icon: this.group ? "group-times" : "user-xmark",
|
icon: this.group ? "group-times" : "user-xmark",
|
||||||
name: I18n.t("discourse_assign.unassign.title"),
|
name: i18n("discourse_assign.unassign.title"),
|
||||||
description: I18n.t("discourse_assign.unassign.help", {
|
description: i18n("discourse_assign.unassign.help", {
|
||||||
username: this.assignee,
|
username: this.assignee,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "reassign",
|
id: "reassign",
|
||||||
icon: "users",
|
icon: "users",
|
||||||
name: I18n.t("discourse_assign.reassign.title"),
|
name: i18n("discourse_assign.reassign.title"),
|
||||||
description: I18n.t("discourse_assign.reassign.help"),
|
description: i18n("discourse_assign.reassign.help"),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,8 @@ export default class AssignActionsDropdown extends DropdownSelectBoxComponent {
|
||||||
options = options.concat({
|
options = options.concat({
|
||||||
id: `unassign_post_${postId}`,
|
id: `unassign_post_${postId}`,
|
||||||
icon: assignee.username ? "user-xmark" : "group-times",
|
icon: assignee.username ? "user-xmark" : "group-times",
|
||||||
name: I18n.t("discourse_assign.unassign_post.title"),
|
name: i18n("discourse_assign.unassign_post.title"),
|
||||||
description: I18n.t("discourse_assign.unassign_post.help", {
|
description: i18n("discourse_assign.unassign_post.help", {
|
||||||
username: assignee.username || assignee.name,
|
username: assignee.username || assignee.name,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { action } from "@ember/object";
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
import DButton from "discourse/components/d-button";
|
import DButton from "discourse/components/d-button";
|
||||||
import DropdownMenu from "discourse/components/dropdown-menu";
|
import DropdownMenu from "discourse/components/dropdown-menu";
|
||||||
import icon from "discourse-common/helpers/d-icon";
|
import icon from "discourse/helpers/d-icon";
|
||||||
import i18n from "discourse-common/helpers/i18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import DMenu from "float-kit/components/d-menu";
|
import DMenu from "float-kit/components/d-menu";
|
||||||
|
|
||||||
export default class AssignedToPost extends Component {
|
export default class AssignedToPost extends Component {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { TextArea } from "@ember/legacy-built-in-components";
|
||||||
import { on } from "@ember/modifier";
|
import { on } from "@ember/modifier";
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
import icon from "discourse-common/helpers/d-icon";
|
import icon from "discourse/helpers/d-icon";
|
||||||
import i18n from "discourse-common/helpers/i18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import ComboBox from "select-kit/components/combo-box";
|
import ComboBox from "select-kit/components/combo-box";
|
||||||
import not from "truth-helpers/helpers/not";
|
import not from "truth-helpers/helpers/not";
|
||||||
import AssigneeChooser from "./assignee-chooser";
|
import AssigneeChooser from "./assignee-chooser";
|
||||||
|
|
|
@ -2,7 +2,7 @@ import Component from "@glimmer/component";
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
import { TrackedObject } from "@ember-compat/tracked-built-ins";
|
import { TrackedObject } from "@ember-compat/tracked-built-ins";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default class AssignUser extends Component {
|
export default class AssignUser extends Component {
|
||||||
@service taskActions;
|
@service taskActions;
|
||||||
|
@ -26,7 +26,7 @@ export default class AssignUser extends Component {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return I18n.t(
|
return i18n(
|
||||||
`discourse_assign.assign${i18nSuffix}.${
|
`discourse_assign.assign${i18nSuffix}.${
|
||||||
this.model.reassign ? "reassign_title" : "title"
|
this.model.reassign ? "reassign_title" : "title"
|
||||||
}`
|
}`
|
||||||
|
|
|
@ -6,7 +6,7 @@ import DButton from "discourse/components/d-button";
|
||||||
import DModal from "discourse/components/d-modal";
|
import DModal from "discourse/components/d-modal";
|
||||||
import DModalCancel from "discourse/components/d-modal-cancel";
|
import DModalCancel from "discourse/components/d-modal-cancel";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import TopicAssignments from "../topic-assignments";
|
import TopicAssignments from "../topic-assignments";
|
||||||
|
|
||||||
export default class EditTopicAssignments extends Component {
|
export default class EditTopicAssignments extends Component {
|
||||||
|
@ -16,9 +16,9 @@ export default class EditTopicAssignments extends Component {
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
if (this.topic.isAssigned() || this.topic.hasAssignedPosts()) {
|
if (this.topic.isAssigned() || this.topic.hasAssignedPosts()) {
|
||||||
return I18n.t("edit_assignments_modal.title");
|
return i18n("edit_assignments_modal.title");
|
||||||
} else {
|
} else {
|
||||||
return I18n.t("discourse_assign.assign_modal.title");
|
return i18n("discourse_assign.assign_modal.title");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse/lib/decorators";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default class RemindAssignsFrequency extends Component {
|
export default class RemindAssignsFrequency extends Component {
|
||||||
@discourseComputed(
|
@discourseComputed(
|
||||||
|
@ -22,7 +22,7 @@ export default class RemindAssignsFrequency extends Component {
|
||||||
@discourseComputed("user.reminders_frequency")
|
@discourseComputed("user.reminders_frequency")
|
||||||
availableFrequencies(userRemindersFrequency) {
|
availableFrequencies(userRemindersFrequency) {
|
||||||
return userRemindersFrequency.map((freq) => ({
|
return userRemindersFrequency.map((freq) => ({
|
||||||
name: I18n.t(freq.name),
|
name: i18n(freq.name),
|
||||||
value: freq.value,
|
value: freq.value,
|
||||||
selected: false,
|
selected: false,
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import { tracked } from "@glimmer/tracking";
|
import { tracked } from "@glimmer/tracking";
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import i18n from "discourse-common/helpers/i18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import I18n from "I18n";
|
|
||||||
import ComboBox from "select-kit/components/combo-box";
|
import ComboBox from "select-kit/components/combo-box";
|
||||||
import Assignment from "./assignment";
|
import Assignment from "./assignment";
|
||||||
|
|
||||||
|
@ -21,9 +20,9 @@ export default class TopicAssignments extends Component {
|
||||||
#toComboBoxOption(assignment) {
|
#toComboBoxOption(assignment) {
|
||||||
const option = { id: assignment.id };
|
const option = { id: assignment.id };
|
||||||
if (assignment.targetType === "Topic") {
|
if (assignment.targetType === "Topic") {
|
||||||
option.name = I18n.t("edit_assignments_modal.topic");
|
option.name = i18n("edit_assignments_modal.topic");
|
||||||
} else {
|
} else {
|
||||||
option.name = `${I18n.t("edit_assignments_modal.post")} #${
|
option.name = `${i18n("edit_assignments_modal.post")} #${
|
||||||
assignment.postNumber
|
assignment.postNumber
|
||||||
}`;
|
}`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { getOwner } from "@ember/application";
|
import { getOwner } from "@ember/application";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
import { renderAvatar } from "discourse/helpers/user-avatar";
|
import { renderAvatar } from "discourse/helpers/user-avatar";
|
||||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
import { iconHTML } from "discourse/lib/icon-library";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import EditTopicAssignments from "../components/modal/edit-topic-assignments";
|
import EditTopicAssignments from "../components/modal/edit-topic-assignments";
|
||||||
|
|
||||||
const DEPENDENT_KEYS = [
|
const DEPENDENT_KEYS = [
|
||||||
|
@ -113,7 +113,7 @@ function extractPostId(buttonId) {
|
||||||
|
|
||||||
function editAssignmentsButton() {
|
function editAssignmentsButton() {
|
||||||
const icon = iconHTML("pencil");
|
const icon = iconHTML("pencil");
|
||||||
const label = I18n.t("discourse_assign.topic_level_menu.edit_assignments");
|
const label = i18n("discourse_assign.topic_level_menu.edit_assignments");
|
||||||
return {
|
return {
|
||||||
id: "reassign",
|
id: "reassign",
|
||||||
name: htmlSafe(label),
|
name: htmlSafe(label),
|
||||||
|
@ -123,9 +123,7 @@ function editAssignmentsButton() {
|
||||||
|
|
||||||
function reassignToSelfButton() {
|
function reassignToSelfButton() {
|
||||||
const icon = iconHTML("user-plus");
|
const icon = iconHTML("user-plus");
|
||||||
const label = I18n.t(
|
const label = i18n("discourse_assign.topic_level_menu.reassign_topic_to_me");
|
||||||
"discourse_assign.topic_level_menu.reassign_topic_to_me"
|
|
||||||
);
|
|
||||||
return {
|
return {
|
||||||
id: "reassign-self",
|
id: "reassign-self",
|
||||||
name: htmlSafe(label),
|
name: htmlSafe(label),
|
||||||
|
@ -139,10 +137,9 @@ function unassignFromTopicButton(topic) {
|
||||||
const icon = topic.assigned_to_user
|
const icon = topic.assigned_to_user
|
||||||
? avatarHtml(topic.assigned_to_user, "small")
|
? avatarHtml(topic.assigned_to_user, "small")
|
||||||
: iconHTML("user-xmark");
|
: iconHTML("user-xmark");
|
||||||
const label = I18n.t(
|
const label = i18n("discourse_assign.topic_level_menu.unassign_from_topic", {
|
||||||
"discourse_assign.topic_level_menu.unassign_from_topic",
|
username,
|
||||||
{ username }
|
});
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: "unassign",
|
id: "unassign",
|
||||||
|
@ -173,11 +170,11 @@ function unassignFromPostButton(postId, assignment) {
|
||||||
icon = iconHTML("group-times");
|
icon = iconHTML("group-times");
|
||||||
}
|
}
|
||||||
|
|
||||||
const label = I18n.t("discourse_assign.topic_level_menu.unassign_from_post", {
|
const label = i18n("discourse_assign.topic_level_menu.unassign_from_post", {
|
||||||
assignee,
|
assignee,
|
||||||
post_number: assignment.post_number,
|
post_number: assignment.post_number,
|
||||||
});
|
});
|
||||||
const dataName = I18n.t(
|
const dataName = i18n(
|
||||||
"discourse_assign.topic_level_menu.unassign_from_post_help",
|
"discourse_assign.topic_level_menu.unassign_from_post_help",
|
||||||
{
|
{
|
||||||
assignee,
|
assignee,
|
||||||
|
@ -193,14 +190,14 @@ function unassignFromPostButton(postId, assignment) {
|
||||||
|
|
||||||
function topicLevelUnassignButton(assignees) {
|
function topicLevelUnassignButton(assignees) {
|
||||||
const avatars = topicLevelUnassignButtonAvatars(assignees);
|
const avatars = topicLevelUnassignButtonAvatars(assignees);
|
||||||
const label = `<span class="unassign-label">${I18n.t(
|
const label = `<span class="unassign-label">${i18n(
|
||||||
"discourse_assign.topic_level_menu.unassign_with_ellipsis"
|
"discourse_assign.topic_level_menu.unassign_with_ellipsis"
|
||||||
)}</span>`;
|
)}</span>`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: null,
|
id: null,
|
||||||
name: htmlSafe(
|
name: htmlSafe(
|
||||||
I18n.t("discourse_assign.topic_level_menu.unassign_with_ellipsis")
|
i18n("discourse_assign.topic_level_menu.unassign_with_ellipsis")
|
||||||
),
|
),
|
||||||
label: htmlSafe(`${avatars}${label}`),
|
label: htmlSafe(`${avatars}${label}`),
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { set } from "@ember/object";
|
import { set } from "@ember/object";
|
||||||
import { sort } from "@ember/object/computed";
|
import { sort } from "@ember/object/computed";
|
||||||
import UserMenuNotificationsList from "discourse/components/user-menu/notifications-list";
|
import UserMenuNotificationsList from "discourse/components/user-menu/notifications-list";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import UserMenuAssignsListEmptyState from "./assigns-list-empty-state";
|
import UserMenuAssignsListEmptyState from "./assigns-list-empty-state";
|
||||||
|
|
||||||
export default class UserMenuAssignNotificationsList extends UserMenuNotificationsList {
|
export default class UserMenuAssignNotificationsList extends UserMenuNotificationsList {
|
||||||
|
@ -14,7 +14,7 @@ export default class UserMenuAssignNotificationsList extends UserMenuNotificatio
|
||||||
}
|
}
|
||||||
|
|
||||||
get dismissTitle() {
|
get dismissTitle() {
|
||||||
return I18n.t("user.dismiss_assigned_tooltip");
|
return i18n("user.dismiss_assigned_tooltip");
|
||||||
}
|
}
|
||||||
|
|
||||||
get showAllHref() {
|
get showAllHref() {
|
||||||
|
@ -22,7 +22,7 @@ export default class UserMenuAssignNotificationsList extends UserMenuNotificatio
|
||||||
}
|
}
|
||||||
|
|
||||||
get showAllTitle() {
|
get showAllTitle() {
|
||||||
return I18n.t("user_menu.view_all_assigned");
|
return i18n("user_menu.view_all_assigned");
|
||||||
}
|
}
|
||||||
|
|
||||||
get itemsCacheKey() {
|
get itemsCacheKey() {
|
||||||
|
@ -47,7 +47,7 @@ export default class UserMenuAssignNotificationsList extends UserMenuNotificatio
|
||||||
}
|
}
|
||||||
|
|
||||||
get dismissConfirmationText() {
|
get dismissConfirmationText() {
|
||||||
return I18n.t("notifications.dismiss_confirmation.body.assigns", {
|
return i18n("notifications.dismiss_confirmation.body.assigns", {
|
||||||
count: this._unreadAssignedNotificationsCount,
|
count: this._unreadAssignedNotificationsCount,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default class AssignableInteractionFields extends Component {
|
export default class AssignableInteractionFields extends Component {
|
||||||
assignableLevelOptions = [
|
assignableLevelOptions = [
|
||||||
{ name: I18n.t("groups.alias_levels.nobody"), value: 0 },
|
{ name: i18n("groups.alias_levels.nobody"), value: 0 },
|
||||||
{ name: I18n.t("groups.alias_levels.only_admins"), value: 1 },
|
{ name: i18n("groups.alias_levels.only_admins"), value: 1 },
|
||||||
{ name: I18n.t("groups.alias_levels.mods_and_admins"), value: 2 },
|
{ name: i18n("groups.alias_levels.mods_and_admins"), value: 2 },
|
||||||
{ name: I18n.t("groups.alias_levels.members_mods_and_admins"), value: 3 },
|
{ name: i18n("groups.alias_levels.members_mods_and_admins"), value: 3 },
|
||||||
{ name: I18n.t("groups.alias_levels.owners_mods_and_admins"), value: 4 },
|
{ name: i18n("groups.alias_levels.owners_mods_and_admins"), value: 4 },
|
||||||
{ name: I18n.t("groups.alias_levels.everyone"), value: 99 },
|
{ name: i18n("groups.alias_levels.everyone"), value: 99 },
|
||||||
];
|
];
|
||||||
|
|
||||||
get assignableLevel() {
|
get assignableLevel() {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { alias } from "@ember/object/computed";
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
import UserTopicsList from "discourse/controllers/user-topics-list";
|
import UserTopicsList from "discourse/controllers/user-topics-list";
|
||||||
import BulkSelectHelper from "discourse/lib/bulk-select-helper";
|
import BulkSelectHelper from "discourse/lib/bulk-select-helper";
|
||||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
import discourseDebounce from "discourse/lib/debounce";
|
||||||
import discourseDebounce from "discourse-common/lib/debounce";
|
import { INPUT_DELAY } from "discourse/lib/environment";
|
||||||
|
|
||||||
export default class GroupAssignedShow extends UserTopicsList {
|
export default class GroupAssignedShow extends UserTopicsList {
|
||||||
@service taskActions;
|
@service taskActions;
|
||||||
|
|
|
@ -2,9 +2,9 @@ import Controller, { inject as controller } from "@ember/controller";
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
import discourseDebounce from "discourse/lib/debounce";
|
||||||
import discourseDebounce from "discourse-common/lib/debounce";
|
import discourseComputed from "discourse/lib/decorators";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import { INPUT_DELAY } from "discourse/lib/environment";
|
||||||
|
|
||||||
export default class GroupAssigned extends Controller {
|
export default class GroupAssigned extends Controller {
|
||||||
@service router;
|
@service router;
|
||||||
|
|
|
@ -3,12 +3,12 @@ import { action } from "@ember/object";
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
import UserTopicsList from "discourse/controllers/user-topics-list";
|
import UserTopicsList from "discourse/controllers/user-topics-list";
|
||||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
import discourseDebounce from "discourse/lib/debounce";
|
||||||
import discourseDebounce from "discourse-common/lib/debounce";
|
import discourseComputed from "discourse/lib/decorators";
|
||||||
import getURL from "discourse-common/lib/get-url";
|
import { INPUT_DELAY } from "discourse/lib/environment";
|
||||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
import getURL from "discourse/lib/get-url";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import { iconHTML } from "discourse/lib/icon-library";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default class UserActivityAssigned extends UserTopicsList {
|
export default class UserActivityAssigned extends UserTopicsList {
|
||||||
@service taskActions;
|
@service taskActions;
|
||||||
|
@ -27,7 +27,7 @@ export default class UserActivityAssigned extends UserTopicsList {
|
||||||
@discourseComputed
|
@discourseComputed
|
||||||
emptyStateBody() {
|
emptyStateBody() {
|
||||||
return htmlSafe(
|
return htmlSafe(
|
||||||
I18n.t("user.no_assignments_body", {
|
i18n("user.no_assignments_body", {
|
||||||
preferencesUrl: getURL("/my/preferences/notifications"),
|
preferencesUrl: getURL("/my/preferences/notifications"),
|
||||||
icon: iconHTML("user-plus"),
|
icon: iconHTML("user-plus"),
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "assign-extend-user-messages",
|
name: "assign-extend-user-messages",
|
||||||
|
@ -11,7 +11,7 @@ export default {
|
||||||
if (currentUser?.can_assign && api.addUserMessagesNavigationDropdownRow) {
|
if (currentUser?.can_assign && api.addUserMessagesNavigationDropdownRow) {
|
||||||
api.addUserMessagesNavigationDropdownRow(
|
api.addUserMessagesNavigationDropdownRow(
|
||||||
"userPrivateMessages.assigned",
|
"userPrivateMessages.assigned",
|
||||||
I18n.t("discourse_assign.assigned"),
|
i18n("discourse_assign.assigned"),
|
||||||
"user-plus"
|
"user-plus"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
import { emojiUnescape } from "discourse/lib/text";
|
import { emojiUnescape } from "discourse/lib/text";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import UserMenuAssignNotificationsList from "../components/user-menu/assigns-list";
|
import UserMenuAssignNotificationsList from "../components/user-menu/assigns-list";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -26,14 +26,11 @@ export default {
|
||||||
return class extends NotificationItemBase {
|
return class extends NotificationItemBase {
|
||||||
get linkTitle() {
|
get linkTitle() {
|
||||||
if (this.isGroup()) {
|
if (this.isGroup()) {
|
||||||
return I18n.t(
|
return i18n(`user.assigned_to_group.${this.postOrTopic()}`, {
|
||||||
`user.assigned_to_group.${this.postOrTopic()}`,
|
group_name: this.notification.data.display_username,
|
||||||
{
|
});
|
||||||
group_name: this.notification.data.display_username,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return I18n.t(`user.assigned_to_you.${this.postOrTopic()}`);
|
return i18n(`user.assigned_to_you.${this.postOrTopic()}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
get icon() {
|
get icon() {
|
||||||
|
@ -50,13 +47,10 @@ export default {
|
||||||
get description() {
|
get description() {
|
||||||
return htmlSafe(
|
return htmlSafe(
|
||||||
emojiUnescape(
|
emojiUnescape(
|
||||||
I18n.t(
|
i18n(`user.assignment_description.${this.postOrTopic()}`, {
|
||||||
`user.assignment_description.${this.postOrTopic()}`,
|
topic_title: this.notification.fancy_title,
|
||||||
{
|
post_number: this.notification.post_number,
|
||||||
topic_title: this.notification.fancy_title,
|
})
|
||||||
post_number: this.notification.post_number,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,16 +5,16 @@ import { isEmpty } from "@ember/utils";
|
||||||
import { hbs } from "ember-cli-htmlbars";
|
import { hbs } from "ember-cli-htmlbars";
|
||||||
import { h } from "virtual-dom";
|
import { h } from "virtual-dom";
|
||||||
import { renderAvatar } from "discourse/helpers/user-avatar";
|
import { renderAvatar } from "discourse/helpers/user-avatar";
|
||||||
|
import discourseComputed from "discourse/lib/decorators";
|
||||||
|
import { withSilencedDeprecations } from "discourse/lib/deprecated";
|
||||||
|
import getURL from "discourse/lib/get-url";
|
||||||
|
import { iconHTML, iconNode } from "discourse/lib/icon-library";
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
import { registerTopicFooterDropdown } from "discourse/lib/register-topic-footer-dropdown";
|
import { registerTopicFooterDropdown } from "discourse/lib/register-topic-footer-dropdown";
|
||||||
import { escapeExpression } from "discourse/lib/utilities";
|
import { escapeExpression } from "discourse/lib/utilities";
|
||||||
import RawHtml from "discourse/widgets/raw-html";
|
import RawHtml from "discourse/widgets/raw-html";
|
||||||
import RenderGlimmer from "discourse/widgets/render-glimmer";
|
import RenderGlimmer from "discourse/widgets/render-glimmer";
|
||||||
import { withSilencedDeprecations } from "discourse-common/lib/deprecated";
|
import { i18n } from "discourse-i18n";
|
||||||
import getURL from "discourse-common/lib/get-url";
|
|
||||||
import { iconHTML, iconNode } from "discourse-common/lib/icon-library";
|
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
|
||||||
import I18n from "I18n";
|
|
||||||
import AssignButton, {
|
import AssignButton, {
|
||||||
assignPost,
|
assignPost,
|
||||||
unassignPost,
|
unassignPost,
|
||||||
|
@ -36,9 +36,9 @@ function defaultTitle(topic) {
|
||||||
topic.assigned_to_user?.username || topic.assigned_to_group?.name;
|
topic.assigned_to_user?.username || topic.assigned_to_group?.name;
|
||||||
|
|
||||||
if (username) {
|
if (username) {
|
||||||
return I18n.t("discourse_assign.unassign.help", { username });
|
return i18n("discourse_assign.unassign.help", { username });
|
||||||
} else {
|
} else {
|
||||||
return I18n.t("discourse_assign.assign.help");
|
return i18n("discourse_assign.assign.help");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ function registerTopicFooterButtons(api) {
|
||||||
return defaultTitle(this.topic);
|
return defaultTitle(this.topic);
|
||||||
},
|
},
|
||||||
translatedLabel() {
|
translatedLabel() {
|
||||||
return I18n.t("discourse_assign.assign.title");
|
return i18n("discourse_assign.assign.title");
|
||||||
},
|
},
|
||||||
async action() {
|
async action() {
|
||||||
if (!this.currentUser?.can_assign) {
|
if (!this.currentUser?.can_assign) {
|
||||||
|
@ -118,7 +118,7 @@ function registerTopicFooterButtons(api) {
|
||||||
translatedLabel() {
|
translatedLabel() {
|
||||||
const user = this.topic.assigned_to_user;
|
const user = this.topic.assigned_to_user;
|
||||||
const group = this.topic.assigned_to_group;
|
const group = this.topic.assigned_to_group;
|
||||||
const label = I18n.t("discourse_assign.assigned_to_w_ellipsis");
|
const label = i18n("discourse_assign.assigned_to_w_ellipsis");
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
return htmlSafe(
|
return htmlSafe(
|
||||||
|
@ -158,7 +158,7 @@ function registerTopicFooterButtons(api) {
|
||||||
return defaultTitle(this.topic);
|
return defaultTitle(this.topic);
|
||||||
},
|
},
|
||||||
translatedLabel() {
|
translatedLabel() {
|
||||||
const label = I18n.t("discourse_assign.unassign.title");
|
const label = i18n("discourse_assign.unassign.title");
|
||||||
|
|
||||||
return htmlSafe(
|
return htmlSafe(
|
||||||
`<span class="unassign-label"><span class="text">${label}</span></span>`
|
`<span class="unassign-label"><span class="text">${label}</span></span>`
|
||||||
|
@ -200,13 +200,13 @@ function registerTopicFooterButtons(api) {
|
||||||
return "user-plus";
|
return "user-plus";
|
||||||
},
|
},
|
||||||
translatedTitle() {
|
translatedTitle() {
|
||||||
return I18n.t("discourse_assign.reassign.to_self_help");
|
return i18n("discourse_assign.reassign.to_self_help");
|
||||||
},
|
},
|
||||||
translatedAriaLabel() {
|
translatedAriaLabel() {
|
||||||
return I18n.t("discourse_assign.reassign.to_self_help");
|
return i18n("discourse_assign.reassign.to_self_help");
|
||||||
},
|
},
|
||||||
translatedLabel() {
|
translatedLabel() {
|
||||||
const label = I18n.t("discourse_assign.reassign.to_self");
|
const label = i18n("discourse_assign.reassign.to_self");
|
||||||
|
|
||||||
return htmlSafe(
|
return htmlSafe(
|
||||||
`<span class="unassign-label"><span class="text">${label}</span></span>`
|
`<span class="unassign-label"><span class="text">${label}</span></span>`
|
||||||
|
@ -250,13 +250,13 @@ function registerTopicFooterButtons(api) {
|
||||||
return "group-plus";
|
return "group-plus";
|
||||||
},
|
},
|
||||||
translatedTitle() {
|
translatedTitle() {
|
||||||
return I18n.t("discourse_assign.reassign.help");
|
return i18n("discourse_assign.reassign.help");
|
||||||
},
|
},
|
||||||
translatedAriaLabel() {
|
translatedAriaLabel() {
|
||||||
return I18n.t("discourse_assign.reassign.help");
|
return i18n("discourse_assign.reassign.help");
|
||||||
},
|
},
|
||||||
translatedLabel() {
|
translatedLabel() {
|
||||||
const label = I18n.t("discourse_assign.reassign.title_w_ellipsis");
|
const label = i18n("discourse_assign.reassign.title_w_ellipsis");
|
||||||
|
|
||||||
return htmlSafe(
|
return htmlSafe(
|
||||||
`<span class="unassign-label"><span class="text">${label}</span></span>`
|
`<span class="unassign-label"><span class="text">${label}</span></span>`
|
||||||
|
@ -334,11 +334,11 @@ function initialize(api) {
|
||||||
? {
|
? {
|
||||||
inOptionsForUsers: [
|
inOptionsForUsers: [
|
||||||
{
|
{
|
||||||
name: I18n.t("search.advanced.in.assigned"),
|
name: i18n("search.advanced.in.assigned"),
|
||||||
value: "assigned",
|
value: "assigned",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: I18n.t("search.advanced.in.unassigned"),
|
name: i18n("search.advanced.in.unassigned"),
|
||||||
value: "unassigned",
|
value: "unassigned",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -385,7 +385,7 @@ function initialize(api) {
|
||||||
this.args.topic.get("assigned_to_user.username") ===
|
this.args.topic.get("assigned_to_user.username") ===
|
||||||
this.currentUser.username
|
this.currentUser.username
|
||||||
) {
|
) {
|
||||||
return I18n.t("notification_reason.user");
|
return i18n("notification_reason.user");
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.reasonText;
|
return super.reasonText;
|
||||||
|
@ -521,7 +521,7 @@ function initialize(api) {
|
||||||
|
|
||||||
const assignedHtml = (username, path, type) => {
|
const assignedHtml = (username, path, type) => {
|
||||||
return `<span class="assigned-to--${type}">${htmlSafe(
|
return `<span class="assigned-to--${type}">${htmlSafe(
|
||||||
I18n.t("discourse_assign.assigned_topic_to", {
|
i18n("discourse_assign.assigned_topic_to", {
|
||||||
username,
|
username,
|
||||||
path,
|
path,
|
||||||
})
|
})
|
||||||
|
@ -570,7 +570,7 @@ function initialize(api) {
|
||||||
href: `${topic.url}/${postNumber}`,
|
href: `${topic.url}/${postNumber}`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
I18n.t("discourse_assign.assign_post_to_multiple", {
|
i18n("discourse_assign.assign_post_to_multiple", {
|
||||||
post_number: postNumber,
|
post_number: postNumber,
|
||||||
username: assignee.username || assignee.name,
|
username: assignee.username || assignee.name,
|
||||||
})
|
})
|
||||||
|
@ -584,7 +584,7 @@ function initialize(api) {
|
||||||
assignedToUser ? iconNode("user-plus") : iconNode("group-plus"),
|
assignedToUser ? iconNode("user-plus") : iconNode("group-plus"),
|
||||||
assignedToUser || assignedToGroup
|
assignedToUser || assignedToGroup
|
||||||
? ""
|
? ""
|
||||||
: h("span.assign-text", I18n.t("discourse_assign.assigned")),
|
: h("span.assign-text", i18n("discourse_assign.assigned")),
|
||||||
assigneeElements,
|
assigneeElements,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
import cookie from "discourse/lib/cookie";
|
import cookie from "discourse/lib/cookie";
|
||||||
import UserTopicListRoute from "discourse/routes/user-topic-list";
|
import UserTopicListRoute from "discourse/routes/user-topic-list";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default class UserActivityAssigned extends UserTopicListRoute {
|
export default class UserActivityAssigned extends UserTopicListRoute {
|
||||||
@service router;
|
@service router;
|
||||||
|
@ -33,6 +33,6 @@ export default class UserActivityAssigned extends UserTopicListRoute {
|
||||||
}
|
}
|
||||||
|
|
||||||
titleToken() {
|
titleToken() {
|
||||||
return I18n.t("discourse_assign.assigned");
|
return i18n("discourse_assign.assigned");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
13
package.json
13
package.json
|
@ -1,15 +1,16 @@
|
||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@discourse/lint-configs": "2.2.2",
|
"@discourse/lint-configs": "2.4.0",
|
||||||
"ember-template-lint": "6.0.0",
|
"ember-template-lint": "6.1.0",
|
||||||
"eslint": "9.15.0",
|
"eslint": "9.19.0",
|
||||||
"prettier": "2.8.8"
|
"prettier": "2.8.8"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18",
|
"node": ">= 22",
|
||||||
"npm": "please-use-pnpm",
|
"npm": "please-use-pnpm",
|
||||||
"yarn": "please-use-pnpm",
|
"yarn": "please-use-pnpm",
|
||||||
"pnpm": ">= 9"
|
"pnpm": "9.x"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@9.15.5"
|
||||||
}
|
}
|
||||||
|
|
1317
pnpm-lock.yaml
1317
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,6 @@
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
import { cloneJSON } from "discourse/lib/object";
|
||||||
import userFixtures from "discourse/tests/fixtures/user-fixtures";
|
import userFixtures from "discourse/tests/fixtures/user-fixtures";
|
||||||
import pretender, {
|
import pretender, {
|
||||||
parsePostData,
|
parsePostData,
|
||||||
|
@ -10,7 +11,6 @@ import {
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
|
||||||
|
|
||||||
acceptance("Discourse Assign | Assign mobile", function (needs) {
|
acceptance("Discourse Assign | Assign mobile", function (needs) {
|
||||||
needs.user();
|
needs.user();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
import { cloneJSON } from "discourse/lib/object";
|
||||||
import userFixtures from "discourse/tests/fixtures/user-fixtures";
|
import userFixtures from "discourse/tests/fixtures/user-fixtures";
|
||||||
import pretender, {
|
import pretender, {
|
||||||
parsePostData,
|
parsePostData,
|
||||||
|
@ -10,7 +11,6 @@ import {
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
|
||||||
|
|
||||||
// TODO (glimmer-post-menu): Remove this file when the post menu widget code is removed from core
|
// TODO (glimmer-post-menu): Remove this file when the post menu widget code is removed from core
|
||||||
acceptance(
|
acceptance(
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
import { cloneJSON } from "discourse/lib/object";
|
||||||
import topicFixtures from "discourse/tests/fixtures/topic";
|
import topicFixtures from "discourse/tests/fixtures/topic";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
|
@ -7,8 +8,7 @@ import {
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
import { i18n } from "discourse-i18n";
|
||||||
import I18n from "I18n";
|
|
||||||
import NotificationFixture from "../fixtures/notifications-fixtures";
|
import NotificationFixture from "../fixtures/notifications-fixtures";
|
||||||
|
|
||||||
function assignCurrentUserToTopic(needs) {
|
function assignCurrentUserToTopic(needs) {
|
||||||
|
@ -173,7 +173,7 @@ acceptance("Discourse Assign | Assigned topic", function (needs) {
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
notification.querySelector("a").title,
|
notification.querySelector("a").title,
|
||||||
I18n.t("notifications.titles.assigned"),
|
i18n("notifications.titles.assigned"),
|
||||||
"with correct title"
|
"with correct title"
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
queryAll,
|
queryAll,
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
const USER_MENU_ASSIGN_RESPONSE = {
|
const USER_MENU_ASSIGN_RESPONSE = {
|
||||||
notifications: [
|
notifications: [
|
||||||
|
@ -239,12 +239,12 @@ acceptance("Discourse Assign | user menu", function (needs) {
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
userAssign.querySelector("a").title,
|
userAssign.querySelector("a").title,
|
||||||
I18n.t("user.assigned_to_you.topic"),
|
i18n("user.assigned_to_you.topic"),
|
||||||
"user assign has the right title"
|
"user assign has the right title"
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
groupAssign.querySelector("a").title,
|
groupAssign.querySelector("a").title,
|
||||||
I18n.t("user.assigned_to_group.topic", { group_name: "Team" }),
|
i18n("user.assigned_to_group.topic", { group_name: "Team" }),
|
||||||
"group assign has the right title"
|
"group assign has the right title"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -264,7 +264,7 @@ acceptance("Discourse Assign | user menu", function (needs) {
|
||||||
query(
|
query(
|
||||||
".dismiss-notification-confirmation .d-modal__body"
|
".dismiss-notification-confirmation .d-modal__body"
|
||||||
).textContent.trim(),
|
).textContent.trim(),
|
||||||
I18n.t("notifications.dismiss_confirmation.body.assigns", { count: 173 }),
|
i18n("notifications.dismiss_confirmation.body.assigns", { count: 173 }),
|
||||||
"dismiss confirmation modal is shown"
|
"dismiss confirmation modal is shown"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ acceptance("Discourse Assign | user menu", function (needs) {
|
||||||
assert
|
assert
|
||||||
.dom(".empty-state-title")
|
.dom(".empty-state-title")
|
||||||
.hasText(
|
.hasText(
|
||||||
I18n.t("user.no_assignments_title"),
|
i18n("user.no_assignments_title"),
|
||||||
"empty state title is rendered"
|
"empty state title is rendered"
|
||||||
);
|
);
|
||||||
assert.dom(".empty-state-body").exists("empty state body exists");
|
assert.dom(".empty-state-body").exists("empty state body exists");
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
|
import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
function stubCategory(needs, customFields) {
|
function stubCategory(needs, customFields) {
|
||||||
needs.site({
|
needs.site({
|
||||||
|
@ -39,7 +39,7 @@ acceptance(
|
||||||
test("can see Unassigned button", async function (assert) {
|
test("can see Unassigned button", async function (assert) {
|
||||||
await visit("/c/test");
|
await visit("/c/test");
|
||||||
|
|
||||||
const title = I18n.t("filters.unassigned.help");
|
const title = i18n("filters.unassigned.help");
|
||||||
assert.dom(`#navigation-bar li[title='${title}']`).exists();
|
assert.dom(`#navigation-bar li[title='${title}']`).exists();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ acceptance(
|
||||||
test("cannot see Unassigned button", async function (assert) {
|
test("cannot see Unassigned button", async function (assert) {
|
||||||
await visit("/c/test");
|
await visit("/c/test");
|
||||||
|
|
||||||
const title = I18n.t("filters.unassigned.help");
|
const title = i18n("filters.unassigned.help");
|
||||||
assert.dom(`#navigation-bar li[title='${title}']`).doesNotExist();
|
assert.dom(`#navigation-bar li[title='${title}']`).doesNotExist();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ acceptance(
|
||||||
test("can see Unassigned button", async function (assert) {
|
test("can see Unassigned button", async function (assert) {
|
||||||
await visit("/c/test");
|
await visit("/c/test");
|
||||||
|
|
||||||
const title = I18n.t("filters.unassigned.help");
|
const title = i18n("filters.unassigned.help");
|
||||||
assert.dom(`#navigation-bar li[title='${title}']`).exists();
|
assert.dom(`#navigation-bar li[title='${title}']`).exists();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ acceptance(
|
||||||
test("cannot see Unassigned button", async function (assert) {
|
test("cannot see Unassigned button", async function (assert) {
|
||||||
await visit("/c/test");
|
await visit("/c/test");
|
||||||
|
|
||||||
const title = I18n.t("filters.unassigned.help");
|
const title = i18n("filters.unassigned.help");
|
||||||
assert.dom(`#navigation-bar li[title='${title}']`).doesNotExist();
|
assert.dom(`#navigation-bar li[title='${title}']`).doesNotExist();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
import { cloneJSON } from "discourse/lib/object";
|
||||||
import topicFixtures from "discourse/tests/fixtures/topic";
|
import topicFixtures from "discourse/tests/fixtures/topic";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
|
||||||
|
|
||||||
acceptance(
|
acceptance(
|
||||||
"Discourse Assign | Never track topics assign reason",
|
"Discourse Assign | Never track topics assign reason",
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
import { cloneJSON } from "discourse/lib/object";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
|
||||||
import AssignedTopics from "../fixtures/assigned-topics-fixtures";
|
import AssignedTopics from "../fixtures/assigned-topics-fixtures";
|
||||||
|
|
||||||
acceptance(
|
acceptance(
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { currentURL, visit } from "@ember/test-helpers";
|
import { currentURL, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
import { cloneJSON } from "discourse/lib/object";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
import { i18n } from "discourse-i18n";
|
||||||
import I18n from "I18n";
|
|
||||||
import AssignedTopics from "../fixtures/assigned-topics-fixtures";
|
import AssignedTopics from "../fixtures/assigned-topics-fixtures";
|
||||||
|
|
||||||
acceptance("Discourse Assign | User Private Messages", function (needs) {
|
acceptance("Discourse Assign | User Private Messages", function (needs) {
|
||||||
|
@ -34,7 +34,7 @@ acceptance("Discourse Assign | User Private Messages", function (needs) {
|
||||||
const messagesDropdown = selectKit(".user-nav-messages-dropdown");
|
const messagesDropdown = selectKit(".user-nav-messages-dropdown");
|
||||||
|
|
||||||
await messagesDropdown.expand();
|
await messagesDropdown.expand();
|
||||||
await messagesDropdown.selectRowByName(I18n.t("discourse_assign.assigned"));
|
await messagesDropdown.selectRowByName(i18n("discourse_assign.assigned"));
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
currentURL(),
|
currentURL(),
|
||||||
|
@ -44,7 +44,7 @@ acceptance("Discourse Assign | User Private Messages", function (needs) {
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
messagesDropdown.header().name(),
|
messagesDropdown.header().name(),
|
||||||
I18n.t("discourse_assign.assigned"),
|
i18n("discourse_assign.assigned"),
|
||||||
"assigned messages is selected in the dropdown"
|
"assigned messages is selected in the dropdown"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
import { cloneJSON } from "discourse/lib/object";
|
||||||
import topicFixtures from "discourse/tests/fixtures/topic";
|
import topicFixtures from "discourse/tests/fixtures/topic";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
|
||||||
|
|
||||||
export default function topicWithAssignedPosts() {
|
export default function topicWithAssignedPosts() {
|
||||||
const username = "eviltrout";
|
const username = "eviltrout";
|
||||||
|
|
Loading…
Reference in New Issue