Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix: simplify login screens

tianma-ifcf2143d5e5b3
diff --git a/apps/ios/EdgeEver/Features/Auth/LoginView.swift b/apps/ios/EdgeEver/Features/Auth/LoginView.swift
index 5ea3a29d..816dc002 100644
--- a/apps/ios/EdgeEver/Features/Auth/LoginView.swift
+++ b/apps/ios/EdgeEver/Features/Auth/LoginView.swift
@@ -34,6 +34,7 @@ struct LoginView: View {
.clipShape(Circle())
.overlay(Circle().stroke(AppTheme.border, lineWidth: 1))
}
+ .accessibilityLabel(env.preferences.t("GitHub 仓库", en: "GitHub repository"))
.padding(.trailing, 18)
.padding(.top, 18)
.zIndex(2)
@@ -70,23 +71,6 @@ struct LoginView: View {
keyboard: .URL,
secure: false
)
- Text(env.preferences.t(
- "请填写完整 HTTPS 地址,不要只输入 demo。",
- en: "Enter the full HTTPS URL, not just “demo”."
- ))
- .font(.system(size: 12, weight: .medium))
- .foregroundStyle(AppTheme.secondary)
- .padding(.top, 8)
- Button {
- baseUrl = EdgeEverPublicDemo.instanceURLString
- } label: {
- Text(env.preferences.t("填入公开演示实例", en: "Use public demo instance"))
- .font(.system(size: 13, weight: .semibold))
- .foregroundStyle(AppTheme.accent)
- }
- .buttonStyle(.plain)
- .accessibilityLabel(env.preferences.t("填入公开演示实例", en: "Use public demo instance"))
- .padding(.top, 6)
.padding(.bottom, 14)
field(
diff --git a/apps/mobile/src/components/icons.tsx b/apps/mobile/src/components/icons.tsx
index ea9f5f08..4f7887f9 100644
--- a/apps/mobile/src/components/icons.tsx
+++ b/apps/mobile/src/components/icons.tsx
@@ -41,6 +41,7 @@ export const FileSpreadsheet = createIcon("grid");
export const FileText = createIcon("file-text");
export const Folder = createIcon("folder");
export const Grid = createIcon("grid");
+export const GitHub = createIcon("github");
export const HardDrive = createIcon("hard-drive");
export const Heading2 = createIcon("type");
export const History = createIcon("clock");
diff --git a/apps/mobile/src/screens/LoginScreen.tsx b/apps/mobile/src/screens/LoginScreen.tsx
index 6a44fd3a..a23f6703 100644
--- a/apps/mobile/src/screens/LoginScreen.tsx
+++ b/apps/mobile/src/screens/LoginScreen.tsx
@@ -9,7 +9,7 @@ import {
} from "react-native";
import { PUBLIC_DEMO_INSTANCE_URL } from "@edgeever/shared";
import { SafeAreaView } from "react-native-safe-area-context";
-import { ActivityIndicator, ExternalLink, LockKeyhole } from "../components/icons";
+import { ActivityIndicator, GitHub, LockKeyhole } from "../components/icons";
import { Pressable, Text, TextInput } from "../components/LocalizedText";
import { resolveMobileThemeStyles, useMobileTheme, type MobileResolvedTheme } from "../lib/mobile-theme";
import { useSession } from "../lib/session";
@@ -48,7 +48,7 @@ export const LoginScreen = () => {
return (
<SafeAreaView style={styles.safeArea}>
<Pressable accessibilityLabel="GitHub 仓库" accessibilityRole="link" onPress={() => Linking.openURL(GITHUB_REPOSITORY_URL)} style={styles.githubButton}>
- <ExternalLink color="#475569" size={20} />
+ <GitHub color="#475569" size={20} />
</Pressable>
<KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : undefined} style={styles.keyboard}>
<ScrollView
@@ -78,14 +78,6 @@ export const LoginScreen = () => {
style={styles.input}
value={baseUrl}
/>
- <Text style={styles.hint}>请填写完整 HTTPS 地址,不要只输入 demo。</Text>
- <Pressable
- accessibilityLabel="填入公开演示实例"
- accessibilityRole="button"
- onPress={() => setBaseUrl(PUBLIC_DEMO_INSTANCE_URL)}
- >
- <Text style={styles.demoLink}>填入公开演示实例</Text>
- </Pressable>
</View>
<View style={styles.field}>
@@ -217,16 +209,6 @@ const baseLoginStyles = StyleSheet.create({
minHeight: 48,
paddingHorizontal: 14,
},
- hint: {
- color: "#64748b",
- fontSize: 12,
- lineHeight: 16,
- },
- demoLink: {
- color: "#059669",
- fontSize: 13,
- fontWeight: "700",
- },
error: {
color: "#dc2626",
fontSize: 13,
diff --git a/apps/web/src/components/GitHubRepositoryLink.tsx b/apps/web/src/components/GitHubRepositoryLink.tsx
index 1fba98e7..84278de0 100644
--- a/apps/web/src/components/GitHubRepositoryLink.tsx
+++ b/apps/web/src/components/GitHubRepositoryLink.tsx
@@ -31,7 +31,13 @@ export const GitHubRepositoryLink = ({
<TooltipProvider delayDuration={0} skipDelayDuration={0}>
<Tooltip>
<TooltipTrigger asChild>
- <a className={cn("inline-flex items-center gap-2", className)} href={GITHUB_REPOSITORY_URL} target="_blank" rel="noopener noreferrer" title="" aria-label={children ? undefined : resolvedTitle}>
+ <a
+ aria-label={children ? undefined : resolvedTitle}
+ className={cn("inline-flex items-center gap-2", className)}
+ href={GITHUB_REPOSITORY_URL}
+ rel="noopener noreferrer"
+ target="_blank"
+ >
<GitHubMark className={cn("h-4 w-4 shrink-0", iconClassName)} />
{children}
</a>
diff --git a/apps/web/src/components/LoginScreen.tsx b/apps/web/src/components/LoginScreen.tsx
index be481962..700c7f17 100644
--- a/apps/web/src/components/LoginScreen.tsx
+++ b/apps/web/src/components/LoginScreen.tsx
@@ -1,7 +1,7 @@
import { useState, type FormEvent } from "react";
import { LockKeyhole } from "lucide-react";
import { useTranslation } from "react-i18next";
-import { PUBLIC_DEMO_INSTANCE_URL, resolveInstanceUrlInput } from "@edgeever/shared";
+import { resolveInstanceUrlInput } from "@edgeever/shared";
import { Button } from "@/components/ui/button";
import { GitHubRepositoryLink } from "@/components/GitHubRepositoryLink";
import { Input } from "@/components/ui/input";
@@ -92,14 +92,6 @@ export const LoginScreen = ({ error, instanceUrl: initialInstanceUrl, isSubmitti
value={instanceUrl}
onChange={(event) => setInstanceUrl(event.target.value)}
/>
- <p className="mt-2 text-xs font-medium text-slate-500">{t("login.instanceUrlHint")}</p>
- <button
- className="mt-1.5 text-sm font-semibold text-emerald-700 transition hover:text-emerald-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/70"
- type="button"
- onClick={() => setInstanceUrl(PUBLIC_DEMO_INSTANCE_URL)}
- >
- {t("login.usePublicDemo")}
- </button>
</label>
) : null}
diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.ts
index 6322da56..0da8cbd5 100644
--- a/packages/shared/src/i18n/en-US.ts
+++ b/packages/shared/src/i18n/en-US.ts
@@ -74,8 +74,6 @@ export const enUS = {
desktopChangeInstance: "Change instance URL",
desktopInstanceUrlInvalid: "Enter a valid instance URL beginning with http:// or https://.",
instanceUrlPlaceholder: "https://demo.edgeever.org",
- instanceUrlHint: "Enter the full HTTPS URL, not just “demo”.",
- usePublicDemo: "Use public demo instance",
},
nav: {
mobileMain: "Mobile primary navigation",
diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.ts
index ed55e4ae..8d528027 100644
--- a/packages/shared/src/i18n/zh-CN.ts
+++ b/packages/shared/src/i18n/zh-CN.ts
@@ -74,8 +74,6 @@ export const zhCN = {
desktopChangeInstance: "更换实例地址",
desktopInstanceUrlInvalid: "请输入以 http:// 或 https:// 开头的有效实例地址。",
instanceUrlPlaceholder: "https://demo.edgeever.org",
- instanceUrlHint: "请填写完整 HTTPS 地址,不要只输入 demo。",
- usePublicDemo: "填入公开演示实例",
},
nav: {
mobileMain: "移动端主导航",