add ui:alwaysUseMobileChatBar option

This commit is contained in:
hippoz 2022-08-31 11:46:51 +03:00
parent 8c75b96696
commit 4080e69b11
No known key found for this signature in database
GPG key ID: 7C52899193467641
2 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
<script> <script>
import { ArrowUpIcon } from "svelte-feather-icons"; import { ArrowUpIcon } from "svelte-feather-icons";
import request from "../request"; import request from "../request";
import { apiRoute } from "../storage"; import { apiRoute, getItem } from "../storage";
import { messagesStoreProvider, overlayStore, smallViewport, typingStore, userInfoStore } from "../stores"; import { messagesStoreProvider, overlayStore, smallViewport, typingStore, userInfoStore } from "../stores";
export let channel; export let channel;
@ -173,9 +173,9 @@
on:input={ onInput } on:input={ onInput }
bind:value={ messageInput } bind:value={ messageInput }
bind:this={ messageTextarea } bind:this={ messageTextarea }
class:small={ $smallViewport } class:small={ $smallViewport || getItem("ui:alwaysUseMobileChatBar") }
/> />
{#if $smallViewport} {#if $smallViewport || getItem("ui:alwaysUseMobileChatBar")}
<button class="icon-button send-button" on:click="{ sendMessage }"> <button class="icon-button send-button" on:click="{ sendMessage }">
<ArrowUpIcon /> <ArrowUpIcon />
</button> </button>

View file

@ -9,6 +9,7 @@ const defaults = {
"log:Store": false, "log:Store": false,
"ui:stateful:presistSelectedChannel": true, "ui:stateful:presistSelectedChannel": true,
"ui:showSidebarToggle": false, "ui:showSidebarToggle": false,
"ui:alwaysUseMobileChatBar": false,
"ui:online:processRemoteTypingEvents": true, "ui:online:processRemoteTypingEvents": true,
"ui:online:processRemotePresenceEvents": true, "ui:online:processRemotePresenceEvents": true,
"ui:online:loadMessageHistory": true, "ui:online:loadMessageHistory": true,