mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-21 05:18:51 +01:00
Fix compose button not auto-hiding
This commit is contained in:
parent
02d26b8da2
commit
c95a451111
1 changed files with 21 additions and 23 deletions
44
src/app.jsx
44
src/app.jsx
|
@ -265,32 +265,30 @@ function App() {
|
||||||
<Route path="/:instance?/s/:id" element={<StatusRoute />} />
|
<Route path="/:instance?/s/:id" element={<StatusRoute />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
)}
|
)}
|
||||||
<div>
|
{isLoggedIn && (
|
||||||
{isLoggedIn && (
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
id="compose-button"
|
||||||
id="compose-button"
|
onClick={(e) => {
|
||||||
onClick={(e) => {
|
if (e.shiftKey) {
|
||||||
if (e.shiftKey) {
|
const newWin = openCompose();
|
||||||
const newWin = openCompose();
|
if (!newWin) {
|
||||||
if (!newWin) {
|
alert('Looks like your browser is blocking popups.');
|
||||||
alert('Looks like your browser is blocking popups.');
|
|
||||||
states.showCompose = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
states.showCompose = true;
|
states.showCompose = true;
|
||||||
}
|
}
|
||||||
}}
|
} else {
|
||||||
>
|
states.showCompose = true;
|
||||||
<Icon icon="quill" size="xl" alt="Compose" />
|
}
|
||||||
</button>
|
}}
|
||||||
|
>
|
||||||
|
<Icon icon="quill" size="xl" alt="Compose" />
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
{isLoggedIn &&
|
||||||
|
!snapStates.settings.shortcutsColumnsMode &&
|
||||||
|
snapStates.settings.shortcutsViewMode !== 'multi-column' && (
|
||||||
|
<Shortcuts />
|
||||||
)}
|
)}
|
||||||
{isLoggedIn &&
|
|
||||||
!snapStates.settings.shortcutsColumnsMode &&
|
|
||||||
snapStates.settings.shortcutsViewMode !== 'multi-column' && (
|
|
||||||
<Shortcuts />
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
{!!snapStates.showCompose && (
|
{!!snapStates.showCompose && (
|
||||||
<Modal>
|
<Modal>
|
||||||
<Compose
|
<Compose
|
||||||
|
|
Loading…
Reference in a new issue