diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-02-10 10:27:05 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-02-10 10:27:05 +0900 |
| commit | ff7bb97d8ee04a6a56aaea8a09f9b4d7170f2064 (patch) | |
| tree | 54440ed27272a0c75fdd2ba9d3b83b095993c27c /src/web/app/desktop/mixins/widget.ts | |
| parent | wip (diff) | |
| download | misskey-ff7bb97d8ee04a6a56aaea8a09f9b4d7170f2064.tar.gz misskey-ff7bb97d8ee04a6a56aaea8a09f9b4d7170f2064.tar.bz2 misskey-ff7bb97d8ee04a6a56aaea8a09f9b4d7170f2064.zip | |
wip
Diffstat (limited to 'src/web/app/desktop/mixins/widget.ts')
| -rw-r--r-- | src/web/app/desktop/mixins/widget.ts | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/web/app/desktop/mixins/widget.ts b/src/web/app/desktop/mixins/widget.ts deleted file mode 100644 index 04131cd8f0..0000000000 --- a/src/web/app/desktop/mixins/widget.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as riot from 'riot'; - -// ミックスインにオプションを渡せないのアレ -// SEE: https://github.com/riot/riot/issues/2434 - -(riot as any).mixin('widget', { - init: function() { - this.mixin('i'); - this.mixin('api'); - - this.id = this.opts.id; - this.place = this.opts.place; - - if (this.data) { - Object.keys(this.data).forEach(prop => { - this.data[prop] = this.opts.data.hasOwnProperty(prop) ? this.opts.data[prop] : this.data[prop]; - }); - } - }, - - save: function() { - this.update(); - this.api('i/update_home', { - id: this.id, - data: this.data - }).then(() => { - this.I.client_settings.home.find(w => w.id == this.id).data = this.data; - this.I.update(); - }); - } -}); |