mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 23:38:49 +01:00
📱
This commit is contained in:
parent
5088e03fc2
commit
5d3bfbabff
1 changed files with 4 additions and 1 deletions
|
|
@ -313,6 +313,9 @@ export const setMode = (modeElementValue: number) => {
|
|||
};
|
||||
|
||||
const rgba2hex = (rgba: string) => {
|
||||
if (rgba.startsWith("#")) {
|
||||
return rgba;
|
||||
}
|
||||
let a: any;
|
||||
const rgb: any = rgba.replace(/\s/g, "").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);
|
||||
const alpha = (rgb && rgb[4] || "").trim();
|
||||
|
|
@ -334,7 +337,7 @@ const rgba2hex = (rgba: string) => {
|
|||
const updateMobileTheme = (OSTheme: string) => {
|
||||
if (isInIOS() || isInAndroid()) {
|
||||
setTimeout(() => {
|
||||
const backgroundColor = rgba2hex(getComputedStyle(document.body).getPropertyValue("--b3-theme-background").trim().replace(" ", ""));
|
||||
const backgroundColor = rgba2hex(getComputedStyle(document.body).getPropertyValue("--b3-theme-background").trim());
|
||||
let mode = window.siyuan.config.appearance.mode;
|
||||
if (window.siyuan.config.appearance.modeOS) {
|
||||
if (OSTheme === "dark") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue