mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 16:33:59 +08:00
REFACTOR: Remove Ember.Component
global variable
Use imports instead.
This commit is contained in:
parent
3db61aa18a
commit
a8a76198b1
|
@ -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,
|
||||
|
|
|
@ -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"],
|
||||
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
|
||||
buffer: "",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
classNames: ["row"]
|
||||
});
|
||||
|
|
|
@ -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",
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: ""
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
classNames: ["admin-report-inline-table"]
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: "tr"
|
||||
});
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: "tr"
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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"],
|
||||
|
||||
|
|
|
@ -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"],
|
||||
|
||||
|
|
|
@ -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"),
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: ""
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
classNames: ["flag-user-lists"]
|
||||
});
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
classNames: ["install-theme-item"]
|
||||
});
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: "tr"
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: ""
|
||||
});
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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", {
|
||||
|
|
|
@ -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"],
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: ""
|
||||
});
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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`, {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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,
|
||||
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
classNames: "activation-controls"
|
||||
});
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"],
|
||||
|
||||
|
|
|
@ -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) : "";
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"),
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
classNames: ["categories-and-latest"]
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
classNames: ["categories-and-top"]
|
||||
});
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: ""
|
||||
});
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
import Component from "@ember/component";
|
||||
// Exists so plugins can use it
|
||||
export default Ember.Component.extend();
|
||||
export default Component.extend();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: ""
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: "h3"
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
tagName: "span"
|
||||
});
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
classNames: "colors-container",
|
||||
|
||||
actions: {
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"),
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
export default Component.extend({
|
||||
classNames: ["conditional-loading-section"],
|
||||
|
||||
classNameBindings: ["isLoading"],
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue
Block a user