REFACTOR: Remove Ember.Component global variable

Use imports instead.
This commit is contained in:
Robin Ward 2019-10-23 12:30:52 -04:00
parent 3db61aa18a
commit a8a76198b1
270 changed files with 540 additions and 270 deletions

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import loadScript from "discourse/lib/load-script";
import { observes } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
mode: "css",
classNames: ["ace-wrapper"],
_editor: null,

View File

@ -1,10 +1,11 @@
import Component from "@ember/component";
import debounce from "discourse/lib/debounce";
import { renderSpinner } from "discourse/helpers/loading-spinner";
import { escapeExpression } from "discourse/lib/utilities";
import { bufferedRender } from "discourse-common/lib/buffered-render";
import { observes, on } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend(
export default Component.extend(
bufferedRender({
classNames: ["admin-backups-logs"],

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { iconHTML } from "discourse-common/lib/icon-library";
import { bufferedRender } from "discourse-common/lib/buffered-render";
export default Ember.Component.extend(
export default Component.extend(
bufferedRender({
tagName: "th",
classNames: ["sortable"],

View File

@ -1,4 +1,5 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: "",
buffer: "",

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: ["row"]
});

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import loadScript from "discourse/lib/load-script";
export default Ember.Component.extend({
export default Component.extend({
tagName: "canvas",
type: "line",

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: ""
});

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { number } from "discourse/lib/formatter";
import loadScript from "discourse/lib/load-script";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["admin-report-chart"],
limit: 8,
total: 0,

View File

@ -1,4 +1,5 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: ["admin-report-counters"],
attributeBindings: ["model.description:title"]

View File

@ -1,4 +1,5 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
allTime: true,
tagName: "tr",
reverseColors: Ember.computed.match(

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: ["admin-report-inline-table"]
});

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: "tr"
});

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { number } from "discourse/lib/formatter";
import loadScript from "discourse/lib/load-script";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["admin-report-chart", "admin-report-stacked-chart"],
init() {

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { setting } from "discourse/lib/computed";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["admin-report-storage-stats"],
backupLocation: setting("backup_location"),

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
tagName: "td",
classNames: ["admin-report-table-cell"],
classNameBindings: ["type", "property"],

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
tagName: "th",
classNames: ["admin-report-table-header"],
classNameBindings: ["label.mainProperty", "label.type", "isCurrentSort"],

View File

@ -1,4 +1,5 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: "tr",
classNames: ["admin-report-table-row"],
options: null

View File

@ -1,8 +1,9 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
const PAGES_LIMIT = 8;
export default Ember.Component.extend({
export default Component.extend({
classNameBindings: ["sortable", "twoColumns"],
classNames: ["admin-report-table"],
sortable: false,

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: "tr"
});

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import ReportLoader from "discourse/lib/reports-loader";
import { exportEntity } from "discourse/lib/export-csv";
import { outputExportResult } from "discourse/lib/export-result";
@ -34,7 +35,7 @@ function collapseWeekly(data, average) {
return aggregate;
}
export default Ember.Component.extend({
export default Component.extend({
classNameBindings: ["isEnabled", "isLoading", "dasherizedDataSourceName"],
classNames: ["admin-report"],
isEnabled: true,

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { default as computed } from "ember-addons/ember-computed-decorators";
import { fmt } from "discourse/lib/computed";
export default Ember.Component.extend({
export default Component.extend({
@computed("theme.targets", "onlyOverridden", "showAdvanced")
visibleTargets(targets, onlyOverridden, showAdvanced) {
return targets.filter(target => {

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import UserField from "admin/models/user-field";
import { bufferedProperty } from "discourse/mixins/buffered-content";
import { popupAjaxError } from "discourse/lib/ajax-error";
@ -9,7 +10,7 @@ import {
on
} from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend(bufferedProperty("userField"), {
export default Component.extend(bufferedProperty("userField"), {
editing: Ember.computed.empty("userField.id"),
classNameBindings: [":user-field"],

View File

@ -1,8 +1,9 @@
import Component from "@ember/component";
import { iconHTML } from "discourse-common/lib/icon-library";
import { bufferedRender } from "discourse-common/lib/buffered-render";
import { escapeExpression } from "discourse/lib/utilities";
export default Ember.Component.extend(
export default Component.extend(
bufferedRender({
classNames: ["watched-word"],

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["hook-event"],
typeName: Ember.computed.alias("type.name"),

View File

@ -1,9 +1,10 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { ensureJSON, plainJSON, prettyJSON } from "discourse/lib/formatter";
export default Ember.Component.extend({
export default Component.extend({
tagName: "li",
expandDetails: null,
expandDetailsRequestKey: "request",

View File

@ -1,8 +1,9 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import { iconHTML } from "discourse-common/lib/icon-library";
import { bufferedRender } from "discourse-common/lib/buffered-render";
export default Ember.Component.extend(
export default Component.extend(
bufferedRender({
classes: ["text-muted", "text-danger", "text-successful", "text-muted"],
icons: ["far-circle", "times-circle", "circle", "circle"],

View File

@ -1,4 +1,5 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
didInsertElement() {
this._super(...arguments);
$("body").addClass("admin-interface");

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: ""
});

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import { default as loadScript, loadCSS } from "discourse/lib/load-script";
/**
@ -7,7 +8,7 @@ import { default as loadScript, loadCSS } from "discourse/lib/load-script";
@param brightnessValue is a number from 0 to 255 representing the brightness of the color. See ColorSchemeColor.
@params valid is a boolean indicating if the input field is a valid color.
**/
export default Ember.Component.extend({
export default Component.extend({
classNames: ["color-picker"],
hexValueChanged: function() {
var hex = this.hexValue;

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
editorId: Ember.computed.reads("fieldName"),
@computed("fieldName", "styles.html", "styles.css")

View File

@ -1,9 +1,10 @@
import Component from "@ember/component";
import { bufferedProperty } from "discourse/mixins/buffered-content";
import computed from "ember-addons/ember-computed-decorators";
import { on, observes } from "ember-addons/ember-computed-decorators";
import { popupAjaxError } from "discourse/lib/ajax-error";
export default Ember.Component.extend(bufferedProperty("host"), {
export default Component.extend(bufferedProperty("host"), {
editToggled: false,
tagName: "tr",
categoryId: null,

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["embed-setting"],
@computed("field")

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: ["flag-user-lists"]
});

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { on, observes } from "ember-addons/ember-computed-decorators";
import highlightSyntax from "discourse/lib/highlight-syntax";
export default Ember.Component.extend({
export default Component.extend({
@on("didInsertElement")
@observes("code")
_refresh: function() {

View File

@ -1,9 +1,10 @@
import Component from "@ember/component";
import {
default as computed,
observes
} from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["inline-edit"],
checked: null,

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: ["install-theme-item"]
});

View File

@ -1,9 +1,10 @@
import Component from "@ember/component";
import { default as computed } from "ember-addons/ember-computed-decorators";
import { ajax } from "discourse/lib/ajax";
import AdminUser from "admin/models/admin-user";
import copyText from "discourse/lib/copy-text";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["ip-lookup"],
@computed("other_accounts.length", "totalOthersWithSameIP")

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: "tr"
});

View File

@ -1,8 +1,9 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
const ACTIONS = ["delete", "delete_replies", "edit", "none"];
export default Ember.Component.extend({
export default Component.extend({
postId: null,
postAction: null,
postEdit: null,

View File

@ -1,8 +1,9 @@
import Component from "@ember/component";
import { default as computed } from "ember-addons/ember-computed-decorators";
import { fmt } from "discourse/lib/computed";
import Permalink from "admin/models/permalink";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["permalink-form"],
formSubmitted: false,
permalinkType: "topic_id",

View File

@ -1,4 +1,5 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
actions: {
onChange(value) {
this.applyFilter(this.get("filter.id"), value);

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import { iconHTML } from "discourse-common/lib/icon-library";
import { bufferedRender } from "discourse-common/lib/buffered-render";
import {
@ -17,7 +18,7 @@ import {
uploadText="UPLOAD"
}}
**/
export default Ember.Component.extend(
export default Component.extend(
bufferedRender({
tagName: "button",
classNames: ["btn", "ru"],

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["controls"],
buttonDisabled: Ember.computed.or("model.isSaving", "saveDisabled"),

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
/**
A form to create an IP address that will be blocked or whitelisted.
Example usage:
@ -13,7 +14,7 @@ import ScreenedIpAddress from "admin/models/screened-ip-address";
import computed from "ember-addons/ember-computed-decorators";
import { on } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["screened-ip-address-form"],
formSubmitted: false,
actionName: "block",

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import { on } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNameBindings: [":value-list", ":secret-value-list"],
inputDelimiter: null,
collection: null,

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: ""
});

View File

@ -1,10 +1,11 @@
import Component from "@ember/component";
import BufferedContent from "discourse/mixins/buffered-content";
import SiteSetting from "admin/models/site-setting";
import SettingComponent from "admin/mixins/setting-component";
import showModal from "discourse/lib/show-modal";
import AboutRoute from "discourse/routes/about";
export default Ember.Component.extend(BufferedContent, SettingComponent, {
export default Component.extend(BufferedContent, SettingComponent, {
_save(callback) {
const defaultCategoriesSettings = [
"default_categories_watching",

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
@computed("value")
enabled: {
get(value) {

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
@computed("value")
selectedCategories: {
get(value) {

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
@computed()
groupChoices() {
return this.site.get("groups").map(g => {

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import showModal from "discourse/lib/show-modal";
export default Ember.Component.extend({
export default Component.extend({
actions: {
showUploadModal({ value, setting }) {
showModal("admin-uploaded-image-list", {

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import { on } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["site-text"],
classNameBindings: ["siteText.overridden"],

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import DiscourseURL from "discourse/lib/url";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["table", "staff-actions"],
willDestroyElement() {

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: ""
});

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import UploadMixin from "discourse/mixins/upload";
export default Ember.Component.extend(UploadMixin, {
export default Component.extend(UploadMixin, {
type: "csv",
uploadUrl: "/tags/upload",
addDisabled: Ember.computed.alias("uploading"),

View File

@ -1,9 +1,10 @@
import Component from "@ember/component";
import BufferedContent from "discourse/mixins/buffered-content";
import SettingComponent from "admin/mixins/setting-component";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
export default Ember.Component.extend(BufferedContent, SettingComponent, {
export default Component.extend(BufferedContent, SettingComponent, {
layoutName: "admin/templates/components/site-setting",
_save() {
return ajax(`/admin/themes/${this.model.id}/setting`, {

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import BufferedContent from "discourse/mixins/buffered-content";
import SettingComponent from "admin/mixins/setting-component";
export default Ember.Component.extend(BufferedContent, SettingComponent, {
export default Component.extend(BufferedContent, SettingComponent, {
layoutName: "admin/templates/components/site-setting",
setting: Ember.computed.alias("translation"),
type: "string",

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import {
default as computed,
observes
@ -7,7 +8,7 @@ import { escape } from "pretty-text/sanitizer";
const MAX_COMPONENTS = 4;
export default Ember.Component.extend({
export default Component.extend({
childrenExpanded: false,
classNames: ["themes-list-item"],
classNameBindings: ["theme.selected:selected"],

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { THEMES, COMPONENTS } from "admin/models/theme";
import { default as computed } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
THEMES: THEMES,
COMPONENTS: COMPONENTS,

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { on } from "ember-addons/ember-computed-decorators";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNameBindings: [":value-list"],
inputInvalid: Ember.computed.empty("newValue"),

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import WatchedWord from "admin/models/watched-word";
import {
default as computed,
@ -5,7 +6,7 @@ import {
observes
} from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["watched-word-form"],
formSubmitted: false,
actionKey: null,

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Ember.Component.extend(UploadMixin, {
export default Component.extend(UploadMixin, {
type: "txt",
classNames: "watched-words-uploader",
uploadUrl: "/admin/logs/watched_words/upload",

View File

@ -1,9 +1,10 @@
import Component from "@ember/component";
import { userPath } from "discourse/lib/url";
import { formatUsername, escapeExpression } from "discourse/lib/utilities";
import { normalize } from "discourse/components/user-info";
import { renderAvatar } from "discourse/helpers/user-avatar";
export default Ember.Component.extend({
export default Component.extend({
usersTemplates: Ember.computed("users.[]", function() {
return (this.users || []).map(user => {
let name = "";

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: "activation-controls"
});

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import { observes } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
_slug: null,
didInsertElement() {

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Ember.Component.extend(UploadMixin, {
export default Component.extend(UploadMixin, {
type: "avatar",
tagName: "span",
imageIsNotASquare: false,

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
@ -12,7 +13,7 @@ function b64EncodeUnicode(str) {
);
}
export default Ember.Component.extend({
export default Component.extend({
classNames: ["backup-codes"],
backupCodes: null,

View File

@ -1,9 +1,10 @@
import Component from "@ember/component";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Ember.Component.extend(UploadMixin, {
export default Component.extend(UploadMixin, {
tagName: "span",
@computed("uploading", "uploadProgress")

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
tagName: "span",
classNameBindings: [
":user-badge",

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import { sanitize, emojiUnescape } from "discourse/lib/text";
export default Ember.Component.extend({
export default Component.extend({
size: "medium",
classNameBindings: [":badge-card", "size", "badge.slug"],

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import {
on,
observes,
@ -6,7 +7,7 @@ import {
import { findRawTemplate } from "discourse/lib/raw-templates";
const { makeArray } = Ember;
export default Ember.Component.extend({
export default Component.extend({
@computed("placeholderKey")
placeholder(placeholderKey) {
return placeholderKey ? I18n.t(placeholderKey) : "";

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { ajax } from "discourse/lib/ajax";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["badge-title"],
saved: false,

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
loadingMore: Ember.computed.alias("topicList.loadingMore"),
loading: Ember.computed.not("loaded"),

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import { default as computed } from "ember-addons/ember-computed-decorators";
// A breadcrumb including category drop downs
export default Ember.Component.extend({
export default Component.extend({
classNameBindings: ["hidden:hidden", ":category-breadcrumb"],
tagName: "ol",

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import showModal from "discourse/lib/show-modal";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["bulk-select-container"],
actions: {

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: ["categories-and-latest"]
});

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: ["categories-and-top"]
});

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
tagName: "li",
@computed("topic.pinned", "topic.closed", "topic.archived")

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
tagName: "section",
classNameBindings: [
":category-boxes-with-topics",

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import DiscourseURL from "discourse/lib/url";
export default Ember.Component.extend({
export default Component.extend({
tagName: "section",
classNameBindings: [
":category-boxes",

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: ""
});

View File

@ -1,2 +1,3 @@
import Component from "@ember/component";
// Exists so plugins can use it
export default Ember.Component.extend();
export default Component.extend();

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: ""
});

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: "h3"
});

View File

@ -1,3 +1,4 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
tagName: "span"
});

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
tagName: "",
@computed("src")

View File

@ -1,8 +1,9 @@
import Component from "@ember/component";
import debounce from "discourse/lib/debounce";
import { searchForTerm } from "discourse/lib/search";
import { observes } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
loading: null,
noResults: null,
messages: null,

View File

@ -1,8 +1,9 @@
import Component from "@ember/component";
import debounce from "discourse/lib/debounce";
import { searchForTerm } from "discourse/lib/search";
import { observes } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
loading: null,
noResults: null,
topics: null,

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
tagName: "button",
attributeBindings: ["style", "title"],
classNameBindings: [":colorpicker", "isUsed:used-color:unused-color"],

View File

@ -1,4 +1,5 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: "colors-container",
actions: {

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import { default as computed } from "ember-addons/ember-computed-decorators";
import {
PRIVATE_MESSAGE,
@ -16,7 +17,7 @@ const TITLES = {
[EDIT_SHARED_DRAFT]: "composer.edit_shared_draft"
};
export default Ember.Component.extend({
export default Component.extend({
classNames: ["composer-action-title"],
options: Ember.computed.alias("model.replyOptions"),
action: Ember.computed.alias("model.action"),

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import {
default as computed,
observes
@ -20,7 +21,7 @@ function mouseYPos(e) {
return e.clientY || (e.touches && e.touches[0] && e.touches[0].clientY);
}
export default Ember.Component.extend(KeyEnterEscape, {
export default Component.extend(KeyEnterEscape, {
elementId: "reply-control",
classNameBindings: [

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import userSearch from "discourse/lib/user-search";
import {
default as computed,
@ -53,7 +54,7 @@ export function addComposerUploadHandler(extensions, method) {
});
}
export default Ember.Component.extend({
export default Component.extend({
classNameBindings: ["showToolbar:toolbar-visible", ":wmd-controls"],
uploadProgress: 0,

View File

@ -1,7 +1,8 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import { getOwner } from "discourse-common/lib/get-owner";
export default Ember.Component.extend({
export default Component.extend({
classNameBindings: [":composer-popup", ":hidden", "message.extraClass"],
@computed("message.templateName")

View File

@ -1,8 +1,9 @@
import Component from "@ember/component";
import LinkLookup from "discourse/lib/link-lookup";
let _messagesCache = {};
export default Ember.Component.extend({
export default Component.extend({
classNameBindings: [":composer-popup-container", "hidden"],
checkedMessages: false,
messages: null,

View File

@ -1,3 +1,4 @@
import Component from "@ember/component";
import {
default as computed,
observes
@ -7,7 +8,7 @@ import { load, lookupCache } from "pretty-text/oneboxer";
import { ajax } from "discourse/lib/ajax";
import afterTransition from "discourse/lib/after-transition";
export default Ember.Component.extend({
export default Component.extend({
classNames: ["title-input"],
watchForLink: Ember.computed.alias("composer.canEditTopicFeaturedLink"),

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
tagName: "",
@computed("composeState")

View File

@ -1,9 +1,10 @@
import Component from "@ember/component";
import {
default as computed,
observes
} from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
showSelector: true,
shouldHide: false,
defaultUsernameCount: 0,

View File

@ -1,4 +1,5 @@
export default Ember.Component.extend({
import Component from "@ember/component";
export default Component.extend({
classNames: ["conditional-loading-section"],
classNameBindings: ["isLoading"],

View File

@ -1,6 +1,7 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
export default Component.extend({
classNameBindings: [
":loading-container",
"containerClass",

Some files were not shown because too many files have changed in this diff Show More