create-lupine 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +410 -411
- package/package.json +17 -17
- package/templates/common/.env.development +7 -7
- package/templates/common/.env.mobile +9 -9
- package/templates/common/.env.production +7 -7
- package/templates/common/_env +58 -58
- package/templates/common/_gitignore +25 -25
- package/templates/common/apps/server/src/index.ts +78 -76
- package/templates/common/apps/server/src/server-env-keys.ts +0 -9
- package/templates/common/dev/cp-folder.js +45 -45
- package/templates/common/tsconfig.json +128 -128
- package/templates/lupine-template-cv-starter/api/package.json +5 -5
- package/templates/lupine-template-cv-starter/api/resources/config_default.json +6 -6
- package/templates/lupine-template-cv-starter/api/resources/install.sqlite.sql +3 -3
- package/templates/lupine-template-cv-starter/api/src/index.ts +15 -15
- package/templates/lupine-template-cv-starter/lupine.json +40 -38
- package/templates/lupine-template-cv-starter/web/markdown/en/01-experience/index.md +32 -32
- package/templates/lupine-template-cv-starter/web/markdown/en/02-projects/index.md +36 -36
- package/templates/lupine-template-cv-starter/web/markdown/en/03-skills/index.md +28 -28
- package/templates/lupine-template-cv-starter/web/markdown/en/04-education/index.md +16 -16
- package/templates/lupine-template-cv-starter/web/markdown/en/index.md +41 -41
- package/templates/lupine-template-cv-starter/web/markdown/index.md +7 -7
- package/templates/lupine-template-cv-starter/web/markdown/zh/01-experience/index.md +32 -32
- package/templates/lupine-template-cv-starter/web/markdown/zh/02-projects/index.md +36 -36
- package/templates/lupine-template-cv-starter/web/markdown/zh/03-skills/index.md +28 -28
- package/templates/lupine-template-cv-starter/web/markdown/zh/04-education/index.md +17 -17
- package/templates/lupine-template-cv-starter/web/markdown/zh/index.md +41 -41
- package/templates/lupine-template-cv-starter/web/package.json +5 -5
- package/templates/lupine-template-cv-starter/web/src/client-env-keys.ts +5 -5
- package/templates/lupine-template-cv-starter/web/src/index.html +16 -16
- package/templates/lupine-template-cv-starter/web/src/index.tsx +28 -28
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/404.html +38 -38
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.html +73 -73
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.tsx +30 -30
- package/templates/lupine-template-cv-starter/web/src/markdown-built/en/01-experience/index.html +20 -20
- package/templates/lupine-template-cv-starter/web/src/markdown-built/en/02-projects/index.html +28 -28
- package/templates/lupine-template-cv-starter/web/src/markdown-built/en/03-skills/index.html +18 -18
- package/templates/lupine-template-cv-starter/web/src/markdown-built/en/04-education/index.html +10 -10
- package/templates/lupine-template-cv-starter/web/src/markdown-built/en/index.html +20 -20
- package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/01-experience/index.html +20 -20
- package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/02-projects/index.html +28 -28
- package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/03-skills/index.html +18 -18
- package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/04-education/index.html +11 -11
- package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/index.html +20 -20
- package/templates/lupine-template-cv-starter/web/src/styles/base-css.ts +15 -15
- package/templates/lupine-template-doc-starter/api/package.json +5 -5
- package/templates/lupine-template-doc-starter/api/resources/config_default.json +6 -6
- package/templates/lupine-template-doc-starter/api/resources/install.sqlite.sql +3 -3
- package/templates/lupine-template-doc-starter/api/src/index.ts +15 -15
- package/templates/lupine-template-doc-starter/api/src/resources/config_default.json +6 -6
- package/templates/lupine-template-doc-starter/api/src/resources/install.sqlite.sql +3 -3
- package/templates/lupine-template-doc-starter/lupine.json +40 -38
- package/templates/lupine-template-doc-starter/web/markdown/en/essentials/index.md +6 -6
- package/templates/lupine-template-doc-starter/web/markdown/en/essentials/list.md +18 -18
- package/templates/lupine-template-doc-starter/web/markdown/en/guide/install.md +18 -18
- package/templates/lupine-template-doc-starter/web/markdown/en/guide/started.md +22 -22
- package/templates/lupine-template-doc-starter/web/markdown/en/index.md +42 -42
- package/templates/lupine-template-doc-starter/web/markdown/index.md +7 -7
- package/templates/lupine-template-doc-starter/web/markdown/zh/essentials/index.md +6 -6
- package/templates/lupine-template-doc-starter/web/markdown/zh/essentials/list.md +18 -18
- package/templates/lupine-template-doc-starter/web/markdown/zh/guide/install.md +18 -18
- package/templates/lupine-template-doc-starter/web/markdown/zh/guide/started.md +22 -22
- package/templates/lupine-template-doc-starter/web/markdown/zh/index.md +42 -42
- package/templates/lupine-template-doc-starter/web/package.json +5 -5
- package/templates/lupine-template-doc-starter/web/src/client-env-keys.ts +5 -5
- package/templates/lupine-template-doc-starter/web/src/index.html +16 -16
- package/templates/lupine-template-doc-starter/web/src/index.tsx +28 -28
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/404.html +38 -38
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.html +27 -27
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.tsx +30 -30
- package/templates/lupine-template-doc-starter/web/src/markdown-built/en/essentials/list.html +8 -8
- package/templates/lupine-template-doc-starter/web/src/markdown-built/en/guide/install.html +8 -8
- package/templates/lupine-template-doc-starter/web/src/markdown-built/en/guide/started.html +12 -12
- package/templates/lupine-template-doc-starter/web/src/markdown-built/zh/essentials/list.html +8 -8
- package/templates/lupine-template-doc-starter/web/src/markdown-built/zh/guide/install.html +8 -8
- package/templates/lupine-template-doc-starter/web/src/markdown-built/zh/guide/started.html +12 -12
- package/templates/lupine-template-doc-starter/web/src/styles/base-css.ts +15 -15
- package/templates/lupine-template-hello-world/api/resources/install.sqlite.sql +3 -3
- package/templates/lupine-template-hello-world/api/src/index.ts +4 -4
- package/templates/lupine-template-hello-world/api/src/service/root-api.ts +18 -18
- package/templates/lupine-template-hello-world/lupine.json +23 -23
- package/templates/lupine-template-hello-world/web/package.json +6 -6
- package/templates/lupine-template-hello-world/web/src/index.html +16 -16
- package/templates/lupine-template-hello-world/web/src/index.tsx +73 -73
- package/templates/lupine-template-responsive-starter/api/resources/install.sqlite.sql +3 -3
- package/templates/lupine-template-responsive-starter/api/src/index.ts +4 -4
- package/templates/lupine-template-responsive-starter/api/src/service/root-api.ts +18 -18
- package/templates/lupine-template-responsive-starter/lupine.json +7 -7
- package/templates/lupine-template-responsive-starter/web/src/app-icons.ts +76 -76
- package/templates/lupine-template-responsive-starter/web/src/components/input-history-component.tsx +93 -93
- package/templates/lupine-template-responsive-starter/web/src/components/mine-about-page.tsx +86 -86
- package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +80 -80
- package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +220 -219
- package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +119 -119
- package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +116 -116
- package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +154 -154
- package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +193 -193
- package/templates/lupine-template-responsive-starter/web/src/components/search-input.tsx +95 -95
- package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx +182 -182
- package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +52 -52
- package/templates/lupine-template-responsive-starter/web/src/index.html +16 -16
- package/templates/lupine-template-responsive-starter/web/src/index.tsx +39 -39
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/404.html +35 -35
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.html +49 -49
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.tsx +32 -32
- package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +43 -43
- package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +46 -46
- package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +452 -452
- package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +325 -325
- package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +46 -46
- package/templates/lupine-template-responsive-starter/web/src/services/local-notes-service.ts +87 -87
- package/templates/lupine-template-responsive-starter/web/src/services/mine-service.ts +45 -45
- package/templates/common/dev/dev-watch.js +0 -389
|
@@ -1,325 +1,325 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CssProps,
|
|
3
|
-
HtmlVar,
|
|
4
|
-
PageProps,
|
|
5
|
-
RefProps,
|
|
6
|
-
SliderFrame,
|
|
7
|
-
SliderFrameHookProps,
|
|
8
|
-
MobileHeaderCenter,
|
|
9
|
-
MobileHeaderEmptyIcon,
|
|
10
|
-
MobileHeaderTitleIcon,
|
|
11
|
-
MobileTopSysIcon,
|
|
12
|
-
} from 'lupine.components';
|
|
13
|
-
import { MineService, MineStats } from '../services/mine-service';
|
|
14
|
-
import { MineSettingsPage } from '../components/mine-settings-page';
|
|
15
|
-
import { MinePremiumPage } from '../components/mine-premium-page';
|
|
16
|
-
|
|
17
|
-
export const MinePage = async (props: PageProps) => {
|
|
18
|
-
const dom = new HtmlVar('');
|
|
19
|
-
const sliderFrameHook: SliderFrameHookProps = {};
|
|
20
|
-
|
|
21
|
-
const renderDashboard = () => {
|
|
22
|
-
const stats: MineStats = MineService.getStats();
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div class='mine-dashboard'>
|
|
26
|
-
<div class='dashboard-title'>Data Overview</div>
|
|
27
|
-
|
|
28
|
-
<div class='stat-grid'>
|
|
29
|
-
<div class='stat-card' style={{ borderTopColor: 'var(--primary-accent-color)' }}>
|
|
30
|
-
<div class='stat-icon'>
|
|
31
|
-
<i class='ifc-icon ma-text-box-outline' style={{ color: 'var(--primary-accent-color)' }} />
|
|
32
|
-
</div>
|
|
33
|
-
<div class='stat-value'>{stats.noteCount}</div>
|
|
34
|
-
<div class='stat-label'>Notes</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const refreshRender = () => {
|
|
42
|
-
dom.value = (
|
|
43
|
-
<div class='mine-page-container'>
|
|
44
|
-
<SliderFrame hook={sliderFrameHook} />
|
|
45
|
-
|
|
46
|
-
{/* Profile Header Block */}
|
|
47
|
-
<div class='profile-header'>
|
|
48
|
-
<div class='profile-info'>
|
|
49
|
-
<div class='avatar'>
|
|
50
|
-
<i class='ifc-icon ma-account' />
|
|
51
|
-
</div>
|
|
52
|
-
<div class='user-details'>
|
|
53
|
-
<div class='user-name'>Demo User</div>
|
|
54
|
-
<div class='user-tagline'>Local Workspace Offline</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
<div class='profile-nav'>
|
|
58
|
-
<div class='flex-1'></div>
|
|
59
|
-
<div
|
|
60
|
-
class='settings-btn'
|
|
61
|
-
onClick={() => {
|
|
62
|
-
sliderFrameHook.load!(
|
|
63
|
-
<MineSettingsPage sliderFrameHook={sliderFrameHook} onDataChanged={refreshRender} />
|
|
64
|
-
);
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
<i class='ifc-icon ma-cog-outline' />
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<div class='mine-scroll-content'>
|
|
73
|
-
{/* Dashboard Blocks */}
|
|
74
|
-
{renderDashboard()}
|
|
75
|
-
|
|
76
|
-
{/* Premium Banner Mock */}
|
|
77
|
-
<div class='premium-banner'>
|
|
78
|
-
<div class='banner-content'>
|
|
79
|
-
<div class='banner-title'>
|
|
80
|
-
<i class='ifc-icon ma-star' /> Upgrade to Premium
|
|
81
|
-
</div>
|
|
82
|
-
<div class='banner-desc'>Unlock cloud sync, custom themes, and unlimited media storage.</div>
|
|
83
|
-
</div>
|
|
84
|
-
<button
|
|
85
|
-
class='banner-btn'
|
|
86
|
-
onClick={() => {
|
|
87
|
-
sliderFrameHook.load!(<MinePremiumPage sliderFrameHook={sliderFrameHook} />);
|
|
88
|
-
}}
|
|
89
|
-
>
|
|
90
|
-
View Plans
|
|
91
|
-
</button>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const css: CssProps = {
|
|
99
|
-
display: 'flex',
|
|
100
|
-
flexDirection: 'column',
|
|
101
|
-
height: '100%',
|
|
102
|
-
position: 'relative',
|
|
103
|
-
|
|
104
|
-
'.mine-page-container': {
|
|
105
|
-
display: 'flex',
|
|
106
|
-
flexDirection: 'column',
|
|
107
|
-
height: '100%',
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
// 1. Profile Header
|
|
111
|
-
'.profile-header': {
|
|
112
|
-
padding: '16px 20px 24px 20px',
|
|
113
|
-
borderBottomLeftRadius: '24px',
|
|
114
|
-
borderBottomRightRadius: '24px',
|
|
115
|
-
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
|
|
116
|
-
zIndex: 10,
|
|
117
|
-
},
|
|
118
|
-
'.profile-nav': {
|
|
119
|
-
display: 'flex',
|
|
120
|
-
marginBottom: '16px',
|
|
121
|
-
},
|
|
122
|
-
'.settings-btn': {
|
|
123
|
-
width: '36px',
|
|
124
|
-
height: '36px',
|
|
125
|
-
borderRadius: '18px',
|
|
126
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
127
|
-
display: 'flex',
|
|
128
|
-
alignItems: 'center',
|
|
129
|
-
justifyContent: 'center',
|
|
130
|
-
cursor: 'pointer',
|
|
131
|
-
color: 'var(--primary-color)',
|
|
132
|
-
transition: 'background-color 0.2s',
|
|
133
|
-
'&:active': {
|
|
134
|
-
backgroundColor: 'rgba(0,0,0,0.05)',
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
'.profile-info': {
|
|
138
|
-
display: 'flex',
|
|
139
|
-
alignItems: 'center',
|
|
140
|
-
gap: '16px',
|
|
141
|
-
},
|
|
142
|
-
'.avatar': {
|
|
143
|
-
width: '64px',
|
|
144
|
-
height: '64px',
|
|
145
|
-
borderRadius: '32px',
|
|
146
|
-
backgroundColor: 'var(--primary-accent-color)',
|
|
147
|
-
color: 'white',
|
|
148
|
-
display: 'flex',
|
|
149
|
-
alignItems: 'center',
|
|
150
|
-
justifyContent: 'center',
|
|
151
|
-
fontSize: '36px',
|
|
152
|
-
boxShadow: '0 4px 12px rgba(24, 144, 255, 0.3)',
|
|
153
|
-
},
|
|
154
|
-
'.user-name': {
|
|
155
|
-
fontSize: '22px',
|
|
156
|
-
fontWeight: 'bold',
|
|
157
|
-
color: 'var(--primary-color)',
|
|
158
|
-
marginBottom: '4px',
|
|
159
|
-
},
|
|
160
|
-
'.user-tagline': {
|
|
161
|
-
fontSize: '14px',
|
|
162
|
-
color: 'var(--secondary-color)',
|
|
163
|
-
opacity: 0.8,
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
// Scrollable Rest of the Page
|
|
167
|
-
'.mine-scroll-content': {
|
|
168
|
-
flex: 1,
|
|
169
|
-
overflowY: 'auto',
|
|
170
|
-
padding: '24px 16px',
|
|
171
|
-
display: 'flex',
|
|
172
|
-
flexDirection: 'column',
|
|
173
|
-
gap: '24px',
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
// 2. Dashboard
|
|
177
|
-
'.mine-dashboard': {
|
|
178
|
-
display: 'flex',
|
|
179
|
-
flexDirection: 'column',
|
|
180
|
-
gap: '16px',
|
|
181
|
-
},
|
|
182
|
-
'.dashboard-title': {
|
|
183
|
-
fontSize: '18px',
|
|
184
|
-
fontWeight: 'bold',
|
|
185
|
-
color: 'var(--primary-color)',
|
|
186
|
-
},
|
|
187
|
-
'.stat-grid': {
|
|
188
|
-
display: 'grid',
|
|
189
|
-
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
190
|
-
gap: '12px',
|
|
191
|
-
},
|
|
192
|
-
'.stat-card': {
|
|
193
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
194
|
-
borderRadius: '12px',
|
|
195
|
-
padding: '16px 12px',
|
|
196
|
-
display: 'flex',
|
|
197
|
-
flexDirection: 'column',
|
|
198
|
-
alignItems: 'center',
|
|
199
|
-
boxShadow: '0 2px 8px rgba(0,0,0,0.04)',
|
|
200
|
-
borderTop: '4px solid transparent',
|
|
201
|
-
},
|
|
202
|
-
'.stat-icon': {
|
|
203
|
-
fontSize: '24px',
|
|
204
|
-
marginBottom: '8px',
|
|
205
|
-
},
|
|
206
|
-
'.stat-value': {
|
|
207
|
-
fontSize: '20px',
|
|
208
|
-
fontWeight: 'bold',
|
|
209
|
-
color: 'var(--primary-color)',
|
|
210
|
-
marginBottom: '4px',
|
|
211
|
-
},
|
|
212
|
-
'.stat-label': {
|
|
213
|
-
fontSize: '12px',
|
|
214
|
-
color: 'var(--secondary-color)',
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
'.usage-bar-container': {
|
|
218
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
219
|
-
borderRadius: '12px',
|
|
220
|
-
padding: '16px',
|
|
221
|
-
boxShadow: '0 2px 8px rgba(0,0,0,0.04)',
|
|
222
|
-
},
|
|
223
|
-
'.usage-bar-labels': {
|
|
224
|
-
display: 'flex',
|
|
225
|
-
justifyContent: 'space-between',
|
|
226
|
-
fontSize: '13px',
|
|
227
|
-
color: 'var(--secondary-color)',
|
|
228
|
-
marginBottom: '12px',
|
|
229
|
-
fontWeight: '500',
|
|
230
|
-
},
|
|
231
|
-
'.usage-bar': {
|
|
232
|
-
height: '12px',
|
|
233
|
-
borderRadius: '6px',
|
|
234
|
-
display: 'flex',
|
|
235
|
-
overflow: 'hidden',
|
|
236
|
-
backgroundColor: 'rgba(0,0,0,0.05)',
|
|
237
|
-
gap: '2px', // tiny visual gap between segments
|
|
238
|
-
},
|
|
239
|
-
'.usage-bar-segment': {
|
|
240
|
-
height: '100%',
|
|
241
|
-
transition: 'width 0.5s ease',
|
|
242
|
-
},
|
|
243
|
-
'.usage-bar-segment.empty': { backgroundColor: 'transparent' },
|
|
244
|
-
'.usage-bar-segment.note': { backgroundColor: 'var(--primary-accent-color)' },
|
|
245
|
-
'.usage-bar-segment.diary': { backgroundColor: '#eb2f96' },
|
|
246
|
-
'.usage-bar-segment.finance': { backgroundColor: '#52c41a' },
|
|
247
|
-
|
|
248
|
-
// 3. Premium Banner
|
|
249
|
-
'.premium-banner': {
|
|
250
|
-
background: 'linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%)',
|
|
251
|
-
borderRadius: '16px',
|
|
252
|
-
padding: '20px',
|
|
253
|
-
display: 'flex',
|
|
254
|
-
flexDirection: 'column',
|
|
255
|
-
gap: '16px',
|
|
256
|
-
color: '#333',
|
|
257
|
-
boxShadow: '0 8px 16px rgba(255, 154, 158, 0.3)',
|
|
258
|
-
position: 'relative',
|
|
259
|
-
overflow: 'hidden',
|
|
260
|
-
},
|
|
261
|
-
'.banner-content': {
|
|
262
|
-
position: 'relative',
|
|
263
|
-
zIndex: 2,
|
|
264
|
-
},
|
|
265
|
-
'.banner-title': {
|
|
266
|
-
fontSize: '18px',
|
|
267
|
-
fontWeight: 'bold',
|
|
268
|
-
marginBottom: '8px',
|
|
269
|
-
display: 'flex',
|
|
270
|
-
alignItems: 'center',
|
|
271
|
-
gap: '8px',
|
|
272
|
-
},
|
|
273
|
-
'.banner-title i': {
|
|
274
|
-
color: '#FFD700',
|
|
275
|
-
},
|
|
276
|
-
'.banner-desc': {
|
|
277
|
-
fontSize: '14px',
|
|
278
|
-
opacity: 0.9,
|
|
279
|
-
lineHeight: '1.4',
|
|
280
|
-
},
|
|
281
|
-
'.banner-btn': {
|
|
282
|
-
alignSelf: 'flex-start',
|
|
283
|
-
backgroundColor: '#fff',
|
|
284
|
-
color: '#FF9A9E',
|
|
285
|
-
border: 'none',
|
|
286
|
-
padding: '8px 20px',
|
|
287
|
-
borderRadius: '20px',
|
|
288
|
-
fontWeight: 'bold',
|
|
289
|
-
fontSize: '14px',
|
|
290
|
-
cursor: 'pointer',
|
|
291
|
-
boxShadow: '0 4px 8px rgba(0,0,0,0.1)',
|
|
292
|
-
position: 'relative',
|
|
293
|
-
zIndex: 2,
|
|
294
|
-
},
|
|
295
|
-
'.mine-page-content-wrapper': {
|
|
296
|
-
flex: 1,
|
|
297
|
-
overflowY: 'auto',
|
|
298
|
-
display: 'flex',
|
|
299
|
-
flexDirection: 'column',
|
|
300
|
-
},
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
const ref: RefProps = {
|
|
304
|
-
onLoad: async () => {
|
|
305
|
-
refreshRender();
|
|
306
|
-
},
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
return (
|
|
310
|
-
<div css={css} ref={ref}>
|
|
311
|
-
<MobileHeaderCenter>
|
|
312
|
-
<MobileHeaderTitleIcon
|
|
313
|
-
title='Mine'
|
|
314
|
-
left={<MobileHeaderEmptyIcon />}
|
|
315
|
-
right={
|
|
316
|
-
<div class='flex-center-gap-12'>
|
|
317
|
-
<MobileTopSysIcon />
|
|
318
|
-
</div>
|
|
319
|
-
}
|
|
320
|
-
/>
|
|
321
|
-
</MobileHeaderCenter>
|
|
322
|
-
<div class='mine-page-content-wrapper no-scrollbar-container'>{dom.node}</div>
|
|
323
|
-
</div>
|
|
324
|
-
);
|
|
325
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
CssProps,
|
|
3
|
+
HtmlVar,
|
|
4
|
+
PageProps,
|
|
5
|
+
RefProps,
|
|
6
|
+
SliderFrame,
|
|
7
|
+
SliderFrameHookProps,
|
|
8
|
+
MobileHeaderCenter,
|
|
9
|
+
MobileHeaderEmptyIcon,
|
|
10
|
+
MobileHeaderTitleIcon,
|
|
11
|
+
MobileTopSysIcon,
|
|
12
|
+
} from 'lupine.components';
|
|
13
|
+
import { MineService, MineStats } from '../services/mine-service';
|
|
14
|
+
import { MineSettingsPage } from '../components/mine-settings-page';
|
|
15
|
+
import { MinePremiumPage } from '../components/mine-premium-page';
|
|
16
|
+
|
|
17
|
+
export const MinePage = async (props: PageProps) => {
|
|
18
|
+
const dom = new HtmlVar('');
|
|
19
|
+
const sliderFrameHook: SliderFrameHookProps = {};
|
|
20
|
+
|
|
21
|
+
const renderDashboard = () => {
|
|
22
|
+
const stats: MineStats = MineService.getStats();
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div class='mine-dashboard'>
|
|
26
|
+
<div class='dashboard-title'>Data Overview</div>
|
|
27
|
+
|
|
28
|
+
<div class='stat-grid'>
|
|
29
|
+
<div class='stat-card' style={{ borderTopColor: 'var(--primary-accent-color)' }}>
|
|
30
|
+
<div class='stat-icon'>
|
|
31
|
+
<i class='ifc-icon ma-text-box-outline' style={{ color: 'var(--primary-accent-color)' }} />
|
|
32
|
+
</div>
|
|
33
|
+
<div class='stat-value'>{stats.noteCount}</div>
|
|
34
|
+
<div class='stat-label'>Notes</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const refreshRender = () => {
|
|
42
|
+
dom.value = (
|
|
43
|
+
<div class='mine-page-container'>
|
|
44
|
+
<SliderFrame hook={sliderFrameHook} />
|
|
45
|
+
|
|
46
|
+
{/* Profile Header Block */}
|
|
47
|
+
<div class='profile-header'>
|
|
48
|
+
<div class='profile-info'>
|
|
49
|
+
<div class='avatar'>
|
|
50
|
+
<i class='ifc-icon ma-account' />
|
|
51
|
+
</div>
|
|
52
|
+
<div class='user-details'>
|
|
53
|
+
<div class='user-name'>Demo User</div>
|
|
54
|
+
<div class='user-tagline'>Local Workspace Offline</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class='profile-nav'>
|
|
58
|
+
<div class='flex-1'></div>
|
|
59
|
+
<div
|
|
60
|
+
class='settings-btn'
|
|
61
|
+
onClick={() => {
|
|
62
|
+
sliderFrameHook.load!(
|
|
63
|
+
<MineSettingsPage sliderFrameHook={sliderFrameHook} onDataChanged={refreshRender} />
|
|
64
|
+
);
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
<i class='ifc-icon ma-cog-outline' />
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div class='mine-scroll-content'>
|
|
73
|
+
{/* Dashboard Blocks */}
|
|
74
|
+
{renderDashboard()}
|
|
75
|
+
|
|
76
|
+
{/* Premium Banner Mock */}
|
|
77
|
+
<div class='premium-banner'>
|
|
78
|
+
<div class='banner-content'>
|
|
79
|
+
<div class='banner-title'>
|
|
80
|
+
<i class='ifc-icon ma-star' /> Upgrade to Premium
|
|
81
|
+
</div>
|
|
82
|
+
<div class='banner-desc'>Unlock cloud sync, custom themes, and unlimited media storage.</div>
|
|
83
|
+
</div>
|
|
84
|
+
<button
|
|
85
|
+
class='banner-btn'
|
|
86
|
+
onClick={() => {
|
|
87
|
+
sliderFrameHook.load!(<MinePremiumPage sliderFrameHook={sliderFrameHook} />);
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
View Plans
|
|
91
|
+
</button>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const css: CssProps = {
|
|
99
|
+
display: 'flex',
|
|
100
|
+
flexDirection: 'column',
|
|
101
|
+
height: '100%',
|
|
102
|
+
position: 'relative',
|
|
103
|
+
|
|
104
|
+
'.mine-page-container': {
|
|
105
|
+
display: 'flex',
|
|
106
|
+
flexDirection: 'column',
|
|
107
|
+
height: '100%',
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
// 1. Profile Header
|
|
111
|
+
'.profile-header': {
|
|
112
|
+
padding: '16px 20px 24px 20px',
|
|
113
|
+
borderBottomLeftRadius: '24px',
|
|
114
|
+
borderBottomRightRadius: '24px',
|
|
115
|
+
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
|
|
116
|
+
zIndex: 10,
|
|
117
|
+
},
|
|
118
|
+
'.profile-nav': {
|
|
119
|
+
display: 'flex',
|
|
120
|
+
marginBottom: '16px',
|
|
121
|
+
},
|
|
122
|
+
'.settings-btn': {
|
|
123
|
+
width: '36px',
|
|
124
|
+
height: '36px',
|
|
125
|
+
borderRadius: '18px',
|
|
126
|
+
backgroundColor: 'var(--secondary-bg-color)',
|
|
127
|
+
display: 'flex',
|
|
128
|
+
alignItems: 'center',
|
|
129
|
+
justifyContent: 'center',
|
|
130
|
+
cursor: 'pointer',
|
|
131
|
+
color: 'var(--primary-color)',
|
|
132
|
+
transition: 'background-color 0.2s',
|
|
133
|
+
'&:active': {
|
|
134
|
+
backgroundColor: 'rgba(0,0,0,0.05)',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
'.profile-info': {
|
|
138
|
+
display: 'flex',
|
|
139
|
+
alignItems: 'center',
|
|
140
|
+
gap: '16px',
|
|
141
|
+
},
|
|
142
|
+
'.avatar': {
|
|
143
|
+
width: '64px',
|
|
144
|
+
height: '64px',
|
|
145
|
+
borderRadius: '32px',
|
|
146
|
+
backgroundColor: 'var(--primary-accent-color)',
|
|
147
|
+
color: 'white',
|
|
148
|
+
display: 'flex',
|
|
149
|
+
alignItems: 'center',
|
|
150
|
+
justifyContent: 'center',
|
|
151
|
+
fontSize: '36px',
|
|
152
|
+
boxShadow: '0 4px 12px rgba(24, 144, 255, 0.3)',
|
|
153
|
+
},
|
|
154
|
+
'.user-name': {
|
|
155
|
+
fontSize: '22px',
|
|
156
|
+
fontWeight: 'bold',
|
|
157
|
+
color: 'var(--primary-color)',
|
|
158
|
+
marginBottom: '4px',
|
|
159
|
+
},
|
|
160
|
+
'.user-tagline': {
|
|
161
|
+
fontSize: '14px',
|
|
162
|
+
color: 'var(--secondary-color)',
|
|
163
|
+
opacity: 0.8,
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
// Scrollable Rest of the Page
|
|
167
|
+
'.mine-scroll-content': {
|
|
168
|
+
flex: 1,
|
|
169
|
+
overflowY: 'auto',
|
|
170
|
+
padding: '24px 16px',
|
|
171
|
+
display: 'flex',
|
|
172
|
+
flexDirection: 'column',
|
|
173
|
+
gap: '24px',
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
// 2. Dashboard
|
|
177
|
+
'.mine-dashboard': {
|
|
178
|
+
display: 'flex',
|
|
179
|
+
flexDirection: 'column',
|
|
180
|
+
gap: '16px',
|
|
181
|
+
},
|
|
182
|
+
'.dashboard-title': {
|
|
183
|
+
fontSize: '18px',
|
|
184
|
+
fontWeight: 'bold',
|
|
185
|
+
color: 'var(--primary-color)',
|
|
186
|
+
},
|
|
187
|
+
'.stat-grid': {
|
|
188
|
+
display: 'grid',
|
|
189
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
190
|
+
gap: '12px',
|
|
191
|
+
},
|
|
192
|
+
'.stat-card': {
|
|
193
|
+
backgroundColor: 'var(--primary-bg-color)',
|
|
194
|
+
borderRadius: '12px',
|
|
195
|
+
padding: '16px 12px',
|
|
196
|
+
display: 'flex',
|
|
197
|
+
flexDirection: 'column',
|
|
198
|
+
alignItems: 'center',
|
|
199
|
+
boxShadow: '0 2px 8px rgba(0,0,0,0.04)',
|
|
200
|
+
borderTop: '4px solid transparent',
|
|
201
|
+
},
|
|
202
|
+
'.stat-icon': {
|
|
203
|
+
fontSize: '24px',
|
|
204
|
+
marginBottom: '8px',
|
|
205
|
+
},
|
|
206
|
+
'.stat-value': {
|
|
207
|
+
fontSize: '20px',
|
|
208
|
+
fontWeight: 'bold',
|
|
209
|
+
color: 'var(--primary-color)',
|
|
210
|
+
marginBottom: '4px',
|
|
211
|
+
},
|
|
212
|
+
'.stat-label': {
|
|
213
|
+
fontSize: '12px',
|
|
214
|
+
color: 'var(--secondary-color)',
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
'.usage-bar-container': {
|
|
218
|
+
backgroundColor: 'var(--primary-bg-color)',
|
|
219
|
+
borderRadius: '12px',
|
|
220
|
+
padding: '16px',
|
|
221
|
+
boxShadow: '0 2px 8px rgba(0,0,0,0.04)',
|
|
222
|
+
},
|
|
223
|
+
'.usage-bar-labels': {
|
|
224
|
+
display: 'flex',
|
|
225
|
+
justifyContent: 'space-between',
|
|
226
|
+
fontSize: '13px',
|
|
227
|
+
color: 'var(--secondary-color)',
|
|
228
|
+
marginBottom: '12px',
|
|
229
|
+
fontWeight: '500',
|
|
230
|
+
},
|
|
231
|
+
'.usage-bar': {
|
|
232
|
+
height: '12px',
|
|
233
|
+
borderRadius: '6px',
|
|
234
|
+
display: 'flex',
|
|
235
|
+
overflow: 'hidden',
|
|
236
|
+
backgroundColor: 'rgba(0,0,0,0.05)',
|
|
237
|
+
gap: '2px', // tiny visual gap between segments
|
|
238
|
+
},
|
|
239
|
+
'.usage-bar-segment': {
|
|
240
|
+
height: '100%',
|
|
241
|
+
transition: 'width 0.5s ease',
|
|
242
|
+
},
|
|
243
|
+
'.usage-bar-segment.empty': { backgroundColor: 'transparent' },
|
|
244
|
+
'.usage-bar-segment.note': { backgroundColor: 'var(--primary-accent-color)' },
|
|
245
|
+
'.usage-bar-segment.diary': { backgroundColor: '#eb2f96' },
|
|
246
|
+
'.usage-bar-segment.finance': { backgroundColor: '#52c41a' },
|
|
247
|
+
|
|
248
|
+
// 3. Premium Banner
|
|
249
|
+
'.premium-banner': {
|
|
250
|
+
background: 'linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%)',
|
|
251
|
+
borderRadius: '16px',
|
|
252
|
+
padding: '20px',
|
|
253
|
+
display: 'flex',
|
|
254
|
+
flexDirection: 'column',
|
|
255
|
+
gap: '16px',
|
|
256
|
+
color: '#333',
|
|
257
|
+
boxShadow: '0 8px 16px rgba(255, 154, 158, 0.3)',
|
|
258
|
+
position: 'relative',
|
|
259
|
+
overflow: 'hidden',
|
|
260
|
+
},
|
|
261
|
+
'.banner-content': {
|
|
262
|
+
position: 'relative',
|
|
263
|
+
zIndex: 2,
|
|
264
|
+
},
|
|
265
|
+
'.banner-title': {
|
|
266
|
+
fontSize: '18px',
|
|
267
|
+
fontWeight: 'bold',
|
|
268
|
+
marginBottom: '8px',
|
|
269
|
+
display: 'flex',
|
|
270
|
+
alignItems: 'center',
|
|
271
|
+
gap: '8px',
|
|
272
|
+
},
|
|
273
|
+
'.banner-title i': {
|
|
274
|
+
color: '#FFD700',
|
|
275
|
+
},
|
|
276
|
+
'.banner-desc': {
|
|
277
|
+
fontSize: '14px',
|
|
278
|
+
opacity: 0.9,
|
|
279
|
+
lineHeight: '1.4',
|
|
280
|
+
},
|
|
281
|
+
'.banner-btn': {
|
|
282
|
+
alignSelf: 'flex-start',
|
|
283
|
+
backgroundColor: '#fff',
|
|
284
|
+
color: '#FF9A9E',
|
|
285
|
+
border: 'none',
|
|
286
|
+
padding: '8px 20px',
|
|
287
|
+
borderRadius: '20px',
|
|
288
|
+
fontWeight: 'bold',
|
|
289
|
+
fontSize: '14px',
|
|
290
|
+
cursor: 'pointer',
|
|
291
|
+
boxShadow: '0 4px 8px rgba(0,0,0,0.1)',
|
|
292
|
+
position: 'relative',
|
|
293
|
+
zIndex: 2,
|
|
294
|
+
},
|
|
295
|
+
'.mine-page-content-wrapper': {
|
|
296
|
+
flex: 1,
|
|
297
|
+
overflowY: 'auto',
|
|
298
|
+
display: 'flex',
|
|
299
|
+
flexDirection: 'column',
|
|
300
|
+
},
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
const ref: RefProps = {
|
|
304
|
+
onLoad: async () => {
|
|
305
|
+
refreshRender();
|
|
306
|
+
},
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
return (
|
|
310
|
+
<div css={css} ref={ref}>
|
|
311
|
+
<MobileHeaderCenter>
|
|
312
|
+
<MobileHeaderTitleIcon
|
|
313
|
+
title='Mine'
|
|
314
|
+
left={<MobileHeaderEmptyIcon />}
|
|
315
|
+
right={
|
|
316
|
+
<div class='flex-center-gap-12'>
|
|
317
|
+
<MobileTopSysIcon />
|
|
318
|
+
</div>
|
|
319
|
+
}
|
|
320
|
+
/>
|
|
321
|
+
</MobileHeaderCenter>
|
|
322
|
+
<div class='mine-page-content-wrapper no-scrollbar-container'>{dom.node}</div>
|
|
323
|
+
</div>
|
|
324
|
+
);
|
|
325
|
+
};
|