mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-24 06:24:42 +01:00
Disable Switch post menu if no post instance yet
This commit is contained in:
parent
25e13144a3
commit
1422c5da33
1 changed files with 10 additions and 2 deletions
|
@ -1100,7 +1100,7 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
||||||
<MenuDivider />
|
<MenuDivider />
|
||||||
<MenuHeader className="plain">Experimental</MenuHeader>
|
<MenuHeader className="plain">Experimental</MenuHeader>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
disabled={postSameInstance}
|
disabled={!postInstance || postSameInstance}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const statusURL = getInstanceStatusURL(heroStatus.url);
|
const statusURL = getInstanceStatusURL(heroStatus.url);
|
||||||
if (statusURL) {
|
if (statusURL) {
|
||||||
|
@ -1112,7 +1112,15 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
||||||
>
|
>
|
||||||
<Icon icon="transfer" />
|
<Icon icon="transfer" />
|
||||||
<small class="menu-double-lines">
|
<small class="menu-double-lines">
|
||||||
Switch to post's instance (<b>{postInstance}</b>)
|
Switch to post's instance
|
||||||
|
{postInstance ? (
|
||||||
|
<>
|
||||||
|
{' '}
|
||||||
|
(<b>{postInstance}</b>)
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
''
|
||||||
|
)}
|
||||||
</small>
|
</small>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu2>
|
</Menu2>
|
||||||
|
|
Loading…
Add table
Reference in a new issue