mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 08:55:42 +08:00
DEV: Remove uses of deprecated Ember.copy
and Copyable
(#8978)
This commit is contained in:
parent
76a06dfa03
commit
fedd8e3e3a
@ -53,7 +53,7 @@ export default Controller.extend({
|
||||
},
|
||||
|
||||
copy() {
|
||||
var newColorScheme = Ember.copy(this.model, true);
|
||||
const newColorScheme = this.model.copy();
|
||||
newColorScheme.set(
|
||||
"name",
|
||||
I18n.t("admin.customize.colors.copy_name_prefix") +
|
||||
|
@ -26,7 +26,7 @@ export default Controller.extend({
|
||||
actions: {
|
||||
newColorSchemeWithBase(baseKey) {
|
||||
const base = this.baseColorSchemes.findBy("base_scheme_id", baseKey);
|
||||
const newColorScheme = Ember.copy(base, true);
|
||||
const newColorScheme = base.copy();
|
||||
newColorScheme.setProperties({
|
||||
name: I18n.t("admin.customize.colors.new_name"),
|
||||
base_scheme_id: base.get("base_scheme_id")
|
||||
|
@ -4,7 +4,7 @@ import { ajax } from "discourse/lib/ajax";
|
||||
import ColorSchemeColor from "admin/models/color-scheme-color";
|
||||
import EmberObject from "@ember/object";
|
||||
|
||||
const ColorScheme = EmberObject.extend(Ember.Copyable, {
|
||||
const ColorScheme = EmberObject.extend({
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user