summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/app/common/scripts')
-rw-r--r--src/client/app/common/scripts/note-mixin.ts12
-rw-r--r--src/client/app/common/scripts/note-subscriber.ts2
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;
}
},