mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Only show compose button when logged in
This commit is contained in:
parent
dafcccf093
commit
4aeaeb229c
1 changed files with 17 additions and 15 deletions
32
src/app.jsx
32
src/app.jsx
|
@ -266,23 +266,25 @@ function App() {
|
||||||
</Routes>
|
</Routes>
|
||||||
)}
|
)}
|
||||||
<div>
|
<div>
|
||||||
<button
|
{isLoggedIn && (
|
||||||
type="button"
|
<button
|
||||||
id="compose-button"
|
type="button"
|
||||||
onClick={(e) => {
|
id="compose-button"
|
||||||
if (e.shiftKey) {
|
onClick={(e) => {
|
||||||
const newWin = openCompose();
|
if (e.shiftKey) {
|
||||||
if (!newWin) {
|
const newWin = openCompose();
|
||||||
alert('Looks like your browser is blocking popups.');
|
if (!newWin) {
|
||||||
|
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 &&
|
{isLoggedIn &&
|
||||||
!snapStates.settings.shortcutsColumnsMode &&
|
!snapStates.settings.shortcutsColumnsMode &&
|
||||||
snapStates.settings.shortcutsViewMode !== 'multi-column' && (
|
snapStates.settings.shortcutsViewMode !== 'multi-column' && (
|
||||||
|
|
Loading…
Reference in a new issue