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,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "lupine-template-hello-world",
|
|
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
|
-
"
|
|
14
|
-
"from": "web/assets",
|
|
15
|
-
"to": "assets"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"
|
|
19
|
-
"from": "api/resources",
|
|
20
|
-
"to": "resources"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "lupine-template-hello-world",
|
|
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
|
+
"env": "all",
|
|
14
|
+
"from": "web/assets",
|
|
15
|
+
"to": "web/assets"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"env": "all",
|
|
19
|
+
"from": "api/resources",
|
|
20
|
+
"to": "data/resources"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "hello-world-web",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"dependencies": {},
|
|
5
|
-
"devDependencies": {}
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "hello-world-web",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"dependencies": {},
|
|
5
|
+
"devDependencies": {}
|
|
6
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html data-theme="<!--META-THEME-->">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<title><!--META-TITLE--></title>
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, user-scalable=no" />
|
|
7
|
-
<!--META-ENV-START-->
|
|
8
|
-
<!--META-ENV-END-->
|
|
9
|
-
<link rel="shortcut icon" href="{SUBDIR}/assets/favicon.ico?t={hash}" type="image/x-icon" />
|
|
10
|
-
<link rel="stylesheet" type="text/css" href="{SUBDIR}/index.css?t={hash}" />
|
|
11
|
-
<script defer src="{SUBDIR}/index.js?t={hash}"></script>
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<div class="lupine-root"></div>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html data-theme="<!--META-THEME-->">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title><!--META-TITLE--></title>
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, user-scalable=no" />
|
|
7
|
+
<!--META-ENV-START-->
|
|
8
|
+
<!--META-ENV-END-->
|
|
9
|
+
<link rel="shortcut icon" href="{SUBDIR}/assets/favicon.ico?t={hash}" type="image/x-icon" />
|
|
10
|
+
<link rel="stylesheet" type="text/css" href="{SUBDIR}/index.css?t={hash}" />
|
|
11
|
+
<script defer src="{SUBDIR}/index.js?t={hash}"></script>
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div class="lupine-root"></div>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
// css order is important
|
|
2
|
-
import './styles/global.css';
|
|
3
|
-
import './styles/app.css';
|
|
4
|
-
|
|
5
|
-
import { bindRouter, CssProps, isFrontEnd, PageRouter, webEnv, debugWatch, useState } from 'lupine.components';
|
|
6
|
-
|
|
7
|
-
// ── useState demo component ─────────────────────────────────────
|
|
8
|
-
const Counter = () => {
|
|
9
|
-
const [count, setCount] = useState(0);
|
|
10
|
-
const [name, setName] = useState('World');
|
|
11
|
-
const [show, setShow] = useState(true);
|
|
12
|
-
|
|
13
|
-
const css: CssProps = {
|
|
14
|
-
display: 'inline-block',
|
|
15
|
-
padding: '24px',
|
|
16
|
-
border: '2px solid #4f8ef7',
|
|
17
|
-
borderRadius: '12px',
|
|
18
|
-
margin: '20px',
|
|
19
|
-
minWidth: '280px',
|
|
20
|
-
fontFamily: 'monospace',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<div css={css}>
|
|
25
|
-
{/* number state */}
|
|
26
|
-
<p>
|
|
27
|
-
count = <strong>{count}</strong>
|
|
28
|
-
</p>
|
|
29
|
-
<button onClick={() => setCount(count - 1)}>−</button> <button onClick={() => setCount(count + 1)}>+</button>{' '}
|
|
30
|
-
{/* functional update test */}
|
|
31
|
-
<button onClick={() => setCount((n) => n * 2)}>×2</button>
|
|
32
|
-
{/* string state */}
|
|
33
|
-
<p style={{ marginTop: '12px' }}>
|
|
34
|
-
Hello, <strong>{name}</strong>!
|
|
35
|
-
</p>
|
|
36
|
-
<button onClick={() => setName(name === 'World' ? 'Lupine' : 'World')}>Toggle name</button>
|
|
37
|
-
{/* boolean state + multiple setState calls should batch into one rerender */}
|
|
38
|
-
<p style={{ marginTop: '12px' }}>
|
|
39
|
-
<button
|
|
40
|
-
onClick={() => {
|
|
41
|
-
// 3 consecutive setState calls — should batch into 1 rerender
|
|
42
|
-
setCount(count + 10);
|
|
43
|
-
setName('Batch!');
|
|
44
|
-
setShow(!show);
|
|
45
|
-
}}
|
|
46
|
-
>
|
|
47
|
-
Batch
|
|
48
|
-
</button>
|
|
49
|
-
</p>
|
|
50
|
-
{show && <p>✅ true</p>}
|
|
51
|
-
{!show && <p>❌ false</p>}
|
|
52
|
-
</div>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const HelloPage = () => (
|
|
57
|
-
<div css={{ textAlign: 'center', padding: '20px' }}>
|
|
58
|
-
<h1>Demo</h1>
|
|
59
|
-
<Counter />
|
|
60
|
-
<Counter /> {/* two independent instances — state is isolated */}
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
// ────────────────────────────────────────────────────────────────
|
|
64
|
-
|
|
65
|
-
// #if DEV==='1'
|
|
66
|
-
if (isFrontEnd() && webEnv('NODE_ENV', '') === 'development') {
|
|
67
|
-
debugWatch(webEnv('API_PORT', 0));
|
|
68
|
-
}
|
|
69
|
-
// #endif
|
|
70
|
-
|
|
71
|
-
const pageRouter = new PageRouter();
|
|
72
|
-
pageRouter.use('/', HelloPage);
|
|
73
|
-
bindRouter(pageRouter);
|
|
1
|
+
// css order is important
|
|
2
|
+
import './styles/global.css';
|
|
3
|
+
import './styles/app.css';
|
|
4
|
+
|
|
5
|
+
import { bindRouter, CssProps, isFrontEnd, PageRouter, webEnv, debugWatch, useState } from 'lupine.components';
|
|
6
|
+
|
|
7
|
+
// ── useState demo component ─────────────────────────────────────
|
|
8
|
+
const Counter = () => {
|
|
9
|
+
const [count, setCount] = useState(0);
|
|
10
|
+
const [name, setName] = useState('World');
|
|
11
|
+
const [show, setShow] = useState(true);
|
|
12
|
+
|
|
13
|
+
const css: CssProps = {
|
|
14
|
+
display: 'inline-block',
|
|
15
|
+
padding: '24px',
|
|
16
|
+
border: '2px solid #4f8ef7',
|
|
17
|
+
borderRadius: '12px',
|
|
18
|
+
margin: '20px',
|
|
19
|
+
minWidth: '280px',
|
|
20
|
+
fontFamily: 'monospace',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div css={css}>
|
|
25
|
+
{/* number state */}
|
|
26
|
+
<p>
|
|
27
|
+
count = <strong>{count}</strong>
|
|
28
|
+
</p>
|
|
29
|
+
<button onClick={() => setCount(count - 1)}>−</button> <button onClick={() => setCount(count + 1)}>+</button>{' '}
|
|
30
|
+
{/* functional update test */}
|
|
31
|
+
<button onClick={() => setCount((n) => n * 2)}>×2</button>
|
|
32
|
+
{/* string state */}
|
|
33
|
+
<p style={{ marginTop: '12px' }}>
|
|
34
|
+
Hello, <strong>{name}</strong>!
|
|
35
|
+
</p>
|
|
36
|
+
<button onClick={() => setName(name === 'World' ? 'Lupine' : 'World')}>Toggle name</button>
|
|
37
|
+
{/* boolean state + multiple setState calls should batch into one rerender */}
|
|
38
|
+
<p style={{ marginTop: '12px' }}>
|
|
39
|
+
<button
|
|
40
|
+
onClick={() => {
|
|
41
|
+
// 3 consecutive setState calls — should batch into 1 rerender
|
|
42
|
+
setCount(count + 10);
|
|
43
|
+
setName('Batch!');
|
|
44
|
+
setShow(!show);
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
Batch
|
|
48
|
+
</button>
|
|
49
|
+
</p>
|
|
50
|
+
{show && <p>✅ true</p>}
|
|
51
|
+
{!show && <p>❌ false</p>}
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const HelloPage = () => (
|
|
57
|
+
<div css={{ textAlign: 'center', padding: '20px' }}>
|
|
58
|
+
<h1>Demo</h1>
|
|
59
|
+
<Counter />
|
|
60
|
+
<Counter /> {/* two independent instances — state is isolated */}
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
// ────────────────────────────────────────────────────────────────
|
|
64
|
+
|
|
65
|
+
// #if DEV==='1'
|
|
66
|
+
if (isFrontEnd() && webEnv('NODE_ENV', '') === 'development') {
|
|
67
|
+
debugWatch(webEnv('API_PORT', 0));
|
|
68
|
+
}
|
|
69
|
+
// #endif
|
|
70
|
+
|
|
71
|
+
const pageRouter = new PageRouter();
|
|
72
|
+
pageRouter.use('/', HelloPage);
|
|
73
|
+
bindRouter(pageRouter);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#-- sql queries to create tables
|
|
2
|
-
#-- Never name a table with plural (such as "users")
|
|
3
|
-
#-- Never name a table using a reserved keyword (such as "user")
|
|
1
|
+
#-- sql queries to create tables
|
|
2
|
+
#-- Never name a table with plural (such as "users")
|
|
3
|
+
#-- Never name a table using a reserved keyword (such as "user")
|
|
4
4
|
#-- Never prefix your table name with "tbl" or some other object type prefix
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiModule } from 'lupine.api';
|
|
2
|
-
import { RootApi } from './service/root-api';
|
|
3
|
-
|
|
4
|
-
export const apiModule = new ApiModule(new RootApi());
|
|
1
|
+
import { ApiModule } from 'lupine.api';
|
|
2
|
+
import { RootApi } from './service/root-api';
|
|
3
|
+
|
|
4
|
+
export const apiModule = new ApiModule(new RootApi());
|
|
@@ -1,18 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"apiEntryPoint": "api/src/index.ts",
|
|
16
16
|
"copyFiles": [
|
|
17
17
|
{
|
|
18
|
-
"
|
|
18
|
+
"env": "all",
|
|
19
19
|
"from": "web/assets",
|
|
20
|
-
"to": "assets"
|
|
20
|
+
"to": "web/assets"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"
|
|
23
|
+
"env": "all",
|
|
24
24
|
"from": "web/src/lupine-template-responsive-starter/404.html",
|
|
25
|
-
"to": "lupine-template-responsive-starter/404.html"
|
|
25
|
+
"to": "web/lupine-template-responsive-starter/404.html"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
"
|
|
28
|
+
"env": "all",
|
|
29
29
|
"from": "api/resources",
|
|
30
|
-
"to": "resources"
|
|
30
|
+
"to": "data/resources"
|
|
31
31
|
}
|
|
32
32
|
]
|
|
33
|
-
}
|
|
33
|
+
}
|
|
@@ -1,76 +1,76 @@
|
|
|
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
|
-
'-webkit-mask-repeat': 'no-repeat',
|
|
62
|
-
'-webkit-mask-position': 'center',
|
|
63
|
-
'-webkit-mask-size': 'contain',
|
|
64
|
-
WebkitMaskRepeat: 'no-repeat',
|
|
65
|
-
WebkitMaskPosition: 'center',
|
|
66
|
-
WebkitMaskSize: 'contain',
|
|
67
|
-
backgroundColor: 'currentColor',
|
|
68
|
-
},
|
|
69
|
-
...Object.entries(appIcons).reduce((acc: any, [key, svg]) => {
|
|
70
|
-
acc['.ifc-icon.' + key] = {
|
|
71
|
-
'-webkit-mask-image': 'url("' + svg + '")',
|
|
72
|
-
maskImage: 'url("' + svg + '")',
|
|
73
|
-
};
|
|
74
|
-
return acc;
|
|
75
|
-
}, {} as any),
|
|
76
|
-
};
|
|
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
|
+
'-webkit-mask-repeat': 'no-repeat',
|
|
62
|
+
'-webkit-mask-position': 'center',
|
|
63
|
+
'-webkit-mask-size': 'contain',
|
|
64
|
+
WebkitMaskRepeat: 'no-repeat',
|
|
65
|
+
WebkitMaskPosition: 'center',
|
|
66
|
+
WebkitMaskSize: 'contain',
|
|
67
|
+
backgroundColor: 'currentColor',
|
|
68
|
+
},
|
|
69
|
+
...Object.entries(appIcons).reduce((acc: any, [key, svg]) => {
|
|
70
|
+
acc['.ifc-icon.' + key] = {
|
|
71
|
+
'-webkit-mask-image': 'url("' + svg + '")',
|
|
72
|
+
maskImage: 'url("' + svg + '")',
|
|
73
|
+
};
|
|
74
|
+
return acc;
|
|
75
|
+
}, {} as any),
|
|
76
|
+
};
|