summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts/note-mixin.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-12 14:34:54 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-12 14:34:54 +0900
commit9b253ccb3a122384ba3bfbdbe777b47c7a6b407c (patch)
treed32e4504f27a3eace542b00adaf718e4a04d38cc /src/client/app/common/scripts/note-mixin.ts
parentRefactor and usability improvements (diff)
downloadsharkey-9b253ccb3a122384ba3bfbdbe777b47c7a6b407c.tar.gz
sharkey-9b253ccb3a122384ba3bfbdbe777b47c7a6b407c.tar.bz2
sharkey-9b253ccb3a122384ba3bfbdbe777b47c7a6b407c.zip
Refactor
Diffstat (limited to 'src/client/app/common/scripts/note-mixin.ts')
-rw-r--r--src/client/app/common/scripts/note-mixin.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/client/app/common/scripts/note-mixin.ts b/src/client/app/common/scripts/note-mixin.ts
index ac276dbe68..17182e2757 100644
--- a/src/client/app/common/scripts/note-mixin.ts
+++ b/src/client/app/common/scripts/note-mixin.ts
@@ -84,6 +84,26 @@ export default (opts: Opts = {}) => ({
},
methods: {
+ reply(viaKeyboard = false) {
+ (this as any).apis.post({
+ reply: this.appearNote,
+ animation: !viaKeyboard,
+ cb: () => {
+ this.focus();
+ }
+ });
+ },
+
+ renote(viaKeyboard = false) {
+ (this as any).apis.post({
+ renote: this.appearNote,
+ animation: !viaKeyboard,
+ cb: () => {
+ this.focus();
+ }
+ });
+ },
+
renoteDirectly() {
(this as any).api('notes/create', {
renoteId: this.appearNote.id