Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ショートカットからお気に入りとRenote時にダイアログを表示 #6921

Merged
merged 3 commits into from Dec 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions locales/ja-JP.yml
Expand Up @@ -33,6 +33,8 @@ addUser: "ユーザーを追加"
favorite: "お気に入り"
favorites: "お気に入り"
unfavorite: "お気に入り解除"
favorited: "お気に入りに登録しました。"
alreadyFavorited: "既にお気に入りに登録されています。"
pin: "ピン留め"
unpin: "ピン留め解除"
copyContent: "内容をコピー"
Expand Down Expand Up @@ -87,6 +89,7 @@ followRequestPending: "フォロー許可待ち"
enterEmoji: "絵文字を入力"
renote: "Renote"
unrenote: "Renote解除"
renoted: "Renoteしました。"
quote: "引用"
pinnedNote: "ピン留めされたノート"
you: "あなた"
Expand Down
17 changes: 16 additions & 1 deletion src/client/components/note.vue
Expand Up @@ -490,8 +490,13 @@ export default defineComponent({
},

renoteDirectly() {
os.api('notes/create', {
os.apiWithDialog('notes/create', {
renoteId: this.appearNote.id
}, undefined, (res: any) => {
os.dialog({
type: 'success',
text: this.$t('renoted'),
});
});
},

Expand Down Expand Up @@ -533,6 +538,16 @@ export default defineComponent({
pleaseLogin();
os.apiWithDialog('notes/favorites/create', {
noteId: this.appearNote.id
}, undefined, (res: any) => {
os.dialog({
type: 'success',
text: this.$t('favorited'),
});
}, (e: Error) => {
os.dialog({
type: 'error',
text: this.$t('alreadyFavorited'),
kabo2468 marked this conversation as resolved.
Show resolved Hide resolved
});
});
},

Expand Down