create-lupine 1.2.0 → 1.3.1
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/README.md +13 -7
- package/index.js +236 -109
- package/package.json +1 -1
- package/templates/common/.agents/skills/lupine-framework/SKILL.md +3 -3
- package/templates/common/.agents/skills/lupine-framework/references/backend-api.md +16 -1
- package/templates/common/.agents/skills/lupine-framework/references/icon-handling.md +1 -1
- package/templates/common/.agents/skills/lupine-framework/references/mobile-interactions.md +17 -88
- package/templates/common/.agents/skills/lupine-framework/references/native-apps.md +47 -24
- package/templates/common/.agents/skills/lupine-framework/references/navigation-and-routing.md +1 -0
- package/templates/common/.agents/skills/lupine-framework/references/reactivity-and-state.md +2 -2
- package/templates/common/.agents/skills/lupine-framework/references/styling-and-themes.md +3 -1
- package/templates/common/.env.development +2 -0
- package/templates/common/.env.mobile +4 -3
- package/templates/common/_env +10 -5
- package/templates/common/apps/server/README.md +10 -0
- package/templates/common/dev/cp-folder.js +9 -4
- package/templates/lupine-template-cv-starter/README.md +33 -1
- package/templates/lupine-template-cv-starter/app/package.json +20 -0
- package/templates/lupine-template-cv-starter/app/src/app.tsx +6 -0
- package/templates/lupine-template-cv-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-cv-starter/app/src/index.test.tsx +71 -0
- package/templates/lupine-template-cv-starter/app/src/index.web.tsx +28 -0
- package/templates/lupine-template-cv-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-cv-starter/lupine.json +8 -7
- package/templates/lupine-template-cv-starter/web/src/index.html +9 -2
- package/templates/lupine-template-cv-starter/web/src/index.tsx +9 -14
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.html +9 -2
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.tsx +4 -20
- package/templates/lupine-template-doc-starter/README.md +33 -1
- package/templates/lupine-template-doc-starter/app/package.json +20 -0
- package/templates/lupine-template-doc-starter/app/src/app.tsx +6 -0
- package/templates/lupine-template-doc-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-doc-starter/app/src/index.test.tsx +78 -0
- package/templates/lupine-template-doc-starter/app/src/index.web.tsx +28 -0
- package/templates/lupine-template-doc-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-doc-starter/lupine.json +8 -7
- package/templates/lupine-template-doc-starter/web/src/index.html +9 -2
- package/templates/lupine-template-doc-starter/web/src/index.tsx +9 -14
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.html +9 -2
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.tsx +4 -20
- package/templates/lupine-template-fullstack-note/README.md +83 -0
- package/templates/{lupine-template-cv-starter → lupine-template-fullstack-note}/api/package.json +2 -2
- package/templates/lupine-template-fullstack-note/api/resources/install.mysql.sql +32 -0
- package/templates/lupine-template-fullstack-note/api/resources/install.sqlite.sql +27 -0
- package/templates/lupine-template-fullstack-note/api/src/service/answer.ts +39 -0
- package/templates/lupine-template-fullstack-note/api/src/service/api.ts +52 -0
- package/templates/lupine-template-fullstack-note/api/src/service/db.ts +78 -0
- package/templates/lupine-template-fullstack-note/api/src/service/notes-api.ts +86 -0
- package/templates/lupine-template-fullstack-note/api/src/service/root-api.ts +19 -0
- package/templates/lupine-template-fullstack-note/api/src/service/user-api.ts +182 -0
- package/templates/lupine-template-fullstack-note/app/package.json +19 -0
- package/templates/lupine-template-fullstack-note/app/src/app.tsx +75 -0
- package/templates/lupine-template-fullstack-note/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-fullstack-note/app/src/index.test.tsx +373 -0
- package/templates/lupine-template-fullstack-note/app/src/index.web.tsx +20 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/components.tsx +65 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/details.tsx +38 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/discover.tsx +25 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/home.tsx +76 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/inbox.tsx +49 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/login.tsx +54 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/me.tsx +32 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/notes.tsx +128 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/settings.tsx +45 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/AppMenu.tsx +44 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/api.ts +159 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/data.ts +20 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/locales/ja.ts +80 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/locales/zh-CN.ts +80 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/texts.ts +14 -0
- package/templates/lupine-template-fullstack-note/app/tsconfig.json +17 -0
- package/templates/lupine-template-fullstack-note/lupine.json +25 -0
- package/templates/lupine-template-fullstack-note/web/assets/favicon.ico +0 -0
- package/templates/{lupine-template-doc-starter/api → lupine-template-fullstack-note/web}/package.json +2 -2
- package/templates/lupine-template-fullstack-note/web/src/index.html +23 -0
- package/templates/lupine-template-fullstack-note/web/src/index.tsx +15 -0
- package/templates/lupine-template-fullstack-starter/README.md +64 -14
- package/templates/lupine-template-fullstack-starter/api/resources/install.mysql.sql +2 -2
- package/templates/lupine-template-fullstack-starter/api/resources/install.sqlite.sql +2 -2
- package/templates/lupine-template-fullstack-starter/api/src/service/contact-api.ts +2 -2
- package/templates/lupine-template-fullstack-starter/api/src/service/user-api.ts +72 -47
- package/templates/lupine-template-fullstack-starter/app/package.json +20 -0
- package/templates/lupine-template-fullstack-starter/app/src/app.tsx +76 -0
- package/templates/lupine-template-fullstack-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-fullstack-starter/app/src/index.test.tsx +276 -0
- package/templates/lupine-template-fullstack-starter/app/src/index.web.tsx +28 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/about.tsx +27 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/contact.tsx +41 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/favorite.tsx +27 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/home.tsx +63 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/login.tsx +63 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/mine.tsx +44 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/profile.tsx +58 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/register.tsx +48 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/reset-password.tsx +41 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/settings.tsx +33 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/story.tsx +46 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/api.ts +127 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/parts.tsx +100 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/stories.ts +65 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/texts.ts +79 -0
- package/templates/lupine-template-fullstack-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-fullstack-starter/lupine.json +6 -7
- package/templates/lupine-template-fullstack-starter/web/src/admin/admin-patch.tsx +34 -0
- package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/home-search-component.tsx +18 -25
- package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/story-card.tsx +17 -8
- package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/story-list.tsx +1 -2
- package/templates/lupine-template-fullstack-starter/web/src/{admin_dev → admin}/index.html +1 -0
- package/templates/lupine-template-fullstack-starter/web/src/{admin_dev → admin}/index.tsx +13 -28
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-cfg.tsx +23 -19
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-item-edit.tsx +3 -4
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-item-list.tsx +2 -3
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-user.tsx +15 -20
- package/templates/lupine-template-fullstack-starter/web/src/index.html +8 -2
- package/templates/lupine-template-fullstack-starter/web/src/index.tsx +11 -150
- package/templates/lupine-template-fullstack-starter/web/src/services/fetch-data.ts +7 -25
- package/templates/lupine-template-fullstack-starter/web/src/styles/base-css.ts +0 -3
- package/templates/lupine-template-fullstack-starter/web/src/styles/theme.ts +1 -2
- package/templates/lupine-template-responsive-starter/README.md +46 -2
- package/templates/lupine-template-responsive-starter/app/package.json +19 -0
- package/templates/lupine-template-responsive-starter/app/src/app.tsx +80 -0
- package/templates/lupine-template-responsive-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-responsive-starter/app/src/index.test.tsx +283 -0
- package/templates/lupine-template-responsive-starter/app/src/index.web.tsx +31 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/about.tsx +23 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/finance.tsx +48 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/mine.tsx +60 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/not-found.tsx +9 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/note-detail.tsx +43 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/note-edit.tsx +45 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/note-search.tsx +62 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/notes.tsx +71 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/settings.tsx +55 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/tools.tsx +112 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/icons.ts +7 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/layout.ts +18 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/locales/zh-CN.ts +89 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/menu.tsx +81 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/nav.ts +12 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/store.ts +72 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/texts.ts +11 -0
- package/templates/lupine-template-responsive-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-responsive-starter/lupine.json +7 -6
- package/templates/lupine-template-responsive-starter/web/src/index.html +9 -2
- package/templates/lupine-template-responsive-starter/web/src/index.tsx +9 -25
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.html +12 -6
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.tsx +12 -22
- package/templates/common/apps/server/src/app-loader.ts +0 -4
- package/templates/lupine-template-cv-starter/api/resources/config_default.json +0 -6
- package/templates/lupine-template-cv-starter/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-cv-starter/api/src/index.ts +0 -15
- package/templates/lupine-template-cv-starter/web/src/client-env-keys.ts +0 -5
- package/templates/lupine-template-cv-starter/web/src/styles/base-css.ts +0 -15
- package/templates/lupine-template-doc-starter/api/resources/config_default.json +0 -6
- package/templates/lupine-template-doc-starter/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-doc-starter/api/src/index.ts +0 -15
- package/templates/lupine-template-doc-starter/api/src/resources/config_default.json +0 -6
- package/templates/lupine-template-doc-starter/api/src/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-doc-starter/web/src/client-env-keys.ts +0 -5
- package/templates/lupine-template-doc-starter/web/src/styles/base-css.ts +0 -15
- package/templates/lupine-template-fullstack-starter/web/src/admin_dev/admin-about.tsx +0 -16
- package/templates/lupine-template-fullstack-starter/web/src/admin_dev/admin-patch.ts +0 -22
- package/templates/lupine-template-fullstack-starter/web/src/components/footer-menu.tsx +0 -52
- package/templates/lupine-template-fullstack-starter/web/src/components/footer.tsx +0 -15
- package/templates/lupine-template-fullstack-starter/web/src/components/header.tsx +0 -75
- package/templates/lupine-template-fullstack-starter/web/src/components/login-code-zh.tsx +0 -162
- package/templates/lupine-template-fullstack-starter/web/src/components/login-code.tsx +0 -165
- package/templates/lupine-template-fullstack-starter/web/src/components/login-zh.tsx +0 -118
- package/templates/lupine-template-fullstack-starter/web/src/components/login.tsx +0 -122
- package/templates/lupine-template-fullstack-starter/web/src/components/not-found-page.tsx +0 -12
- package/templates/lupine-template-fullstack-starter/web/src/components/register-zh.tsx +0 -161
- package/templates/lupine-template-fullstack-starter/web/src/components/register.tsx +0 -163
- package/templates/lupine-template-fullstack-starter/web/src/components/reset-password-zh.tsx +0 -166
- package/templates/lupine-template-fullstack-starter/web/src/components/reset-password.tsx +0 -177
- package/templates/lupine-template-fullstack-starter/web/src/components/user-info.tsx +0 -84
- package/templates/lupine-template-fullstack-starter/web/src/frames/admin-page-frame.tsx +0 -48
- package/templates/lupine-template-fullstack-starter/web/src/frames/frame1-page-frame.tsx +0 -61
- package/templates/lupine-template-fullstack-starter/web/src/frames/frame2-page-frame.tsx +0 -61
- package/templates/lupine-template-fullstack-starter/web/src/frames/top-frame.tsx +0 -23
- package/templates/lupine-template-fullstack-starter/web/src/frames/user-page-frame.tsx +0 -90
- package/templates/lupine-template-fullstack-starter/web/src/models/index.ts +0 -15
- package/templates/lupine-template-fullstack-starter/web/src/pages/contact.tsx +0 -105
- package/templates/lupine-template-fullstack-starter/web/src/pages/page1-page.tsx +0 -38
- package/templates/lupine-template-fullstack-starter/web/src/pages/page2-page.tsx +0 -38
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-favorite-page.tsx +0 -58
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-home-page.tsx +0 -27
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-mine-page.tsx +0 -54
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page-zh.tsx +0 -112
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page.tsx +0 -112
- package/templates/lupine-template-fullstack-starter/web/src/pages/user1-page.tsx +0 -57
- package/templates/lupine-template-fullstack-starter/web/src/services/shared-data.ts +0 -19
- package/templates/lupine-template-fullstack-starter/web/src/styles/app.css +0 -0
- package/templates/lupine-template-responsive-starter/api/package.json +0 -6
- package/templates/lupine-template-responsive-starter/api/resources/config_default.json +0 -6
- package/templates/lupine-template-responsive-starter/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-responsive-starter/api/src/service/root-api.ts +0 -18
- package/templates/lupine-template-responsive-starter/web/src/app-icons.ts +0 -76
- package/templates/lupine-template-responsive-starter/web/src/components/input-history-component.tsx +0 -93
- package/templates/lupine-template-responsive-starter/web/src/components/mine-about-page.tsx +0 -87
- package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +0 -81
- package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +0 -211
- package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +0 -107
- package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +0 -110
- package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +0 -144
- package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +0 -188
- package/templates/lupine-template-responsive-starter/web/src/components/search-input.tsx +0 -95
- package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx +0 -169
- package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +0 -53
- package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +0 -32
- package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +0 -35
- package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +0 -444
- package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +0 -318
- package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +0 -35
- package/templates/lupine-template-responsive-starter/web/src/services/local-notes-service.ts +0 -87
- package/templates/lupine-template-responsive-starter/web/src/services/mine-service.ts +0 -45
- package/templates/lupine-template-responsive-starter/web/src/styles/app.css +0 -0
- package/templates/lupine-template-responsive-starter/web/src/styles/base-css.ts +0 -65
- package/templates/lupine-template-responsive-starter/web/src/styles/global.css +0 -2130
- package/templates/lupine-template-responsive-starter/web/src/styles/theme.ts +0 -17
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/01-experience/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/02-projects/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/03-skills/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/04-education/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/01-experience/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/02-projects/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/03-skills/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/04-education/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/01-experience/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/02-projects/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/03-skills/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/04-education/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/01-experience/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/02-projects/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/03-skills/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/04-education/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/list.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/install.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/started.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/list.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/install.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/started.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/list.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/install.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/started.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/list.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/install.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/started.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
- /package/templates/{lupine-template-responsive-starter → lupine-template-fullstack-note}/api/src/index.ts +0 -0
- /package/templates/lupine-template-fullstack-starter/{web/assets/images → app/assets}/sample.png +0 -0
- /package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/story-props.ts +0 -0
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { createSignal, CssProps, onMount } from 'lupine.web';
|
|
2
|
-
import {
|
|
3
|
-
NotificationColor,
|
|
4
|
-
NotificationMessage,
|
|
5
|
-
SliderFrameHookProps,
|
|
6
|
-
HeaderWithBackFrame,
|
|
7
|
-
ActionSheetColorPicker,
|
|
8
|
-
createField,
|
|
9
|
-
} from 'lupine.web.components';
|
|
10
|
-
// HEditor relies on complex setup in original app, fallback to simple textarea for robustness here
|
|
11
|
-
import { LocalNoteProps, LocalNotesService } from '../services/local-notes-service';
|
|
12
|
-
|
|
13
|
-
export const NoteEditComponent = (props: {
|
|
14
|
-
note?: LocalNoteProps;
|
|
15
|
-
sliderFrameHook: SliderFrameHookProps;
|
|
16
|
-
onSaved: () => void;
|
|
17
|
-
}) => {
|
|
18
|
-
const isEdit = !!props.note;
|
|
19
|
-
const noteId = props.note ? props.note.id : -1;
|
|
20
|
-
const title = createField(props.note?.title || '');
|
|
21
|
-
const content = createField(props.note?.content || '');
|
|
22
|
-
const [color, setColor] = createSignal(props.note?.color || '');
|
|
23
|
-
let titleInput!: HTMLInputElement;
|
|
24
|
-
// Auto-focus title if new note
|
|
25
|
-
onMount(() => {
|
|
26
|
-
if (!isEdit) titleInput.focus();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const pickColor = async () => {
|
|
30
|
-
const res = await ActionSheetColorPicker({
|
|
31
|
-
value: color(),
|
|
32
|
-
title: 'Select Color Tag',
|
|
33
|
-
});
|
|
34
|
-
if (res !== undefined) setColor(res);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const onSave = () => {
|
|
38
|
-
if (!title().trim()) {
|
|
39
|
-
NotificationMessage.sendMessage('Please enter a note title', NotificationColor.Error);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
LocalNotesService.saveNote({
|
|
44
|
-
id: noteId,
|
|
45
|
-
title: title().trim(),
|
|
46
|
-
content: content().trim(),
|
|
47
|
-
color: color(),
|
|
48
|
-
updatedAt: Date.now(),
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
NotificationMessage.sendMessage(isEdit ? 'Modified and saved' : 'Note added', NotificationColor.Success);
|
|
52
|
-
props.onSaved();
|
|
53
|
-
props.sliderFrameHook.close!(new MouseEvent('click'));
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const css: CssProps = {
|
|
57
|
-
display: 'flex',
|
|
58
|
-
flexDirection: 'column',
|
|
59
|
-
height: '100%',
|
|
60
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
61
|
-
padding: '16px',
|
|
62
|
-
|
|
63
|
-
'.note-edit-title-input': {
|
|
64
|
-
width: '100%',
|
|
65
|
-
fontSize: '20px',
|
|
66
|
-
fontWeight: 'bold',
|
|
67
|
-
padding: '8px',
|
|
68
|
-
backgroundColor: 'transparent',
|
|
69
|
-
color: 'var(--primary-color)',
|
|
70
|
-
outline: 'none',
|
|
71
|
-
marginBottom: '16px',
|
|
72
|
-
'&:focus': {
|
|
73
|
-
borderBottomColor: 'var(--primary-accent-color)',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
'.note-edit-body-input': {
|
|
77
|
-
flex: 1,
|
|
78
|
-
padding: '12px',
|
|
79
|
-
backgroundColor: 'transparent',
|
|
80
|
-
color: 'var(--primary-color)',
|
|
81
|
-
fontSize: '16px',
|
|
82
|
-
resize: 'none',
|
|
83
|
-
outline: 'none',
|
|
84
|
-
lineHeight: '1.6',
|
|
85
|
-
},
|
|
86
|
-
'.note-edit-color-row': {
|
|
87
|
-
display: 'flex',
|
|
88
|
-
alignItems: 'center',
|
|
89
|
-
padding: '12px',
|
|
90
|
-
cursor: 'pointer',
|
|
91
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
92
|
-
borderRadius: '8px',
|
|
93
|
-
marginBottom: '16px',
|
|
94
|
-
color: 'var(--primary-color)',
|
|
95
|
-
fontWeight: 'bold',
|
|
96
|
-
fontSize: '16px',
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<HeaderWithBackFrame
|
|
102
|
-
title={isEdit ? 'Edit Note' : 'New Note'}
|
|
103
|
-
onBack={(e: Event) => props.sliderFrameHook.close!(e)}
|
|
104
|
-
right={
|
|
105
|
-
<div
|
|
106
|
-
onClick={onSave}
|
|
107
|
-
style={{
|
|
108
|
-
color: 'var(--primary-accent-color)',
|
|
109
|
-
fontWeight: 'bold',
|
|
110
|
-
fontSize: '16px',
|
|
111
|
-
padding: '0 8px',
|
|
112
|
-
cursor: 'pointer',
|
|
113
|
-
}}
|
|
114
|
-
>
|
|
115
|
-
Save
|
|
116
|
-
</div>
|
|
117
|
-
}
|
|
118
|
-
>
|
|
119
|
-
<div css={css} class='note-edit-container flex-col h-100'>
|
|
120
|
-
<input
|
|
121
|
-
ref={(el) => (titleInput = el)}
|
|
122
|
-
type='text'
|
|
123
|
-
class='input-base note-edit-title-input'
|
|
124
|
-
placeholder='Title...'
|
|
125
|
-
{...title.input}
|
|
126
|
-
maxLength={50}
|
|
127
|
-
/>
|
|
128
|
-
<div class='note-edit-color-row' onClick={pickColor}>
|
|
129
|
-
<div class='flex-1'>Color Tag</div>
|
|
130
|
-
<div
|
|
131
|
-
class='note-color-preview color-preview-box'
|
|
132
|
-
style={() => ({ backgroundColor: color() || 'transparent' })}
|
|
133
|
-
></div>
|
|
134
|
-
<i class='ifc-icon ma-pencil-outline icon-btn-secondary' />
|
|
135
|
-
</div>
|
|
136
|
-
<textarea
|
|
137
|
-
class='input-base note-edit-body-input'
|
|
138
|
-
placeholder='Write your note...'
|
|
139
|
-
{...content.input}
|
|
140
|
-
></textarea>
|
|
141
|
-
</div>
|
|
142
|
-
</HeaderWithBackFrame>
|
|
143
|
-
);
|
|
144
|
-
};
|
package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { createSignal, CssProps, onMount } from 'lupine.web';
|
|
2
|
-
import { HeaderWithBackFrame, SliderFrame, SliderFrameHookProps } from 'lupine.web.components';
|
|
3
|
-
import { SearchInput, SearchInputHookProps } from './search-input';
|
|
4
|
-
import { InputHistoryComponent, addHistoryItem } from './input-history-component';
|
|
5
|
-
import { LocalNoteProps, LocalNotesService } from '../services/local-notes-service';
|
|
6
|
-
import { NoteDetailComponent } from './note-detail';
|
|
7
|
-
import { clearHistoryList } from './input-history-component';
|
|
8
|
-
|
|
9
|
-
const extractText = (html: string) => {
|
|
10
|
-
const tmp = document.createElement('DIV');
|
|
11
|
-
tmp.innerHTML = html;
|
|
12
|
-
return tmp.textContent || tmp.innerText || '';
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const NoteSearchComponent = (props: { sliderFrameHook: SliderFrameHookProps }) => {
|
|
16
|
-
const [listDom, setListDom] = createSignal<any>('');
|
|
17
|
-
const [historyDom, setHistoryDom] = createSignal<any>('');
|
|
18
|
-
|
|
19
|
-
const searchInputHook: SearchInputHookProps = {};
|
|
20
|
-
// this is the inner slide hook for editing from search results
|
|
21
|
-
const subSliderHook: SliderFrameHookProps = {};
|
|
22
|
-
|
|
23
|
-
const historyKey = 'note-search';
|
|
24
|
-
|
|
25
|
-
const onSearch = (value?: string) => {
|
|
26
|
-
const val = (value || '').trim();
|
|
27
|
-
if (val) {
|
|
28
|
-
addHistoryItem(historyKey, val);
|
|
29
|
-
hideHistory();
|
|
30
|
-
} else {
|
|
31
|
-
showHistory();
|
|
32
|
-
}
|
|
33
|
-
refreshList(val);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const onClearSearch = () => {
|
|
37
|
-
onSearch('');
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const showHistory = () => {
|
|
41
|
-
setHistoryDom(
|
|
42
|
-
<InputHistoryComponent
|
|
43
|
-
historyKey={historyKey}
|
|
44
|
-
onClearHistory={() => {
|
|
45
|
-
clearHistoryList(historyKey);
|
|
46
|
-
showHistory();
|
|
47
|
-
}}
|
|
48
|
-
onItemClick={(item) => {
|
|
49
|
-
searchInputHook.setValue!(item);
|
|
50
|
-
onSearch(item);
|
|
51
|
-
}}
|
|
52
|
-
/>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const hideHistory = () => {
|
|
57
|
-
setHistoryDom('');
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const onViewNote = (note: LocalNoteProps) => {
|
|
61
|
-
subSliderHook.load!(
|
|
62
|
-
<NoteDetailComponent
|
|
63
|
-
note={note}
|
|
64
|
-
sliderFrameHook={subSliderHook}
|
|
65
|
-
onSaved={() => {
|
|
66
|
-
// We re-query the note values after saving. Easiest is to trigger search again.
|
|
67
|
-
const val = document.querySelector('.search-input .search-in-input') as HTMLInputElement;
|
|
68
|
-
if (val) onSearch(val.value);
|
|
69
|
-
}}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const refreshList = (query: string) => {
|
|
75
|
-
if (!query) {
|
|
76
|
-
setListDom('');
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const allNotes = LocalNotesService.getAllNotes();
|
|
81
|
-
const filteredNotes = allNotes.filter(
|
|
82
|
-
(n) =>
|
|
83
|
-
n.title.toLowerCase().includes(query.toLowerCase()) || n.content.toLowerCase().includes(query.toLowerCase())
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
if (filteredNotes.length === 0) {
|
|
87
|
-
setListDom(
|
|
88
|
-
<div
|
|
89
|
-
class='note-empty-state'
|
|
90
|
-
style={{ marginTop: '40px', textAlign: 'center', color: 'var(--secondary-color)' }}
|
|
91
|
-
>
|
|
92
|
-
No search results
|
|
93
|
-
</div>
|
|
94
|
-
);
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
setListDom(
|
|
99
|
-
<div class='note-list-container' style={{ paddingTop: '16px' }}>
|
|
100
|
-
{filteredNotes.map((note) => (
|
|
101
|
-
<div class='note-card-wrapper search-result-card-wrapper'>
|
|
102
|
-
<div class='note-card row-box search-result-card' onClick={() => onViewNote(note)}>
|
|
103
|
-
<div class='note-card-content flex-1'>
|
|
104
|
-
<div class='note-card-title'>{note.title}</div>
|
|
105
|
-
<div class='note-card-preview ellipsis'>{extractText(note.content)}</div>
|
|
106
|
-
<div class='note-card-date'>{new Date(note.updatedAt).toLocaleString()}</div>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
))}
|
|
111
|
-
</div>
|
|
112
|
-
);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const css: CssProps = {
|
|
116
|
-
height: '100%',
|
|
117
|
-
display: 'flex',
|
|
118
|
-
flexDirection: 'column',
|
|
119
|
-
overflowY: 'auto',
|
|
120
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
121
|
-
padding: '0 16px',
|
|
122
|
-
|
|
123
|
-
'.search-result-card-wrapper': {
|
|
124
|
-
marginBottom: '16px',
|
|
125
|
-
borderRadius: '12px',
|
|
126
|
-
overflow: 'hidden',
|
|
127
|
-
boxShadow: '0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05)',
|
|
128
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
129
|
-
},
|
|
130
|
-
'.search-result-card': {
|
|
131
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
132
|
-
borderRadius: '12px',
|
|
133
|
-
padding: '16px',
|
|
134
|
-
cursor: 'pointer',
|
|
135
|
-
alignItems: 'center',
|
|
136
|
-
transition: 'transform 0.2s ease, box-shadow 0.2s ease',
|
|
137
|
-
'&:active': {
|
|
138
|
-
transform: 'scale(0.98)',
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
'.note-card-title': {
|
|
142
|
-
fontSize: '16px',
|
|
143
|
-
fontWeight: 'bold',
|
|
144
|
-
color: 'var(--primary-color)',
|
|
145
|
-
marginBottom: '4px',
|
|
146
|
-
},
|
|
147
|
-
'.note-card-preview': {
|
|
148
|
-
fontSize: '14px',
|
|
149
|
-
color: 'var(--secondary-color)',
|
|
150
|
-
marginBottom: '6px',
|
|
151
|
-
},
|
|
152
|
-
'.note-card-date': {
|
|
153
|
-
fontSize: '12px',
|
|
154
|
-
color: 'var(--secondary-color)',
|
|
155
|
-
opacity: 0.8,
|
|
156
|
-
},
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
onMount(() => {
|
|
160
|
-
showHistory();
|
|
161
|
-
requestAnimationFrame(() => searchInputHook.focus?.());
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
const headerTitle = (
|
|
165
|
-
<SearchInput
|
|
166
|
-
placeholder='Search title or content...'
|
|
167
|
-
onSearch={onSearch}
|
|
168
|
-
onClear={onClearSearch}
|
|
169
|
-
onFocus={showHistory}
|
|
170
|
-
class='w-100p'
|
|
171
|
-
hook={searchInputHook}
|
|
172
|
-
/>
|
|
173
|
-
);
|
|
174
|
-
|
|
175
|
-
return (
|
|
176
|
-
<HeaderWithBackFrame
|
|
177
|
-
title={headerTitle}
|
|
178
|
-
right={<span></span>}
|
|
179
|
-
onBack={(event) => props.sliderFrameHook.close!(event)}
|
|
180
|
-
>
|
|
181
|
-
<div css={css} class='note-search-page'>
|
|
182
|
-
<SliderFrame hook={subSliderHook} />
|
|
183
|
-
{historyDom}
|
|
184
|
-
{listDom}
|
|
185
|
-
</div>
|
|
186
|
-
</HeaderWithBackFrame>
|
|
187
|
-
);
|
|
188
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { bindGlobalStyle, CssProps } from 'lupine.web';
|
|
2
|
-
|
|
3
|
-
export interface SearchInputHookProps {
|
|
4
|
-
setValue?: (value: string) => void;
|
|
5
|
-
focus?: () => void;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface InputWithClearProps {
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
onSearch: (value: string) => void;
|
|
11
|
-
onClear?: () => void;
|
|
12
|
-
onFocus?: () => void;
|
|
13
|
-
onBlur?: () => void;
|
|
14
|
-
class?: string;
|
|
15
|
-
searchIcon?: string;
|
|
16
|
-
hook?: SearchInputHookProps;
|
|
17
|
-
}
|
|
18
|
-
export const SearchInput = (props: InputWithClearProps) => {
|
|
19
|
-
const css: CssProps = {
|
|
20
|
-
display: 'flex',
|
|
21
|
-
flex: 1,
|
|
22
|
-
position: 'relative',
|
|
23
|
-
fontSize: '16px',
|
|
24
|
-
'.search-in-input': {
|
|
25
|
-
flex: 1,
|
|
26
|
-
paddingRight: '30px',
|
|
27
|
-
height: '32px',
|
|
28
|
-
padding: '4px 30px 4px 12px',
|
|
29
|
-
borderRadius: '16px',
|
|
30
|
-
border: 'none',
|
|
31
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
32
|
-
color: 'var(--primary-color)',
|
|
33
|
-
outline: 'none',
|
|
34
|
-
},
|
|
35
|
-
'.search-in-search, .search-in-clear': {
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
top: '50%',
|
|
38
|
-
transform: 'translateY(-50%)',
|
|
39
|
-
cursor: 'pointer',
|
|
40
|
-
display: 'flex',
|
|
41
|
-
alignItems: 'center',
|
|
42
|
-
justifyContent: 'center',
|
|
43
|
-
color: 'var(--secondary-color)',
|
|
44
|
-
},
|
|
45
|
-
'.search-in-search': {
|
|
46
|
-
right: '12px',
|
|
47
|
-
},
|
|
48
|
-
'.search-in-clear': {
|
|
49
|
-
display: 'none',
|
|
50
|
-
right: '34px',
|
|
51
|
-
},
|
|
52
|
-
'input.search-in-input:not(:placeholder-shown) + .search-in-clear': {
|
|
53
|
-
display: 'flex',
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
bindGlobalStyle('search-input-component', css);
|
|
57
|
-
|
|
58
|
-
let input!: HTMLInputElement;
|
|
59
|
-
const onSearch = () => props.onSearch(input.value);
|
|
60
|
-
const onClear = () => {
|
|
61
|
-
input.value = '';
|
|
62
|
-
props.onClear?.();
|
|
63
|
-
};
|
|
64
|
-
if (props.hook) {
|
|
65
|
-
props.hook.setValue = (value: string) => {
|
|
66
|
-
input.value = value;
|
|
67
|
-
};
|
|
68
|
-
props.hook.focus = () => input.focus();
|
|
69
|
-
}
|
|
70
|
-
return (
|
|
71
|
-
<div class={'search-input-component ' + (props.class || '')}>
|
|
72
|
-
<input
|
|
73
|
-
ref={(el) => (input = el)}
|
|
74
|
-
type='text'
|
|
75
|
-
maxLength={30}
|
|
76
|
-
spellcheck={false}
|
|
77
|
-
class='search-in-input input-base'
|
|
78
|
-
placeholder={props.placeholder}
|
|
79
|
-
onKeyDown={(e) => {
|
|
80
|
-
if (e.key === 'Enter') {
|
|
81
|
-
onSearch();
|
|
82
|
-
}
|
|
83
|
-
}}
|
|
84
|
-
onBlur={() => props.onBlur?.()}
|
|
85
|
-
onFocus={() => props.onFocus?.()}
|
|
86
|
-
/>
|
|
87
|
-
<div class='search-in-clear' onClick={onClear}>
|
|
88
|
-
<i class='ifc-icon ma-close' />
|
|
89
|
-
</div>
|
|
90
|
-
<div class='search-in-search' onClick={onSearch}>
|
|
91
|
-
<i class={'ifc-icon ' + (props.searchIcon || 'bs-search')} />
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
);
|
|
95
|
-
};
|
package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { CssProps, getGlobalStylesId, bindGlobalStyle, VNode, updateTheme } from 'lupine.web';
|
|
2
|
-
import { MobileSideMenuHelper, NotificationColor, NotificationMessage, SliderFrameHookProps, IconMenuItemProps } from 'lupine.web.components';
|
|
3
|
-
import { MineSettingsPage } from './mine-settings-page';
|
|
4
|
-
|
|
5
|
-
export type SideMenuContentProps = {
|
|
6
|
-
navItems?: IconMenuItemProps[];
|
|
7
|
-
menuItems?: string[];
|
|
8
|
-
title?: string;
|
|
9
|
-
footer?: string;
|
|
10
|
-
version?: string;
|
|
11
|
-
onAction?: (action: string) => void;
|
|
12
|
-
settingSliderHook: SliderFrameHookProps;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const sideMenuContentCss: CssProps = {
|
|
16
|
-
margin: '0 -12px',
|
|
17
|
-
display: 'flex',
|
|
18
|
-
flexDirection: 'column',
|
|
19
|
-
flex: 1,
|
|
20
|
-
height: '100%',
|
|
21
|
-
'.msm-header': {
|
|
22
|
-
display: 'flex',
|
|
23
|
-
alignItems: 'center',
|
|
24
|
-
padding: '16px',
|
|
25
|
-
borderBottom: '1px solid var(--primary-border-color)',
|
|
26
|
-
},
|
|
27
|
-
'.msm-header-icon': {
|
|
28
|
-
width: '32px',
|
|
29
|
-
height: '32px',
|
|
30
|
-
marginRight: '12px',
|
|
31
|
-
borderRadius: '4px',
|
|
32
|
-
backgroundColor: 'var(--primary-color)',
|
|
33
|
-
},
|
|
34
|
-
'.msm-header-title': {
|
|
35
|
-
fontSize: '18px',
|
|
36
|
-
fontWeight: 'bold',
|
|
37
|
-
color: 'var(--primary-color)',
|
|
38
|
-
},
|
|
39
|
-
'.msm-content': {
|
|
40
|
-
flex: '1',
|
|
41
|
-
overflowY: 'auto',
|
|
42
|
-
padding: '12px 0',
|
|
43
|
-
},
|
|
44
|
-
'.msm-item-link': {
|
|
45
|
-
textDecoration: 'none',
|
|
46
|
-
color: 'inherit',
|
|
47
|
-
display: 'block',
|
|
48
|
-
},
|
|
49
|
-
'.msm-separator': {
|
|
50
|
-
height: '1px',
|
|
51
|
-
backgroundColor: 'var(--primary-border-color)',
|
|
52
|
-
margin: '8px 12px',
|
|
53
|
-
},
|
|
54
|
-
'.msm-item': {
|
|
55
|
-
padding: '12px',
|
|
56
|
-
fontSize: '16px',
|
|
57
|
-
cursor: 'pointer',
|
|
58
|
-
transition: 'background-color 0.2s',
|
|
59
|
-
display: 'flex',
|
|
60
|
-
alignItems: 'center',
|
|
61
|
-
gap: '12px',
|
|
62
|
-
width: '100%',
|
|
63
|
-
'&:hover': {
|
|
64
|
-
backgroundColor: 'var(--activatable-bg-color-hover, rgba(0,0,0,0.04))',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
'.msm-footer': {
|
|
68
|
-
borderTop: '1px solid var(--primary-border-color)',
|
|
69
|
-
padding: '16px 0',
|
|
70
|
-
},
|
|
71
|
-
'.msm-footer-cfg': {
|
|
72
|
-
display: 'flex',
|
|
73
|
-
flexDirection: 'row',
|
|
74
|
-
justifyContent: 'space-between',
|
|
75
|
-
},
|
|
76
|
-
'.msm-footer-cfg .msm-item': {
|
|
77
|
-
padding: '12px',
|
|
78
|
-
},
|
|
79
|
-
'.msm-footer-version': {
|
|
80
|
-
textAlign: 'center',
|
|
81
|
-
fontSize: '12px',
|
|
82
|
-
color: 'var(--secondary-color, #999)',
|
|
83
|
-
marginTop: '2px',
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export const SideMenuContent = ({
|
|
88
|
-
navItems = [],
|
|
89
|
-
menuItems = ['Light Mode', 'Dark Mode'],
|
|
90
|
-
title = 'Function Menu',
|
|
91
|
-
footer,
|
|
92
|
-
onAction,
|
|
93
|
-
settingSliderHook,
|
|
94
|
-
}: SideMenuContentProps): VNode<any> => {
|
|
95
|
-
const globalCssId = getGlobalStylesId(sideMenuContentCss);
|
|
96
|
-
bindGlobalStyle(globalCssId, sideMenuContentCss);
|
|
97
|
-
|
|
98
|
-
const handleAction = (item: string) => {
|
|
99
|
-
if (onAction) {
|
|
100
|
-
onAction(item);
|
|
101
|
-
} else {
|
|
102
|
-
if (item === 'Light Mode') {
|
|
103
|
-
updateTheme('light');
|
|
104
|
-
MobileSideMenuHelper.hide();
|
|
105
|
-
} else if (item === 'Dark Mode') {
|
|
106
|
-
updateTheme('dark');
|
|
107
|
-
MobileSideMenuHelper.hide();
|
|
108
|
-
} else {
|
|
109
|
-
NotificationMessage.sendMessage(`Action: ${item}`, NotificationColor.Info);
|
|
110
|
-
MobileSideMenuHelper.hide();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
return (
|
|
116
|
-
<div css={globalCssId}>
|
|
117
|
-
<div class='msm-header'>
|
|
118
|
-
{/* <div class='msm-header-icon'></div> */}
|
|
119
|
-
<div class='msm-header-title'>{title}</div>
|
|
120
|
-
</div>
|
|
121
|
-
|
|
122
|
-
<div class='msm-content'>
|
|
123
|
-
{navItems &&
|
|
124
|
-
navItems.map((item, index) => {
|
|
125
|
-
const handleClick = (e: Event) => {
|
|
126
|
-
if (item.js) {
|
|
127
|
-
e.preventDefault();
|
|
128
|
-
item.js();
|
|
129
|
-
}
|
|
130
|
-
MobileSideMenuHelper.hide();
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
return (
|
|
134
|
-
<a href={item.url || 'javascript:void(0)'} class='msm-item-link' onClick={handleClick}>
|
|
135
|
-
<div class='msm-item'>
|
|
136
|
-
{item.icon && <i class={`ifc-icon ${item.icon}`}></i>}
|
|
137
|
-
{item.text}
|
|
138
|
-
</div>
|
|
139
|
-
</a>
|
|
140
|
-
);
|
|
141
|
-
})}
|
|
142
|
-
{navItems && navItems.length > 0 && menuItems.length > 0 && <div class='msm-separator'></div>}
|
|
143
|
-
{menuItems.map((item) => (
|
|
144
|
-
<div class='msm-item' onClick={() => handleAction(item)}>
|
|
145
|
-
{item}
|
|
146
|
-
</div>
|
|
147
|
-
))}
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
<div class='msm-footer'>
|
|
151
|
-
<div class='msm-footer-cfg'>
|
|
152
|
-
<div
|
|
153
|
-
class='msm-item'
|
|
154
|
-
onClick={() => {
|
|
155
|
-
settingSliderHook.load!(
|
|
156
|
-
<MineSettingsPage sliderFrameHook={settingSliderHook} onDataChanged={() => { }} />
|
|
157
|
-
);
|
|
158
|
-
MobileSideMenuHelper.hide();
|
|
159
|
-
}}
|
|
160
|
-
>
|
|
161
|
-
<i class='ifc-icon ma-cog-outline'></i>
|
|
162
|
-
Settings
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
{footer && <div class='msm-footer-version'>{footer}</div>}
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
);
|
|
169
|
-
};
|
package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { VNode } from 'lupine.web';
|
|
2
|
-
import { MediaQueryMaxWidth, ResponsiveFrame, SliderFrame, SliderFrameHookProps } from 'lupine.web.components';
|
|
3
|
-
import { SideMenuContent } from '../components/side-menu-content';
|
|
4
|
-
|
|
5
|
-
// Note: Replace with true site config loading if available
|
|
6
|
-
const getSiteTitle = async () => 'My Note App';
|
|
7
|
-
const getSiteFooter = async () => '© 2026 My Note App';
|
|
8
|
-
|
|
9
|
-
// 'sidemenu' | 'tabs', this will be replaced by create-lupine
|
|
10
|
-
const DEFAULT_LAYOUT = 'tabs';
|
|
11
|
-
export const AppResponsiveFrame = async (placeholderClassname: string, vnode: VNode<any>) => {
|
|
12
|
-
// special login for github pages
|
|
13
|
-
let subDir = '';
|
|
14
|
-
if (typeof window !== 'undefined' && window.location.hostname === 'uuware.github.io') {
|
|
15
|
-
// first section is subDir
|
|
16
|
-
subDir = '/' + window.location.pathname.split('/')[1];
|
|
17
|
-
}
|
|
18
|
-
const mobileBottomMenu = [
|
|
19
|
-
{ icon: 'ma-home-outline', url: subDir + '/', text: 'Notes' },
|
|
20
|
-
{ icon: 'icon-finance', url: subDir + '/finance', text: 'Finance' },
|
|
21
|
-
{ icon: 'ma-book-outline', url: subDir + '/about', text: 'About', topout: true },
|
|
22
|
-
{ icon: 'ma-tools', url: subDir + '/tools', text: 'Tools' },
|
|
23
|
-
{ icon: 'ma-account-cog-outline', url: subDir + '/mine', text: 'Mine' },
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
// (on the server there is no localStorage: the page is rendered with the default)
|
|
27
|
-
const layout: 'sidemenu' | 'tabs' = ((typeof localStorage === 'object' && localStorage.getItem('app-layout')) as any) || DEFAULT_LAYOUT;
|
|
28
|
-
const sliderFrameHook: SliderFrameHookProps = {};
|
|
29
|
-
|
|
30
|
-
return ResponsiveFrame({
|
|
31
|
-
placeholderClassname,
|
|
32
|
-
mainContent: vnode,
|
|
33
|
-
desktopHeaderTitle: await getSiteTitle(),
|
|
34
|
-
desktopFooterTitle: await getSiteFooter(),
|
|
35
|
-
desktopTopMenu: layout === 'sidemenu' ? undefined : mobileBottomMenu,
|
|
36
|
-
mobileBottomMenu: layout === 'sidemenu' ? undefined : mobileBottomMenu,
|
|
37
|
-
sharedContents: (
|
|
38
|
-
<>
|
|
39
|
-
<SliderFrame hook={sliderFrameHook} />
|
|
40
|
-
</>
|
|
41
|
-
),
|
|
42
|
-
mobileSideMenuContent: (
|
|
43
|
-
<SideMenuContent
|
|
44
|
-
navItems={layout === 'sidemenu' ? mobileBottomMenu : undefined}
|
|
45
|
-
settingSliderHook={sliderFrameHook}
|
|
46
|
-
title='My Note App'
|
|
47
|
-
footer='Powered by Lupine.js'
|
|
48
|
-
/>
|
|
49
|
-
),
|
|
50
|
-
maxWidth: MediaQueryMaxWidth.DesktopMax,
|
|
51
|
-
autoExtendSidemenu: layout === 'sidemenu',
|
|
52
|
-
});
|
|
53
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { CssProps, PageProps } from 'lupine.web';
|
|
2
|
-
import { MobileHeaderCenter, MobileHeaderEmptyIcon, MobileHeaderTitleIcon, MobileTopSysIcon } from 'lupine.web.components';
|
|
3
|
-
import { MineAboutContent } from '../components/mine-about-page';
|
|
4
|
-
|
|
5
|
-
export const AboutPage = async (props: PageProps) => {
|
|
6
|
-
const css: CssProps = {
|
|
7
|
-
display: 'flex',
|
|
8
|
-
flexDirection: 'column',
|
|
9
|
-
height: '100%',
|
|
10
|
-
position: 'relative',
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<div css={css}>
|
|
15
|
-
<MobileHeaderCenter>
|
|
16
|
-
<MobileHeaderTitleIcon
|
|
17
|
-
title='About'
|
|
18
|
-
left={<MobileHeaderEmptyIcon />}
|
|
19
|
-
right={
|
|
20
|
-
<div class='flex-center-gap-12'>
|
|
21
|
-
<MobileTopSysIcon />
|
|
22
|
-
</div>
|
|
23
|
-
}
|
|
24
|
-
/>
|
|
25
|
-
</MobileHeaderCenter>
|
|
26
|
-
|
|
27
|
-
<div class='tools-scroll tools-list-container no-scrollbar-container'>
|
|
28
|
-
<MineAboutContent />
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
);
|
|
32
|
-
};
|