Improve beta mobile accessibility

This commit is contained in:
kwaroran
2024-09-11 09:25:49 +09:00
parent 5b6c3e0d04
commit f66ae59d70
18 changed files with 370 additions and 180 deletions

View File

@@ -436,6 +436,10 @@ export function setDatabase(data:Database){
data.falLoraScale ??= 1
data.customCSS ??= ''
data.strictJsonSchema ??= true
data.statics ??= {
messages: 0,
imports: 0
}
changeLanguage(data.language)
DataBase.set(data)
}
@@ -734,6 +738,10 @@ export interface Database{
jsonSchema:string
strictJsonSchema:boolean
extractJson:string
statics: {
messages: number
imports: number
}
}
export interface customscript{
@@ -887,6 +895,7 @@ export interface character{
defaultVariables?:string
lowLevelAccess?:boolean
hideChatIcon?:boolean
lastInteraction?:number
}
@@ -935,6 +944,7 @@ export interface groupChat{
defaultVariables?:string
lowLevelAccess?:boolean
hideChatIcon?:boolean
lastInteraction?:number
}
export interface botPreset{

View File

@@ -35,6 +35,7 @@ import { removeDefaultHandler } from "src/main";
import { updateGuisize } from "../gui/guisize";
import { encodeCapKeySafe } from "./mobileStorage";
import { updateLorebooks } from "../characters";
import { initMobileGesture } from "../hotkey";
//@ts-ignore
export const isTauri = !!window.__TAURI__
@@ -542,7 +543,8 @@ export async function loadData() {
if(db.botSettingAtStart){
botMakerMode.set(true)
}
if(db.betaMobileGUI && window.innerWidth <= 800){
if((db.betaMobileGUI && window.innerWidth <= 800) || import.meta.env.VITE_RISU_LITE){
initMobileGesture()
MobileGUI.set(true)
}
loadedStore.set(true)