merge: integrate marketplace and design v2 client

This commit is contained in:
2026-08-30 22:45:44 +08:00
43 changed files with 5662 additions and 14134 deletions

View File

@@ -149,33 +149,25 @@ function publishDesktopActivity(input: {
function ProtectedLayout({
authReady,
authRequired,
imageWorkspaceLocalDevelopment,
setupReady,
}: {
authReady: boolean;
authRequired: boolean;
imageWorkspaceLocalDevelopment: boolean;
setupReady: boolean;
}) {
const location = useLocation();
const authenticated = useAuthStore((state) => state.isAuthenticated());
const moduleAccess = useAuthStore((state) => state.moduleAccess);
const requestedModule = getGuardedAiModuleForPath(location.pathname);
const allowsAnonymousImageWorkspace = imageWorkspaceLocalDevelopment
&& (location.pathname === '/image-canvas'
|| location.pathname.startsWith('/image-canvas/')
|| location.pathname === '/image-prompts'
|| location.pathname.startsWith('/image-prompts/'));
if (!setupReady) {
return <StartupScreen />;
}
if (authRequired && !authReady && !allowsAnonymousImageWorkspace) {
if (authRequired && !authReady) {
return <StartupScreen />;
}
if (authRequired && !allowsAnonymousImageWorkspace && !authenticated) {
if (authRequired && !authenticated) {
return (
<Navigate
to="/login"
@@ -283,7 +275,6 @@ function App() {
const bootstrapUserSync = useUserSyncStore((state) => state.bootstrap);
const setupReady = setupComplete || skipSetupForE2E || rendererOnlyPreview;
const authRequired = !skipSetupForE2E && !rendererOnlyPreview;
const imageWorkspaceLocalDevelopment = window.electron?.imageWorkspaceLocalDevelopment === true;
useEffect(() => installRendererPerformanceDiagnostics(), []);
@@ -450,7 +441,6 @@ function App() {
<ProtectedLayout
authReady={authInitialized}
authRequired={authRequired}
imageWorkspaceLocalDevelopment={imageWorkspaceLocalDevelopment}
setupReady={setupReady}
/>
)}