DEV: Bump dependencies and fix linting (#236)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { computed } from "@ember/object";
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import { makeArray } from "discourse/lib/helpers";
|
||||
import MultiSelectComponent from "select-kit/components/multi-select";
|
||||
|
||||
@classNames("house-ads-chooser")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { action } from "@ember/object";
|
||||
import { mapBy } from "@ember/object/computed";
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import { makeArray } from "discourse/lib/helpers";
|
||||
import HouseAdsSetting from "discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting";
|
||||
|
||||
@classNames("house-ads-setting house-ads-list-setting")
|
||||
|
||||
@@ -3,8 +3,8 @@ import { action } from "@ember/object";
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { i18n, propertyNotEqual } from "discourse/lib/computed";
|
||||
import I18n from "I18n";
|
||||
import { i18n as computedI18n, propertyNotEqual } from "discourse/lib/computed";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
@classNames("house-ads-setting")
|
||||
export default class HouseAdsSetting extends Component {
|
||||
@@ -12,8 +12,8 @@ export default class HouseAdsSetting extends Component {
|
||||
saving = false;
|
||||
savingStatus = "";
|
||||
|
||||
@i18n("name", "admin.adplugin.house_ads.%@.title") title;
|
||||
@i18n("name", "admin.adplugin.house_ads.%@.description") help;
|
||||
@computedI18n("name", "admin.adplugin.house_ads.%@.title") title;
|
||||
@computedI18n("name", "admin.adplugin.house_ads.%@.description") help;
|
||||
@propertyNotEqual("adValue", "value") changed;
|
||||
|
||||
init() {
|
||||
@@ -26,7 +26,7 @@ export default class HouseAdsSetting extends Component {
|
||||
if (!this.get("saving")) {
|
||||
this.setProperties({
|
||||
saving: true,
|
||||
savingStatus: I18n.t("saving"),
|
||||
savingStatus: i18n("saving"),
|
||||
});
|
||||
|
||||
ajax(`/admin/plugins/pluginad/house_settings/${this.get("name")}.json`, {
|
||||
@@ -38,7 +38,7 @@ export default class HouseAdsSetting extends Component {
|
||||
adSettings.set(this.get("name"), this.get("adValue"));
|
||||
this.setProperties({
|
||||
value: this.get("adValue"),
|
||||
savingStatus: I18n.t("saved"),
|
||||
savingStatus: i18n("saved"),
|
||||
});
|
||||
})
|
||||
.catch(popupAjaxError)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import DModal from "discourse/components/d-modal";
|
||||
import i18n from "discourse-common/helpers/i18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
const Preview = <template>
|
||||
<DModal
|
||||
|
||||
@@ -7,7 +7,7 @@ import { observes } from "@ember-decorators/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import Category from "discourse/models/category";
|
||||
import I18n from "I18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import Preview from "../components/modal/preview";
|
||||
|
||||
export default class adminPluginsHouseAdsShow extends Controller {
|
||||
@@ -43,7 +43,7 @@ export default class adminPluginsHouseAdsShow extends Controller {
|
||||
async save() {
|
||||
if (!this.saving) {
|
||||
this.saving = true;
|
||||
this.savingStatus = I18n.t("saving");
|
||||
this.savingStatus = i18n("saving");
|
||||
const data = {};
|
||||
const newRecord = !this.buffered.id;
|
||||
if (!newRecord) {
|
||||
@@ -66,7 +66,7 @@ export default class adminPluginsHouseAdsShow extends Controller {
|
||||
data,
|
||||
}
|
||||
);
|
||||
this.savingStatus = I18n.t("saved");
|
||||
this.savingStatus = i18n("saved");
|
||||
const houseAds = this.houseAdsController.model;
|
||||
if (newRecord) {
|
||||
this.buffered.id = ajaxData.house_ad.id;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { TrackedObject } from "@ember-compat/tracked-built-ins";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "I18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
export default class AdminPluginsHouseAdsShow extends DiscourseRoute {
|
||||
model(params) {
|
||||
if (params.ad_id === "new") {
|
||||
return new TrackedObject({
|
||||
name: I18n.t("admin.adplugin.house_ads.new_name"),
|
||||
name: i18n("admin.adplugin.house_ads.new_name"),
|
||||
html: "",
|
||||
visible_to_logged_in_users: true,
|
||||
visible_to_anons: true,
|
||||
|
||||
Reference in New Issue
Block a user