Change Lite theme
This commit is contained in:
@@ -13,13 +13,11 @@
|
|||||||
import RealmFrame from './lib/UI/Realm/RealmFrame.svelte';
|
import RealmFrame from './lib/UI/Realm/RealmFrame.svelte';
|
||||||
import { AccountWarning } from './ts/storage/accountStorage';
|
import { AccountWarning } from './ts/storage/accountStorage';
|
||||||
import AccountWarningComp from './lib/Others/AccountWarningComp.svelte';
|
import AccountWarningComp from './lib/Others/AccountWarningComp.svelte';
|
||||||
import { isLite } from './ts/lite';
|
import Botpreset from './lib/Setting/botpreset.svelte';
|
||||||
import LiteMain from './LiteMain.svelte';
|
import ListedPersona from './lib/Setting/listedPersona.svelte';
|
||||||
import Botpreset from './lib/Setting/botpreset.svelte';
|
import MobileHeader from './lib/Mobile/MobileHeader.svelte';
|
||||||
import ListedPersona from './lib/Setting/listedPersona.svelte';
|
import MobileBody from './lib/Mobile/MobileBody.svelte';
|
||||||
import MobileHeader from './lib/Mobile/MobileHeader.svelte';
|
import MobileFooter from './lib/Mobile/MobileFooter.svelte';
|
||||||
import MobileBody from './lib/Mobile/MobileBody.svelte';
|
|
||||||
import MobileFooter from './lib/Mobile/MobileFooter.svelte';
|
|
||||||
|
|
||||||
|
|
||||||
let didFirstSetup: boolean = false
|
let didFirstSetup: boolean = false
|
||||||
|
|||||||
@@ -9,9 +9,10 @@
|
|||||||
import { language } from "src/lang";
|
import { language } from "src/lang";
|
||||||
import SideChatList from "../SideBars/SideChatList.svelte";
|
import SideChatList from "../SideBars/SideChatList.svelte";
|
||||||
import DevTool from "../SideBars/DevTool.svelte";
|
import DevTool from "../SideBars/DevTool.svelte";
|
||||||
|
import { isLite } from "src/ts/lite";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $MobileSideBar > 0}
|
{#if $MobileSideBar > 0 && !$isLite}
|
||||||
<div class="w-full px-2 py-1 text-textcolor2 border-b border-b-darkborderc bg-darkbg flex justify-start items-center gap-2">
|
<div class="w-full px-2 py-1 text-textcolor2 border-b border-b-darkborderc bg-darkbg flex justify-start items-center gap-2">
|
||||||
<button class="flex-1 border-r border-r-darkborderc" class:text-textcolor={$MobileSideBar === 1} on:click={() => {
|
<button class="flex-1 border-r border-r-darkborderc" class:text-textcolor={$MobileSideBar === 1} on:click={() => {
|
||||||
$MobileSideBar = 1
|
$MobileSideBar = 1
|
||||||
|
|||||||
@@ -94,6 +94,18 @@ const colorShemes = {
|
|||||||
darkBorderc: "#4b5563",
|
darkBorderc: "#4b5563",
|
||||||
darkbutton: "#374151",
|
darkbutton: "#374151",
|
||||||
type:'dark'
|
type:'dark'
|
||||||
|
},
|
||||||
|
"lite": {
|
||||||
|
bgcolor: "#1f2937",
|
||||||
|
darkbg: "#1C2533",
|
||||||
|
borderc: "#475569",
|
||||||
|
selected: "#475569",
|
||||||
|
draculared: "#ff5555",
|
||||||
|
textcolor: "#f8f8f2",
|
||||||
|
textcolor2: "#64748b",
|
||||||
|
darkBorderc: "#030712",
|
||||||
|
darkbutton: "#374151",
|
||||||
|
type:'dark'
|
||||||
}
|
}
|
||||||
|
|
||||||
} as const
|
} as const
|
||||||
@@ -122,7 +134,7 @@ export function updateColorScheme(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(get(isLite)){
|
if(get(isLite)){
|
||||||
colorScheme = structuredClone(colorShemes.light)
|
colorScheme = structuredClone(colorShemes.lite)
|
||||||
}
|
}
|
||||||
|
|
||||||
//set css variables
|
//set css variables
|
||||||
@@ -188,7 +200,7 @@ export function updateTextThemeAndCSS(){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let textTheme = get(isLite) ? 'standard' : db.textTheme
|
let textTheme = get(isLite) ? 'standard' : db.textTheme
|
||||||
let colorScheme = get(isLite) ? 'light' : db.colorScheme.type
|
let colorScheme = get(isLite) ? 'dark' : db.colorScheme.type
|
||||||
switch(textTheme){
|
switch(textTheme){
|
||||||
case "standard":{
|
case "standard":{
|
||||||
if(colorScheme === 'dark'){
|
if(colorScheme === 'dark'){
|
||||||
|
|||||||
@@ -32,10 +32,7 @@ export default defineConfig({
|
|||||||
host: '0.0.0.0', // listen on all addresses
|
host: '0.0.0.0', // listen on all addresses
|
||||||
port: 5174,
|
port: 5174,
|
||||||
strictPort: true,
|
strictPort: true,
|
||||||
hmr: {
|
hmr: false,
|
||||||
protocol: 'ws',
|
|
||||||
port: 5184,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
// to make use of `TAURI_DEBUG` and other env variables
|
// to make use of `TAURI_DEBUG` and other env variables
|
||||||
// https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
|
// https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
|
||||||
|
|||||||
Reference in New Issue
Block a user