From 150cfe764aeb9e93341ba2f231fd121fe85472af Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Wed, 27 Dec 2017 13:09:17 +0100 Subject: First working draft of icon upload --- src/models/Service.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/models') diff --git a/src/models/Service.js b/src/models/Service.js index 0b19440e7..652d2594c 100644 --- a/src/models/Service.js +++ b/src/models/Service.js @@ -24,7 +24,7 @@ export default class Service { @observable isNotificationEnabled = true; @observable isBadgeEnabled = true; @observable isIndirectMessageBadgeEnabled = true; - @observable customIconUrl = ''; + @observable iconUrl = ''; @observable hasCrashed = false; constructor(data, recipe) { @@ -42,7 +42,8 @@ export default class Service { this.name = data.name || this.name; this.team = data.team || this.team; this.customUrl = data.customUrl || this.customUrl; - this.customIconUrl = data.customIconUrl || this.customIconUrl; + // this.customIconUrl = data.customIconUrl || this.customIconUrl; + this.iconUrl = data.iconUrl || this.iconUrl; this.order = data.order !== undefined ? data.order : this.order; @@ -97,15 +98,15 @@ export default class Service { } @computed get icon() { - if (this.hasCustomIcon) { - return this.customIconUrl; + if (this.iconUrl) { + return this.iconUrl; } return path.join(this.recipe.path, 'icon.svg'); } @computed get hasCustomIcon() { - return (this.customIconUrl !== ''); + return Boolean(this.iconUrl); } @computed get iconPNG() { -- cgit v1.2.3-70-g09d2