This commit is contained in:
Generated
+660
-650
File diff suppressed because it is too large
Load Diff
@@ -229,8 +229,7 @@
|
||||
<CopyIcon class="w-4 h-4" />
|
||||
复制
|
||||
</button>
|
||||
<button @click="showPreview = false"
|
||||
class="p-1.5 rounded-lg transition duration-300 hover:bg-opacity-10"
|
||||
<button @click="showPreview = false" class="p-1.5 rounded-lg transition duration-300 hover:bg-opacity-10"
|
||||
:class="[
|
||||
isDarkMode
|
||||
? 'text-gray-400 hover:text-white hover:bg-white'
|
||||
@@ -241,13 +240,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 overflow-y-auto custom-scrollbar">
|
||||
<div class="prose max-w-none p-6 rounded-xl"
|
||||
:class="[
|
||||
<div class="prose max-w-none p-6 rounded-xl" :class="[
|
||||
isDarkMode
|
||||
? 'prose-invert bg-gray-900 bg-opacity-50'
|
||||
: 'bg-gray-50'
|
||||
]"
|
||||
v-html="renderedContent">
|
||||
]" v-html="renderedContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -515,6 +512,7 @@ const showContentPreview = () => {
|
||||
|
||||
<style scoped>
|
||||
@keyframes blob {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: translate(0, 0) scale(1);
|
||||
|
||||
@@ -638,7 +638,8 @@ const handlePaste = async (event: ClipboardEvent) => {
|
||||
const items = event.clipboardData?.items
|
||||
if (!items) return
|
||||
|
||||
for (const item of items) {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i]
|
||||
if (item.kind === 'file') {
|
||||
const file = item.getAsFile()
|
||||
if (file) {
|
||||
@@ -762,6 +763,40 @@ const getUnit = (value: string = expirationMethod.value) => {
|
||||
}
|
||||
}
|
||||
|
||||
const getExpirationTime = (method: string, value: string) => {
|
||||
if (method === 'forever') {
|
||||
return '永久'
|
||||
}
|
||||
if (method === 'count') {
|
||||
return `${value}次后过期`
|
||||
}
|
||||
|
||||
const now = new Date()
|
||||
const expireValue = parseInt(value)
|
||||
|
||||
switch (method) {
|
||||
case 'minute':
|
||||
now.setMinutes(now.getMinutes() + expireValue)
|
||||
break
|
||||
case 'hour':
|
||||
now.setHours(now.getHours() + expireValue)
|
||||
break
|
||||
case 'day':
|
||||
now.setDate(now.getDate() + expireValue)
|
||||
break
|
||||
default:
|
||||
return `${value}${getUnit(method)}后过期`
|
||||
}
|
||||
|
||||
const year = now.getFullYear()
|
||||
const month = (now.getMonth() + 1).toString().padStart(2, '0')
|
||||
const day = now.getDate().toString().padStart(2, '0')
|
||||
const hours = now.getHours().toString().padStart(2, '0')
|
||||
const minutes = now.getMinutes().toString().padStart(2, '0')
|
||||
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}过期`
|
||||
}
|
||||
|
||||
const handleChunkUpload = async (file: File) => {
|
||||
try {
|
||||
// 默认切片大小为5MB
|
||||
@@ -959,7 +994,7 @@ const handleSubmit = async () => {
|
||||
expiration:
|
||||
expirationMethod.value === 'forever'
|
||||
? '永久'
|
||||
: `${expirationValue.value}${getUnit()}后过期`,
|
||||
: getExpirationTime(expirationMethod.value, expirationValue.value),
|
||||
retrieveCode: retrieveCode
|
||||
}
|
||||
fileDataStore.addShareData(newRecord)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<h2 class="text-2xl font-bold mb-6" :class="[isDarkMode ? 'text-white' : 'text-gray-800']">
|
||||
仪表盘
|
||||
</h2>
|
||||
|
||||
<!-- 统计卡片区域 -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
|
||||
<div class="p-6 rounded-lg shadow-md transition-colors duration-300"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"moduleResolution": "bundler",
|
||||
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
|
||||
Reference in New Issue
Block a user