create-lupine 1.0.31 → 1.3.0

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.
Files changed (269) hide show
  1. package/README.md +31 -0
  2. package/index.js +238 -112
  3. package/package.json +1 -1
  4. package/templates/common/.agents/skills/lupine-framework/SKILL.md +63 -0
  5. package/templates/common/.agents/skills/lupine-framework/references/backend-api.md +113 -0
  6. package/templates/common/.agents/skills/lupine-framework/references/icon-handling.md +71 -0
  7. package/templates/common/.agents/skills/lupine-framework/references/mobile-interactions.md +29 -0
  8. package/templates/common/.agents/skills/lupine-framework/references/native-apps.md +190 -0
  9. package/templates/common/.agents/skills/lupine-framework/references/navigation-and-routing.md +55 -0
  10. package/templates/common/.agents/skills/lupine-framework/references/reactivity-and-state.md +108 -0
  11. package/templates/common/.agents/skills/lupine-framework/references/styling-and-themes.md +121 -0
  12. package/templates/common/.env.mobile +4 -3
  13. package/templates/common/_env +10 -4
  14. package/templates/common/apps/server/README.md +10 -0
  15. package/templates/common/dev/cp-folder.js +9 -4
  16. package/templates/lupine-template-cv-starter/README.md +37 -0
  17. package/templates/lupine-template-cv-starter/app/package.json +20 -0
  18. package/templates/lupine-template-cv-starter/app/src/app.tsx +6 -0
  19. package/templates/lupine-template-cv-starter/app/src/index.native.tsx +4 -0
  20. package/templates/lupine-template-cv-starter/app/src/index.test.tsx +71 -0
  21. package/templates/lupine-template-cv-starter/app/src/index.web.tsx +28 -0
  22. package/templates/lupine-template-cv-starter/app/tsconfig.json +17 -0
  23. package/templates/lupine-template-cv-starter/lupine.json +8 -7
  24. package/templates/lupine-template-cv-starter/web/src/index.html +9 -2
  25. package/templates/lupine-template-cv-starter/web/src/index.tsx +9 -23
  26. package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.html +9 -2
  27. package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.tsx +4 -29
  28. package/templates/lupine-template-doc-starter/README.md +37 -0
  29. package/templates/lupine-template-doc-starter/app/package.json +20 -0
  30. package/templates/lupine-template-doc-starter/app/src/app.tsx +6 -0
  31. package/templates/lupine-template-doc-starter/app/src/index.native.tsx +4 -0
  32. package/templates/lupine-template-doc-starter/app/src/index.test.tsx +78 -0
  33. package/templates/lupine-template-doc-starter/app/src/index.web.tsx +28 -0
  34. package/templates/lupine-template-doc-starter/app/tsconfig.json +17 -0
  35. package/templates/lupine-template-doc-starter/lupine.json +8 -7
  36. package/templates/lupine-template-doc-starter/web/src/index.html +9 -2
  37. package/templates/lupine-template-doc-starter/web/src/index.tsx +9 -23
  38. package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.html +9 -2
  39. package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.tsx +4 -29
  40. package/templates/lupine-template-fullstack-note/README.md +83 -0
  41. package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/api/package.json +1 -1
  42. package/templates/lupine-template-fullstack-note/api/resources/install.mysql.sql +32 -0
  43. package/templates/lupine-template-fullstack-note/api/resources/install.sqlite.sql +27 -0
  44. package/templates/lupine-template-fullstack-note/api/src/service/answer.ts +39 -0
  45. package/templates/lupine-template-fullstack-note/api/src/service/api.ts +52 -0
  46. package/templates/lupine-template-fullstack-note/api/src/service/db.ts +78 -0
  47. package/templates/lupine-template-fullstack-note/api/src/service/notes-api.ts +86 -0
  48. package/templates/lupine-template-fullstack-note/api/src/service/root-api.ts +19 -0
  49. package/templates/lupine-template-fullstack-note/api/src/service/user-api.ts +182 -0
  50. package/templates/lupine-template-fullstack-note/app/package.json +19 -0
  51. package/templates/lupine-template-fullstack-note/app/src/app.tsx +75 -0
  52. package/templates/lupine-template-fullstack-note/app/src/index.native.tsx +4 -0
  53. package/templates/lupine-template-fullstack-note/app/src/index.test.tsx +373 -0
  54. package/templates/lupine-template-fullstack-note/app/src/index.web.tsx +20 -0
  55. package/templates/lupine-template-fullstack-note/app/src/pages/components.tsx +65 -0
  56. package/templates/lupine-template-fullstack-note/app/src/pages/details.tsx +38 -0
  57. package/templates/lupine-template-fullstack-note/app/src/pages/discover.tsx +25 -0
  58. package/templates/lupine-template-fullstack-note/app/src/pages/home.tsx +76 -0
  59. package/templates/lupine-template-fullstack-note/app/src/pages/inbox.tsx +49 -0
  60. package/templates/lupine-template-fullstack-note/app/src/pages/login.tsx +54 -0
  61. package/templates/lupine-template-fullstack-note/app/src/pages/me.tsx +32 -0
  62. package/templates/lupine-template-fullstack-note/app/src/pages/notes.tsx +128 -0
  63. package/templates/lupine-template-fullstack-note/app/src/pages/settings.tsx +45 -0
  64. package/templates/lupine-template-fullstack-note/app/src/shell/AppMenu.tsx +44 -0
  65. package/templates/lupine-template-fullstack-note/app/src/shell/api.ts +159 -0
  66. package/templates/lupine-template-fullstack-note/app/src/shell/data.ts +20 -0
  67. package/templates/lupine-template-fullstack-note/app/src/shell/locales/ja.ts +80 -0
  68. package/templates/lupine-template-fullstack-note/app/src/shell/locales/zh-CN.ts +80 -0
  69. package/templates/lupine-template-fullstack-note/app/src/shell/texts.ts +14 -0
  70. package/templates/lupine-template-fullstack-note/app/tsconfig.json +17 -0
  71. package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/lupine.json +4 -2
  72. package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/web/package.json +1 -1
  73. package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/web/src/index.html +10 -3
  74. package/templates/lupine-template-fullstack-note/web/src/index.tsx +15 -0
  75. package/templates/lupine-template-fullstack-starter/README.md +70 -0
  76. package/templates/lupine-template-fullstack-starter/api/package.json +10 -0
  77. package/templates/lupine-template-fullstack-starter/api/resources/install.mysql.sql +107 -0
  78. package/templates/lupine-template-fullstack-starter/api/resources/install.sqlite.sql +75 -0
  79. package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-en.ts +39 -0
  80. package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-zh-cn.ts +37 -0
  81. package/templates/lupine-template-fullstack-starter/api/src/service/admin-api.ts +139 -0
  82. package/templates/lupine-template-fullstack-starter/api/src/service/api.ts +111 -0
  83. package/templates/lupine-template-fullstack-starter/api/src/service/contact-api.ts +50 -0
  84. package/templates/lupine-template-fullstack-starter/api/src/service/file-api-base.ts +30 -0
  85. package/templates/lupine-template-fullstack-starter/api/src/service/root-api.ts +28 -0
  86. package/templates/lupine-template-fullstack-starter/api/src/service/send-email.ts +47 -0
  87. package/templates/lupine-template-fullstack-starter/api/src/service/setting-api.ts +60 -0
  88. package/templates/lupine-template-fullstack-starter/api/src/service/user-api.ts +1046 -0
  89. package/templates/lupine-template-fullstack-starter/app/assets/sample.png +0 -0
  90. package/templates/lupine-template-fullstack-starter/app/package.json +20 -0
  91. package/templates/lupine-template-fullstack-starter/app/src/app.tsx +76 -0
  92. package/templates/lupine-template-fullstack-starter/app/src/index.native.tsx +4 -0
  93. package/templates/lupine-template-fullstack-starter/app/src/index.test.tsx +276 -0
  94. package/templates/lupine-template-fullstack-starter/app/src/index.web.tsx +28 -0
  95. package/templates/lupine-template-fullstack-starter/app/src/pages/about.tsx +27 -0
  96. package/templates/lupine-template-fullstack-starter/app/src/pages/contact.tsx +41 -0
  97. package/templates/lupine-template-fullstack-starter/app/src/pages/favorite.tsx +27 -0
  98. package/templates/lupine-template-fullstack-starter/app/src/pages/home.tsx +63 -0
  99. package/templates/lupine-template-fullstack-starter/app/src/pages/login.tsx +63 -0
  100. package/templates/lupine-template-fullstack-starter/app/src/pages/mine.tsx +44 -0
  101. package/templates/lupine-template-fullstack-starter/app/src/pages/profile.tsx +58 -0
  102. package/templates/lupine-template-fullstack-starter/app/src/pages/register.tsx +48 -0
  103. package/templates/lupine-template-fullstack-starter/app/src/pages/reset-password.tsx +41 -0
  104. package/templates/lupine-template-fullstack-starter/app/src/pages/settings.tsx +33 -0
  105. package/templates/lupine-template-fullstack-starter/app/src/pages/story.tsx +46 -0
  106. package/templates/lupine-template-fullstack-starter/app/src/shell/api.ts +127 -0
  107. package/templates/lupine-template-fullstack-starter/app/src/shell/parts.tsx +100 -0
  108. package/templates/lupine-template-fullstack-starter/app/src/shell/stories.ts +65 -0
  109. package/templates/lupine-template-fullstack-starter/app/src/shell/texts.ts +79 -0
  110. package/templates/lupine-template-fullstack-starter/app/tsconfig.json +17 -0
  111. package/templates/lupine-template-fullstack-starter/lupine.json +31 -0
  112. package/templates/lupine-template-fullstack-starter/web/assets/android-chrome-192x192.png +0 -0
  113. package/templates/lupine-template-fullstack-starter/web/assets/apple-touch-icon.png +0 -0
  114. package/templates/lupine-template-fullstack-starter/web/assets/favicon-16x16.png +0 -0
  115. package/templates/lupine-template-fullstack-starter/web/assets/favicon-32x32.png +0 -0
  116. package/templates/lupine-template-fullstack-starter/web/assets/favicon.ico +0 -0
  117. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-carbon-icons.txt +71 -0
  118. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-material-design.txt +20 -0
  119. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/i-font.woff2 +0 -0
  120. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/sample.html +124 -0
  121. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/style.css +103 -0
  122. package/templates/lupine-template-fullstack-starter/web/assets/lupine-flower.png +0 -0
  123. package/templates/lupine-template-fullstack-starter/web/assets/lupine.svg +71 -0
  124. package/templates/lupine-template-fullstack-starter/web/assets/site.webmanifest +14 -0
  125. package/templates/lupine-template-fullstack-starter/web/icons-font.config.js +129 -0
  126. package/templates/{lupine-template-responsive-starter/api → lupine-template-fullstack-starter/web}/package.json +1 -1
  127. package/templates/lupine-template-fullstack-starter/web/src/admin/admin-patch.tsx +34 -0
  128. package/templates/lupine-template-fullstack-starter/web/src/admin/components/home-search-component.tsx +125 -0
  129. package/templates/lupine-template-fullstack-starter/web/src/admin/components/story-card.tsx +105 -0
  130. package/templates/lupine-template-fullstack-starter/web/src/admin/components/story-list.tsx +105 -0
  131. package/templates/lupine-template-fullstack-starter/web/src/admin/components/story-props.ts +34 -0
  132. package/templates/lupine-template-fullstack-starter/web/src/admin/index.html +23 -0
  133. package/templates/lupine-template-fullstack-starter/web/src/admin/index.tsx +49 -0
  134. package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-cfg.tsx +144 -0
  135. package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-item-edit.tsx +20 -0
  136. package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-item-list.tsx +23 -0
  137. package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-user.tsx +145 -0
  138. package/templates/lupine-template-fullstack-starter/web/src/index.html +28 -0
  139. package/templates/lupine-template-fullstack-starter/web/src/index.tsx +16 -0
  140. package/templates/lupine-template-fullstack-starter/web/src/services/fetch-data.ts +37 -0
  141. package/templates/lupine-template-fullstack-starter/web/src/styles/base-css.ts +14 -0
  142. package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/global.css +10 -57
  143. package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/theme.ts +2 -1
  144. package/templates/lupine-template-responsive-starter/README.md +51 -0
  145. package/templates/lupine-template-responsive-starter/app/package.json +19 -0
  146. package/templates/lupine-template-responsive-starter/app/src/app.tsx +80 -0
  147. package/templates/lupine-template-responsive-starter/app/src/index.native.tsx +4 -0
  148. package/templates/lupine-template-responsive-starter/app/src/index.test.tsx +283 -0
  149. package/templates/lupine-template-responsive-starter/app/src/index.web.tsx +31 -0
  150. package/templates/lupine-template-responsive-starter/app/src/pages/about.tsx +23 -0
  151. package/templates/lupine-template-responsive-starter/app/src/pages/finance.tsx +48 -0
  152. package/templates/lupine-template-responsive-starter/app/src/pages/mine.tsx +60 -0
  153. package/templates/lupine-template-responsive-starter/app/src/pages/not-found.tsx +9 -0
  154. package/templates/lupine-template-responsive-starter/app/src/pages/note-detail.tsx +43 -0
  155. package/templates/lupine-template-responsive-starter/app/src/pages/note-edit.tsx +45 -0
  156. package/templates/lupine-template-responsive-starter/app/src/pages/note-search.tsx +62 -0
  157. package/templates/lupine-template-responsive-starter/app/src/pages/notes.tsx +71 -0
  158. package/templates/lupine-template-responsive-starter/app/src/pages/settings.tsx +55 -0
  159. package/templates/lupine-template-responsive-starter/app/src/pages/tools.tsx +112 -0
  160. package/templates/lupine-template-responsive-starter/app/src/shell/icons.ts +7 -0
  161. package/templates/lupine-template-responsive-starter/app/src/shell/layout.ts +18 -0
  162. package/templates/lupine-template-responsive-starter/app/src/shell/locales/zh-CN.ts +89 -0
  163. package/templates/lupine-template-responsive-starter/app/src/shell/menu.tsx +81 -0
  164. package/templates/lupine-template-responsive-starter/app/src/shell/nav.ts +12 -0
  165. package/templates/lupine-template-responsive-starter/app/src/shell/store.ts +72 -0
  166. package/templates/lupine-template-responsive-starter/app/src/shell/texts.ts +11 -0
  167. package/templates/lupine-template-responsive-starter/app/tsconfig.json +17 -0
  168. package/templates/lupine-template-responsive-starter/lupine.json +7 -6
  169. package/templates/lupine-template-responsive-starter/web/src/index.html +9 -2
  170. package/templates/lupine-template-responsive-starter/web/src/index.tsx +9 -34
  171. package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.html +12 -6
  172. package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.tsx +12 -31
  173. package/templates/common/AI_CONTEXT.md +0 -1002
  174. package/templates/common/apps/server/src/app-loader.ts +0 -4
  175. package/templates/lupine-template-cv-starter/api/package.json +0 -6
  176. package/templates/lupine-template-cv-starter/api/resources/install.sqlite.sql +0 -4
  177. package/templates/lupine-template-cv-starter/api/src/index.ts +0 -15
  178. package/templates/lupine-template-cv-starter/web/src/styles/base-css.ts +0 -15
  179. package/templates/lupine-template-doc-starter/api/package.json +0 -6
  180. package/templates/lupine-template-doc-starter/api/resources/config_default.json +0 -6
  181. package/templates/lupine-template-doc-starter/api/resources/install.sqlite.sql +0 -4
  182. package/templates/lupine-template-doc-starter/api/src/index.ts +0 -15
  183. package/templates/lupine-template-doc-starter/api/src/resources/config_default.json +0 -6
  184. package/templates/lupine-template-doc-starter/api/src/resources/install.sqlite.sql +0 -4
  185. package/templates/lupine-template-doc-starter/web/src/client-env-keys.ts +0 -5
  186. package/templates/lupine-template-doc-starter/web/src/styles/base-css.ts +0 -15
  187. package/templates/lupine-template-hello-world/api/resources/config_default.json +0 -6
  188. package/templates/lupine-template-hello-world/api/resources/install.sqlite.sql +0 -4
  189. package/templates/lupine-template-hello-world/api/src/service/root-api.ts +0 -18
  190. package/templates/lupine-template-hello-world/web/src/index.tsx +0 -73
  191. package/templates/lupine-template-hello-world/web/src/styles/app.css +0 -0
  192. package/templates/lupine-template-hello-world/web/src/styles/base-css.ts +0 -1
  193. package/templates/lupine-template-responsive-starter/api/resources/config_default.json +0 -6
  194. package/templates/lupine-template-responsive-starter/api/resources/install.sqlite.sql +0 -4
  195. package/templates/lupine-template-responsive-starter/api/src/service/root-api.ts +0 -18
  196. package/templates/lupine-template-responsive-starter/web/src/app-icons.ts +0 -76
  197. package/templates/lupine-template-responsive-starter/web/src/components/input-history-component.tsx +0 -93
  198. package/templates/lupine-template-responsive-starter/web/src/components/mine-about-page.tsx +0 -86
  199. package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +0 -80
  200. package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +0 -220
  201. package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +0 -119
  202. package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +0 -116
  203. package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +0 -154
  204. package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +0 -193
  205. package/templates/lupine-template-responsive-starter/web/src/components/search-input.tsx +0 -95
  206. package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx +0 -182
  207. package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +0 -52
  208. package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +0 -43
  209. package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +0 -46
  210. package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +0 -452
  211. package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +0 -325
  212. package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +0 -46
  213. package/templates/lupine-template-responsive-starter/web/src/services/local-notes-service.ts +0 -87
  214. package/templates/lupine-template-responsive-starter/web/src/services/mine-service.ts +0 -45
  215. package/templates/lupine-template-responsive-starter/web/src/styles/app.css +0 -0
  216. package/templates/lupine-template-responsive-starter/web/src/styles/base-css.ts +0 -65
  217. package/templates/lupine-template-responsive-starter/web/src/styles/global.css +0 -2130
  218. package/templates/lupine-template-responsive-starter/web/src/styles/theme.ts +0 -16
  219. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/01-experience/index.md +0 -0
  220. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/02-projects/index.md +0 -0
  221. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/03-skills/index.md +0 -0
  222. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/04-education/index.md +0 -0
  223. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/index.md +0 -0
  224. /package/templates/lupine-template-cv-starter/{web → app}/markdown/index.md +0 -0
  225. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/01-experience/index.md +0 -0
  226. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/02-projects/index.md +0 -0
  227. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/03-skills/index.md +0 -0
  228. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/04-education/index.md +0 -0
  229. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/index.md +0 -0
  230. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/01-experience/index.html +0 -0
  231. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/02-projects/index.html +0 -0
  232. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/03-skills/index.html +0 -0
  233. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/04-education/index.html +0 -0
  234. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/index.html +0 -0
  235. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/index.html +0 -0
  236. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
  237. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/01-experience/index.html +0 -0
  238. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/02-projects/index.html +0 -0
  239. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/03-skills/index.html +0 -0
  240. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/04-education/index.html +0 -0
  241. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
  242. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/index.md +0 -0
  243. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/list.md +0 -0
  244. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/install.md +0 -0
  245. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/started.md +0 -0
  246. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/index.md +0 -0
  247. /package/templates/lupine-template-doc-starter/{web → app}/markdown/index.md +0 -0
  248. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/index.md +0 -0
  249. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/list.md +0 -0
  250. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/install.md +0 -0
  251. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/started.md +0 -0
  252. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/index.md +0 -0
  253. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/index.html +0 -0
  254. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/list.html +0 -0
  255. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/install.html +0 -0
  256. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/started.html +0 -0
  257. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/index.html +0 -0
  258. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/index.html +0 -0
  259. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
  260. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/index.html +0 -0
  261. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/list.html +0 -0
  262. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/install.html +0 -0
  263. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/started.html +0 -0
  264. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
  265. /package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/api/src/index.ts +0 -0
  266. /package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/web/assets/favicon.ico +0 -0
  267. /package/templates/{lupine-template-cv-starter → lupine-template-fullstack-starter}/api/resources/config_default.json +0 -0
  268. /package/templates/{lupine-template-responsive-starter → lupine-template-fullstack-starter}/api/src/index.ts +0 -0
  269. /package/templates/{lupine-template-cv-starter/web/src → lupine-template-fullstack-starter/web/src/models}/client-env-keys.ts +0 -0
