mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-03 02:20:19 +08:00
fix(env): is mobile flag (#8005)
only 'mobile' entry has isMobile = true flag
This commit is contained in:
@@ -20,7 +20,7 @@ export const AffineOtherPageLayout = ({
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
{environment.isDesktop ? null : (
|
||||
{environment.isElectron ? null : (
|
||||
<div className={styles.topNav}>
|
||||
<a href="/" rel="noreferrer" className={styles.affineLogo}>
|
||||
<Logo1Icon width={24} height={24} />
|
||||
|
||||
@@ -119,8 +119,8 @@ export const OnboardingPage = ({
|
||||
() => questions?.[questionIdx],
|
||||
[questionIdx, questions]
|
||||
);
|
||||
const isMacosDesktop = environment.isDesktop && environment.isMacOs;
|
||||
const isWindowsDesktop = environment.isDesktop && environment.isWindows;
|
||||
const isMacosDesktop = environment.isElectron && environment.isMacOs;
|
||||
const isWindowsDesktop = environment.isElectron && environment.isWindows;
|
||||
|
||||
if (!questions) {
|
||||
return null;
|
||||
|
||||
@@ -10,7 +10,7 @@ const DesktopThemeSync = memo(function DesktopThemeSync() {
|
||||
const lastThemeRef = useRef(theme);
|
||||
const onceRef = useRef(false);
|
||||
if (lastThemeRef.current !== theme || !onceRef.current) {
|
||||
if (environment.isDesktop && theme) {
|
||||
if (environment.isElectron && theme) {
|
||||
apis?.ui
|
||||
.handleThemeChange(theme as 'dark' | 'light' | 'system')
|
||||
.catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user