summaryrefslogtreecommitdiff
path: root/src/client/app/common/define-widget.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-06 19:22:45 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-06 19:22:45 +0900
commitb0f989dbacbdbdd091b0d220496d22f47c795576 (patch)
treec4af330d8eb11c1d0d5dc0a991409060e9287c6b /src/client/app/common/define-widget.ts
parentUpdate README.md (diff)
downloadsharkey-b0f989dbacbdbdd091b0d220496d22f47c795576.tar.gz
sharkey-b0f989dbacbdbdd091b0d220496d22f47c795576.tar.bz2
sharkey-b0f989dbacbdbdd091b0d220496d22f47c795576.zip
Deckにウィジェットを置けるように
Diffstat (limited to 'src/client/app/common/define-widget.ts')
-rw-r--r--src/client/app/common/define-widget.ts21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/client/app/common/define-widget.ts b/src/client/app/common/define-widget.ts
index 0b2bc36566..2fae28be72 100644
--- a/src/client/app/common/define-widget.ts
+++ b/src/client/app/common/define-widget.ts
@@ -9,9 +9,9 @@ export default function<T extends object>(data: {
widget: {
type: Object
},
- isMobile: {
- type: Boolean,
- default: false
+ platform: {
+ type: String,
+ required: true
},
isCustomizeMode: {
type: Boolean,
@@ -66,17 +66,10 @@ export default function<T extends object>(data: {
this.bakeProps();
- if (this.isMobile) {
- (this as any).api('i/update_mobile_home', {
- id: this.id,
- data: this.props
- });
- } else {
- (this as any).api('i/update_home', {
- id: this.id,
- data: this.props
- });
- }
+ (this as any).api('i/update_widget', {
+ id: this.id,
+ data: this.props
+ });
}
}
});