Add a warning to logged out users that tours will break.
This commit is contained in:
parent
43ac3c9cf3
commit
02af7391e7
|
@ -20,3 +20,9 @@
|
|||
width: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.tish-warning {
|
||||
border: 1px solid var(--alert-color);
|
||||
color: var(--alert-color);
|
||||
padding: 8px;
|
||||
}
|
||||
|
|
|
@ -6,8 +6,30 @@ import {
|
|||
renderInContainer,
|
||||
} from "../utilities.js";
|
||||
|
||||
const userIsLoggedIn =
|
||||
document.querySelector(".logged-in-user-username") !== null;
|
||||
|
||||
const step01 = renderInContainer(
|
||||
<>
|
||||
{userIsLoggedIn ? (
|
||||
""
|
||||
) : (
|
||||
<p class="tish-warning">
|
||||
It looks like you aren't logged in to Tildes. Tildes Shepherd assumes
|
||||
that you are logged in as a lot of the Tildes interface isn't shown to
|
||||
logged out users.
|
||||
<br />
|
||||
To still let anyone without an account benefit from the extension you
|
||||
may continue, however, know that certain parts of the tour <b>
|
||||
will
|
||||
</b>{" "}
|
||||
break and look weird.
|
||||
<br />
|
||||
It's highly recommended that you exit the tour, log in and start it
|
||||
again.
|
||||
</p>
|
||||
)}
|
||||
|
||||
<h1>The Homepage</h1>
|
||||
|
||||
<p>
|
||||
|
|
Loading…
Reference in New Issue