mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-12 00:48:50 +01:00
Different copy for toast when replying or editing
This commit is contained in:
parent
0f5edef199
commit
fd1b45900d
2 changed files with 8 additions and 2 deletions
|
@ -839,6 +839,8 @@ function Compose({
|
||||||
|
|
||||||
// Close
|
// Close
|
||||||
onClose({
|
onClose({
|
||||||
|
// type: post, reply, edit
|
||||||
|
type: editStatus ? 'edit' : replyToStatus ? 'reply' : 'post',
|
||||||
newStatus,
|
newStatus,
|
||||||
instance,
|
instance,
|
||||||
});
|
});
|
||||||
|
|
|
@ -50,13 +50,17 @@ export default function Modals() {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
onClose={(results) => {
|
onClose={(results) => {
|
||||||
const { newStatus, instance } = results || {};
|
const { newStatus, instance, type } = results || {};
|
||||||
states.showCompose = false;
|
states.showCompose = false;
|
||||||
window.__COMPOSE__ = null;
|
window.__COMPOSE__ = null;
|
||||||
if (newStatus) {
|
if (newStatus) {
|
||||||
states.reloadStatusPage++;
|
states.reloadStatusPage++;
|
||||||
showToast({
|
showToast({
|
||||||
text: 'Post published. Check it out.',
|
text: {
|
||||||
|
post: 'Post published. Check it out.',
|
||||||
|
reply: 'Reply posted. Check it out.',
|
||||||
|
edit: 'Post updated. Check it out.',
|
||||||
|
}[type || 'post'],
|
||||||
delay: 1000,
|
delay: 1000,
|
||||||
duration: 10_000, // 10 seconds
|
duration: 10_000, // 10 seconds
|
||||||
onClick: (toast) => {
|
onClick: (toast) => {
|
||||||
|
|
Loading…
Reference in a new issue