cobalt/web/src/components/dialog/NoScriptDialog.svelte
dumbmoron eab37ae7ff
Some checks are pending
Run service tests / test service functionality (push) Waiting to run
Run service tests / test service: ${{ matrix.service }} (push) Blocked by required conditions
Run tests / api sanity check (push) Waiting to run
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
web/dialog: show dialog when loading cobalt with no js support
2024-10-12 18:01:57 +00:00

40 lines
981 B
Svelte

<script lang="ts">
import SmallDialog from "$components/dialog/SmallDialog.svelte";
</script>
<noscript style="display: contents">
<div id="nojs-ack">
<SmallDialog
id="nojs-dialog"
meowbalt="error"
bodyText={
"cobalt uses javascript for api requests and ui interactions, but it's not available in your browser. "
+ "you can still navigate around cobalt, but most functionality won't work."
}
buttons={[
{
text: "got it",
main: true,
action: () => {},
link: "#nojs-ack"
},
]}
/>
<div id="nojs-dialog-backdrop"></div>
</div>
</noscript>
<style>
:global(#nojs-ack) {
display: contents;
}
:global(#nojs-ack:target) {
display: none;
}
#nojs-dialog-backdrop {
opacity: 1;
}
</style>