create-lupine 1.0.13 → 1.0.15
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 +32 -2
- package/package.json +1 -1
- package/templates/common/AI_CONTEXT.md +245 -50
- package/templates/common/dev/cp-folder.js +2 -6
- package/templates/cv-starter/web/src/index.html +1 -1
- package/templates/doc-starter/web/src/index.html +1 -1
- package/templates/hello-world/web/src/index.html +1 -1
- package/templates/hello-world/web/src/index.tsx +54 -15
- package/templates/hello-world/web/src/styles/global.css +63 -0
- package/templates/responsive-starter/api/package.json +6 -0
- package/templates/responsive-starter/api/resources/config_default.json +6 -0
- package/templates/responsive-starter/api/resources/install.sqlite.sql +4 -0
- package/templates/responsive-starter/api/src/index.ts +4 -0
- package/templates/responsive-starter/api/src/service/root-api.ts +18 -0
- package/templates/responsive-starter/lupine.json +23 -0
- package/templates/responsive-starter/web/assets/favicon.ico +0 -0
- package/templates/responsive-starter/web/package.json +6 -0
- package/templates/responsive-starter/web/src/app-icons.ts +72 -0
- package/templates/responsive-starter/web/src/components/input-history-component.tsx +93 -0
- package/templates/responsive-starter/web/src/components/mine-about-page.tsx +86 -0
- package/templates/responsive-starter/web/src/components/mine-premium-page.tsx +80 -0
- package/templates/responsive-starter/web/src/components/mine-settings-page.tsx +219 -0
- package/templates/responsive-starter/web/src/components/mobile-top-search-menu.tsx +119 -0
- package/templates/responsive-starter/web/src/components/note-detail.tsx +116 -0
- package/templates/responsive-starter/web/src/components/note-edit.tsx +154 -0
- package/templates/responsive-starter/web/src/components/note-search-page.tsx +193 -0
- package/templates/responsive-starter/web/src/components/search-input.tsx +95 -0
- package/templates/responsive-starter/web/src/components/side-menu-content.tsx +178 -0
- package/templates/responsive-starter/web/src/frames/app-responsive-frame.tsx +46 -0
- package/templates/responsive-starter/web/src/index.html +16 -0
- package/templates/responsive-starter/web/src/index.tsx +42 -0
- package/templates/responsive-starter/web/src/pages/about-page.tsx +43 -0
- package/templates/responsive-starter/web/src/pages/finance-page.tsx +46 -0
- package/templates/responsive-starter/web/src/pages/home-page.tsx +452 -0
- package/templates/responsive-starter/web/src/pages/mine-page.tsx +325 -0
- package/templates/responsive-starter/web/src/pages/tools-page.tsx +46 -0
- package/templates/responsive-starter/web/src/services/local-notes-service.ts +87 -0
- package/templates/responsive-starter/web/src/services/mine-service.ts +45 -0
- package/templates/responsive-starter/web/src/styles/app.css +0 -0
- package/templates/responsive-starter/web/src/styles/base-css.ts +65 -0
- package/templates/responsive-starter/web/src/styles/global.css +2143 -0
- package/templates/responsive-starter/web/src/styles/theme.ts +16 -0
|
@@ -785,6 +785,66 @@ body {
|
|
|
785
785
|
font-weight: var(--font-weight-base);
|
|
786
786
|
}
|
|
787
787
|
|
|
788
|
+
.safe-area-pt {
|
|
789
|
+
padding-top: constant(safe-area-inset-top);
|
|
790
|
+
padding-top: env(safe-area-inset-top);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.safe-area-pb {
|
|
794
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
795
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
.safe-area-pl {
|
|
799
|
+
padding-left: constant(safe-area-inset-left);
|
|
800
|
+
padding-left: env(safe-area-inset-left);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.safe-area-pr {
|
|
804
|
+
padding-right: constant(safe-area-inset-right);
|
|
805
|
+
padding-right: env(safe-area-inset-right);
|
|
806
|
+
}
|
|
807
|
+
.safe-area-pall {
|
|
808
|
+
padding-top: constant(safe-area-inset-top);
|
|
809
|
+
padding-top: env(safe-area-inset-top);
|
|
810
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
811
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
812
|
+
padding-left: constant(safe-area-inset-left);
|
|
813
|
+
padding-left: env(safe-area-inset-left);
|
|
814
|
+
padding-right: constant(safe-area-inset-right);
|
|
815
|
+
padding-right: env(safe-area-inset-right);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.safe-area-mt {
|
|
819
|
+
margin-top: constant(safe-area-inset-top);
|
|
820
|
+
margin-top: env(safe-area-inset-top);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.safe-area-mb {
|
|
824
|
+
margin-bottom: constant(safe-area-inset-bottom);
|
|
825
|
+
margin-bottom: env(safe-area-inset-bottom);
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
.safe-area-ml {
|
|
829
|
+
margin-left: constant(safe-area-inset-left);
|
|
830
|
+
margin-left: env(safe-area-inset-left);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.safe-area-mr {
|
|
834
|
+
margin-right: constant(safe-area-inset-right);
|
|
835
|
+
margin-right: env(safe-area-inset-right);
|
|
836
|
+
}
|
|
837
|
+
.safe-area-mall {
|
|
838
|
+
margin-top: constant(safe-area-inset-top);
|
|
839
|
+
margin-top: env(safe-area-inset-top);
|
|
840
|
+
margin-bottom: constant(safe-area-inset-bottom);
|
|
841
|
+
margin-bottom: env(safe-area-inset-bottom);
|
|
842
|
+
margin-left: constant(safe-area-inset-left);
|
|
843
|
+
margin-left: env(safe-area-inset-left);
|
|
844
|
+
margin-right: constant(safe-area-inset-right);
|
|
845
|
+
margin-right: env(safe-area-inset-right);
|
|
846
|
+
}
|
|
847
|
+
|
|
788
848
|
input.base-css[type='text'],
|
|
789
849
|
input.base-css[type='password'],
|
|
790
850
|
input.base-css[type='email'],
|
|
@@ -888,6 +948,9 @@ input.base-css[type='text'][disabled='true']::placeholder {
|
|
|
888
948
|
}
|
|
889
949
|
|
|
890
950
|
.button-base {
|
|
951
|
+
display: flex;
|
|
952
|
+
align-items: center;
|
|
953
|
+
justify-content: center;
|
|
891
954
|
line-height: 1.1;
|
|
892
955
|
height: var(--button-height);
|
|
893
956
|
cursor: pointer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IApiBase, StaticServer, ApiRouter } from 'lupine.api';
|
|
2
|
+
|
|
3
|
+
export class RootApi implements IApiBase {
|
|
4
|
+
protected router = new ApiRouter();
|
|
5
|
+
|
|
6
|
+
constructor() {
|
|
7
|
+
this.mountDashboard();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public getRouter(): ApiRouter {
|
|
11
|
+
return this.router;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
protected mountDashboard() {
|
|
15
|
+
const staticServer = new StaticServer();
|
|
16
|
+
this.router.use('*', staticServer.processRequest.bind(staticServer));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "responsive-starter",
|
|
3
|
+
"webEntryPoints": [
|
|
4
|
+
{
|
|
5
|
+
"index": "web/src/index.tsx",
|
|
6
|
+
"html": "web/src/index.html",
|
|
7
|
+
"outdir": "/"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"apiEntryPoint": "api/src/index.ts",
|
|
11
|
+
"copyFiles": [
|
|
12
|
+
{
|
|
13
|
+
"type": "web",
|
|
14
|
+
"from": "web/assets",
|
|
15
|
+
"to": "assets"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "data",
|
|
19
|
+
"from": "api/resources",
|
|
20
|
+
"to": "resources"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { CssProps } from 'lupine.web';
|
|
2
|
+
|
|
3
|
+
export const appIcons = {
|
|
4
|
+
// 记事 (Notes)
|
|
5
|
+
'ma-home-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M9 22V12h6v10'/%3E%3C/svg%3E`,
|
|
6
|
+
// 财务 (Finance)
|
|
7
|
+
'icon-finance': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E`,
|
|
8
|
+
'icon-date': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M19 4H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2zM16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E`,
|
|
9
|
+
'icon-time': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 6v6l4 2'/%3E%3C/svg%3E`,
|
|
10
|
+
'icon-color': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 21a9 9 0 1 1 0-18c1.5 0 2.5 1 2.5 2.5a2 2 0 0 1-1.5 2 2 2 0 0 0-1.5 2c0 1 1 2 2 2h2c2.5 0 4.5 2 4.5 4.5A5.5 5.5 0 0 1 12 21z'/%3E%3Ccircle cx='7.5' cy='10.5' r='1.5' fill='black'/%3E%3Ccircle cx='10.5' cy='7.5' r='1.5' fill='black'/%3E%3Ccircle cx='14.5' cy='8.5' r='1.5' fill='black'/%3E%3Ccircle cx='16.5' cy='12.5' r='1.5' fill='black'/%3E%3C/svg%3E`,
|
|
11
|
+
// 记账 (Ledger/List)
|
|
12
|
+
'bs-list': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E`,
|
|
13
|
+
// 日记 (Diary/Calendar)
|
|
14
|
+
'ma-pencil-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z'/%3E%3C/svg%3E`,
|
|
15
|
+
'ma-book-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M19 3H7C5.895 3 5 3.895 5 5v14c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM5 7h16M7 3v18'/%3E%3C/svg%3E`,
|
|
16
|
+
// 工具 (Tools)
|
|
17
|
+
'ma-tools': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E`,
|
|
18
|
+
'ma-calendar-star': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M19 4H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2zM16 2v4M8 2v4M3 10h18M12 11.5l1.2 2.5 2.8.4-2 2 .5 2.8-2.5-1.3-2.5 1.3.5-2.8-2-2 2.8-.4L12 11.5z'/%3E%3C/svg%3E`,
|
|
19
|
+
'ma-calendar-check': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M19 4H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2zM16 2v4M8 2v4M3 10h18M9 16l2 2 4-4'/%3E%3C/svg%3E`,
|
|
20
|
+
'ma-format-list-checks': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M10 6h10M10 12h10M10 18h10M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2'/%3E%3C/svg%3E`,
|
|
21
|
+
'ma-timer-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 2v4M10 2h4M12 6a8 8 0 100 16 8 8 0 000-16zM12 10v4l2 2'/%3E%3C/svg%3E`,
|
|
22
|
+
'ma-pause': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='currentColor' d='M14 19h4V5h-4M6 19h4V5H6v14Z'/%3E%3C/svg%3E`,
|
|
23
|
+
'ma-play': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='currentColor' d='M8 5v14l11-7z'/%3E%3C/svg%3E`,
|
|
24
|
+
'ma-refresh': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='currentColor' d='M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z'/%3E%3C/svg%3E`,
|
|
25
|
+
'ma-check-circle-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='currentColor' d='M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z'/%3E%3C/svg%3E`,
|
|
26
|
+
'ma-checkbox-blank-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='currentColor' d='M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z'/%3E%3C/svg%3E`,
|
|
27
|
+
'ma-checkbox-marked': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='currentColor' d='M19 3H5c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E`,
|
|
28
|
+
|
|
29
|
+
// 我的 (Mine)
|
|
30
|
+
'ma-account-cog-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E`,
|
|
31
|
+
// 搜索相关 (Search & UI Controls)
|
|
32
|
+
'bs-search': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E`,
|
|
33
|
+
'ma-close': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' width='24' height='24'%3E%3Cpath fill='currentColor' d='M810.7 750.5L750.5 810.7L512 572.2L273.5 810.7L213.3 750.5L451.8 512L213.3 273.5L273.5 213.3L512 451.8L750.5 213.3L810.7 273.5L572.2 512L810.7 750.5z'/%3E%3C/svg%3E`,
|
|
34
|
+
'ma-delete-off-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6'/%3E%3C/svg%3E`,
|
|
35
|
+
'ma-cog-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1Z'/%3E%3C/svg%3E`,
|
|
36
|
+
'mg-arrow_back_ios_new_outlined': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' width='24' height='24'%3E%3Cpath fill='currentColor' d='M698.7 85.3L272 512L698.7 938.7L758.4 877.9L392.5 512L758.4 146.1z'/%3E%3C/svg%3E`,
|
|
37
|
+
'mg-arrow_forward_ios_outlined': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' width='24' height='24'%3E%3Cpath fill='currentColor' d='M325.3 85.3L752 512L325.3 938.7L265.6 877.9L631.5 512L265.6 146.1z'/%3E%3C/svg%3E`,
|
|
38
|
+
'ma-add': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 5v14M5 12h14'/%3E%3C/svg%3E`,
|
|
39
|
+
|
|
40
|
+
// Dashboard & Mine Additional Icons
|
|
41
|
+
'ma-account': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E`,
|
|
42
|
+
'ma-text-box-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M5 4h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM9 9h6M9 13h6M9 17h4'/%3E%3C/svg%3E`,
|
|
43
|
+
'ma-star': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E`,
|
|
44
|
+
|
|
45
|
+
// Settings Utility Icons
|
|
46
|
+
'ma-download': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E`,
|
|
47
|
+
'ma-upload': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12'/%3E%3C/svg%3E`,
|
|
48
|
+
'ma-chevron-right': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M9 18l6-6-6-6'/%3E%3C/svg%3E`,
|
|
49
|
+
'ma-chevron-left': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M15 18l-6-6 6-6'/%3E%3C/svg%3E`,
|
|
50
|
+
'ma-delete-outline': `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14M10 11v6M14 11v6'/%3E%3C/svg%3E`,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const appIconsCss: CssProps = {
|
|
54
|
+
'.ifc-icon': {
|
|
55
|
+
display: 'inline-block',
|
|
56
|
+
width: '24px',
|
|
57
|
+
height: '24px',
|
|
58
|
+
maskRepeat: 'no-repeat',
|
|
59
|
+
maskPosition: 'center',
|
|
60
|
+
maskSize: 'contain',
|
|
61
|
+
WebkitMaskRepeat: 'no-repeat',
|
|
62
|
+
WebkitMaskPosition: 'center',
|
|
63
|
+
WebkitMaskSize: 'contain',
|
|
64
|
+
backgroundColor: 'currentColor',
|
|
65
|
+
},
|
|
66
|
+
...Object.entries(appIcons).reduce((acc: any, [key, svg]) => {
|
|
67
|
+
acc['.ifc-icon.' + key] = {
|
|
68
|
+
maskImage: 'url("' + svg + '")',
|
|
69
|
+
};
|
|
70
|
+
return acc;
|
|
71
|
+
}, {} as any),
|
|
72
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { bindGlobalStyle, CssProps } from 'lupine.components';
|
|
2
|
+
|
|
3
|
+
export const getHistoryList = (key: string): string[] => {
|
|
4
|
+
try {
|
|
5
|
+
const hist = localStorage.getItem(`search_history_${key}`);
|
|
6
|
+
return hist ? JSON.parse(hist) : [];
|
|
7
|
+
} catch (e) {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const addHistoryItem = (key: string, item: string) => {
|
|
13
|
+
const current = getHistoryList(key);
|
|
14
|
+
const filtered = current.filter((x) => x !== item);
|
|
15
|
+
filtered.unshift(item);
|
|
16
|
+
// keep max 20
|
|
17
|
+
if (filtered.length > 20) {
|
|
18
|
+
filtered.pop();
|
|
19
|
+
}
|
|
20
|
+
localStorage.setItem(`search_history_${key}`, JSON.stringify(filtered));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const clearHistoryList = (key: string) => {
|
|
24
|
+
localStorage.removeItem(`search_history_${key}`);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const InputHistoryComponent = (props: {
|
|
28
|
+
label?: string;
|
|
29
|
+
historyKey: string;
|
|
30
|
+
onClearHistory: () => void;
|
|
31
|
+
onItemClick: (item: string) => void;
|
|
32
|
+
}) => {
|
|
33
|
+
const list = getHistoryList(props.historyKey);
|
|
34
|
+
const css: CssProps = {
|
|
35
|
+
padding: '4px 0',
|
|
36
|
+
'.history-c-header': {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
justifyContent: 'space-between',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
padding: '4px 0',
|
|
42
|
+
},
|
|
43
|
+
'.history-c-h-title': {
|
|
44
|
+
fontSize: '12px',
|
|
45
|
+
},
|
|
46
|
+
'.history-c-h-icon': {
|
|
47
|
+
fontSize: '16px',
|
|
48
|
+
cursor: 'pointer',
|
|
49
|
+
},
|
|
50
|
+
'.history-c-body': {
|
|
51
|
+
display: 'flex',
|
|
52
|
+
flexWrap: 'wrap',
|
|
53
|
+
gap: '8px',
|
|
54
|
+
marginTop: '8px',
|
|
55
|
+
},
|
|
56
|
+
'.history-c-item': {
|
|
57
|
+
padding: '4px 12px',
|
|
58
|
+
borderRadius: '6px',
|
|
59
|
+
border: '1px solid var(--secondary-border-color)',
|
|
60
|
+
backgroundColor: 'var(--secondary-bg-color)',
|
|
61
|
+
color: 'var(--primary-color)',
|
|
62
|
+
fontSize: '13px',
|
|
63
|
+
width: 'fit-content',
|
|
64
|
+
cursor: 'pointer',
|
|
65
|
+
},
|
|
66
|
+
'.history-c-item:hover': {
|
|
67
|
+
backgroundColor: 'var(--activatable-bg-color-hover, rgba(0,0,0,0.04))',
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
bindGlobalStyle('history-c-box', css);
|
|
71
|
+
|
|
72
|
+
if (list.length === 0) {
|
|
73
|
+
return <></>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div css={css} class='history-c-box'>
|
|
78
|
+
<div class='history-c-header'>
|
|
79
|
+
<div class='history-c-h-title'>{props.label || 'History Search List'}</div>
|
|
80
|
+
<div class='history-c-h-icon'>
|
|
81
|
+
<i class='ifc-icon ma-delete-off-outline' onClick={props.onClearHistory}></i>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
<div class='history-c-body'>
|
|
85
|
+
{list.map((item) => (
|
|
86
|
+
<div class='history-c-item' onClick={() => props.onItemClick(item)}>
|
|
87
|
+
{item}
|
|
88
|
+
</div>
|
|
89
|
+
))}
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { CssProps, HeaderWithBackFrame, SliderFrameHookProps } from 'lupine.components';
|
|
2
|
+
|
|
3
|
+
export const MineAboutContent = () => {
|
|
4
|
+
const css: CssProps = {
|
|
5
|
+
flex: 1,
|
|
6
|
+
overflowY: 'auto',
|
|
7
|
+
padding: '32px 24px',
|
|
8
|
+
backgroundColor: 'var(--primary-bg-color)',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
|
|
13
|
+
'.about-logo': {
|
|
14
|
+
width: '80px',
|
|
15
|
+
height: '80px',
|
|
16
|
+
borderRadius: '20px',
|
|
17
|
+
backgroundColor: 'var(--primary-accent-color)',
|
|
18
|
+
color: 'white',
|
|
19
|
+
display: 'flex',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
fontSize: '48px',
|
|
23
|
+
marginBottom: '16px',
|
|
24
|
+
boxShadow: '0 4px 12px rgba(24, 144, 255, 0.3)',
|
|
25
|
+
},
|
|
26
|
+
'.about-title': {
|
|
27
|
+
fontSize: '24px',
|
|
28
|
+
fontWeight: 'bold',
|
|
29
|
+
color: 'var(--primary-color)',
|
|
30
|
+
marginBottom: '8px',
|
|
31
|
+
},
|
|
32
|
+
'.about-version': {
|
|
33
|
+
fontSize: '14px',
|
|
34
|
+
color: 'var(--secondary-color)',
|
|
35
|
+
marginBottom: '32px',
|
|
36
|
+
},
|
|
37
|
+
'.about-content': {
|
|
38
|
+
fontSize: '16px',
|
|
39
|
+
color: 'var(--primary-color)',
|
|
40
|
+
lineHeight: '1.8',
|
|
41
|
+
textAlign: 'center',
|
|
42
|
+
marginBottom: '32px',
|
|
43
|
+
maxWidth: '500px',
|
|
44
|
+
whiteSpace: 'pre-wrap',
|
|
45
|
+
},
|
|
46
|
+
'.about-link': {
|
|
47
|
+
color: 'var(--primary-accent-color)',
|
|
48
|
+
textDecoration: 'none',
|
|
49
|
+
fontWeight: 'bold',
|
|
50
|
+
padding: '12px 24px',
|
|
51
|
+
border: '1px solid var(--primary-accent-color)',
|
|
52
|
+
borderRadius: '24px',
|
|
53
|
+
transition: 'all 0.2s',
|
|
54
|
+
'&:active': {
|
|
55
|
+
backgroundColor: 'rgba(24, 144, 255, 0.1)',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const textContent = `This is a demo application built for the full-stack framework Lupine.js.
|
|
61
|
+
Using this template alongside AI, you can rapidly build and deploy cross-platform applications.`;
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<div css={css} class='about-page-wrapper no-scrollbar-container flex-col h-100'>
|
|
65
|
+
<div class='about-logo'>
|
|
66
|
+
<i class='ifc-icon ma-text-box-outline'></i>
|
|
67
|
+
</div>
|
|
68
|
+
<div class='about-title'>Lupine Note Starter</div>
|
|
69
|
+
<div class='about-version'>Version 1.0.0</div>
|
|
70
|
+
|
|
71
|
+
<div class='about-content'>{textContent}</div>
|
|
72
|
+
|
|
73
|
+
<a class='about-link' href='https://github.com/uuware/lupine.js' target='_blank'>
|
|
74
|
+
Learn More
|
|
75
|
+
</a>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const MineAboutPage = (props: { sliderFrameHook?: SliderFrameHookProps }) => {
|
|
81
|
+
return (
|
|
82
|
+
<HeaderWithBackFrame title='About' onBack={(e: Event) => props.sliderFrameHook?.close!(e)}>
|
|
83
|
+
<MineAboutContent />
|
|
84
|
+
</HeaderWithBackFrame>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { CssProps, HeaderWithBackFrame, SliderFrameHookProps } from 'lupine.components';
|
|
2
|
+
|
|
3
|
+
export const MinePremiumPage = (props: { sliderFrameHook: SliderFrameHookProps }) => {
|
|
4
|
+
const css: CssProps = {
|
|
5
|
+
flex: 1,
|
|
6
|
+
overflowY: 'auto',
|
|
7
|
+
padding: '32px 24px',
|
|
8
|
+
backgroundColor: 'var(--primary-bg-color)',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
|
|
13
|
+
'.premium-logo': {
|
|
14
|
+
width: '80px',
|
|
15
|
+
height: '80px',
|
|
16
|
+
borderRadius: '20px',
|
|
17
|
+
background: 'linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%)',
|
|
18
|
+
color: '#FFD700',
|
|
19
|
+
display: 'flex',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
fontSize: '48px',
|
|
23
|
+
marginBottom: '16px',
|
|
24
|
+
boxShadow: '0 4px 12px rgba(255, 154, 158, 0.3)',
|
|
25
|
+
},
|
|
26
|
+
'.premium-title': {
|
|
27
|
+
fontSize: '24px',
|
|
28
|
+
fontWeight: 'bold',
|
|
29
|
+
color: 'var(--primary-color)',
|
|
30
|
+
marginBottom: '8px',
|
|
31
|
+
},
|
|
32
|
+
'.premium-version': {
|
|
33
|
+
fontSize: '14px',
|
|
34
|
+
color: 'var(--secondary-color)',
|
|
35
|
+
marginBottom: '32px',
|
|
36
|
+
},
|
|
37
|
+
'.premium-content': {
|
|
38
|
+
fontSize: '16px',
|
|
39
|
+
color: 'var(--primary-color)',
|
|
40
|
+
lineHeight: '1.8',
|
|
41
|
+
textAlign: 'center',
|
|
42
|
+
marginBottom: '32px',
|
|
43
|
+
maxWidth: '500px',
|
|
44
|
+
whiteSpace: 'pre-wrap',
|
|
45
|
+
},
|
|
46
|
+
'.premium-link': {
|
|
47
|
+
color: 'var(--primary-accent-color)',
|
|
48
|
+
textDecoration: 'none',
|
|
49
|
+
fontWeight: 'bold',
|
|
50
|
+
padding: '12px 24px',
|
|
51
|
+
border: '1px solid var(--primary-accent-color)',
|
|
52
|
+
borderRadius: '24px',
|
|
53
|
+
transition: 'all 0.2s',
|
|
54
|
+
'&:active': {
|
|
55
|
+
backgroundColor: 'rgba(24, 144, 255, 0.1)',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const textContent = `This is a demo application built for the full-stack framework Lupine.js.
|
|
61
|
+
If you need customized special functions or premium features, please click the button below to open the github open source link and raise an issue.`;
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<HeaderWithBackFrame title='Premium Demo' onBack={(e: Event) => props.sliderFrameHook.close!(e)}>
|
|
65
|
+
<div css={css} class='premium-page-wrapper no-scrollbar-container flex-col h-100'>
|
|
66
|
+
<div class='premium-logo'>
|
|
67
|
+
<i class='ifc-icon ma-star'></i>
|
|
68
|
+
</div>
|
|
69
|
+
<div class='premium-title'>Premium Features</div>
|
|
70
|
+
<div class='premium-version'>Unlock the Full Potential</div>
|
|
71
|
+
|
|
72
|
+
<div class='premium-content'>{textContent}</div>
|
|
73
|
+
|
|
74
|
+
<a class='premium-link' href='https://github.com/uuware/lupine.js/issues/new' target='_blank'>
|
|
75
|
+
Request Custom Features
|
|
76
|
+
</a>
|
|
77
|
+
</div>
|
|
78
|
+
</HeaderWithBackFrame>
|
|
79
|
+
);
|
|
80
|
+
};
|