mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-12 10:16:37 +08:00
[优化] 界面优化
This commit is contained in:
@@ -9,11 +9,7 @@ import { LoadingState } from '@/components/feedback/loading-state';
|
|||||||
import {AppCard} from '@/components/ui/app-card';
|
import {AppCard} from '@/components/ui/app-card';
|
||||||
import {AppModal} from '@/components/ui/app-modal';
|
import {AppModal} from '@/components/ui/app-modal';
|
||||||
import {StatusBadge} from '@/components/ui/status-badge';
|
import {StatusBadge} from '@/components/ui/status-badge';
|
||||||
import type {
|
import type {LatestReleaseInfo, ReleaseChannel, UploadedServerBinaryInfo,} from '@/features/update/types';
|
||||||
LatestReleaseInfo,
|
|
||||||
ReleaseChannel,
|
|
||||||
UploadedServerBinaryInfo,
|
|
||||||
} from '@/features/update/types';
|
|
||||||
import {
|
import {
|
||||||
PrimaryButton,
|
PrimaryButton,
|
||||||
ResourceField,
|
ResourceField,
|
||||||
@@ -109,12 +105,8 @@ export function VersionUpgradeModal({
|
|||||||
size="lg"
|
size="lg"
|
||||||
>
|
>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<div className="grid gap-4 md:grid-cols-2 xl:grid-cols-4">
|
<div className="grid gap-4 md:grid-cols-2 xl:grid-cols-2">
|
||||||
<AppCard title="前端版本">
|
|
||||||
<p className="text-sm font-medium text-[var(--foreground-primary)]">
|
|
||||||
{frontendVersion}
|
|
||||||
</p>
|
|
||||||
</AppCard>
|
|
||||||
<AppCard title="服务端版本">
|
<AppCard title="服务端版本">
|
||||||
<div className="flex flex-wrap items-center gap-3">
|
<div className="flex flex-wrap items-center gap-3">
|
||||||
<p className="text-sm font-medium text-[var(--foreground-primary)]">
|
<p className="text-sm font-medium text-[var(--foreground-primary)]">
|
||||||
@@ -126,23 +118,16 @@ export function VersionUpgradeModal({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</AppCard>
|
</AppCard>
|
||||||
|
|
||||||
<AppCard title="最新版本">
|
<AppCard title="最新版本">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="flex flex-wrap items-center gap-3">
|
<div className="flex flex-wrap items-center gap-3">
|
||||||
<p className="text-sm font-medium text-[var(--foreground-primary)]">
|
<p className="text-sm font-medium text-[var(--foreground-primary)]">
|
||||||
{release?.tag_name || '未检查'}
|
{release?.tag_name || '未检查'}
|
||||||
</p>
|
</p>
|
||||||
<StatusBadge
|
|
||||||
label={selectedChannelLabel}
|
|
||||||
variant={selectedChannel === 'preview' ? 'warning' : 'info'}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{canUpgrade ? (
|
{canUpgrade ? (
|
||||||
<div className="flex flex-wrap items-center justify-between gap-3">
|
<div className="flex flex-wrap items-center justify-between gap-3">
|
||||||
<div className="flex flex-wrap items-center gap-2">
|
<div className="flex flex-wrap items-center gap-2">
|
||||||
<span className="text-xs text-[var(--foreground-secondary)]">
|
|
||||||
点击标签切换通道
|
|
||||||
</span>
|
|
||||||
<StatusBadge
|
<StatusBadge
|
||||||
label={selectedChannelLabel}
|
label={selectedChannelLabel}
|
||||||
variant={
|
variant={
|
||||||
@@ -152,6 +137,9 @@ export function VersionUpgradeModal({
|
|||||||
disabled={isChecking || isUpgrading || isUploadingBinary}
|
disabled={isChecking || isUpgrading || isUploadingBinary}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
<SecondaryButton
|
<SecondaryButton
|
||||||
type="button"
|
type="button"
|
||||||
onClick={onCheck}
|
onClick={onCheck}
|
||||||
@@ -161,8 +149,6 @@ export function VersionUpgradeModal({
|
|||||||
{isChecking ? '检查中...' : '检查'}
|
{isChecking ? '检查中...' : '检查'}
|
||||||
</SecondaryButton>
|
</SecondaryButton>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
</AppCard>
|
</AppCard>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -224,6 +210,7 @@ export function VersionUpgradeModal({
|
|||||||
</a>
|
</a>
|
||||||
{canUpgrade ? (
|
{canUpgrade ? (
|
||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
|
|
||||||
<PrimaryButton
|
<PrimaryButton
|
||||||
type="button"
|
type="button"
|
||||||
onClick={onUpgrade}
|
onClick={onUpgrade}
|
||||||
@@ -311,13 +298,15 @@ export function VersionUpgradeModal({
|
|||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{!manualErrorMessage && manualStatusMessage ? (
|
{!manualErrorMessage && manualStatusMessage ? (
|
||||||
<div className="rounded-2xl border border-[var(--status-warning-border)] bg-[var(--status-warning-soft)] px-4 py-3 text-sm text-[var(--status-warning-foreground)]">
|
<div
|
||||||
|
className="rounded-2xl border border-[var(--status-warning-border)] bg-[var(--status-warning-soft)] px-4 py-3 text-sm text-[var(--status-warning-foreground)]">
|
||||||
{manualStatusMessage}
|
{manualStatusMessage}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{uploadedBinary ? (
|
{uploadedBinary ? (
|
||||||
<div className="space-y-4 rounded-3xl border border-[var(--border-default)] bg-[var(--surface-elevated)] p-4">
|
<div
|
||||||
|
className="space-y-4 rounded-3xl border border-[var(--border-default)] bg-[var(--surface-elevated)] p-4">
|
||||||
<div className="flex flex-wrap items-center gap-3">
|
<div className="flex flex-wrap items-center gap-3">
|
||||||
<StatusBadge
|
<StatusBadge
|
||||||
label={
|
label={
|
||||||
|
|||||||
Reference in New Issue
Block a user