add ui:showSidebarToggle config

This commit is contained in:
hippoz 2022-08-04 02:17:23 +03:00
parent ad8e6315ed
commit e7615879e4
No known key found for this signature in database
GPG key ID: 7C52899193467641
2 changed files with 5 additions and 3 deletions

View file

@ -1,5 +1,6 @@
<script>
import { HashIcon, MenuIcon } from "svelte-feather-icons";
import { getItem } from "../storage";
import { overlayStore, showSidebar } from "../stores";
export let channel;
@ -12,8 +13,8 @@
</style>
<div class="top-bar">
{#if !$showSidebar}
<button class="icon-button menu-button" on:click="{ () => showSidebar.set(true) }">
{#if !$showSidebar || getItem("ui:showSidebarToggle")}
<button class="icon-button menu-button" on:click="{ () => showSidebar.set(!showSidebar.value) }">
<MenuIcon />
</button>
{/if}

View file

@ -7,7 +7,8 @@ const defaults = {
"state:openChannelId": -1,
"log:Gateway": false,
"log:Store": false,
"ui:stateful:presistSelectedChannel": true
"ui:stateful:presistSelectedChannel": true,
"ui:showSidebarToggle": false
};
const store = new Map(Object.entries(defaults));
const persistentProvider = localStorage;