统一公共收发页面外壳

This commit is contained in:
orion committed 2026-09-11 09:07:39 +08:00
1 parent b2e1928898
commit 1f85404586
3 files changed
+36 -42

No files matched your search

+18
View File
@@ -12,6 +12,24 @@ body {
font-family: inherit;
}
/* Shared shell for the public send/retrieve flows. Keep these pages visually
related without coupling their form behavior or pickup-code handling. */
.public-page-shell {
width: 100%;
}
.public-page-card {
border-color: rgba(191, 208, 211, 0.72);
background: rgba(255, 255, 255, 0.94);
box-shadow: 0 10px 26px rgba(128, 151, 155, 0.18);
}
.dark .public-page-card {
border-color: rgba(68, 86, 94, 0.82);
background: rgba(34, 49, 56, 0.94);
box-shadow: 0 16px 36px rgba(4, 10, 14, 0.34);
}
:focus-visible {
outline: 3px solid rgba(95, 135, 150, 0.78);
outline-offset: 3px;
+4 -4
View File
@@ -1,17 +1,17 @@
<template>
<div
class="min-h-[100dvh] flex items-center justify-center overflow-x-hidden overflow-y-auto px-4 pb-6 pt-24 transition-colors duration-300 sm:py-4"
class="public-page-shell min-h-[100dvh] flex items-center justify-center overflow-x-hidden overflow-y-auto px-3 pb-4 pt-24 transition-colors duration-300 sm:px-4 sm:py-4"
>
<div class="w-full max-w-md relative z-10">
<div class="relative z-10 w-full max-w-md">
<div
class="rounded-3xl shadow-2xl overflow-hidden border transform transition-all duration-300"
class="public-page-card rounded-3xl shadow-2xl overflow-hidden border transform transition-all duration-300"
:class="[
isDarkMode
? 'bg-gray-800 bg-opacity-50 backdrop-filter backdrop-blur-xl border-gray-700'
: 'bg-white border-gray-200'
]"
>
<div class="p-8">
<div class="p-5 sm:p-8">
<PageHeader :title="config.name" @title-click="toSend" />
<RetrieveForm
v-model="code"
+14 -38
View File
@@ -1,26 +1,26 @@
<template>
<div
class="min-h-[100dvh] flex items-center justify-center overflow-x-hidden overflow-y-auto px-4 pb-6 pt-24 transition-colors duration-300 sm:py-4"
class="public-page-shell min-h-[100dvh] flex items-center justify-center overflow-x-hidden overflow-y-auto px-3 pb-4 pt-24 transition-colors duration-300 sm:px-4 sm:py-4"
@paste.prevent="handlePaste"
>
<div
class="rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300"
class="public-page-card rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300"
:class="[
isDarkMode
? 'bg-white bg-opacity-10 backdrop-filter backdrop-blur-xl border-gray-700'
: 'bg-white border-gray-200'
]"
>
<div class="p-6 sm:p-8">
<div class="p-5 sm:p-8">
<PageHeader :title="config.name" @title-click="toRetrieve" />
<form @submit.prevent="handleSubmit" class="space-y-8">
<form @submit.prevent="handleSubmit" class="space-y-6 sm:space-y-8">
<SendTypeSelector
:selected-type="sendType"
@update:selected-type="sendType = $event"
/>
<transition name="fade" mode="out-in">
<div v-if="sendType === 'file'" key="file" class="grid grid-cols-1 gap-8">
<div v-if="sendType === 'file'" key="file" class="grid grid-cols-1 gap-6 sm:gap-8">
<FileUploadArea
class="payload-panel"
:selected-file="selectedFile"
@@ -37,7 +37,7 @@
@retry="handleSubmit"
/>
</div>
<div v-else key="text" class="grid grid-cols-1 gap-8">
<div v-else key="text" class="grid grid-cols-1 gap-6 sm:gap-8">
<TextInputArea
v-model="textContent"
class="payload-panel"
@@ -86,34 +86,13 @@
</span>
</button>
</form>
<div class="mt-6 text-center">
<router-link to="/" class="inline-flex min-h-11 items-center rounded-lg px-2 text-sm text-[#3f6a77] transition duration-200 hover:bg-[#dcebed] hover:text-[#315c69] dark:text-[#b8d4dc] dark:hover:bg-[#294047] sm:px-3 sm:text-base">
{{ t('send.needRetrieveFile') }}
</router-link>
</div>
</div>
<div
class="flex items-center justify-between gap-3 bg-opacity-50 px-4 py-3 sm:px-8 sm:py-4"
:class="[isDarkMode ? 'bg-gray-800' : 'bg-gray-100']"
>
<span
class="text-sm flex items-center"
:class="[isDarkMode ? 'text-gray-300' : 'text-gray-800']"
>
<ShieldCheckIcon class="w-4 h-4 mr-1 text-green-400" />
{{ t('send.secureEncryption') }}
</span>
<button
type="button"
@click="toggleDrawer"
class="flex min-h-11 items-center rounded-lg px-2 text-sm transition duration-200 hover:bg-indigo-50 dark:hover:bg-gray-700"
:class="[isDarkMode ? 'text-indigo-400' : 'text-indigo-600']"
>
{{ t('send.sendRecords') }}
<ClipboardListIcon class="w-4 h-4 ml-1" />
</button>
</div>
<PageFooter
:link-text="t('send.needRetrieveFile')"
link-to="/"
:drawer-text="t('send.sendRecords')"
@toggle-drawer="toggleDrawer"
/>
</div>
<SideDrawer :visible="showDrawer" :title="t('send.sendRecords')" @close="toggleDrawer">
@@ -140,12 +119,9 @@
import { inject } from 'vue'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import {
SendIcon,
ClipboardListIcon,
ShieldCheckIcon
} from 'lucide-vue-next'
import { SendIcon } from 'lucide-vue-next'
import PageHeader from '@/components/common/PageHeader.vue'
import PageFooter from '@/components/common/PageFooter.vue'
import SendTypeSelector from '@/components/common/SendTypeSelector.vue'
import FileUploadArea from '@/components/common/FileUploadArea.vue'
import ExpirationSelector from '@/components/common/ExpirationSelector.vue'