feat: 发布 0.2.8 版本
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
|
||||
const ANNOUNCEMENT_KEY = 'hasClosedAnnouncement_v18';
|
||||
const ANNOUNCEMENT_KEY = 'hasClosedAnnouncement_v19';
|
||||
|
||||
export default function Announcement() {
|
||||
const [isVisible, setIsVisible] = useState(false);
|
||||
@@ -75,14 +75,13 @@ export default function Announcement() {
|
||||
<span>公告</span>
|
||||
</div>
|
||||
<div style={{ color: 'var(--text)', lineHeight: '1.6', fontSize: '15px', overflowY: 'auto', minHeight: 0, flex: 1, paddingRight: '4px' }}>
|
||||
<p>v0.2.7 更新内容:</p>
|
||||
<p>1. 业绩走势增加对比线。</p>
|
||||
<p>2. 修复排序存储别名问题。</p>
|
||||
<p>3. PC端斑马纹 hover 样式问题。</p>
|
||||
<p>4. 修复大盘指数刷新及用户数据同步问题。</p>
|
||||
<p>v0.2.8 更新内容:</p>
|
||||
<p>1. 增加关联板块列。</p>
|
||||
<p>2. 设置持仓支持今日首次买入。</p>
|
||||
<p>3. 加仓自动获取费率。</p>
|
||||
<br/>
|
||||
<p>下一版本更新内容:</p>
|
||||
<p>1. 关联板块。</p>
|
||||
<p>1. 关联板块实时估值。</p>
|
||||
<p>2. 收益曲线。</p>
|
||||
<p>3. 估值差异列。</p>
|
||||
<p>如有建议和问题,欢迎进用户支持群反馈。</p>
|
||||
|
||||
@@ -1,33 +1,26 @@
|
||||
'use client';
|
||||
|
||||
import { motion } from 'framer-motion';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||||
import { UpdateIcon } from './Icons';
|
||||
|
||||
export default function UpdatePromptModal({ updateContent, onClose, onRefresh }) {
|
||||
export default function UpdatePromptModal({ updateContent, open, onClose, onRefresh }) {
|
||||
return (
|
||||
<motion.div
|
||||
className="modal-overlay"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label="更新提示"
|
||||
onClick={onClose}
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
style={{ zIndex: 10002 }}
|
||||
>
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.95, y: 20 }}
|
||||
animate={{ opacity: 1, scale: 1, y: 0 }}
|
||||
exit={{ opacity: 0, scale: 0.95, y: 20 }}
|
||||
className="glass card modal"
|
||||
<Dialog open={open} onOpenChange={(v) => !v && onClose?.()}>
|
||||
<DialogContent
|
||||
className="glass card"
|
||||
style={{ maxWidth: '400px' }}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
showCloseButton={false}
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label="更新提示"
|
||||
>
|
||||
<div className="title" style={{ marginBottom: 12 }}>
|
||||
<UpdateIcon width="20" height="20" style={{ color: 'var(--success)' }} />
|
||||
<span>更新提示</span>
|
||||
</div>
|
||||
<DialogHeader>
|
||||
<DialogTitle style={{ display: 'flex', alignItems: 'center', gap: 10, marginBottom: 12 }}>
|
||||
<UpdateIcon width="20" height="20" style={{ color: 'var(--success)' }} />
|
||||
<span>更新提示</span>
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
<div style={{ marginBottom: 24 }}>
|
||||
<p className="muted" style={{ fontSize: '14px', lineHeight: '1.6', marginBottom: 12 }}>
|
||||
检测到新版本,是否刷新浏览器以更新?
|
||||
@@ -36,7 +29,7 @@ export default function UpdatePromptModal({ updateContent, onClose, onRefresh })
|
||||
</p>
|
||||
{updateContent && (
|
||||
<div style={{
|
||||
background: 'rgba(0,0,0,0.2)',
|
||||
background: 'var(--card)',
|
||||
padding: '12px',
|
||||
borderRadius: '8px',
|
||||
fontSize: '13px',
|
||||
@@ -44,13 +37,14 @@ export default function UpdatePromptModal({ updateContent, onClose, onRefresh })
|
||||
maxHeight: '200px',
|
||||
overflowY: 'auto',
|
||||
whiteSpace: 'pre-wrap',
|
||||
border: '1px solid rgba(255,255,255,0.1)'
|
||||
border: '1px solid var(--border)'
|
||||
}}>
|
||||
{updateContent}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="row" style={{ gap: 12 }}>
|
||||
|
||||
<div className="flex-row" style={{ gap: 12, display: 'flex' }}>
|
||||
<button
|
||||
className="button secondary"
|
||||
onClick={onClose}
|
||||
@@ -66,7 +60,7 @@ export default function UpdatePromptModal({ updateContent, onClose, onRefresh })
|
||||
刷新浏览器
|
||||
</button>
|
||||
</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
15
app/page.jsx
15
app/page.jsx
@@ -4729,15 +4729,12 @@ export default function HomePage() {
|
||||
)}
|
||||
|
||||
{/* 更新提示弹窗 */}
|
||||
<AnimatePresence>
|
||||
{updateModalOpen && (
|
||||
<UpdatePromptModal
|
||||
updateContent={updateContent}
|
||||
onClose={() => setUpdateModalOpen(false)}
|
||||
onRefresh={() => window.location.reload()}
|
||||
/>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
<UpdatePromptModal
|
||||
open={updateModalOpen}
|
||||
updateContent={updateContent}
|
||||
onClose={() => setUpdateModalOpen(false)}
|
||||
onRefresh={() => window.location.reload()}
|
||||
/>
|
||||
|
||||
<AnimatePresence>
|
||||
{isScanning && (
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "real-time-fund",
|
||||
"version": "0.2.7",
|
||||
"version": "0.2.8",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "real-time-fund",
|
||||
"version": "0.2.7",
|
||||
"version": "0.2.8",
|
||||
"dependencies": {
|
||||
"@dicebear/collection": "^9.3.1",
|
||||
"@dicebear/core": "^9.3.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "real-time-fund",
|
||||
"version": "0.2.7",
|
||||
"version": "0.2.8",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
Reference in New Issue
Block a user