mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
DEV: Import every instance of Ember.computed function (#8267)
* DEV: Import every instance of Ember.computed function * export default for Ember.computed
This commit is contained in:

committed by
GitHub

parent
790a7e2095
commit
2ae21e9c35
@ -1,3 +1,4 @@
|
||||
import { equal, match, alias } from "@ember/object/computed";
|
||||
import { inject } from "@ember/controller";
|
||||
import Controller from "@ember/controller";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
@ -13,24 +14,24 @@ import { POPULAR_THEMES } from "discourse-common/helpers/popular-themes";
|
||||
const MIN_NAME_LENGTH = 4;
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
popular: Ember.computed.equal("selection", "popular"),
|
||||
local: Ember.computed.equal("selection", "local"),
|
||||
remote: Ember.computed.equal("selection", "remote"),
|
||||
create: Ember.computed.equal("selection", "create"),
|
||||
popular: equal("selection", "popular"),
|
||||
local: equal("selection", "local"),
|
||||
remote: equal("selection", "remote"),
|
||||
create: equal("selection", "create"),
|
||||
selection: "popular",
|
||||
adminCustomizeThemes: inject(),
|
||||
loading: false,
|
||||
keyGenUrl: "/admin/themes/generate_key_pair",
|
||||
importUrl: "/admin/themes/import",
|
||||
recordType: "theme",
|
||||
checkPrivate: Ember.computed.match("uploadUrl", /^git/),
|
||||
checkPrivate: match("uploadUrl", /^git/),
|
||||
localFile: null,
|
||||
uploadUrl: null,
|
||||
urlPlaceholder: "https://github.com/discourse/sample_theme",
|
||||
advancedVisible: false,
|
||||
themesController: inject("adminCustomizeThemes"),
|
||||
selectedType: Ember.computed.alias("themesController.currentTab"),
|
||||
component: Ember.computed.equal("selectedType", COMPONENTS),
|
||||
selectedType: alias("themesController.currentTab"),
|
||||
component: equal("selectedType", COMPONENTS),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
Reference in New Issue
Block a user