mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-23 14:13:21 +01:00
Extra check if the composer is publishing
This commit is contained in:
parent
7589ec8803
commit
9cc590be1b
1 changed files with 10 additions and 3 deletions
|
@ -788,9 +788,16 @@ function Compose({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.opener.__STATES__.showCompose) {
|
if (window.opener.__STATES__.showCompose) {
|
||||||
const yes = confirm(
|
if (window.opener.__STATES__.composerState?.publishing) {
|
||||||
'Looks like you already have a compose field open in the parent window. Popping in this window will discard the changes you made in the parent window. Continue?',
|
alert(
|
||||||
);
|
'Looks like you already have a compose field open in the parent window and currently publishing. Please wait for it to be done and try again later.',
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let confirmText =
|
||||||
|
'Looks like you already have a compose field open in the parent window. Popping in this window will discard the changes you made in the parent window. Continue?';
|
||||||
|
const yes = confirm(confirmText);
|
||||||
if (!yes) return;
|
if (!yes) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue