mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
🐛 fix(desktop): stub better-auth client for Electron renderer (#12563)
* 🐛 fix(desktop): stub better-auth client for Electron and improve drag regions Add auth-client.desktop.ts noop stub so the Electron renderer build skips the real better-auth dependency that was crashing module evaluation and preventing React from mounting. Also fix drag-bar regions in splash.html and error.html, and add dev:desktop convenience script. * ♻️ refactor(desktop): lazy-init better-auth client with remote server URL Replace noop stub with Proxy-based lazy initialization that creates the real better-auth client on first use, using the configured remote server URL from the electron store as baseURL. * 🔧 fix(desktop): update Proxy target in lazyProp for better-auth client initialization Change the Proxy target in the lazyProp function from a noop stub to a function, ensuring the apply trap works correctly for lazy initialization of the better-auth client. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(profile): restrict SSO providers display to non-desktop view Update the condition for rendering the SSO Providers Row in the Profile Settings to only show when the user is logged in and not on a desktop device. This change improves the user interface by preventing unnecessary display on desktop screens. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -5,10 +5,18 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>LobeHub - 连接错误</title>
|
||||
<style>
|
||||
body {
|
||||
.drag-bar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 32px;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 32px 0 0;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -72,7 +80,6 @@
|
||||
}
|
||||
|
||||
.retry-button {
|
||||
-webkit-app-region: no-drag;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background-color: #f5f5f5;
|
||||
color: #1f1f1f;
|
||||
@@ -89,6 +96,7 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="drag-bar"></div>
|
||||
<div class="container">
|
||||
<div class="error-icon">⚠️</div>
|
||||
<h1 class="error-title">Connection Error</h1>
|
||||
|
||||
@@ -5,10 +5,18 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>LobeHub</title>
|
||||
<style>
|
||||
body {
|
||||
.drag-bar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 48px;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 48px 0 0;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -70,6 +78,7 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="drag-bar"></div>
|
||||
<div class="container">
|
||||
<svg
|
||||
class="lobe-brand-loading"
|
||||
|
||||
Reference in New Issue
Block a user