@@ -0,0 +1,129 @@
1
+ /*
2
+ Define icons for generating fonts
3
+
4
+ Suggestions:
5
+ 1, use WOFF2 for major browsers except IE;
6
+ Or: 2, use WOFF for major browsers and IE 9~, Edge 12~
7
+ All 1, 2 need this code in HTML: `<i class="ifc-icon icon_name"></i>`
8
+ */
9
+
10
+ var path = require('path');
11
+ var cssTemplate = `
12
+ /*font-face*/
13
+ .ifc-box {
14
+ display: inline-flex;
15
+ position: relative;
16
+ border-radius: 3px;
17
+ text-align: center;
18
+ vertical-align: middle;
19
+ border: solid 1px #00f;
20
+ width: 40px;
21
+ height: 40px;
22
+ font-size: 20px;
23
+ color: blue;
24
+ margin: 5px;
25
+ }
26
+
27
+ .ifc-icon {
28
+ font-size: inherit;
29
+ display: inline-block;
30
+ font-family: '#font-family#';
31
+ font-style: normal;
32
+ font-weight: 400;
33
+ font-variant: normal;
34
+ text-transform: none;
35
+ text-rendering: auto;
36
+ line-height: 1em;
37
+ vertical-align: middle;
38
+ text-align: center;
39
+ text-decoration: inherit;
40
+ -moz-osx-font-smoothing: grayscale;
41
+ -webkit-font-smoothing: antialiased;
42
+ margin: auto;
43
+ }
44
+
45
+ /*
46
+ <div class='ifc-over-box'>
47
+ <i class='ifc-icon ma-refresh'></i>
48
+ <i class='ifc-icon ma-play ifc-over'></i>
49
+ </div>
50
+ */
51
+ .ifc-over-box {
52
+ display: flex;
53
+ position: relative;
54
+ width: min-content;
55
+ }
56
+
57
+ .ifc-over {
58
+ position: absolute;
59
+ left: 50%;
60
+ top: 50%;
61
+ font-size: 60%;
62
+ z-index: 1;
63
+ color: red;
64
+ transform: translate(-50%, -50%);
65
+ }
66
+
67
+ /* Animation for spinners */
68
+ .ifc-spin {
69
+ animation: ifc-spin-f 2s infinite linear;
70
+ display: inline-block;
71
+ }
72
+ /* @keyframes for IE10~ and major browsers */
73
+ @keyframes ifc-spin-f {
74
+ 0% {
75
+ transform: rotate(0deg);
76
+ }
77
+ 100% {
78
+ transform: rotate(359deg);
79
+ }
80
+ }
81
+
82
+ /*icons-css*/
83
+ `;
84
+
85
+ var htmlTemplate = `
86
+ <!DOCTYPE html><html><head>
87
+ <title>icons-font-customization sample</title>
88
+ <link rel="stylesheet" type="text/css" href="style.css">
89
+ </head><body><div class="sample">
90
+ #icons-html#</div></body></html>
91
+ `;
92
+
93
+ module.exports = {
94
+ fontName: 'i-font',
95
+ outputPath: path.join(__dirname, 'assets/icons-font/'),
96
+ outputName: 'i-font', // automatically add font extension to it
97
+ startChar: 10000, // unicode start number
98
+ svgicons2svgfont: {
99
+ fontHeight: 1024,
100
+ },
101
+ icons: [
102
+ // copy svg from icons-font-customization locally or remotely
103
+ {
104
+ path: 'material-design/svg/theme-light-dark.svg',
105
+ name: 'ma-theme-light-dark',
106
+ },
107
+ { path: 'font-awesome/brands/apple.svg', name: 'fa-apple' },
108
+ { path: 'font-awesome/brands/android.svg', name: 'fa-android' },
109
+ { path: 'carbon-icons/svg/app-services.svg', name: 'cb-app-services' },
110
+ { path: 'unicons/line/16-plus.svg', name: 'un-16-plus' },
111
+ { path: 'ant-design-icons/outlined/drag.svg', name: 'at-drag' },
112
+ // or add local svg files
113
+ // { path: '../src/asset/icons/pin.svg', name: 'my-pin', iconsRoot: __dirname },
114
+ ],
115
+ fontType: {
116
+ woff2: true,
117
+ woff: false,
118
+ ttf: false,
119
+ eot: false,
120
+ svg: false,
121
+ },
122
+ cssTemplate: cssTemplate,
123
+ htmlTemplate: htmlTemplate,
124
+ };
125
+
126
+ // Or pass parameters
127
+ var parameters = { '--config': path.join(__dirname, 'icons-font.config.js') };
128
+ var cmd = require('icons-font-command');
129
+ cmd.IconsFontLite.generateFont(parameters);
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "lupine-template-responsive-starter-api",
2
+ "name": "lupine-template-fullstack-starter-web",
3
3
  "version": "1.0.0",
