diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-09 08:13:34 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-09 08:13:34 +0900 |
| commit | 60ef3e3563c95008bde52818a7d638d1d8ff9b19 (patch) | |
| tree | 085539a945faa4fe4105f82f65e5d320ea542b03 /src/client/app/common/scripts | |
| parent | Clean up (diff) | |
| download | sharkey-60ef3e3563c95008bde52818a7d638d1d8ff9b19.tar.gz sharkey-60ef3e3563c95008bde52818a7d638d1d8ff9b19.tar.bz2 sharkey-60ef3e3563c95008bde52818a7d638d1d8ff9b19.zip | |
Refactor & Clean up
Diffstat (limited to 'src/client/app/common/scripts')
| -rw-r--r-- | src/client/app/common/scripts/note-mixin.ts | 12 | ||||
| -rw-r--r-- | src/client/app/common/scripts/note-subscriber.ts | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/client/app/common/scripts/note-mixin.ts b/src/client/app/common/scripts/note-mixin.ts index cd3d3ae760..93debf81e8 100644 --- a/src/client/app/common/scripts/note-mixin.ts +++ b/src/client/app/common/scripts/note-mixin.ts @@ -115,7 +115,7 @@ export default (opts: Opts = {}) => ({ react(viaKeyboard = false) { this.blur(); - (this as any).os.new(MkReactionPicker, { + this.$root.new(MkReactionPicker, { source: this.$refs.reactButton, note: this.appearNote, showFocus: viaKeyboard, @@ -126,28 +126,28 @@ export default (opts: Opts = {}) => ({ }, reactDirectly(reaction) { - (this as any).api('notes/reactions/create', { + (this.$root.api('notes/reactions/create', { noteId: this.appearNote.id, reaction: reaction }); }, favorite() { - (this as any).api('notes/favorites/create', { + this.$root.api('notes/favorites/create', { noteId: this.appearNote.id }).then(() => { - (this as any).os.new(Ok); + this.$root.new(Ok); }); }, del() { - (this as any).api('notes/delete', { + this.$root.api('notes/delete', { noteId: this.appearNote.id }); }, menu(viaKeyboard = false) { - (this as any).os.new(MkNoteMenu, { + this.$root.new(MkNoteMenu, { source: this.$refs.menuButton, note: this.appearNote, animation: !viaKeyboard, diff --git a/src/client/app/common/scripts/note-subscriber.ts b/src/client/app/common/scripts/note-subscriber.ts index 1a82dd3918..bc434c4360 100644 --- a/src/client/app/common/scripts/note-subscriber.ts +++ b/src/client/app/common/scripts/note-subscriber.ts @@ -26,7 +26,7 @@ export default prop => ({ created() { if (this.$store.getters.isSignedIn) { - this.connection = (this as any).os.stream; + this.connection = this.$root.stream; } }, |