lesli 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (398) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +3 -0
  3. data/app/assets/config/lesli_manifest.js +53 -0
  4. data/app/assets/fonts/lesli/Domine/Domine-Bold.ttf +0 -0
  5. data/app/assets/fonts/lesli/Domine/Domine-Regular.ttf +0 -0
  6. data/app/assets/fonts/lesli/Domine/OFL.txt +95 -0
  7. data/app/assets/fonts/lesli/MaterialDesign/icons.woff2 +0 -0
  8. data/app/assets/fonts/lesli/Montserrat/Montserrat-Variable.ttf +0 -0
  9. data/app/assets/fonts/lesli/OpenSans/OpenSans-Variable.ttf +0 -0
  10. data/app/assets/fonts/lesli/Remix/remixicon.eot +0 -0
  11. data/app/assets/fonts/lesli/Remix/remixicon.glyph.json +1 -0
  12. data/app/assets/fonts/lesli/Remix/remixicon.svg +7633 -0
  13. data/app/assets/fonts/lesli/Remix/remixicon.symbol.svg +11 -0
  14. data/app/assets/fonts/lesli/Remix/remixicon.ttf +0 -0
  15. data/app/assets/fonts/lesli/Remix/remixicon.woff +0 -0
  16. data/app/assets/fonts/lesli/Remix/remixicon.woff2 +0 -0
  17. data/app/assets/fonts/lesli/Roboto/LICENSE.txt +202 -0
  18. data/app/assets/fonts/lesli/Roboto/Roboto-Black.ttf +0 -0
  19. data/app/assets/fonts/lesli/Roboto/Roboto-BlackItalic.ttf +0 -0
  20. data/app/assets/fonts/lesli/Roboto/Roboto-Bold.ttf +0 -0
  21. data/app/assets/fonts/lesli/Roboto/Roboto-BoldItalic.ttf +0 -0
  22. data/app/assets/fonts/lesli/Roboto/Roboto-Italic.ttf +0 -0
  23. data/app/assets/fonts/lesli/Roboto/Roboto-Light.ttf +0 -0
  24. data/app/assets/fonts/lesli/Roboto/Roboto-LightItalic.ttf +0 -0
  25. data/app/assets/fonts/lesli/Roboto/Roboto-Medium.ttf +0 -0
  26. data/app/assets/fonts/lesli/Roboto/Roboto-MediumItalic.ttf +0 -0
  27. data/app/assets/fonts/lesli/Roboto/Roboto-Regular.ttf +0 -0
  28. data/app/assets/fonts/lesli/Roboto/Roboto-Thin.ttf +0 -0
  29. data/app/assets/fonts/lesli/Roboto/Roboto-ThinItalic.ttf +0 -0
  30. data/app/assets/icons/lesli/cloud-admin.svg +1 -0
  31. data/app/assets/icons/lesli/cloud-audit.svg +1 -0
  32. data/app/assets/icons/lesli/cloud-babel.svg +1 -0
  33. data/app/assets/icons/lesli/cloud-bell.svg +1 -0
  34. data/app/assets/icons/lesli/cloud-books.svg +1 -0
  35. data/app/assets/icons/lesli/cloud-development.svg +1 -0
  36. data/app/assets/icons/lesli/cloud-dispatcher.svg +1 -0
  37. data/app/assets/icons/lesli/cloud-driver.svg +1 -0
  38. data/app/assets/icons/lesli/cloud-focus.svg +1 -0
  39. data/app/assets/icons/lesli/cloud-help.svg +1 -0
  40. data/app/assets/icons/lesli/cloud-kb.svg +1 -0
  41. data/app/assets/icons/lesli/cloud-leaf.svg +1 -0
  42. data/app/assets/icons/lesli/cloud-lesli.svg +1 -0
  43. data/app/assets/icons/lesli/cloud-mailer.svg +1 -0
  44. data/app/assets/icons/lesli/cloud-one.svg +1 -0
  45. data/app/assets/icons/lesli/cloud-profile.svg +1 -0
  46. data/app/assets/icons/lesli/cloud-proposal.svg +1 -0
  47. data/app/assets/icons/lesli/cloud-scraper.svg +1 -0
  48. data/app/assets/icons/lesli/cloud-shared.svg +1 -0
  49. data/app/assets/icons/lesli/cloud-storage.svg +1 -0
  50. data/app/assets/icons/lesli/cloud-talk.svg +1 -0
  51. data/app/assets/icons/lesli/cloud-team.svg +1 -0
  52. data/app/assets/icons/lesli/cloud-time.svg +1 -0
  53. data/app/assets/icons/lesli/cloud-vault.svg +1 -0
  54. data/app/assets/icons/lesli/cloud-word.svg +1 -0
  55. data/app/assets/icons/lesli/icon-module.svg +1 -0
  56. data/app/assets/icons/lesli/logo-android.svg +1 -0
  57. data/app/assets/icons/lesli/logo-bulma.svg +1 -0
  58. data/app/assets/icons/lesli/logo-ios.svg +1 -0
  59. data/app/assets/icons/lesli/logo-linux.svg +1 -0
  60. data/app/assets/icons/lesli/logo-mac.svg +1 -0
  61. data/app/assets/icons/lesli/logo-module.svg +1 -0
  62. data/app/assets/icons/lesli/logo-postgresql.svg +1 -0
  63. data/app/assets/icons/lesli/logo-rails.svg +1 -0
  64. data/app/assets/icons/lesli/logo-ruby.svg +1 -0
  65. data/app/assets/icons/lesli/logo-sass.svg +1 -0
  66. data/app/assets/icons/lesli/logo-vue.svg +1 -0
  67. data/app/assets/icons/lesli/logo-web.svg +1 -0
  68. data/app/assets/icons/lesli/logo-windows.svg +1 -0
  69. data/app/assets/icons/readme.md +10 -0
  70. data/app/assets/images/lesli/brand/app-auth.svg +9 -0
  71. data/app/assets/images/lesli/brand/app-icon.svg +42 -0
  72. data/app/assets/images/lesli/brand/app-logo.svg +4 -0
  73. data/app/assets/images/lesli/brand/favicon.png +0 -0
  74. data/app/assets/images/lesli/brand/favicon.svg +61 -0
  75. data/app/assets/images/lesli/brand/login-background.jpg +0 -0
  76. data/app/assets/javascripts/lesli/users/sessions.js +786 -0
  77. data/app/assets/stylesheets/lesli/users/confirmations.scss +34 -0
  78. data/app/assets/stylesheets/lesli/users/devise.scss +32 -0
  79. data/app/assets/stylesheets/lesli/users/oauth.scss +34 -0
  80. data/app/assets/stylesheets/lesli/users/passwords.scss +34 -0
  81. data/app/assets/stylesheets/lesli/users/registrations.scss +34 -0
  82. data/app/assets/stylesheets/lesli/users/sessions.scss +38 -0
  83. data/app/controllers/lesli/application_controller.rb +108 -0
  84. data/app/controllers/lesli/application_devise_controller.rb +54 -0
  85. data/app/controllers/lesli/application_lesli_controller.rb +61 -0
  86. data/app/controllers/lesli/interfaces/application/authorization.rb +107 -0
  87. data/app/controllers/lesli/interfaces/application/customization.rb +46 -0
  88. data/app/controllers/lesli/interfaces/application/logger.rb +133 -0
  89. data/app/controllers/lesli/interfaces/application/requester.rb +84 -0
  90. data/app/controllers/lesli/interfaces/application/responder.rb +132 -0
  91. data/app/controllers/lesli/profiles_controller.rb +60 -0
  92. data/app/controllers/users/confirmations_controller.rb +30 -0
  93. data/app/controllers/users/omniauth_callbacks_controller.rb +30 -0
  94. data/app/controllers/users/passwords_controller.rb +34 -0
  95. data/app/controllers/users/registrations_controller.rb +62 -0
  96. data/app/controllers/users/sessions_controller.rb +142 -0
  97. data/app/controllers/users/unlocks_controller.rb +30 -0
  98. data/app/helpers/lesli/assets_helper.rb +92 -0
  99. data/app/helpers/lesli/customization_helper.rb +84 -0
  100. data/app/helpers/lesli/general_helper.rb +83 -0
  101. data/app/helpers/lesli/navigation_helper.rb +349 -0
  102. data/app/helpers/lesli/profiles_helper.rb +4 -0
  103. data/app/helpers/lesli/system_helper.rb +57 -0
  104. data/app/lib/date2.rb +192 -0
  105. data/app/lib/lesli/system.rb +80 -0
  106. data/app/models/concerns/account_engines.rb +249 -0
  107. data/app/models/concerns/user_activities.rb +163 -0
  108. data/app/models/concerns/user_extensions.rb +129 -0
  109. data/app/models/concerns/user_guard.rb +278 -0
  110. data/app/models/concerns/user_polyfill.rb +134 -0
  111. data/app/models/lesli/account/log.rb +57 -0
  112. data/app/models/lesli/account.rb +76 -0
  113. data/app/models/lesli/application_lesli_record.rb +37 -0
  114. data/app/models/lesli/profile.rb +4 -0
  115. data/app/models/lesli/system_controller/action.rb +37 -0
  116. data/app/models/lesli/system_controller.rb +37 -0
  117. data/app/models/lesli/user/agent.rb +37 -0
  118. data/app/models/lesli/user/log.rb +38 -0
  119. data/app/models/lesli/user/request.rb +37 -0
  120. data/app/models/lesli/user/session.rb +105 -0
  121. data/app/models/lesli/user.rb +162 -0
  122. data/app/services/lesli/application_lesli_service.rb +168 -0
  123. data/app/services/lesli/user/session_service.rb +62 -0
  124. data/app/validators/lesli/application_lesli_validator.rb +67 -0
  125. data/app/validators/lesli/users_validator.rb +217 -0
  126. data/app/views/devise/confirmations/new.html.erb +16 -0
  127. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  128. data/app/views/devise/mailer/email_changed.html.erb +7 -0
  129. data/app/views/devise/mailer/password_change.html.erb +3 -0
  130. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  131. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  132. data/app/views/devise/passwords/edit.html.erb +25 -0
  133. data/app/views/devise/passwords/new.html.erb +16 -0
  134. data/app/views/devise/registrations/edit.html.erb +43 -0
  135. data/app/views/devise/registrations/new.html.erb +29 -0
  136. data/app/views/devise/sessions/new.html.erb +178 -0
  137. data/app/views/devise/shared/_error_messages.html.erb +15 -0
  138. data/app/views/devise/shared/_links.html.erb +25 -0
  139. data/app/views/devise/unlocks/new.html.erb +16 -0
  140. data/app/views/lesli/devise/sessions/_form.html.erb +17 -0
  141. data/app/views/lesli/devise/sessions/_session.html.erb +2 -0
  142. data/app/views/lesli/devise/sessions/edit.html.erb +10 -0
  143. data/app/views/lesli/devise/sessions/index.html.erb +14 -0
  144. data/app/views/lesli/devise/sessions/new.html.erb +9 -0
  145. data/app/views/lesli/devise/sessions/show.html.erb +10 -0
  146. data/app/views/lesli/layouts/application-devise.html.erb +58 -0
  147. data/app/views/lesli/layouts/application-lesli.html.erb +57 -0
  148. data/app/views/lesli/layouts/application-public.html.erb +59 -0
  149. data/app/views/lesli/partials/_application-analytics.html.erb +71 -0
  150. data/app/views/lesli/partials/_application-data.html.erb +102 -0
  151. data/app/views/lesli/partials/_application-head.html.erb +56 -0
  152. data/app/views/lesli/partials/_application-lesli-chatbox.html.erb +35 -0
  153. data/app/views/lesli/partials/_application-lesli-content.html.erb +35 -0
  154. data/app/views/lesli/partials/_application-lesli-engines.html.erb +83 -0
  155. data/app/views/lesli/partials/_application-lesli-footer.html.erb +82 -0
  156. data/app/views/lesli/partials/_application-lesli-header.html.erb +79 -0
  157. data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -0
  158. data/app/views/lesli/partials/_application-lesli-javascript.html.erb +57 -0
  159. data/app/views/lesli/partials/_application-lesli-navigation.html.erb +52 -0
  160. data/app/views/lesli/partials/_application-lesli-notices.html.erb +43 -0
  161. data/app/views/lesli/partials/_application-lesli-panels.html.erb +58 -0
  162. data/app/views/lesli/partials/_application-lesli-scss.html.erb +60 -0
  163. data/app/views/lesli/partials/_application-lesli-sidebar.html.erb +50 -0
  164. data/app/views/lesli/partials/_application-public-footer.html.erb +51 -0
  165. data/app/views/lesli/partials/_application-public-javascript.html.erb +51 -0
  166. data/app/views/lesli/partials/_application-public-scss.html.erb +35 -0
  167. data/app/views/lesli/profiles/_form.html.erb +17 -0
  168. data/app/views/lesli/profiles/_profile.html.erb +2 -0
  169. data/app/views/lesli/profiles/edit.html.erb +10 -0
  170. data/app/views/lesli/profiles/index.html.erb +14 -0
  171. data/app/views/lesli/profiles/new.html.erb +9 -0
  172. data/app/views/lesli/profiles/show.html.erb +10 -0
  173. data/app/views/lesli/wrappers/_application-auth.html.erb +65 -0
  174. data/config/initializers/devise.rb +334 -0
  175. data/config/initializers/lesli_defaults.rb +100 -0
  176. data/config/locales/devise.en.yml +65 -0
  177. data/config/routes.rb +52 -0
  178. data/db/migrate/v1.0/0010000110_create_lesli_accounts.rb +70 -0
  179. data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +59 -0
  180. data/db/migrate/v1.0/0010000310_create_lesli_users.rb +97 -0
  181. data/db/migrate/v1.0/0010000610_create_lesli_system_controllers.rb +44 -0
  182. data/db/migrate/v1.0/0010000710_create_lesli_system_controller_actions.rb +43 -0
  183. data/db/migrate/v1.0/0010001210_create_lesli_account_activities.rb +50 -0
  184. data/db/migrate/v1.0/0010001310_create_lesli_account_logs.rb +45 -0
  185. data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +51 -0
  186. data/db/migrate/v1.0/0010003310_create_lesli_user_requests.rb +48 -0
  187. data/db/migrate/v1.0/0010003610_create_lesli_user_logs.rb +45 -0
  188. data/db/migrate/v1.0/0010004010_create_lesli_user_agents.rb +46 -0
  189. data/db/seed/development/accounts.rb +47 -0
  190. data/db/seed/development/users.rb +53 -0
  191. data/db/seed/development.rb +35 -0
  192. data/db/seed/production.rb +35 -0
  193. data/db/seed/test.rb +35 -0
  194. data/db/seed/tools.rb +60 -0
  195. data/db/seeds.rb +64 -0
  196. data/db/structure/00000000_locations.json +32 -0
  197. data/db/structure/00000000_people.json +34 -0
  198. data/db/structure/00000003_actions.json +14 -0
  199. data/db/structure/00000004_activities.json +20 -0
  200. data/db/structure/00000005_discussions.json +8 -0
  201. data/db/structure/00000006_files.json +32 -0
  202. data/db/structure/00000007_subscribers.json +11 -0
  203. data/db/structure/00000008_custom_fields.json +8 -0
  204. data/db/structure/00000201_workflows.json +17 -0
  205. data/db/structure/00000202_workflow_statuses.json +24 -0
  206. data/db/structure/00000203_workflow_associations.json +14 -0
  207. data/db/structure/00000204_workflow_actions.json +39 -0
  208. data/db/structure/00000205_workflow_checks.json +27 -0
  209. data/db/structure/00000301_custom_fields.json +38 -0
  210. data/db/structure/00000401_custom_validations.json +14 -0
  211. data/db/structure/00000402_custom_validation_rules.json +23 -0
  212. data/db/structure/00000403_custom_validation_fields.json +14 -0
  213. data/db/structure/00000501_dashboards.json +14 -0
  214. data/db/structure/00000502_dashboard_components.json +23 -0
  215. data/db/tables/0010001010_create_account_settings.rb +42 -0
  216. data/db/tables/0010001110_create_account_locations.rb +64 -0
  217. data/db/tables/0010001410_create_account_files.rb +52 -0
  218. data/db/tables/0010001510_create_account_currencies.rb +48 -0
  219. data/db/tables/0010001610_create_account_currency_exchange_rates.rb +54 -0
  220. data/db/tables/0010003010_create_user_details.rb +49 -0
  221. data/db/tables/0010003110_create_user_settings.rb +44 -0
  222. data/db/tables/0010003410_create_user_activities.rb +51 -0
  223. data/db/tables/0010003510_create_user_roles.rb +43 -0
  224. data/db/tables/0010003710_create_user_codes.rb +43 -0
  225. data/db/tables/0010003810_create_user_shortcuts.rb +46 -0
  226. data/db/tables/0010004110_create_user_tokens.rb +45 -0
  227. data/db/tables/0010005010_create_descriptors.rb +45 -0
  228. data/db/tables/0010005110_create_descriptor_privileges.rb +44 -0
  229. data/db/tables/0010005210_create_descriptor_activities.rb +51 -0
  230. data/db/tables/0010005510_create_role_descriptors.rb +44 -0
  231. data/db/tables/0010005610_create_role_activities.rb +50 -0
  232. data/db/tables/0010005710_create_role_privileges.rb +45 -0
  233. data/db/tables/0010009010_create_feedbacks.rb +56 -0
  234. data/lib/assets/javascripts/lesli/i18n.js +1095 -0
  235. data/lib/assets/javascripts/lesli/translations.js +15 -0
  236. data/lib/lesli/configuration.rb +45 -0
  237. data/lib/lesli/engine.rb +62 -0
  238. data/lib/lesli/version.rb +34 -0
  239. data/lib/lesli.rb +6 -0
  240. data/lib/sass/lesli/bulma/loader.scss +84 -0
  241. data/lib/sass/lesli/cloud-objects/discussion.scss +77 -0
  242. data/lib/sass/lesli/cloud-objects/file.scss +138 -0
  243. data/lib/sass/lesli/components/editor-richtext.scss +78 -0
  244. data/lib/sass/lesli/components/keypad.scss +109 -0
  245. data/lib/sass/lesli/devise/confirmations.scss.erb +75 -0
  246. data/lib/sass/lesli/devise/passwords.scss.erb +86 -0
  247. data/lib/sass/lesli/devise/registrations.scss.erb +50 -0
  248. data/lib/sass/lesli/devise/sessions.scss +36 -0
  249. data/lib/sass/lesli/elements/autocomplete.scss +72 -0
  250. data/lib/sass/lesli/elements/avatar.scss +48 -0
  251. data/lib/sass/lesli/elements/calendar.scss +47 -0
  252. data/lib/sass/lesli/elements/card.scss +37 -0
  253. data/lib/sass/lesli/elements/content.scss +37 -0
  254. data/lib/sass/lesli/elements/empty.scss +43 -0
  255. data/lib/sass/lesli/elements/file-uploader.scss +74 -0
  256. data/lib/sass/lesli/elements/form.scss +43 -0
  257. data/lib/sass/lesli/elements/gallery.scss +98 -0
  258. data/lib/sass/lesli/elements/header.scss +44 -0
  259. data/lib/sass/lesli/elements/input-tag.scss +73 -0
  260. data/lib/sass/lesli/elements/loading.scss +63 -0
  261. data/lib/sass/lesli/elements/map.scss +107 -0
  262. data/lib/sass/lesli/elements/msg.scss +77 -0
  263. data/lib/sass/lesli/elements/navbar.scss +115 -0
  264. data/lib/sass/lesli/elements/panel.scss +65 -0
  265. data/lib/sass/lesli/elements/tab.scss +48 -0
  266. data/lib/sass/lesli/elements/table.scss +118 -0
  267. data/lib/sass/lesli/elements/toggle.scss +102 -0
  268. data/lib/sass/lesli/elements/toolbar.scss +66 -0
  269. data/lib/sass/lesli/fonts/families.scss +47 -0
  270. data/lib/sass/lesli/fonts/mdicons.scss +84 -0
  271. data/lib/sass/lesli/fonts/remixicons.scss +2602 -0
  272. data/lib/sass/lesli/helpers/display.scss +44 -0
  273. data/lib/sass/lesli/helpers/tooltip.scss +91 -0
  274. data/lib/sass/lesli/layouts/application-announcements.scss +40 -0
  275. data/lib/sass/lesli/layouts/application-component.scss +50 -0
  276. data/lib/sass/lesli/layouts/application-engines.scss +155 -0
  277. data/lib/sass/lesli/layouts/application-footer.scss +102 -0
  278. data/lib/sass/lesli/layouts/application-header.scss +152 -0
  279. data/lib/sass/lesli/layouts/application-navbar.scss +61 -0
  280. data/lib/sass/lesli/layouts/application-search.scss +71 -0
  281. data/lib/sass/lesli/layouts/application-sidebar.scss +219 -0
  282. data/lib/sass/lesli/overrides/sweetalert.scss +106 -0
  283. data/lib/sass/lesli/pages/dashboards.scss +57 -0
  284. data/lib/sass/lesli/pages/invites.scss +81 -0
  285. data/lib/sass/lesli/pages/mfas.scss +36 -0
  286. data/lib/sass/lesli/pages/otps.scss +36 -0
  287. data/lib/sass/lesli/pages/passes.scss +35 -0
  288. data/lib/sass/lesli/panels/panel-announcements.scss +56 -0
  289. data/lib/sass/lesli/panels/panel-notification.scss +67 -0
  290. data/lib/sass/lesli/panels/panel-profile.scss +62 -0
  291. data/lib/sass/lesli/panels/panel-tasks.scss +41 -0
  292. data/lib/sass/lesli/panels/panel-ticket.scss +57 -0
  293. data/lib/sass/lesli/settings/variables.scss +148 -0
  294. data/lib/sass/lesli/shared/workflow-status-progress.scss +135 -0
  295. data/lib/sass/lesli/templates/application.scss +141 -0
  296. data/lib/sass/lesli/templates/dashboards.scss +32 -0
  297. data/lib/sass/lesli/templates/devise.scss +185 -0
  298. data/lib/sass/lesli/templates/empty.scss +42 -0
  299. data/lib/sass/lesli/templates/pdf.scss +45 -0
  300. data/lib/sass/lesli/templates/public.scss +71 -0
  301. data/lib/tasks/db.rb +75 -0
  302. data/lib/tasks/lesli/controllers.rake +103 -0
  303. data/lib/tasks/lesli_tasks.rake +23 -0
  304. data/lib/vue/application.js +269 -0
  305. data/lib/vue/apps/cloudobjects/action.vue +193 -0
  306. data/lib/vue/apps/cloudobjects/discussion/content.vue +60 -0
  307. data/lib/vue/apps/cloudobjects/discussion/element.vue +132 -0
  308. data/lib/vue/apps/cloudobjects/discussion/filters.vue +108 -0
  309. data/lib/vue/apps/cloudobjects/discussion/new.vue +130 -0
  310. data/lib/vue/apps/cloudobjects/discussion.vue +98 -0
  311. data/lib/vue/apps/cloudobjects/file/grid.vue +215 -0
  312. data/lib/vue/apps/cloudobjects/file/list.vue +106 -0
  313. data/lib/vue/apps/cloudobjects/file.vue +145 -0
  314. data/lib/vue/apps/dashboards/apps/edit.vue +105 -0
  315. data/lib/vue/apps/dashboards/apps/index.vue +114 -0
  316. data/lib/vue/apps/dashboards/apps/new.vue +89 -0
  317. data/lib/vue/apps/dashboards/apps/show.vue +76 -0
  318. data/lib/vue/apps/dashboards/components/form.vue +267 -0
  319. data/lib/vue/apps/dashboards/components/preview.vue +172 -0
  320. data/lib/vue/apps/workflows2/apps/actions/form.vue +232 -0
  321. data/lib/vue/apps/workflows2/apps/actions/forms/chatroom-form.vue +103 -0
  322. data/lib/vue/apps/workflows2/apps/actions/forms/cloud-object-clone-form.vue +125 -0
  323. data/lib/vue/apps/workflows2/apps/actions/forms/cloud-object-file-form.vue +102 -0
  324. data/lib/vue/apps/workflows2/apps/actions/forms/email-form.vue +190 -0
  325. data/lib/vue/apps/workflows2/apps/actions/forms/notification-form.vue +124 -0
  326. data/lib/vue/apps/workflows2/apps/actions/forms/send-cloud-object-file.vue +170 -0
  327. data/lib/vue/apps/workflows2/apps/actions/forms/task-form.vue +258 -0
  328. data/lib/vue/apps/workflows2/apps/actions/index.vue +146 -0
  329. data/lib/vue/apps/workflows2/apps/checks/form.vue +200 -0
  330. data/lib/vue/apps/workflows2/apps/checks/index.vue +160 -0
  331. data/lib/vue/apps/workflows2/apps/index.vue +177 -0
  332. data/lib/vue/apps/workflows2/apps/new.vue +97 -0
  333. data/lib/vue/apps/workflows2/apps/show.vue +146 -0
  334. data/lib/vue/apps/workflows2/components/associations.vue +215 -0
  335. data/lib/vue/apps/workflows2/components/chart.vue +91 -0
  336. data/lib/vue/apps/workflows2/components/workflow-form.vue +466 -0
  337. data/lib/vue/apps/workflows2/components/workflow-status-dropdown.vue +129 -0
  338. data/lib/vue/devise/confirmations.js +33 -0
  339. data/lib/vue/devise/passwords.js +137 -0
  340. data/lib/vue/devise/registrations.js +162 -0
  341. data/lib/vue/devise/sessions.js +143 -0
  342. data/lib/vue/layouts/application-announcements.vue +78 -0
  343. data/lib/vue/layouts/application-engines.vue +66 -0
  344. data/lib/vue/layouts/application-footer.vue +123 -0
  345. data/lib/vue/layouts/application-header.vue +213 -0
  346. data/lib/vue/layouts/application-navbar.vue +110 -0
  347. data/lib/vue/layouts/application-search.vue +86 -0
  348. data/lib/vue/layouts/application-sidebar.vue +63 -0
  349. data/lib/vue/layouts/dashboard-component.vue +62 -0
  350. data/lib/vue/pages/errors/app.js +32 -0
  351. data/lib/vue/pages/invites/app.js +76 -0
  352. data/lib/vue/pages/mfas/application.js +77 -0
  353. data/lib/vue/pages/onboarding/application.js +45 -0
  354. data/lib/vue/pages/onboarding/components/address.vue +120 -0
  355. data/lib/vue/pages/onboarding/components/buttons.vue +67 -0
  356. data/lib/vue/pages/onboarding/components/contact.vue +148 -0
  357. data/lib/vue/pages/onboarding/components/date-time.vue +265 -0
  358. data/lib/vue/pages/onboarding/components/finish.vue +62 -0
  359. data/lib/vue/pages/onboarding/components/general-info.vue +93 -0
  360. data/lib/vue/pages/onboarding/components/indicators.vue +78 -0
  361. data/lib/vue/pages/onboarding/components/welcome.vue +66 -0
  362. data/lib/vue/pages/onboarding/show.vue +67 -0
  363. data/lib/vue/pages/onboarding/store.js +165 -0
  364. data/lib/vue/pages/otps/application.js +90 -0
  365. data/lib/vue/pages/passes/application.js +80 -0
  366. data/lib/vue/pages/websites/application.js +34 -0
  367. data/lib/vue/panels/panel-announcements.vue +248 -0
  368. data/lib/vue/panels/panel-files.vue +281 -0
  369. data/lib/vue/panels/panel-notifications.vue +106 -0
  370. data/lib/vue/panels/panel-profile.vue +76 -0
  371. data/lib/vue/panels/panel-tasks.vue +124 -0
  372. data/lib/vue/panels/panel-tickets.vue +181 -0
  373. data/lib/vue/public.js +85 -0
  374. data/lib/vue/stores/announcements.js +75 -0
  375. data/lib/vue/stores/cloud-bell/notification.js +114 -0
  376. data/lib/vue/stores/cloudobjects/action.js +181 -0
  377. data/lib/vue/stores/cloudobjects/discussion.js +221 -0
  378. data/lib/vue/stores/cloudobjects/file.js +205 -0
  379. data/lib/vue/stores/dashboard.js +251 -0
  380. data/lib/vue/stores/firebase.js +163 -0
  381. data/lib/vue/stores/layout.js +60 -0
  382. data/lib/vue/stores/panels/announcements.js +153 -0
  383. data/lib/vue/stores/panels/task.js +66 -0
  384. data/lib/vue/stores/panels/tickets.js +129 -0
  385. data/lib/vue/stores/profile.js +90 -0
  386. data/lib/vue/stores/search.js +154 -0
  387. data/lib/vue/stores/services/translator.js +87 -0
  388. data/lib/vue/stores/workflow.js +185 -0
  389. data/lib/vue/stores/workflow2.js +345 -0
  390. data/lib/vue/stores/workflows/actions.js +327 -0
  391. data/lib/vue/stores/workflows/associations.js +130 -0
  392. data/lib/vue/stores/workflows/checks.js +210 -0
  393. data/lib/webpack/base.js +182 -0
  394. data/lib/webpack/core.js +80 -0
  395. data/lib/webpack/engines.js +162 -0
  396. data/license +674 -0
  397. data/readme.md +120 -0
  398. metadata +554 -0