4
4
  "dependencies": {},
5
5
  "devDependencies": {}
@@ -0,0 +1,34 @@
1
+ import { adminFrameHelper } from 'lupine.api/admin';
2
+ import { clearCookie } from 'lupine.web';
3
+ import { AdminCfgPage } from './pages/admin-cfg';
4
+ import { AdminItemListPage } from './pages/admin-item-list';
5
+ import { AdminUserPage } from './pages/admin-user';
6
+
7
+ export const patchAdminFrame = () => {
8
+ // the pages of the site, for the admins of the app and the developer
9
+ adminFrameHelper.insertMenuItem(
10
+ [
11
+ {
12
+ id: 'site',
13
+ text: 'Site',
14
+ url: '',
15
+ items: [
16
+ { id: 'site-items', text: 'Items', icon: 'list', url: '', js: () => adminFrameHelper.addPanel('Items', <AdminItemListPage />) },
17
+ { id: 'site-users', text: 'Users', icon: 'shield', url: '', js: () => adminFrameHelper.addPanel('Users', <AdminUserPage />) },
18
+ { id: 'site-website', text: 'Website', icon: 'globe', url: '', js: () => adminFrameHelper.addPanel('Website', <AdminCfgPage />) },
19
+ ],
20
+ },
21
+ ],
22
+ 'contents'
23
+ );
24
+
25
+ adminFrameHelper.setAppAdminHookCheckLogin(async (authResponse: any) => {
26
+ if (authResponse && authResponse.user && authResponse.user.admin === '1') {
27
+ return true;
28
+ }
29
+ return false;
30
+ });
31
+ adminFrameHelper.setAppAdminHookLogout(async () => {
32
+ clearCookie('_token', '/');
33
+ });
34
+ };
@@ -0,0 +1,125 @@
1
+ import { createSignal, CssProps, onMount } from 'lupine.web';
2
+ import { adminFrameHelper } from 'lupine.api/admin';
3
+ import { AdminItemEditPage } from '../pages/admin-item-edit';
4
+ import { Toast } from 'lupine.native.components';
5
+ import { StoryListComponent } from './story-list';
6
+ import { StoryCardShortProps } from './story-props';
7
+ // the sample stories of the app
8
+ import { stories } from '../../../../app/src/shell/stories';
9
+
10
+ // A real site gets them from its API: fetchData('/api/stories')
11
+ export const getMusicList = async (management: boolean) => {
12
+ return {
13
+ count: stories.length,
14
+ management,
15
+ results: stories.map(
16
+ (s) =>
17
+ ({
18
+ id: s.id,
19
+ title: s.title,
20
+ cover_file: s.cover,
21
+ author: s.author,
22
+ view_count: s.views,
23
+ download_count: 0,
24
+ collect_count: s.favorites,
25
+ start_time_seconds: new Date().getTime() / 1000,
26
+ } as StoryCardShortProps)
27
+ ),
28
+ };
29
+ };
30
+
31
+ export type SearchMusicProps = {
32
+ management: boolean;
33
+ };
34
+ export const HomeSearchComponent = (props: SearchMusicProps) => {
35
+ const css: CssProps = {
36
+ display: 'flex',
37
+ // paddingTop: '4px',
38
+ // paddingRight: '8px',
39
+ flexDirection: 'column',
40
+ alignItems: 'center',
41
+ width: '100%',
42
+ '.search-result-box': {
43
+ width: '100%',
44
+ },
45
+ '.navigation-bar-box': {
46
+ width: '100%',
47
+ height: '20px',
48
+ position: 'relative',
49
+ marginBottom: '16px',
50
+ // textAlign: 'center',
51
+ },
52
+ '.navigation-bar': {
53
+ position: 'absolute',
54
+ top: '0',
55
+ left: '0',
56
+ width: '100%',
57
+ display: 'flex',
58
+ whiteSpace: 'nowrap',
59
+ overflowX: 'auto',
60
+ scrollbarWidth: 'none',
61
+ // justifyContent: 'center',
62
+ // textAlign: 'left',
63
+ },
64
+ // '.navigation-bar:has(scrollbar), .navigation-bar::-webkit-scrollbar': {
65
+ // justifyContent: 'flex-start',
66
+ // },
67
+ '.navigation-item': {
68
+ padding: '6px 10px',
69
+ borderRadius: '12px',
70
+ cursor: 'pointer',
71
+ '&:hover': {
72
+ backgroundColor: '#f0f0f0',
73
+ },
74
+ },
75
+ '.navigation-item.active': {
76
+ backgroundColor: '#f0f0f0',
77
+ fontWeight: 600,
78
+ },
79
+ };
80
+
81
+ const [dom, setDom] = createSignal<any>('');
82
+ onMount(() => onSearch());
83
+ const onSearch = async () => {
84
+ const result = await getMusicList(props.management);
85
+ setDom(
86
+ <div>
87
+ {result.count > 0 ? (
88
+ <StoryListComponent items={result.results} count={result.count} management={props.management} />
89
+ ) : (
90
+ 'no result'
91
+ )}
92
+ </div>
93
+ );
94
+ };
95
+ const onAdd = () => {
96
+ adminFrameHelper.addPanel('New', <AdminItemEditPage id='new' />);
97
+ };
98
+ return (
99
+ <div css={css} class='search-music-box'>
100
+ <div className='row-box search-box m-auto p-m w-100p'>
101
+ <input class='input-base txt-search flex-1' type='text' placeholder='Please input keywords' />
102
+ <button class='button-base btn-search' onClick={onSearch}>
103
+ Search
104
+ </button>
105
+ {props.management && (
106
+ <button class='button-base btn-add ml-m' onClick={onAdd}>
107
+ Add
108
+ </button>
109
+ )}
110
+ </div>
111
+ <div class='navigation-bar-box mt-m'>
112
+ <div class='navigation-bar'>
113
+ <div class='navigation-item active'>All</div>
114
+ <div class='navigation-item'>Chinese</div>
115
+ <div class='navigation-item'>Europe</div>
116
+ <div class='navigation-item'>Asia</div>
117
+ <div class='navigation-item'>Dimension</div>
118
+ <div class='navigation-item'>Ancient</div>
119
+ <div class='navigation-item'>Simple</div>
120
+ </div>
121
+ </div>
122
+ <div class='search-result-box'>{dom}</div>
123
+ </div>
124
+ );
125
+ };
@@ -0,0 +1,105 @@
1
+ import { CssProps, Icon } from 'lupine.web';
2
+ import { adminFrameHelper } from 'lupine.api/admin';
3
+ import { AdminItemEditPage } from '../pages/admin-item-edit';
4
+ import { ActionSheet, Toast } from 'lupine.native.components';
5
+ import * as icons from 'lupine.core/icons';
6
+ import { StoryCardShortProps } from './story-props';
7
+
8
+ export const StoryCard = (props: StoryCardShortProps) => {
9
+ const css: CssProps = {
10
+ clear: 'both',
11
+ margin: 'auto',
12
+ height: 'auto',
13
+ lineHeight: '1.6',
14
+ paddingBottom: '16px',
15
+ maxWidth: '100%',
16
+ width: '100%',
17
+ position: 'relative',
18
+ '.story-card-title-link': {
19
+ fontSize: '120%',
20
+ color: 'black',
21
+ fontWeight: 'bold',
22
+ },
23
+ '.story-card-row .tag': {
24
+ color: '#999',
25
+ verticalAlign: 'bottom',
26
+ },
27
+ '.story-card-row .label.name': {
28
+ maxWidth: '110px',
29
+ display: 'inline-block',
30
+ whiteSpace: 'nowrap',
31
+ overflow: 'hidden',
32
+ textOverflow: 'ellipsis',
33
+ verticalAlign: 'bottom',
34
+ },
35
+ '.story-card-img': {
36
+ float: 'left',
37
+ width: '100%',
38
+ },
39
+ '.story-card-buttons': {
40
+ position: 'absolute',
41
+ top: '-2px',
42
+ right: '0',
43
+ justifyContent: 'flex-end',
44
+ },
45
+ '.story-card-link': {
46
+ textDecoration: 'none',
47
+ color: 'var(--primary-color)',
48
+ },
49
+ '.story-card-title .title': {
50
+ wordBreak: 'break-all',
51
+ fontWeight: 500,
52
+ fontSize: '15px',
53
+ lineHeight: '140%',
54
+ },
55
+ '.story-card-info .author': {
56
+ wordBreak: 'break-all',
57
+ fontSize: '12px',
58
+ },
59
+ };
60
+
61
+ const onEdit = () => {
62
+ adminFrameHelper.addPanel(`Edit ${props.id}`, <AdminItemEditPage id={String(props.id)} />);
63
+ };
64
+ const onDelete = async () => {
65
+ const index = await ActionSheet.select({ title: 'Are you sure you want to delete this record and related files?', options: ['Delete'], cancelText: 'Cancel' });
66
+ if (index === 0) {
67
+ props.onDeleted?.();
68
+ Toast.success('Delete successfully');
69
+ }
70
+ };
71
+ return (
72
+ <section css={css} class='story-card-box'>
73
+ {props.management && (
74
+ <div class='story-card-buttons pr-s'>
75
+ <button class='button-base button-ss' onClick={onEdit}>
76
+ Edit
77
+ </button>
78
+ <button class='button-base button-ss' onClick={onDelete}>
79
+ Delete
80
+ </button>
81
+ </div>
82
+ )}
83
+ {/* the page of the story in the app */}
84
+ <a class='story-card-link' href={`/story/${props.id}`}>
85
+ <div class='story-card-img-box'>
86
+ <img class='story-card-img' src={props.cover_file} />
87
+ <div class='story-card-img-tips'>
88
+ <span class='view_count'>
89
+ <Icon name={icons.eye} /> {props.view_count}
90
+ </span>{' '}
91
+ <span class='collect_count'>
92
+ <Icon name={icons.heart} /> {props.collect_count}
93
+ </span>
94
+ </div>
95
+ </div>
96
+ <div class='story-card-row story-card-title'>
97
+ <span class='title'>{props.title}</span>
98
+ </div>
99
+ </a>
100
+ <div class='story-card-row story-card-info'>
101
+ <span class='author'>{props.author}</span>
102
+ </div>
103
+ </section>
104
+ );
105
+ };
@@ -0,0 +1,105 @@
1
+ import { createSignal, CssProps, For, adjustedMediaQueryRange, MediaQueryDirection, MediaQueryRange } from 'lupine.web';
2
+ import { StoryCardShortProps } from './story-props';
3
+ import { StoryCard } from './story-card';
4
+
5
+ export type StoryListComponentProps = {
6
+ items: StoryCardShortProps[];
7
+ count: number;
8
+ management: boolean;
9
+ };
10
+
11
+ export const StoryListComponent = (props: StoryListComponentProps) => {
12
+ const [items, setItems] = createSignal(props.items);
13
+ const maxWidth = '1399px';
14
+ const css: CssProps = {
15
+ alignSelf: 'center',
16
+ paddingBottom: '16px',
17
+ clear: 'both',
18
+ width: '100%',
19
+ '.story-list-inner': {
20
+ // display: 'grid',
21
+ // gridGap: '10px',
22
+ // gridAutoRows: 'auto',
23
+ // gridTemplateColumns: 'repeat(5, 1fr)',
24
+ columnCount: 5,
25
+ columnGap: '10px',
26
+ // display: 'flex',
27
+ // flexWrap: 'wrap',
28
+ maxWidth: '100%',
29
+ width: '100%',
30
+ // padding: '0 16px',
31
+ margin: 'auto',
32
+ // placeContent: 'space-between',
33
+ '.story-list-sub': {
34
+ // width: 'calc(25% - 10.7px)', // (16 + 16) / 3
35
+ width: '100%',
36
+ overflow: 'hidden',
37
+ // paddingTop: '16px',
38
+ },
39
+ '.card-list-sub-box': {
40
+ borderRadius: '6px',
41
+ // border: 'dotted 1px gray',
42
+ padding: '8px',
43
+ },
44
+ [adjustedMediaQueryRange(MediaQueryDirection.Above, maxWidth || '', 32)]: {
45
+ padding: '0',
46
+ },
47
+ [MediaQueryRange.DesktopAbove]: {
48
+ '.story-list-sub:nth-child(3n+1), .story-list-sub:nth-child(3n+2)': {
49
+ marginRight: '16px',
50
+ },
51
+ },
52
+ // [MediaQueryRange.DesktopAbove]: {
53
+ // '.card-list-sub:nth-child(3n+1) .card-list-sub-box, .card-list-sub:nth-child(3n+2) .card-list-sub-box': {
54
+ // marginRight: '16px',
55
+ // },
56
+ // },
57
+ [MediaQueryRange.DesktopBelow]: {
58
+ columnCount: 4,
59
+ // gridTemplateColumns: 'repeat(4, 1fr)',
60
+ '.story-list-sub': {
61
+ // width: 'calc(33.33% - 10.7px)', // (16 + 16) / 3
62
+ },
63
+ '.story-list-sub:nth-child(2n+1)': {
64
+ marginRight: '16px',
65
+ },
66
+ },
67
+ [MediaQueryRange.MobileBelow]: {
68
+ columnCount: 3,
69
+ // gridTemplateColumns: 'repeat(3, 1fr)',
70
+ '.story-list-sub': {
71
+ // width: 'calc(50% - 8px)',
72
+ },
73
+ '.story-list-sub:nth-child(2n+1)': {
74
+ marginRight: '16px',
75
+ },
76
+ },
77
+ [MediaQueryRange.ExtraSmallBelow]: {
78
+ columnCount: 2,
79
+ // gridTemplateColumns: 'repeat(2, 1fr)',
80
+ // padding: '0 16px',
81
+ '.story-list-sub': {
82
+ // width: '100%',
83
+ marginRight: '0!important',
84
+ },
85
+ },
86
+ },
87
+ };
88
+ return (
89
+ <section css={css} className='story-list-box'>
90
+ <div class='story-list-inner'>
91
+ <For each={items}>
92
+ {(item) => (
93
+ <div class='story-list-sub'>
94
+ <StoryCard
95
+ {...item}
96
+ management={props.management}
97
+ onDeleted={() => setItems(items().filter((i) => i !== item))}
98
+ />
99
+ </div>
100
+ )}
101
+ </For>
102
+ </div>
103
+ </section>
104
+ );
105
+ };
@@ -0,0 +1,34 @@
1
+ export type StoryCardProps = {
2
+ title: string;
3
+ description: string;
4
+ music_url: string;
5
+ cover_url: string;
6
+ video_url?: string;
7
+ author: string;
8
+ view_count: number;
9
+ download_count: number;
10
+ collect_count: number;
11
+ labels: string[];
12
+ group_labels: string[];
13
+ upload_date: string;
14
+ start_time_seconds: number;
15
+ state: string;
16
+ remark: string;
17
+ updatedstamp: string;
18
+ };
19
+ export type StoryCardShortProps = {
20
+ id: number;
21
+ title: string;
22
+ cover_file: string;
23
+ author: string;
24
+ view_count: number;
25
+ download_count: number;
26
+ collect_count: number;
27
+ start_time_seconds: number;
28
+ management: boolean;
29
+ onDeleted?: () => void;
30
+ };
31
+
32
+ export type StoryListProps = {
33
+ item: StoryCardShortProps;
34
+ };
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html data-theme="<!--META-THEME-->">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="manifest" href="/assets/site.webmanifest" />
6
+ <title><!--META-TITLE--></title>
7
+ <link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png" />
8
+ <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png" />
9
+ <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png" />
10
+ <link rel="icon" type="image/png" sizes="192x192" href="/assets/android-chrome-192x192.png" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
12
+ <!--META-ENV-START-->
13
+ <!--META-ENV-END-->
14
+ <link rel="shortcut icon" href="/assets/favicon.ico?t={hash}" type="image/x-icon" />
15
+ <!-- the icons of the pages of lupine.api (ifc-icon): a font made with web/icons-font.config.js -->
16
+ <link rel="stylesheet" type="text/css" href="/assets/icons-font/style.css?t={hash}" />
17
+ <link rel="stylesheet" type="text/css" href="{SUBDIR}/index.css?t={hash}" />
18
+ <script defer src="{SUBDIR}/index.js?t={hash}"></script>
19
+ </head>
20
+ <body>
21
+ <div class="lupine-root"></div>
22
+ </body>
23
+ </html>
@@ -0,0 +1,49 @@
1
+ // css order is important
2
+ import '../styles/global.css';
3
+
4
+ import { adminFrameHelper, devAdminPageRouter } from 'lupine.api/admin';
5
+ import { bindAppGlobalStyle, bindRenderPageFunctions, bindRouter, bindTheme, PageProps, PageRouter, setDefaultPageTitle, Redirect } from 'lupine.web';
6
+ import { DemoPage } from 'lupine.web.components/demo';
7
+ import { themes } from '../styles/theme';
8
+ import { baseCss } from '../styles/base-css';
9
+ import { baseUrl, fetchData } from '../services/fetch-data';
10
+ import { patchAdminFrame } from './admin-patch';
11
+
12
+ // The admin pages (/admin, in the browser only), an entry of its own (lupine.json). One page for both: an admin of the
13
+ // app (signed in in the app, or here) sees the pages of the site (Site: items, users, the website); the developer
14
+ // (DEV_ADMIN_USER / DEV_ADMIN_PASS of .env) sees the tools too: the database, logs, files, the server, releases,
15
+ // settings. /admin/demo: the examples of all the components.
16
+
17
+ export const checkDevAndAppAuth = async (props: PageProps) => {
18
+ adminFrameHelper.setIsDevAdmin(false);
19
+ if (typeof document === 'undefined') {
20
+ // no ssr for admin pages
21
+ return <div></div>;
22
+ }
23
+
24
+ const data = await props.renderPageFunctions.fetchData('/api/admin/auth');
25
+ if (data && data.json && data.json.devLogin) {
26
+ adminFrameHelper.setIsDevAdmin(true);
27
+ return null;
28
+ }
29
+ // an admin of the app (the API checks it again for each request)
30
+ if (data && data.json && data.json.appLogin && data.json.user && data.json.user.admin === '1') {
31
+ return null;
32
+ }
33
+ if (props.url !== '/admin/login') {
34
+ return Redirect({ url: '/admin/login' });
35
+ }
36
+ return null;
37
+ };
38
+ bindTheme('light', themes);
39
+ bindAppGlobalStyle('comm-css', baseCss, false, true);
40
+ setDefaultPageTitle('Lupine Full-stack Starter - admin');
41
+
42
+ bindRenderPageFunctions({ fetchData, baseUrl });
43
+
44
+ patchAdminFrame();
45
+ const pageRouter = new PageRouter();
46
+ devAdminPageRouter.setFilter(checkDevAndAppAuth);
47
+ pageRouter.use('/admin/demo', DemoPage);
48
+ pageRouter.use('/admin', devAdminPageRouter);
49
+ bindRouter(pageRouter);