Compare commits

...

2 Commits

Author SHA1 Message Date
Xinrea
b03f0150d8 release: bump version to 1.0.6 2024-10-26 12:43:07 +08:00
Xinrea
d61ddafb44 fix: remove window effects
Tauri currently does not provide an API to retrieve the active window effects, making it impossible to adjust the window style based on that information. Therefore, we have removed the window effects to maintain UI consistency.

close #18
2024-10-26 12:42:41 +08:00
3 changed files with 73 additions and 75 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "bili-shadowreplay",
"private": true,
"version": "1.0.5",
"version": "1.0.6",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -8,12 +8,9 @@
"title": "BiliBili ShadowReplay",
"width": 1300,
"height": 600,
"transparent": true,
"transparent": false,
"decorations": false,
"theme": "Light",
"windowEffects": {
"effects": ["tabbed", "mica"]
}
"theme": "Light"
}
]
}

View File

@@ -1,84 +1,85 @@
<script lang="ts">
import Room from "./lib/Room.svelte";
import BSidebar from "./lib/BSidebar.svelte";
import Summary from "./lib/Summary.svelte";
import Setting from "./lib/Setting.svelte";
import Account from "./lib/Account.svelte";
import TitleBar from "./lib/TitleBar.svelte";
import Messages from "./lib/Messages.svelte";
import About from "./lib/About.svelte";
import { platform } from "@tauri-apps/plugin-os";
let active = "#总览";
let room_count = 0;
let message_cnt = 0;
let use_titlebar = platform() == "windows";
import Room from "./lib/Room.svelte";
import BSidebar from "./lib/BSidebar.svelte";
import Summary from "./lib/Summary.svelte";
import Setting from "./lib/Setting.svelte";
import Account from "./lib/Account.svelte";
import TitleBar from "./lib/TitleBar.svelte";
import Messages from "./lib/Messages.svelte";
import About from "./lib/About.svelte";
import { platform } from "@tauri-apps/plugin-os";
let active = "#总览";
let room_count = 0;
let message_cnt = 0;
let use_titlebar = platform() == "windows";
</script>
<main>
{#if use_titlebar}
<TitleBar />
{/if}
<div class="wrap">
<div class="sidebar">
<BSidebar bind:activeUrl={active} {room_count} {message_cnt} />
</div>
<div class="content">
<!-- switch component by active -->
<div class="page" class:visible={active == "#总览"}>
<Summary />
</div>
<div class="h-full page" class:visible={active == "#直播间"}>
<Room bind:room_count />
</div>
<div class="h-full page" class:visible={active == "#消息"}>
<Messages bind:message_cnt />
</div>
<div class="h-full page" class:visible={active == "#账号"}>
<Account />
</div>
<!-- <div class="page" class:visible={active == "#自动化"}>
{#if use_titlebar}
<TitleBar />
{/if}
<div class="wrap">
<div class="sidebar">
<BSidebar bind:activeUrl={active} {room_count} {message_cnt} />
</div>
<div class="content">
<!-- switch component by active -->
<div class="page" class:visible={active == "#总览"}>
<Summary />
</div>
<div class="h-full page" class:visible={active == "#直播间"}>
<Room bind:room_count />
</div>
<div class="h-full page" class:visible={active == "#消息"}>
<Messages bind:message_cnt />
</div>
<div class="h-full page" class:visible={active == "#账号"}>
<Account />
</div>
<!-- <div class="page" class:visible={active == "#自动化"}>
<div>自动化[开发中]</div>
</div> -->
<div class="page" class:visible={active == "#设置"}>
<Setting />
</div>
<div class="page" class:visible={active == "#关于"}>
<About />
</div>
</div>
<div class="page" class:visible={active == "#设置"}>
<Setting />
</div>
<div class="page" class:visible={active == "#关于"}>
<About />
</div>
</div>
</div>
</main>
<style>
.sidebar {
display: flex;
height: 100vh;
}
.sidebar {
display: flex;
height: 100vh;
}
.wrap {
display: flex;
flex-direction: row;
height: 100vh;
overflow: hidden;
}
.wrap {
display: flex;
flex-direction: row;
height: 100vh;
overflow: hidden;
}
.visible {
opacity: 1 !important;
max-height: fit-content !important;
transform: translateX(0) !important;
}
.visible {
opacity: 1 !important;
max-height: fit-content !important;
transform: translateX(0) !important;
}
.page {
opacity: 0;
max-height: 0;
transform: translateX(100%);
overflow: hidden;
transition:
opacity 0.5s ease-in-out,
transform 0.3s ease-in-out;
}
.page {
opacity: 0;
max-height: 0;
transform: translateX(100%);
overflow: hidden;
transition:
opacity 0.5s ease-in-out,
transform 0.3s ease-in-out;
}
.content {
height: 100vh;
}
.content {
height: 100vh;
background-color: #e5e7eb;
}
</style>