@@ -0,0 +1,217 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by https://www.lesli.tech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ module Lesli
34
+ class UsersValidator < ApplicationLesliValidator
35
+
36
+ def validate
37
+ active?()
38
+ confirmed?()
39
+ roles_empty?()
40
+ active_roles?()
41
+ end
42
+
43
+
44
+ # validates if password meet with the minimum password requirements
45
+ # this settings are stored in the account_settings table
46
+ def password_complexity(password)
47
+
48
+ if password.blank?
49
+ failures.push('error_password_cannot_be_blank')
50
+ return self
51
+ end
52
+
53
+ # remove all the special characters for easy validations of some rules
54
+ password_string_no_special = password.gsub(/[^0-9A-Za-z]/, '')
55
+
56
+ # database keys with the parameters to validate
57
+ password_values = [
58
+ 'password_expiration_time_days',
59
+ 'password_enforce_complexity',
60
+ 'password_special_char_count',
61
+ 'password_lowercase_count',
62
+ 'password_uppercase_count',
63
+ 'password_minimum_length',
64
+ 'password_digit_count'
65
+ ].map do |setting_name|
66
+ "name = '#{setting_name}'"
67
+ end
68
+
69
+ password_settings = []
70
+
71
+ # get password settings from the database
72
+ if @resource.account
73
+
74
+ # if user is already registered
75
+ password_settings = @resource.account.settings.where(password_values.join(" or "))
76
+
77
+ elseif Account.first
78
+
79
+ # for new accounts just take the first account in the database
80
+ password_settings = Account.first.settings.where(password_values.join(" or "))
81
+
82
+ end
83
+
84
+ password_settings.each do |settings|
85
+
86
+ # exit validations if password complexity is not enabled
87
+ if settings[:name] == 'password_enforce_complexity' and settings[:value] != "1"
88
+ failures = []
89
+ break
90
+ end
91
+
92
+ # check if the password has te minimum number of special characters required
93
+ if settings[:name] == 'password_special_char_count'
94
+
95
+ # this regex removes all "normal" letters and numbers leaving special characters
96
+ if settings[:value].to_i > password.scan(/[^0-9A-Za-z]/).length
97
+ failures.push('error_password_special_char_count')
98
+ end
99
+
100
+ end
101
+
102
+ # check if the password has te minimum number of lowercase letters required
103
+ if settings[:name] == 'password_lowercase_count'
104
+
105
+ if settings[:value].to_i > password_string_no_special.scan(/[^0-9A-Z]/).length
106
+ failures.push('error_password_lowercase_count')
107
+ end
108
+
109
+ end
110
+
111
+ # check if the password has te minimum number of uppercase letters required
112
+ if settings[:name] == 'password_uppercase_count'
113
+
114
+ if settings[:value].to_i > password_string_no_special.scan(/[^0-9a-z]/).length
115
+ failures.push('error_password_uppercase_count')
116
+ end
117
+
118
+ end
119
+
120
+ # check if the password has te minium number of numbers required xD
121
+ if settings[:name] == 'password_digit_count'
122
+
123
+ if settings[:value].to_i > password_string_no_special.scan(/[^A-Za-z]/).length
124
+ failures.push('error_password_digit_count')
125
+ end
126
+
127
+ end
128
+
129
+ # check if the password has te minimum size required
130
+ if settings[:name] == 'password_minimum_length'
131
+
132
+ if settings[:value].to_i > password.length
133
+ failures.push('error_password_minimum_length')
134
+ end
135
+
136
+ end
137
+
138
+ end
139
+
140
+ return self
141
+
142
+ end
143
+
144
+ private
145
+
146
+
147
+ # check if user is able to create a new session
148
+ def active?
149
+
150
+ unless @resource.active? && @resource.locked_until != nil
151
+
152
+ # save a locked log for the requested user
153
+ @resource.logs.create({
154
+ title: "session_creation_failed",
155
+ description: "user_locked"
156
+ })
157
+
158
+ return false
159
+
160
+ end
161
+
162
+ return true
163
+ end
164
+
165
+ def confirmed?
166
+
167
+ # check if user is already confirmed
168
+ unless @resource.confirmed?
169
+
170
+ # save a invalid credentials log for the requested user
171
+ @resource.logs.create({
172
+ title: "session_creation_failed",
173
+ description: "email_not_confirmed"
174
+ })
175
+
176
+ return false
177
+
178
+ end
179
+
180
+ return true
181
+
182
+ end
183
+
184
+ def roles_empty?
185
+
186
+ # check if user has roles assigned
187
+ if @resource.roles.empty?
188
+
189
+ @resource.logs.create({
190
+ title: "session_creation_failed",
191
+ description: "user_has_no_assigned_role"
192
+ })
193
+
194
+ return true
195
+
196
+ end
197
+
198
+ return false
199
+
200
+ end
201
+
202
+ def active_roles?
203
+
204
+ # check user has at least one active role before authorize the sign-in request
205
+ unless (@resource.roles.map {|role| role.active}.include? true)
206
+ @resource.logs.create({
207
+ title: "session_creation_failed",
208
+ description: "user_has_no_active_role"
209
+ })
210
+
211
+ return false
212
+ end
213
+
214
+ return true
215
+ end
216
+ end
217
+ end
@@ -0,0 +1,16 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Resend confirmation instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @email %>!</p>
2
+
3
+ <% if @resource.try(:unconfirmed_email?) %>
4
+ <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
5
+ <% else %>
6
+ <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
7
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>We're contacting you to notify you that your password has been changed.</p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -0,0 +1,25 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+ <%= f.hidden_field :reset_password_token %>
6
+
7
+ <div class="field">
8
+ <%= f.label :password, "New password" %><br />
9
+ <% if @minimum_password_length %>
10
+ <em>(<%= @minimum_password_length %> characters minimum)</em><br />
11
+ <% end %>
12
+ <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
13
+ </div>
14
+
15
+ <div class="field">
16
+ <%= f.label :password_confirmation, "Confirm new password" %><br />
17
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
18
+ </div>
19
+
20
+ <div class="actions">
21
+ <%= f.submit "Change my password" %>
22
+ </div>
23
+ <% end %>
24
+
25
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,16 @@
1
+ <h2>Forgot your password?</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Send me reset password instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,43 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
12
+ <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
13
+ <% end %>
14
+
15
+ <div class="field">
16
+ <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
17
+ <%= f.password_field :password, autocomplete: "new-password" %>
18
+ <% if @minimum_password_length %>
19
+ <br />
20
+ <em><%= @minimum_password_length %> characters minimum</em>
21
+ <% end %>
22
+ </div>
23
+
24
+ <div class="field">
25
+ <%= f.label :password_confirmation %><br />
26
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
27
+ </div>
28
+
29
+ <div class="field">
30
+ <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
31
+ <%= f.password_field :current_password, autocomplete: "current-password" %>
32
+ </div>
33
+
34
+ <div class="actions">
35
+ <%= f.submit "Update" %>
36
+ </div>
37
+ <% end %>
38
+
39
+ <h3>Cancel my account</h3>
40
+
41
+ <div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div>
42
+
43
+ <%= link_to "Back", :back %>
@@ -0,0 +1,29 @@
1
+ <h2>Sign up</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <div class="field">
12
+ <%= f.label :password %>
13
+ <% if @minimum_password_length %>
14
+ <em>(<%= @minimum_password_length %> characters minimum)</em>
15
+ <% end %><br />
16
+ <%= f.password_field :password, autocomplete: "new-password" %>
17
+ </div>
18
+
19
+ <div class="field">
20
+ <%= f.label :password_confirmation %><br />
21
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
22
+ </div>
23
+
24
+ <div class="actions">
25
+ <%= f.submit "Sign up" %>
26
+ </div>
27
+ <% end %>
28
+
29
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,178 @@
1
+ <%
2
+ =begin
3
+
4
+ Lesli
5
+
6
+ Copyright (c) 2023, Lesli Technologies, S. A.
7
+
8
+ This program is free software: you can redistribute it and/or modify
9
+ it under the terms of the GNU General Public License as published by
10
+ the Free Software Foundation, either version 3 of the License, or
11
+ (at your option) any later version.
12
+
13
+ This program is distributed in the hope that it will be useful,
14
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ GNU General Public License for more details.
17
+
18
+ You should have received a copy of the GNU General Public License
19
+ along with this program. If not, see http://www.gnu.org/licenses/.
20
+
21
+ Lesli · Ruby on Rails SaaS development platform.
22
+
23
+ Made with ♥ by https://www.lesli.tech
24
+ Building a better future, one line of code at a time.
25
+
26
+ @contact hello@lesli.tech
27
+ @website https://www.lesli.tech
28
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
29
+
30
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
31
+ // ·
32
+ =end
33
+ %>
34
+
35
+ <%= render("lesli/wrappers/application-auth") do %>
36
+
37
+ <%# Logo container %>
38
+ <div class="logo has-text-centered mb-4">
39
+ <%= image_tag(
40
+ "#{lesli_instance_code}/brand/app-auth.svg", # dynamic path to the instance main logo
41
+ :class => "#{lesli_instance_code}-logo", # dynamic class according to the instance
42
+ :alt => "Main logo")
43
+ %>
44
+ <h1 class="has-text-primary">
45
+ <%#= I18n.t("core.users/sessions.view_text_welcome") %>
46
+ Welcome to Lesli
47
+ </h1>
48
+ </div>
49
+
50
+ <%# Log in form %>
51
+ <form @submit="postLogin" method="post">
52
+ <div class="field mb-4">
53
+ <label for="user_email" class="label">E-mail address</label>
54
+ <div class="control has-icons-left has-icons-right">
55
+ <input
56
+ required
57
+ id="user_email"
58
+ name="user_email"
59
+ type="email"
60
+ ref="email"
61
+ :class="['input', `is-${notification.type}`]"
62
+ placeholder="hello@lesli.tech"
63
+ v-model="sign_in.email"
64
+ @input="typing">
65
+ <span
66
+ class="icon is-small is-left"
67
+ :class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
68
+ <i class="ri-user-line"></i>
69
+ </span>
70
+ </div>
71
+ </div>
72
+ <div class="field mb-5">
73
+ <label for="user_password" class="label">Password</label>
74
+ <div class="control has-icons-left has-icons-right">
75
+ <input
76
+ required
77
+ id="user_password"
78
+ name="user_password"
79
+ type="password"
80
+ ref="password"
81
+ :class="['input', `is-${notification.type}`]"
82
+ placeholder="* * * * * * *"
83
+ v-model="sign_in.password"
84
+ @input="typing">
85
+ <span
86
+ :class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
87
+ <i class="ri-key-fill"></i>
88
+ </span>
89
+ <span
90
+ @click="togglePasswordInput()"
91
+ :class="['icon', 'is-small', 'is-right', `has-text-${notification.type}`]">
92
+ <i class="ri-eye-fill"></i>
93
+ </span>
94
+ </div>
95
+ <p v-cloak v-if="notification.show" :class="['help', `is-${notification.type}`]">
96
+ {{ notification.message }}
97
+ </p>
98
+ </div>
99
+
100
+ <%#
101
+ <div class="field mb-4">
102
+ <div class="control">
103
+ <label class="checkbox">
104
+ <input type="checkbox" />
105
+ Stay logged in
106
+ </label>
107
+ </div>
108
+ </div>
109
+ %>
110
+
111
+ <div class="field mb-6">
112
+ <div class="control is-fullwidth">
113
+ <button
114
+ type="submit"
115
+ :class="['button', 'is-primary', 'is-fullwidth', 'mb-2', {'is-loading':loading}]">
116
+ Log in
117
+ </button>
118
+ <%# if Rails.application.config.dig(:lesli, :security, :allow_registration) %>
119
+ <p class="account has-text-centered">
120
+ Still not registered?
121
+ <%= link_to "new_registration_path", :class => "has-text-primary" do %>
122
+ <u><b>Create account</b></u>
123
+ <% end %>
124
+ </p>
125
+ <%# end %>
126
+ </div>
127
+ </div>
128
+
129
+ <div class="field mb-6" v-if="false">
130
+ <p class="message has-text-success">Registration successfully done. Please check your E-mail to activate your account.</p>
131
+ </div>
132
+ </form>
133
+
134
+ <div class="links">
135
+ <%= link_to "new_user_password_path", :class => "password-new" do %>
136
+ <span class="icon mr-2">
137
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
138
+ <path d="M10 4.75C8.55296 4.75 7.375 5.92796 7.375 7.375V8.25C6.89155 8.25 6.5 8.64155 6.5 9.125V13.5C6.5 13.9834 6.89155 14.375 7.375 14.375H12.625C13.1084 14.375 13.5 13.9834 13.5 13.5V9.125C13.5 8.64155 13.1084 8.25 12.625 8.25V7.375C12.625 5.92796 11.447 4.75 10 4.75ZM11.75 12.625H8.25V10H11.75V12.625ZM9.125 8.25V7.375C9.125 6.89264 9.51764 6.5 10 6.5C10.4824 6.5 10.875 6.89264 10.875 7.375V8.25H9.125Z" fill="#112A62"/>
139
+ <path d="M16.7549 3.14324C13.4431 -0.120437 8.34511 -0.489197 4.62839 2.0123L4.61745 0.577295C4.61526 0.336669 4.41839 0.141979 4.17667 0.143071L3.30167 0.149633C3.05996 0.151821 2.86527 0.348697 2.86745 0.590409L2.89151 3.86501C2.89479 4.21938 3.11026 4.53656 3.43729 4.67001C3.76542 4.80345 4.14056 4.72579 4.38993 4.47314C7.43941 1.3811 12.4343 1.34386 15.5264 4.39001C17.8867 6.71533 18.5308 10.2132 17.19 13.2111C17.0948 13.4244 17.1725 13.6738 17.3814 13.7799L18.1623 14.1791C18.3833 14.2917 18.6633 14.201 18.7661 13.9746C20.434 10.2996 19.6531 5.99904 16.7546 3.14304L16.7549 3.14324Z" fill="#112A62"/>
140
+ <path d="M16.5625 15.3296C16.2333 15.1962 15.8593 15.2739 15.6099 15.5265C12.5615 18.6197 7.56633 18.6569 4.47345 15.6096C2.11314 13.2843 1.46905 9.78647 2.80986 6.78851C2.90502 6.57523 2.82736 6.32587 2.61846 6.21978L1.83751 5.82055C1.61657 5.7079 1.33656 5.79868 1.23377 6.02509C-0.43528 9.70121 0.346732 14.0017 3.24518 16.8566C6.55702 20.1203 11.655 20.489 15.3717 17.9876L15.3826 19.4215C15.3848 19.6632 15.5817 19.8579 15.8234 19.8557L16.6984 19.8491C16.9401 19.8469 17.1348 19.6501 17.1326 19.4083L17.1086 16.1337C17.1053 15.7805 16.8898 15.4633 16.5628 15.3298L16.5625 15.3296Z" fill="#112A62"/>
141
+ </svg>
142
+ </span>
143
+ <span>Reset password</span>
144
+ <% end %>
145
+
146
+
147
+ <%# Dynamic check if instance allow users to login through magic links (passes) %>
148
+ <%# if Rails.application.config.lesli.dig(:security, :enable_login_link) %>
149
+ <%= link_to "pass_path", :class => "pass-new" do %>
150
+ <span class="icon mr-2">
151
+ <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
152
+ <path d="M17.5 7.25005H15.25C14.6748 7.25005 14.0996 7.34967 13.5498 7.52545C14.1748 8.00005 14.7002 8.57525 15.0996 9.25005H15.25H17.5C19.2998 9.25005 20.75 10.7003 20.75 12.5001C20.75 14.2999 19.2998 15.7501 17.5 15.7501H15.25C15.0996 15.7501 14.9248 15.7247 14.7754 15.7003H14.75C13.2002 15.4503 12 14.125 12 12.5C12 11.5 11.3496 10.6504 10.4502 10.375C10.1504 11.0254 10 11.75 10 12.5C10 15.4005 12.3496 17.75 15.25 17.75H17.5C20.4005 17.75 22.75 15.4004 22.75 12.5C22.75 9.5996 20.4004 7.25 17.5 7.25V7.25005Z" fill="#112A62"/>
153
+ <path d="M9.9248 15.7502H7.5C5.7002 15.7502 4.25 14.3 4.25 12.5002C4.25 10.7004 5.7002 9.25024 7.5 9.25024H9.75C11.5498 9.25024 13 10.7004 13 12.5002C13 13.5002 13.6504 14.3498 14.5498 14.6252C14.8496 13.9748 15 13.2502 15 12.5002C15 9.59974 12.6504 7.25024 9.75 7.25024H7.5C4.5995 7.25024 2.25 9.59984 2.25 12.5002C2.25 15.4006 4.5996 17.7502 7.5 17.7502H9.75C10.3252 17.7502 10.9004 17.6506 11.4502 17.4504C10.8496 17.0002 10.3252 16.4006 9.9248 15.7502Z" fill="#112A62"/>
154
+ </svg>
155
+ </span>
156
+ <span>Magic link</span>
157
+ <% end %>
158
+ <%# end %>
159
+
160
+
161
+ <%# Dynamic check if instance allow users to login through one time passwords %>
162
+ <%# if Rails.application.config.lesli.dig(:security, :enable_login_otp) %>
163
+ <%= link_to "otp_path", :class => "otp-new" do %>
164
+ <span class="con mr-2">
165
+ <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
166
+ <path d="M18.75 7.03132C18.7509 5.48834 18.1806 3.99907 17.1494 2.85057C16.1172 1.70312 14.6982 0.976544 13.1631 0.813469C11.629 0.649407 10.0879 1.05956 8.83688 1.96387C7.58688 2.86817 6.7148 4.20312 6.3896 5.71187C6.06538 7.22067 6.3105 8.79687 7.0771 10.1356C7.84468 11.4745 9.081 12.4823 10.5469 12.9646V14.0623H11.3281V13.1677C12.1025 13.3191 12.8974 13.3191 13.6719 13.1677V22.4607L12.5 23.3396L11.3281 22.4607V22.035L12.3867 20.9803C12.4609 20.907 12.5019 20.8074 12.5019 20.7029C12.5019 20.5984 12.4609 20.4988 12.3867 20.4256L11.3281 19.3709V18.9607L12.3242 18.2927C12.4326 18.2205 12.4971 18.0984 12.4971 17.9685C12.4971 17.8386 12.4326 17.7166 12.3242 17.6443L11.3281 16.9763V16.406H10.5469V17.1873C10.5478 17.3181 10.6133 17.4392 10.7226 17.5115L11.4062 17.9685L10.7226 18.4255C10.6133 18.4978 10.5478 18.6189 10.5469 18.7498V19.531C10.5459 19.6345 10.5869 19.7351 10.6601 19.8084L11.5586 20.7029L10.6601 21.5974C10.5869 21.6707 10.5459 21.7712 10.5469 21.8748V22.656C10.5469 22.7791 10.6045 22.8943 10.7031 22.9685L12.2656 24.1404C12.4043 24.2449 12.5957 24.2449 12.7344 24.1404L14.2969 22.9685C14.3955 22.8943 14.4531 22.7791 14.4531 22.656V12.9645C15.7021 12.5534 16.791 11.7585 17.5626 10.693C18.3341 9.62762 18.7491 8.34637 18.7501 7.03104L18.75 7.03132ZM7.0312 7.03132C7.0312 6.89851 7.0312 6.76959 7.05073 6.64069H7.81246V7.42194H7.05073C7.0312 7.29304 7.0312 7.16414 7.0312 7.03132ZM14.4532 3.51582V2.73457H15.2345V3.51582H14.4532ZM15.2345 10.5471V11.3283H14.4532V10.5471H15.2345ZM8.98445 8.98457V9.76582H8.2032V8.98457H8.98445ZM8.2032 5.07832V4.29707H8.98445V5.07832H8.2032ZM9.7657 11.3283V10.5471H10.547V11.3283H9.7657ZM11.3985 7.42207H9.37505V6.64082H11.3985C11.5167 6.30879 11.7774 6.04804 12.1095 5.92987V3.90642H12.8907V5.92987C13.2716 6.06268 13.5577 6.38202 13.6475 6.77459C13.7374 7.16814 13.6192 7.58027 13.3341 7.86542C13.0489 8.15057 12.6368 8.26874 12.2432 8.17889C11.8507 8.08905 11.5313 7.80292 11.3985 7.42207ZM9.7657 3.51582V2.73457H10.547V3.51582H9.7657ZM16.0157 8.98457H16.797V9.76582H16.0157V8.98457ZM16.0157 5.07832V4.29707H16.797V5.07832H16.0157ZM12.8907 2.34382H12.1095V1.58209H12.5001H12.8907V2.34382ZM12.1095 11.7188H12.8907V12.5001C12.7618 12.5001 12.6329 12.5196 12.5001 12.5196C12.3673 12.5196 12.2384 12.5196 12.1095 12.5001V11.7188ZM17.1875 7.42182V6.64057H17.9687V7.03119V7.42182H17.1875Z" fill="#112A62"/>
167
+ <path d="M18.5977 2.19531L17.9883 2.68751C19.0029 3.95606 19.5469 5.53701 19.5273 7.16126C19.5078 8.78626 18.9268 10.3538 17.8828 11.5978L18.4766 12.1095C19.6377 10.7267 20.2842 8.98549 20.3066 7.17974C20.3281 5.37504 19.7246 3.61724 18.5977 2.20699V2.19531Z" fill="#112A62"/>
168
+ <path d="M7.03132 2.68751L6.40242 2.19531C5.27254 3.60644 4.66707 5.36631 4.68854 7.17381C4.711 8.98144 5.35944 10.7266 6.52349 12.1093L7.11724 11.6093C6.07329 10.3622 5.49322 8.79106 5.47759 7.16406C5.46197 5.53706 6.01079 3.95506 7.03129 2.68756L7.03132 2.68751Z" fill="#112A62"/>
169
+ <path d="M19.7812 1.17188L19.1719 1.66408C20.4336 3.22073 21.1113 5.16908 21.0889 7.17283C21.0654 9.17673 20.3438 11.1093 19.0469 12.6366L19.6406 13.1444C21.0567 11.4784 21.8457 9.36988 21.8711 7.18338C21.8965 4.99688 21.1572 2.87088 19.7812 1.17163V1.17188Z" fill="#112A62"/>
170
+ <path d="M5.82803 1.66408L5.21866 1.17188C3.84268 2.8711 3.10343 4.99713 3.12881 7.18363C3.15418 9.37013 3.94326 11.4786 5.35928 13.1446L5.95303 12.6368C4.65616 11.1095 3.93448 9.17683 3.91103 7.17308C3.88857 5.16918 4.56631 3.22083 5.82803 1.66433V1.66408Z" fill="#112A62"/>
171
+ <path d="M10.5471 14.8438H11.3284V15.625H10.5471V14.8438Z" fill="#112A62"/>
172
+ </svg>
173
+ </span>
174
+ <span>One time password</span>
175
+ <% end %>
176
+ <%# end %>
177
+ </div>
178
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <% if resource.errors.any? %>
2
+ <div id="error_explanation" data-turbo-cache="false">
3
+ <h2>
4
+ <%= I18n.t("errors.messages.not_saved",
5
+ count: resource.errors.count,
6
+ resource: resource.class.model_name.human.downcase)
7
+ %>
8
+ </h2>
9
+ <ul>
10
+ <% resource.errors.full_messages.each do |message| %>
11
+ <li><%= message %></li>
12
+ <% end %>
13
+ </ul>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <%= link_to "Log in", new_session_path(resource_name) %><br />
3
+ <% end %>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
+ <% end %>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
+ <% end %>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
+ <% end %>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
+ <% end %>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %><br />
24
+ <% end %>
25
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Resend unlock instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,17 @@
1
+ <%= form_with(model: devise_session) do |form| %>
2
+ <% if devise_session.errors.any? %>
3
+ <div style="color: red">
4
+ <h2><%= pluralize(devise_session.errors.count, "error") %> prohibited this devise_session from being saved:</h2>
5
+
6
+ <ul>
7
+ <% devise_session.errors.each do |error| %>
8
+ <li><%= error.full_message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div>
15
+ <%= form.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <div id="<%= dom_id session %>">
2
+ </div>