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