R89 极简化登录与移动入口
这个提交包含在:
@@ -1,11 +1,12 @@
|
||||
import { useEffect } from "react";
|
||||
import { Outlet, useLocation } from "react-router-dom";
|
||||
import { Navigate, Outlet, useLocation } from "react-router-dom";
|
||||
import { ErrorBoundary } from "../components/common/ErrorBoundary";
|
||||
import { MobileBottomNav } from "../components/mobile/MobileBottomNav";
|
||||
import { Sidebar } from "../components/navigation/Sidebar";
|
||||
import { Topbar } from "../components/navigation/Topbar";
|
||||
import { resolvePageMeta } from "../features/navigation/schema";
|
||||
import { writeRecentVisit } from "../lib/recentVisits";
|
||||
import { shouldPreferMobileWorkplace } from "../lib/runtimeContext";
|
||||
|
||||
export function AppShellLayout() {
|
||||
const location = useLocation();
|
||||
@@ -19,6 +20,10 @@ export function AppShellLayout() {
|
||||
writeRecentVisit(pathname, resolvePageMeta(pathname).title);
|
||||
}, [location.pathname]);
|
||||
|
||||
if (location.pathname === "/portal" && shouldPreferMobileWorkplace()) {
|
||||
return <Navigate to="/mobile" replace />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="relative flex min-h-screen overflow-hidden bg-[var(--color-bg-canvas)]">
|
||||
<div className="pointer-events-none fixed inset-0 -z-10 bg-[radial-gradient(circle_at_12%_8%,rgba(0,57,138,0.10),transparent_28rem),radial-gradient(circle_at_90%_12%,rgba(19,168,184,0.12),transparent_32rem)]" />
|
||||
|
||||
@@ -3,33 +3,18 @@ import { AppBrand } from "../components/shell/AppBrand";
|
||||
|
||||
export function AuthLayout() {
|
||||
return (
|
||||
<div className="min-h-screen bg-[radial-gradient(circle_at_14%_0%,rgba(0,57,138,0.12),transparent_32rem),radial-gradient(circle_at_86%_8%,rgba(19,168,184,0.12),transparent_30rem),linear-gradient(180deg,#ffffff_0%,#f5f7f8_42%,#eef2f6_100%)] px-6 py-10 lg:px-10 lg:py-14">
|
||||
<div className="mx-auto grid min-h-[calc(100vh-5rem)] max-w-6xl items-center gap-8 lg:grid-cols-[minmax(0,1.05fr),minmax(420px,0.95fr)]">
|
||||
<section className="hidden overflow-hidden rounded-[2rem] border border-slate-200 bg-white/82 p-10 shadow-sm backdrop-blur lg:block">
|
||||
<div className="min-h-screen bg-slate-50 px-4 py-8 sm:px-6 lg:px-10">
|
||||
<div className="mx-auto flex min-h-[calc(100vh-4rem)] max-w-5xl items-center justify-center">
|
||||
<section className="hidden w-full max-w-sm lg:block">
|
||||
<AppBrand />
|
||||
<div className="mt-8 space-y-6">
|
||||
<div>
|
||||
<div className="text-xs font-bold uppercase tracking-[0.2em] text-primary">统一入口</div>
|
||||
<h1 className="mt-2 text-4xl font-semibold tracking-tight text-slate-900">让员工先找到今天要做什么</h1>
|
||||
<p className="mt-3 max-w-xl text-base leading-7 text-slate-600">
|
||||
企业微信负责进入和提醒,真正的审批、项目、周报与留痕都在 OA 内完成。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-2">
|
||||
<div className="surface-muted px-5 py-5">
|
||||
<div className="text-sm font-semibold text-slate-900">主路径稳定</div>
|
||||
<div className="mt-2 text-sm leading-6 text-slate-600">Portal、团队、请假、报销、资产、周报、待办、公告、项目保持稳定结构。</div>
|
||||
</div>
|
||||
<div className="surface-muted px-5 py-5">
|
||||
<div className="text-sm font-semibold text-slate-900">入口可回退</div>
|
||||
<div className="mt-2 text-sm leading-6 text-slate-600">企业微信免登失败时仍可使用账号密码,不让员工猜测下一步。</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-8">
|
||||
<div className="text-xs font-bold uppercase tracking-[0.2em] text-primary">统一入口</div>
|
||||
<h1 className="mt-3 text-4xl font-semibold tracking-tight text-slate-900">海音达 OA</h1>
|
||||
<p className="mt-4 text-base leading-7 text-slate-600">打开后直接处理今天的审批、报销和团队事项。</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="mx-auto w-full max-w-xl">
|
||||
<section className="w-full max-w-md lg:ml-20">
|
||||
<Outlet />
|
||||
</section>
|
||||
</div>
|
||||
|
||||
在新工单中引用
屏蔽一个用户