mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 16:01:38 +08:00
parent
1f899bec21
commit
536f88b95b
|
@ -530,14 +530,11 @@ const AdminUser = Discourse.User.extend({
|
|||
}
|
||||
},
|
||||
|
||||
@computed("suspended_by")
|
||||
suspendedBy: wrapAdmin,
|
||||
@computed("suspended_by") suspendedBy: wrapAdmin,
|
||||
|
||||
@computed("silenced_by")
|
||||
silencedBy: wrapAdmin,
|
||||
@computed("silenced_by") silencedBy: wrapAdmin,
|
||||
|
||||
@computed("approved_by")
|
||||
approvedBy: wrapAdmin
|
||||
@computed("approved_by") approvedBy: wrapAdmin
|
||||
});
|
||||
|
||||
AdminUser.reopenClass({
|
||||
|
|
|
@ -31,8 +31,7 @@ export default Ember.Component.extend({
|
|||
}
|
||||
},
|
||||
|
||||
@computed("formattedBackupCodes")
|
||||
base64BackupCode: b64EncodeUnicode,
|
||||
@computed("formattedBackupCodes") base64BackupCode: b64EncodeUnicode,
|
||||
|
||||
@computed("backupCodes")
|
||||
formattedBackupCodes(backupCodes) {
|
||||
|
|
|
@ -18,8 +18,7 @@ export default Ember.Component.extend({
|
|||
return hasDraft ? "topic.open_draft" : "topic.create";
|
||||
},
|
||||
|
||||
@computed("category.can_edit")
|
||||
showCategoryEdit: canEdit => canEdit,
|
||||
@computed("category.can_edit") showCategoryEdit: canEdit => canEdit,
|
||||
|
||||
@computed("filterMode", "category", "noSubcategories")
|
||||
navItems(filterMode, category, noSubcategories) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import computed from "ember-addons/ember-computed-decorators";
|
||||
|
||||
export default Ember.Component.extend({
|
||||
@computed("post.url")
|
||||
postUrl: Discourse.getURL
|
||||
@computed("post.url") postUrl: Discourse.getURL
|
||||
});
|
||||
|
|
|
@ -32,11 +32,9 @@ export default Ember.Component.extend(CleansUp, {
|
|||
topic: null,
|
||||
visible: null,
|
||||
|
||||
@computed("topic.created_at")
|
||||
createdDate: createdAt => new Date(createdAt),
|
||||
@computed("topic.created_at") createdDate: createdAt => new Date(createdAt),
|
||||
|
||||
@computed("topic.bumped_at")
|
||||
bumpedDate: bumpedAt => new Date(bumpedAt),
|
||||
@computed("topic.bumped_at") bumpedDate: bumpedAt => new Date(bumpedAt),
|
||||
|
||||
@computed("createdDate", "bumpedDate")
|
||||
showTime(createdDate, bumpedDate) {
|
||||
|
|
|
@ -287,8 +287,7 @@ export default Ember.Controller.extend({
|
|||
return authorizesOneOrMoreExtensions();
|
||||
},
|
||||
|
||||
@computed()
|
||||
uploadIcon: () => uploadIcon(),
|
||||
@computed() uploadIcon: () => uploadIcon(),
|
||||
|
||||
actions: {
|
||||
cancelUpload() {
|
||||
|
|
|
@ -7,8 +7,7 @@ export default Ember.Controller.extend({
|
|||
|
||||
showLoginButton: Em.computed.equal("model.path", "login"),
|
||||
|
||||
@computed("model.path")
|
||||
bodyClass: path => `static-${path}`,
|
||||
@computed("model.path") bodyClass: path => `static-${path}`,
|
||||
|
||||
@computed("model.path")
|
||||
showSignupButton() {
|
||||
|
|
|
@ -25,11 +25,9 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
|||
remote: Ember.computed.equal("selection", "remote"),
|
||||
selection: "local",
|
||||
|
||||
@computed()
|
||||
uploadIcon: () => uploadIcon(),
|
||||
@computed() uploadIcon: () => uploadIcon(),
|
||||
|
||||
@computed()
|
||||
title: () => uploadTranslate("title"),
|
||||
@computed() title: () => uploadTranslate("title"),
|
||||
|
||||
@computed("selection")
|
||||
tip(selection) {
|
||||
|
|
|
@ -75,8 +75,7 @@ const Composer = RestModel.extend({
|
|||
return this.site.get("archetypes");
|
||||
}.property(),
|
||||
|
||||
@computed("action")
|
||||
sharedDraft: action => action === CREATE_SHARED_DRAFT,
|
||||
@computed("action") sharedDraft: action => action === CREATE_SHARED_DRAFT,
|
||||
|
||||
@computed
|
||||
categoryId: {
|
||||
|
@ -134,8 +133,7 @@ const Composer = RestModel.extend({
|
|||
|
||||
topicFirstPost: Em.computed.or("creatingTopic", "editingFirstPost"),
|
||||
|
||||
@computed("action")
|
||||
editingPost: isEdit,
|
||||
@computed("action") editingPost: isEdit,
|
||||
|
||||
replyingToTopic: Em.computed.equal("action", REPLY),
|
||||
|
||||
|
|
|
@ -105,8 +105,7 @@ const NavItem = Discourse.Model.extend({
|
|||
});
|
||||
|
||||
const ExtraNavItem = NavItem.extend({
|
||||
@computed("href")
|
||||
href: href => href,
|
||||
@computed("href") href: href => href,
|
||||
customFilter: null
|
||||
});
|
||||
|
||||
|
|
|
@ -198,17 +198,13 @@ const User = RestModel.extend({
|
|||
return suspendedTill && moment(suspendedTill).isAfter();
|
||||
},
|
||||
|
||||
@computed("suspended_till")
|
||||
suspendedForever: isForever,
|
||||
@computed("suspended_till") suspendedForever: isForever,
|
||||
|
||||
@computed("silenced_till")
|
||||
silencedForever: isForever,
|
||||
@computed("silenced_till") silencedForever: isForever,
|
||||
|
||||
@computed("suspended_till")
|
||||
suspendedTillDate: longDate,
|
||||
@computed("suspended_till") suspendedTillDate: longDate,
|
||||
|
||||
@computed("silenced_till")
|
||||
silencedTillDate: longDate,
|
||||
@computed("silenced_till") silencedTillDate: longDate,
|
||||
|
||||
changeUsername(new_username) {
|
||||
return ajax(
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import computed from "ember-addons/ember-computed-decorators";
|
||||
|
||||
export default Ember.Component.extend({
|
||||
@computed("field.value")
|
||||
showStaffCount: staffCount => staffCount > 1
|
||||
@computed("field.value") showStaffCount: staffCount => staffCount > 1
|
||||
});
|
||||
|
|
|
@ -3,6 +3,5 @@ import computed from "ember-addons/ember-computed-decorators";
|
|||
export default Ember.Component.extend({
|
||||
classNameBindings: [":wizard-step-form", "customStepClass"],
|
||||
|
||||
@computed("step.id")
|
||||
customStepClass: stepId => `wizard-step-${stepId}`
|
||||
@computed("step.id") customStepClass: stepId => `wizard-step-${stepId}`
|
||||
});
|
||||
|
|
|
@ -31,8 +31,7 @@ export default Ember.Component.extend({
|
|||
this.autoFocus();
|
||||
},
|
||||
|
||||
@computed("step.index")
|
||||
showQuitButton: index => index === 0,
|
||||
@computed("step.index") showQuitButton: index => index === 0,
|
||||
|
||||
@computed("step.displayIndex", "wizard.totalSteps")
|
||||
showNextButton: (current, total) => current < total,
|
||||
|
@ -40,8 +39,7 @@ export default Ember.Component.extend({
|
|||
@computed("step.displayIndex", "wizard.totalSteps")
|
||||
showDoneButton: (current, total) => current === total,
|
||||
|
||||
@computed("step.index")
|
||||
showBackButton: index => index > 0,
|
||||
@computed("step.index") showBackButton: index => index > 0,
|
||||
|
||||
@computed("step.banner")
|
||||
bannerImage(src) {
|
||||
|
|
|
@ -15,14 +15,11 @@ export default {
|
|||
this.set("_validState", States.UNCHECKED);
|
||||
},
|
||||
|
||||
@computed("_validState")
|
||||
valid: state => state === States.VALID,
|
||||
@computed("_validState") valid: state => state === States.VALID,
|
||||
|
||||
@computed("_validState")
|
||||
invalid: state => state === States.INVALID,
|
||||
@computed("_validState") invalid: state => state === States.INVALID,
|
||||
|
||||
@computed("_validState")
|
||||
unchecked: state => state === States.UNCHECKED,
|
||||
@computed("_validState") unchecked: state => state === States.UNCHECKED,
|
||||
|
||||
setValid(valid, description) {
|
||||
this.set("_validState", valid ? States.VALID : States.INVALID);
|
||||
|
|
|
@ -5,8 +5,7 @@ import { ajax } from "wizard/lib/ajax";
|
|||
export default Ember.Object.extend(ValidState, {
|
||||
id: null,
|
||||
|
||||
@computed("index")
|
||||
displayIndex: index => index + 1,
|
||||
@computed("index") displayIndex: index => index + 1,
|
||||
|
||||
@computed("fields.[]")
|
||||
fieldsById(fields) {
|
||||
|
|
|
@ -4,8 +4,7 @@ import { ajax } from "wizard/lib/ajax";
|
|||
import computed from "ember-addons/ember-computed-decorators";
|
||||
|
||||
const Wizard = Ember.Object.extend({
|
||||
@computed("steps.length")
|
||||
totalSteps: length => length,
|
||||
@computed("steps.length") totalSteps: length => length,
|
||||
|
||||
getTitle() {
|
||||
const titleStep = this.get("steps").findBy("id", "forum-title");
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"chrome-launcher": "^0.10.2",
|
||||
"chrome-remote-interface": "^0.25.6",
|
||||
"eslint": "^4.19.1",
|
||||
"prettier": "^1.14.0",
|
||||
"prettier": "^1.13.0",
|
||||
"puppeteer": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -813,9 +813,9 @@ prelude-ls@~1.1.2:
|
|||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||
|
||||
prettier@^1.14.0:
|
||||
version "1.14.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.0.tgz#847c235522035fd988100f1f43cf20a7d24f9372"
|
||||
prettier@1.13.4:
|
||||
version "1.13.4"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6"
|
||||
|
||||
process-nextick-args@~1.0.6:
|
||||
version "1.0.7"
|
||||
|
|
Loading…
Reference in New Issue
Block a user