enhance(frontend): ノートを投稿した方法によって、トースト通知のアイコンと内容が異なって表示されるように
This commit is contained in:
parent
e196ad365e
commit
b52d7e7db6
|
@ -73,7 +73,8 @@
|
||||||
- Enhance: 일부 설정 배치 변경
|
- Enhance: 일부 설정 배치 변경
|
||||||
- Enhance: '타임라인 상단에 글 작성란 표시' 옵션이 활성화 되었을 때 autofocus를 사용하지 않도록
|
- Enhance: '타임라인 상단에 글 작성란 표시' 옵션이 활성화 되었을 때 autofocus를 사용하지 않도록
|
||||||
- Enhance: 로컬 유저만 그룹에 초대할 수 있도록
|
- Enhance: 로컬 유저만 그룹에 초대할 수 있도록
|
||||||
- Enhance: 노트를 인용할 때 autofocus를 사용하도록
|
- Enhance: 노트를 인용할 때 autofocus를 사용하도록시
|
||||||
|
- Enhance: 노트를 게시한 방식에 따라 토스트 알림의 아이콘과 내용이 다르게 표시되도록
|
||||||
- Fix: (Friendly) 흐림 효과를 사용할 때 하단 내비게이션 바의 가독성이 매우 떨어지는 문제
|
- Fix: (Friendly) 흐림 효과를 사용할 때 하단 내비게이션 바의 가독성이 매우 떨어지는 문제
|
||||||
- Fix: (Friendly) 위젯 버튼에서 'UI 애니메이션 줄이기' 옵션이 적용되지 않는 문제
|
- Fix: (Friendly) 위젯 버튼에서 'UI 애니메이션 줄이기' 옵션이 적용되지 않는 문제
|
||||||
- Fix: (Friendly) 스크롤을 해도 위젯 버튼이 숨겨지지 않는 문제
|
- Fix: (Friendly) 스크롤을 해도 위젯 버튼이 숨겨지지 않는 문제
|
||||||
|
|
|
@ -150,6 +150,8 @@ enterEmoji: "Enter an emoji"
|
||||||
renote: "Renote"
|
renote: "Renote"
|
||||||
unrenote: "Remove renote"
|
unrenote: "Remove renote"
|
||||||
renoted: "Renoted."
|
renoted: "Renoted."
|
||||||
|
quoted: "Quoted."
|
||||||
|
replied: "Replied."
|
||||||
cantRenote: "This post can't be renoted."
|
cantRenote: "This post can't be renoted."
|
||||||
cantReRenote: "A renote can't be renoted."
|
cantReRenote: "A renote can't be renoted."
|
||||||
quote: "Quote"
|
quote: "Quote"
|
||||||
|
|
2
locales/index.d.ts
vendored
2
locales/index.d.ts
vendored
|
@ -153,6 +153,8 @@ export interface Locale {
|
||||||
"renote": string;
|
"renote": string;
|
||||||
"unrenote": string;
|
"unrenote": string;
|
||||||
"renoted": string;
|
"renoted": string;
|
||||||
|
"quoted": string;
|
||||||
|
"replied": string;
|
||||||
"cantRenote": string;
|
"cantRenote": string;
|
||||||
"cantReRenote": string;
|
"cantReRenote": string;
|
||||||
"quote": string;
|
"quote": string;
|
||||||
|
|
|
@ -150,6 +150,8 @@ enterEmoji: "絵文字を入力"
|
||||||
renote: "リノート"
|
renote: "リノート"
|
||||||
unrenote: "リノート解除"
|
unrenote: "リノート解除"
|
||||||
renoted: "リノートしました。"
|
renoted: "リノートしました。"
|
||||||
|
quoted: "ノートを引用しました。"
|
||||||
|
replied: "返信を投稿しました。"
|
||||||
cantRenote: "この投稿はリノートできません。"
|
cantRenote: "この投稿はリノートできません。"
|
||||||
cantReRenote: "リノートをリノートすることはできません。"
|
cantReRenote: "リノートをリノートすることはできません。"
|
||||||
quote: "引用"
|
quote: "引用"
|
||||||
|
|
|
@ -149,7 +149,9 @@ followRequestPending: "팔로우 허가 대기중"
|
||||||
enterEmoji: "이모지 입력"
|
enterEmoji: "이모지 입력"
|
||||||
renote: "리노트"
|
renote: "리노트"
|
||||||
unrenote: "리노트 취소"
|
unrenote: "리노트 취소"
|
||||||
renoted: "리노트 했어요!"
|
renoted: "리노트했어요!"
|
||||||
|
quoted: "노트를 인용했어요!"
|
||||||
|
replied: "답글을 게시했어요!"
|
||||||
cantRenote: "이 게시물은 리노트할 수 없어요."
|
cantRenote: "이 게시물은 리노트할 수 없어요."
|
||||||
cantReRenote: "리노트된 노트는 리노트할 수 없어요."
|
cantReRenote: "리노트된 노트는 리노트할 수 없어요."
|
||||||
quote: "인용"
|
quote: "인용"
|
||||||
|
|
|
@ -340,7 +340,7 @@ function renote(viaKeyboard = false) {
|
||||||
renoteId: appearNote.id,
|
renoteId: appearNote.id,
|
||||||
channelId: appearNote.channelId,
|
channelId: appearNote.channelId,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
|
@ -383,7 +383,7 @@ function renote(viaKeyboard = false) {
|
||||||
visibility,
|
visibility,
|
||||||
renoteId: appearNote.id,
|
renoteId: appearNote.id,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
|
@ -429,7 +429,7 @@ async function renoteOnly() {
|
||||||
renoteId: appearNote.id,
|
renoteId: appearNote.id,
|
||||||
channelId: appearNote.channelId,
|
channelId: appearNote.channelId,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ async function renoteOnly() {
|
||||||
visibility,
|
visibility,
|
||||||
renoteId: appearNote.id,
|
renoteId: appearNote.id,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -388,7 +388,7 @@ function renote(viaKeyboard = false) {
|
||||||
renoteId: appearNote.id,
|
renoteId: appearNote.id,
|
||||||
channelId: appearNote.channelId,
|
channelId: appearNote.channelId,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
|
@ -420,7 +420,7 @@ function renote(viaKeyboard = false) {
|
||||||
os.api('notes/create', {
|
os.api('notes/create', {
|
||||||
renoteId: appearNote.id,
|
renoteId: appearNote.id,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
|
@ -466,7 +466,7 @@ async function renoteOnly() {
|
||||||
renoteId: appearNote.id,
|
renoteId: appearNote.id,
|
||||||
channelId: appearNote.channelId,
|
channelId: appearNote.channelId,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ async function renoteOnly() {
|
||||||
os.api('notes/create', {
|
os.api('notes/create', {
|
||||||
renoteId: appearNote.id,
|
renoteId: appearNote.id,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
>
|
>
|
||||||
<div v-if="showing" class="_acrylic" :class="[$style.root, { [$style.reduceBlurEffect]: !defaultStore.state.useBlurEffect }]" :style="{ zIndex }">
|
<div v-if="showing" class="_acrylic" :class="[$style.root, { [$style.reduceBlurEffect]: !defaultStore.state.useBlurEffect }]" :style="{ zIndex }">
|
||||||
<div style="padding: 16px 24px;">
|
<div style="padding: 16px 24px;">
|
||||||
<i class="ti ti-check"></i>
|
<i :class="icon === 'posted' ? 'ti-check' : icon === 'reply' ? 'ti-arrow-back-up' : icon === 'renote' ? 'ti-repeat' : icon === 'quote' ? 'ti-quote' : 'ti-check'" class="ti"></i>
|
||||||
{{ message }}
|
{{ message }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,6 +29,7 @@ import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
message: string;
|
message: string;
|
||||||
|
icon: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -785,9 +785,12 @@ async function post(ev?: MouseEvent) {
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
if (props.reply) os.noteToast(i18n.ts.replied, 'reply');
|
||||||
|
else if (props.renote) os.noteToast(i18n.ts.quoted, 'quote');
|
||||||
|
else os.noteToast(i18n.ts.posted, 'posted');
|
||||||
|
|
||||||
deleteDraft();
|
deleteDraft();
|
||||||
emit('posted');
|
emit('posted');
|
||||||
os.noteToast(i18n.ts.posted);
|
|
||||||
if (postData.text && postData.text !== '') {
|
if (postData.text && postData.text !== '') {
|
||||||
const hashtags_ = mfm.parse(postData.text).filter(x => x.type === 'hashtag').map(x => x.props.hashtag);
|
const hashtags_ = mfm.parse(postData.text).filter(x => x.type === 'hashtag').map(x => x.props.hashtag);
|
||||||
const history = JSON.parse(miLocalStorage.getItem('hashtags') ?? '[]') as string[];
|
const history = JSON.parse(miLocalStorage.getItem('hashtags') ?? '[]') as string[];
|
||||||
|
|
|
@ -803,9 +803,12 @@ async function post(ev?: MouseEvent) {
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
if (props.reply) os.noteToast(i18n.ts.replied, 'reply');
|
||||||
|
else if (props.renote) os.noteToast(i18n.ts.quoted, 'quote');
|
||||||
|
else os.noteToast(i18n.ts.posted, 'posted');
|
||||||
|
|
||||||
deleteDraft();
|
deleteDraft();
|
||||||
emit('posted');
|
emit('posted');
|
||||||
os.noteToast(i18n.ts.posted);
|
|
||||||
if (postData.text && postData.text !== '') {
|
if (postData.text && postData.text !== '') {
|
||||||
const hashtags_ = mfm.parse(postData.text).filter(x => x.type === 'hashtag').map(x => x.props.hashtag);
|
const hashtags_ = mfm.parse(postData.text).filter(x => x.type === 'hashtag').map(x => x.props.hashtag);
|
||||||
const history = JSON.parse(miLocalStorage.getItem('hashtags') ?? '[]') as string[];
|
const history = JSON.parse(miLocalStorage.getItem('hashtags') ?? '[]') as string[];
|
||||||
|
|
|
@ -218,7 +218,7 @@ function renote(viaKeyboard = false) {
|
||||||
renoteId: props.note.id,
|
renoteId: props.note.id,
|
||||||
channelId: props.note.channelId,
|
channelId: props.note.channelId,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
|
@ -250,7 +250,7 @@ function renote(viaKeyboard = false) {
|
||||||
os.api('notes/create', {
|
os.api('notes/create', {
|
||||||
renoteId: props.note.id,
|
renoteId: props.note.id,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
|
@ -296,7 +296,7 @@ async function renoteOnly() {
|
||||||
renoteId: props.note.id,
|
renoteId: props.note.id,
|
||||||
channelId: props.note.channelId,
|
channelId: props.note.channelId,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ async function renoteOnly() {
|
||||||
os.api('notes/create', {
|
os.api('notes/create', {
|
||||||
renoteId: props.note.id,
|
renoteId: props.note.id,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.noteToast(i18n.ts.renoted);
|
os.noteToast(i18n.ts.renoted, 'renote');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -185,9 +185,10 @@ export function toast(message: string) {
|
||||||
}, {}, 'closed');
|
}, {}, 'closed');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function noteToast(message: string) {
|
export function noteToast(message: string, icon: string) {
|
||||||
popup(MkNoteToast, {
|
popup(MkNoteToast, {
|
||||||
message,
|
message,
|
||||||
|
icon,
|
||||||
}, {}, 'closed');
|
}, {}, 'closed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue