2024-12-06 11:02:29 -05:00
|
|
|
import { action } from "@ember/object";
|
2022-03-06 13:52:19 -05:00
|
|
|
import { mapBy } from "@ember/object/computed";
|
2024-11-29 05:11:21 -05:00
|
|
|
import { classNames } from "@ember-decorators/component";
|
2024-12-06 11:02:29 -05:00
|
|
|
import { makeArray } from "discourse-common/lib/helpers";
|
2023-11-07 12:07:33 -05:00
|
|
|
import HouseAdsSetting from "discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting";
|
2019-04-18 17:52:59 -04:00
|
|
|
|
2024-11-29 05:11:21 -05:00
|
|
|
@classNames("house-ads-setting house-ads-list-setting")
|
|
|
|
export default class HouseAdsListSetting extends HouseAdsSetting {
|
|
|
|
@mapBy("allAds", "name") adNames;
|
2024-12-06 11:02:29 -05:00
|
|
|
|
|
|
|
@action
|
|
|
|
changeAdValue(value) {
|
|
|
|
const settingValue = makeArray(value).join("|");
|
|
|
|
this.set("adValue", settingValue);
|
|
|
|
}
|
2024-11-29 05:11:21 -05:00
|
|
|
}
|