ui(grades): mobile course cards + inline add/edit forms (table desktop-only), band row range-pill redesign
This commit is contained in:
@@ -221,27 +221,35 @@ function BandRow({ band, onSave, onDelete, onChange, onCancel, isNew }: {
|
|||||||
const dirty = isNew || JSON.stringify({ ...value, id: 0 }) !== JSON.stringify({ ...band, id: 0 });
|
const dirty = isNew || JSON.stringify({ ...value, id: 0 }) !== JSON.stringify({ ...band, id: 0 });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-wrap items-center gap-2 px-4 py-2">
|
<div className="px-4 py-3">
|
||||||
<input type="color" value={value.color} onChange={e => set({ color: e.target.value })}
|
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-2.5">
|
||||||
className="size-5 shrink-0 cursor-pointer rounded border border-line bg-surface" aria-label="颜色" />
|
<div className="flex items-center gap-2">
|
||||||
<Input className="w-[96px]" value={value.label} onChange={e => set({ label: e.target.value })} placeholder="等级名" />
|
<input type="color" value={value.color} onChange={e => set({ color: e.target.value })}
|
||||||
<span className="text-[12px] text-ink-3">分数</span>
|
className="size-6 shrink-0 cursor-pointer rounded border border-line bg-surface" aria-label="颜色" />
|
||||||
<Input type="number" className="num w-[72px]" value={String(value.min)} onChange={e => set({ min: Number(e.target.value) })} />
|
<Input className="min-w-0 flex-1 sm:w-[96px] sm:flex-none" value={value.label} onChange={e => set({ label: e.target.value })} placeholder="等级名" />
|
||||||
<span className="text-[12px] text-ink-3">至</span>
|
|
||||||
<Input type="number" className="num w-[72px]" value={String(value.max)} onChange={e => set({ max: Number(e.target.value) })} />
|
|
||||||
{isNew ? (
|
|
||||||
<>
|
|
||||||
<Button size="sm" variant="primary" onClick={() => onSave?.(value)}>添加</Button>
|
|
||||||
<Button size="sm" variant="ghost" onClick={() => onCancel?.()}>取消</Button>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<div className="ml-auto flex gap-1.5">
|
|
||||||
<Button size="sm" variant={dirty ? 'primary' : 'secondary'} disabled={!dirty} onClick={() => onSave?.(value)}>保存</Button>
|
|
||||||
<Button size="icon-sm" variant="ghost" aria-label="删除等级" onClick={() => onDelete?.()}>
|
|
||||||
<Trash2 size={13} />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
<div className="flex shrink-0 items-center gap-1.5 rounded-md border border-line bg-surface-2 px-2.5 py-1">
|
||||||
|
<span className="text-[11px] text-ink-3">分数</span>
|
||||||
|
<Input type="number" className="num h-6 w-[64px] border-0 bg-transparent p-0 text-right" value={String(value.min)} onChange={e => set({ min: Number(e.target.value) })} />
|
||||||
|
<span className="text-[11.5px] text-ink-3">—</span>
|
||||||
|
<Input type="number" className="num h-6 w-[64px] border-0 bg-transparent p-0" value={String(value.max)} onChange={e => set({ max: Number(e.target.value) })} />
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-1.5 sm:ml-auto">
|
||||||
|
{isNew ? (
|
||||||
|
<>
|
||||||
|
<Button size="sm" variant="primary" onClick={() => onSave?.(value)}>添加</Button>
|
||||||
|
<Button size="sm" variant="ghost" onClick={() => onCancel?.()}>取消</Button>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<Button size="sm" variant={dirty ? 'primary' : 'secondary'} disabled={!dirty} onClick={() => onSave?.(value)}>保存</Button>
|
||||||
|
<Button size="icon-sm" variant="ghost" aria-label="删除等级" onClick={() => onDelete?.()}>
|
||||||
|
<Trash2 size={13} />
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -296,7 +304,7 @@ function SemesterCard({ sem }: { sem: SemesterGrades }) {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<CardBody className="p-0">
|
<CardBody className="p-0">
|
||||||
<div className="overflow-x-auto">
|
<div className="hidden overflow-x-auto md:block">
|
||||||
<div className="-mx-1 overflow-x-auto px-1"><table className="w-full border-collapse text-[13px]">
|
<div className="-mx-1 overflow-x-auto px-1"><table className="w-full border-collapse text-[13px]">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -339,6 +347,34 @@ function SemesterCard({ sem }: { sem: SemesterGrades }) {
|
|||||||
</div>
|
</div>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
|
|
||||||
|
{/* 手机端:课程卡片列表 + 添加表单(表格在窄屏不可用) */}
|
||||||
|
<div className="divide-y divide-line border-t border-line md:hidden">
|
||||||
|
{sem.courses.map(c => editingId === c.id ? (
|
||||||
|
<MobileCourseEdit key={'e' + c.id} sem={sem} course={c} onDone={() => setEditingId(null)} />
|
||||||
|
) : (
|
||||||
|
<div key={c.id} className="p-3">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<span className="min-w-0 flex-1 truncate text-[13px] font-medium text-ink-1">{c.course_name}</span>
|
||||||
|
{c.band && <Badge color={c.band.color}>{c.band.label}</Badge>}
|
||||||
|
</div>
|
||||||
|
<div className="num mt-1 flex flex-wrap gap-x-3 text-[11.5px] text-ink-3">
|
||||||
|
<span>学分 {c.credit}</span>
|
||||||
|
<span>分数 {c.score ?? '—'}</span>
|
||||||
|
<span>绩点 {c.grade_point ?? '—'}</span>
|
||||||
|
</div>
|
||||||
|
<div className="mt-2 flex gap-1.5">
|
||||||
|
<Button size="sm" variant="secondary" onClick={() => setEditingId(c.id)}>
|
||||||
|
<Pencil size={12} /> 编辑
|
||||||
|
</Button>
|
||||||
|
<Button size="sm" variant="ghost" className="text-ink-3 hover:text-danger" onClick={() => setDeleting(c)}>
|
||||||
|
<Trash2 size={12} /> 删除
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
<MobileCourseAdd sem={sem} />
|
||||||
|
</div>
|
||||||
|
|
||||||
<Confirm
|
<Confirm
|
||||||
open={!!deleting}
|
open={!!deleting}
|
||||||
title="删除课程"
|
title="删除课程"
|
||||||
@@ -427,6 +463,73 @@ function CourseEditRow({ sem, course, onDone }: { sem: SemesterGrades; course: C
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ---------- 手机端课程表单 ----------
|
||||||
|
function MobileCourseAdd({ sem }: { sem: SemesterGrades }) {
|
||||||
|
const qc = useQueryClient();
|
||||||
|
const toast = useToast();
|
||||||
|
const [name, setName] = useState('');
|
||||||
|
const [credit, setCredit] = useState('');
|
||||||
|
const [score, setScore] = useState('');
|
||||||
|
const [gp, setGp] = useState('');
|
||||||
|
const saveMut = useMutation({
|
||||||
|
mutationFn: () => courseUpsert({
|
||||||
|
semester_id: sem.id, course_name: name, credit: Number(credit) || 0,
|
||||||
|
score: score === '' ? null : Number(score), grade_point: gp === '' ? null : Number(gp)
|
||||||
|
}),
|
||||||
|
onSuccess: () => {
|
||||||
|
setName(''); setCredit(''); setScore(''); setGp('');
|
||||||
|
void qc.invalidateQueries({ queryKey: ['grades'] });
|
||||||
|
toast('success', '课程已添加');
|
||||||
|
},
|
||||||
|
onError: (e: Error) => toast('error', e.message)
|
||||||
|
});
|
||||||
|
return (
|
||||||
|
<div className="p-3">
|
||||||
|
<Input className="mb-2" placeholder="课程名称" value={name} onChange={e => setName(e.target.value)} />
|
||||||
|
<div className="mb-2 grid grid-cols-3 gap-2">
|
||||||
|
<Input type="number" step="0.5" placeholder="学分" value={credit} onChange={e => setCredit(e.target.value)} />
|
||||||
|
<Input type="number" placeholder="分数" value={score} onChange={e => setScore(e.target.value)} />
|
||||||
|
<Input type="number" step="0.1" placeholder="绩点" value={gp} onChange={e => setGp(e.target.value)} />
|
||||||
|
</div>
|
||||||
|
<Button size="sm" variant="primary" disabled={!name.trim() || saveMut.isPending} onClick={() => saveMut.mutate()}>
|
||||||
|
<Plus size={13} /> 添加课程
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function MobileCourseEdit({ sem, course, onDone }: { sem: SemesterGrades; course: CourseGrade; onDone: () => void }) {
|
||||||
|
const qc = useQueryClient();
|
||||||
|
const toast = useToast();
|
||||||
|
const [name, setName] = useState(course.course_name);
|
||||||
|
const [credit, setCredit] = useState(String(course.credit));
|
||||||
|
const [score, setScore] = useState(course.score != null ? String(course.score) : '');
|
||||||
|
const [gp, setGp] = useState(course.grade_point != null ? String(course.grade_point) : '');
|
||||||
|
const saveMut = useMutation({
|
||||||
|
mutationFn: () => courseUpsert({
|
||||||
|
id: course.id, semester_id: sem.id, course_name: name, credit: Number(credit) || 0,
|
||||||
|
score: score === '' ? null : Number(score), grade_point: gp === '' ? null : Number(gp)
|
||||||
|
}),
|
||||||
|
onSuccess: () => { void qc.invalidateQueries({ queryKey: ['grades'] }); onDone(); },
|
||||||
|
onError: (e: Error) => toast('error', e.message)
|
||||||
|
});
|
||||||
|
return (
|
||||||
|
<div className="bg-brand-subtle/40 p-3">
|
||||||
|
<Input className="mb-2" placeholder="课程名称" value={name} onChange={e => setName(e.target.value)} />
|
||||||
|
<div className="mb-2 grid grid-cols-3 gap-2">
|
||||||
|
<Input type="number" step="0.5" placeholder="学分" value={credit} onChange={e => setCredit(e.target.value)} />
|
||||||
|
<Input type="number" placeholder="分数" value={score} onChange={e => setScore(e.target.value)} />
|
||||||
|
<Input type="number" step="0.1" placeholder="绩点" value={gp} onChange={e => setGp(e.target.value)} />
|
||||||
|
</div>
|
||||||
|
<div className="flex gap-1.5">
|
||||||
|
<Button size="sm" variant="primary" onClick={() => saveMut.mutate()}>保存</Button>
|
||||||
|
<Button size="sm" variant="ghost" onClick={onDone}>取消</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// ---------- 学期编辑 ----------
|
// ---------- 学期编辑 ----------
|
||||||
function AddSemesterButton() {
|
function AddSemesterButton() {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|||||||
+3
-3
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
|||||||
import{r as g,f as v,j as t,S as j,t as S}from"./index-yYJRbh_G.js";import{C as c,a as d,b as x}from"./card-Cwi7grRh.js";import{u as N,i as u,a as m}from"./useChart-3bfbje5A.js";import{u as k,i as w,a as C,b as L,c as R,d as $,e as z,f as T}from"./echarts-BIWefrIc.js";k([w,C,L,R,$,z,T]);function q(){const[l,n]=g.useState(""),i=N(),e=v({queryKey:["stats",l||void 0],queryFn:()=>S(l?Number(l):void 0)}).data,p=u("2"),r=u("3"),h=m(()=>({grid:{left:34,right:12,top:14,bottom:24},tooltip:{trigger:"axis"},xAxis:{type:"category",data:(e==null?void 0:e.monthly.map(a=>a.ym.slice(2)))??[],axisLine:{lineStyle:{color:r}},axisTick:{show:!1},axisLabel:{color:r,fontSize:10}},yAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},series:[{type:"bar",data:(e==null?void 0:e.monthly.map(a=>a.count))??[],barMaxWidth:18,itemStyle:{color:"#3056d3",borderRadius:[3,3,0,0]}}]}),[e,i]),b=m(()=>{const a=((e==null?void 0:e.by_type)??[]).filter(s=>s.count>0);return{tooltip:{trigger:"item"},legend:{orient:"vertical",right:4,top:"middle",textStyle:{color:p,fontSize:11},itemWidth:10,itemHeight:10},series:[{type:"pie",radius:["48%","72%"],center:["34%","50%"],label:{show:!1},data:a.map(s=>({name:s.label,value:s.count,itemStyle:{color:s.color||"#64748b"}}))}]}},[e,i]),y=m(()=>{const a=((e==null?void 0:e.by_level)??[]).filter(s=>s.count>0).slice().reverse();return{grid:{left:64,right:24,top:8,bottom:22},tooltip:{trigger:"axis"},xAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},yAxis:{type:"category",data:a.map(s=>s.label),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:p,fontSize:11}},series:[{type:"bar",data:a.map(s=>({value:s.count,itemStyle:{color:s.color||"#3056d3",borderRadius:[0,3,3,0]}})),barMaxWidth:14}]}},[e,i]),f=((e==null?void 0:e.metrics)??[]).slice(0,3);return t.jsxs("div",{className:"mx-auto max-w-[1080px] px-3 py-4 sm:px-6 sm:py-5",children:[t.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-wrap gap-3",children:[t.jsx(o,{label:"总记录",value:(e==null?void 0:e.total)??0}),t.jsx(o,{label:l?l+" 年新增":"本年新增",value:(e==null?void 0:e.total_this_year)??0}),t.jsx(o,{label:"附件总数",value:(e==null?void 0:e.attachment_total)??0}),f.map(a=>t.jsx(o,{label:a.label,value:a.value,unit:a.unit??""},a.key))]}),t.jsx(j,{className:"w-[120px]",value:l,onChange:a=>n(a.target.value),options:[{value:"",label:"全部年份"},...((e==null?void 0:e.years)??[]).map(a=>({value:String(a),label:a+" 年"}))]})]}),!(e!=null&&e.metrics.length)&&t.jsx("div",{className:"mb-4 rounded-md border border-dashed border-line px-4 py-2 text-[12px] text-ink-3",children:"提示:在「统计」配置中注册指标(如志愿时长、读书本数),带单位的数值字段即可在此量化展示。"}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[t.jsxs(c,{children:[t.jsx(d,{title:"近 12 个月活跃度"}),t.jsx(x,{children:t.jsx("div",{ref:h,className:"h-[220px]"})})]}),t.jsxs(c,{children:[t.jsx(d,{title:"类型分布"}),t.jsx(x,{children:t.jsx("div",{ref:b,className:"h-[220px]"})})]}),t.jsxs(c,{className:"lg:col-span-2",children:[t.jsx(d,{title:"级别分布"}),t.jsx(x,{children:t.jsx("div",{ref:y,className:"h-[200px]"})})]})]})]})}function o({label:l,value:n,unit:i}){return t.jsxs("div",{className:"min-w-[120px] rounded-lg border border-line bg-surface px-4 py-3 shadow-card",children:[t.jsx("div",{className:"text-[12px] text-ink-3",children:l}),t.jsxs("div",{className:"num mt-0.5 text-[22px] font-semibold leading-tight text-ink-1",children:[n,i&&t.jsx("span",{className:"ml-1 text-[12px] font-normal text-ink-3",children:i})]})]})}export{q as DashboardPage};
|
import{r as g,f as v,j as t,S as j,t as S}from"./index-Cb8z4-1W.js";import{C as c,a as d,b as x}from"./card-h3_E-Tuy.js";import{u as N,i as u,a as m}from"./useChart-BQAcvE10.js";import{u as k,i as w,a as C,b as L,c as R,d as $,e as z,f as T}from"./echarts-BIWefrIc.js";k([w,C,L,R,$,z,T]);function q(){const[l,n]=g.useState(""),i=N(),e=v({queryKey:["stats",l||void 0],queryFn:()=>S(l?Number(l):void 0)}).data,p=u("2"),r=u("3"),h=m(()=>({grid:{left:34,right:12,top:14,bottom:24},tooltip:{trigger:"axis"},xAxis:{type:"category",data:(e==null?void 0:e.monthly.map(a=>a.ym.slice(2)))??[],axisLine:{lineStyle:{color:r}},axisTick:{show:!1},axisLabel:{color:r,fontSize:10}},yAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},series:[{type:"bar",data:(e==null?void 0:e.monthly.map(a=>a.count))??[],barMaxWidth:18,itemStyle:{color:"#3056d3",borderRadius:[3,3,0,0]}}]}),[e,i]),b=m(()=>{const a=((e==null?void 0:e.by_type)??[]).filter(s=>s.count>0);return{tooltip:{trigger:"item"},legend:{orient:"vertical",right:4,top:"middle",textStyle:{color:p,fontSize:11},itemWidth:10,itemHeight:10},series:[{type:"pie",radius:["48%","72%"],center:["34%","50%"],label:{show:!1},data:a.map(s=>({name:s.label,value:s.count,itemStyle:{color:s.color||"#64748b"}}))}]}},[e,i]),y=m(()=>{const a=((e==null?void 0:e.by_level)??[]).filter(s=>s.count>0).slice().reverse();return{grid:{left:64,right:24,top:8,bottom:22},tooltip:{trigger:"axis"},xAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},yAxis:{type:"category",data:a.map(s=>s.label),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:p,fontSize:11}},series:[{type:"bar",data:a.map(s=>({value:s.count,itemStyle:{color:s.color||"#3056d3",borderRadius:[0,3,3,0]}})),barMaxWidth:14}]}},[e,i]),f=((e==null?void 0:e.metrics)??[]).slice(0,3);return t.jsxs("div",{className:"mx-auto max-w-[1080px] px-3 py-4 sm:px-6 sm:py-5",children:[t.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-wrap gap-3",children:[t.jsx(o,{label:"总记录",value:(e==null?void 0:e.total)??0}),t.jsx(o,{label:l?l+" 年新增":"本年新增",value:(e==null?void 0:e.total_this_year)??0}),t.jsx(o,{label:"附件总数",value:(e==null?void 0:e.attachment_total)??0}),f.map(a=>t.jsx(o,{label:a.label,value:a.value,unit:a.unit??""},a.key))]}),t.jsx(j,{className:"w-[120px]",value:l,onChange:a=>n(a.target.value),options:[{value:"",label:"全部年份"},...((e==null?void 0:e.years)??[]).map(a=>({value:String(a),label:a+" 年"}))]})]}),!(e!=null&&e.metrics.length)&&t.jsx("div",{className:"mb-4 rounded-md border border-dashed border-line px-4 py-2 text-[12px] text-ink-3",children:"提示:在「统计」配置中注册指标(如志愿时长、读书本数),带单位的数值字段即可在此量化展示。"}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[t.jsxs(c,{children:[t.jsx(d,{title:"近 12 个月活跃度"}),t.jsx(x,{children:t.jsx("div",{ref:h,className:"h-[220px]"})})]}),t.jsxs(c,{children:[t.jsx(d,{title:"类型分布"}),t.jsx(x,{children:t.jsx("div",{ref:b,className:"h-[220px]"})})]}),t.jsxs(c,{className:"lg:col-span-2",children:[t.jsx(d,{title:"级别分布"}),t.jsx(x,{children:t.jsx("div",{ref:y,className:"h-[200px]"})})]})]})]})}function o({label:l,value:n,unit:i}){return t.jsxs("div",{className:"min-w-[120px] rounded-lg border border-line bg-surface px-4 py-3 shadow-card",children:[t.jsx("div",{className:"text-[12px] text-ink-3",children:l}),t.jsxs("div",{className:"num mt-0.5 text-[22px] font-semibold leading-tight text-ink-1",children:[n,i&&t.jsx("span",{className:"ml-1 text-[12px] font-normal text-ink-3",children:i})]})]})}export{q as DashboardPage};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import{c as fe,j as e,a as N,r as s,b as he,u as ve,d as ge,e as je,f as L,g as ye,I as be,S as k,B as w,P as Q,h as te,L as se,G as ae,R as Ne,i as ne,k as ke,l as we,T as Ce,E as le,m as Ee,n as Se,o as _e,C as ze,p as qe,q as Le,s as Re,t as De,v as Ie}from"./index-yYJRbh_G.js";/**
|
import{c as fe,j as e,a as N,r as s,b as he,u as ve,d as ge,e as je,f as L,g as ye,I as be,S as k,B as w,P as Q,h as te,L as se,G as ae,R as Ne,i as ne,k as ke,l as we,T as Ce,E as le,m as Ee,n as Se,o as _e,C as ze,p as qe,q as Le,s as Re,t as De,v as Ie}from"./index-Cb8z4-1W.js";/**
|
||||||
* @license lucide-react v0.475.0 - ISC
|
* @license lucide-react v0.475.0 - ISC
|
||||||
*
|
*
|
||||||
* This source code is licensed under the ISC license.
|
* This source code is licensed under the ISC license.
|
||||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import{c as D,u as K,d as F,f as L,r,g as I,j as e,B as p,P as q,M as O,m as _,l as H,T as P,C as R,N as G,F as U,H as i,I as j,O as W,S as z,Q as J,U as V,q as X}from"./index-yYJRbh_G.js";import{C as Y}from"./card-Cwi7grRh.js";/**
|
import{c as D,u as K,d as F,f as L,r,g as I,j as e,B as p,P as q,M as O,m as _,l as H,T as P,C as R,N as G,F as U,H as i,I as j,O as W,S as z,Q as J,U as V,q as X}from"./index-Cb8z4-1W.js";import{C as Y}from"./card-h3_E-Tuy.js";/**
|
||||||
* @license lucide-react v0.475.0 - ISC
|
* @license lucide-react v0.475.0 - ISC
|
||||||
*
|
*
|
||||||
* This source code is licensed under the ISC license.
|
* This source code is licensed under the ISC license.
|
||||||
@@ -1 +1 @@
|
|||||||
import{j as s,a}from"./index-yYJRbh_G.js";function i({className:r,...e}){return s.jsx("div",{className:a("rounded-lg border border-line bg-surface shadow-card",r),...e})}function t({title:r,extra:e,className:n}){return s.jsxs("div",{className:a("flex min-h-11 flex-wrap items-center justify-between gap-2 border-b border-line px-4 py-1.5",n),children:[s.jsx("h3",{className:"text-[13px] font-semibold text-ink-1",children:r}),e&&s.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e})]})}function c({className:r,...e}){return s.jsx("div",{className:a("p-4",r),...e})}export{i as C,t as a,c as b};
|
import{j as s,a}from"./index-Cb8z4-1W.js";function i({className:r,...e}){return s.jsx("div",{className:a("rounded-lg border border-line bg-surface shadow-card",r),...e})}function t({title:r,extra:e,className:n}){return s.jsxs("div",{className:a("flex min-h-11 flex-wrap items-center justify-between gap-2 border-b border-line px-4 py-1.5",n),children:[s.jsx("h3",{className:"text-[13px] font-semibold text-ink-1",children:r}),e&&s.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e})]})}function c({className:r,...e}){return s.jsx("div",{className:a("p-4",r),...e})}export{i as C,t as a,c as b};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
|||||||
import{r}from"./index-yYJRbh_G.js";import{g as f}from"./echarts-BIWefrIc.js";function p(){const[n,o]=r.useState(0);return r.useEffect(()=>{const s=()=>o(t=>t+1);return window.addEventListener("fp-theme-change",s),()=>window.removeEventListener("fp-theme-change",s)},[]),n}function d(n){return getComputedStyle(document.documentElement).getPropertyValue("--text-"+n).trim()||"#454e5c"}function h(n,o){const s=r.useRef(null),[t,i]=r.useState(null),u=r.useRef(n);return u.current=n,r.useEffect(()=>{if(!t)return;const e=f(t);s.current=e,e.setOption(u.current(),{notMerge:!0});const c=new ResizeObserver(()=>e.resize());return c.observe(t),()=>{c.disconnect(),e.dispose(),s.current=null}},[t]),r.useEffect(()=>{var e;(e=s.current)==null||e.setOption(u.current(),{notMerge:!0})},[t,...o]),e=>i(e)}export{h as a,d as i,p as u};
|
import{r}from"./index-Cb8z4-1W.js";import{g as f}from"./echarts-BIWefrIc.js";function p(){const[n,o]=r.useState(0);return r.useEffect(()=>{const s=()=>o(t=>t+1);return window.addEventListener("fp-theme-change",s),()=>window.removeEventListener("fp-theme-change",s)},[]),n}function d(n){return getComputedStyle(document.documentElement).getPropertyValue("--text-"+n).trim()||"#454e5c"}function h(n,o){const s=r.useRef(null),[t,i]=r.useState(null),u=r.useRef(n);return u.current=n,r.useEffect(()=>{if(!t)return;const e=f(t);s.current=e,e.setOption(u.current(),{notMerge:!0});const c=new ResizeObserver(()=>e.resize());return c.observe(t),()=>{c.disconnect(),e.dispose(),s.current=null}},[t]),r.useEffect(()=>{var e;(e=s.current)==null||e.setOption(u.current(),{notMerge:!0})},[t,...o]),e=>i(e)}export{h as a,d as i,p as u};
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
<link rel="icon" href="/icons/pwa-192.png" />
|
<link rel="icon" href="/icons/pwa-192.png" />
|
||||||
<link rel="apple-touch-icon" href="/icons/pwa-192.png" />
|
<link rel="apple-touch-icon" href="/icons/pwa-192.png" />
|
||||||
<title>足迹 Footprints</title>
|
<title>足迹 Footprints</title>
|
||||||
<script type="module" crossorigin src="/assets/index-yYJRbh_G.js"></script>
|
<script type="module" crossorigin src="/assets/index-Cb8z4-1W.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DepAdlgM.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-9mJzSLEA.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user