lesli_shield 0.1.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 (82) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +5 -0
  3. data/app/assets/config/lesli_shield_manifest.js +47 -0
  4. data/app/assets/images/lesli_shield/shield-logo.svg +1 -0
  5. data/app/assets/javascripts/lesli_shield/application.js +4428 -0
  6. data/app/assets/javascripts/lesli_shield/confirmations.js +60 -0
  7. data/app/assets/javascripts/lesli_shield/passwords.js +712 -0
  8. data/app/assets/javascripts/lesli_shield/registrations.js +712 -0
  9. data/app/assets/javascripts/lesli_shield/sessions.js +712 -0
  10. data/app/assets/stylesheets/lesli_shield/application.css +4 -0
  11. data/app/assets/stylesheets/lesli_shield/confirmations.css +19219 -0
  12. data/app/assets/stylesheets/lesli_shield/passwords.css +19202 -0
  13. data/app/assets/stylesheets/lesli_shield/registrations.css +19588 -0
  14. data/app/assets/stylesheets/lesli_shield/sessions.css +19588 -0
  15. data/app/controllers/lesli_shield/application_controller.rb +4 -0
  16. data/app/controllers/lesli_shield/dashboard/components_controller.rb +60 -0
  17. data/app/controllers/lesli_shield/dashboards_controller.rb +4 -0
  18. data/app/controllers/users/confirmations_controller.rb +66 -0
  19. data/app/controllers/users/omniauth_callbacks_controller.rb +30 -0
  20. data/app/controllers/users/passwords_controller.rb +71 -0
  21. data/app/controllers/users/registrations_controller.rb +141 -0
  22. data/app/controllers/users/sessions_controller.rb +141 -0
  23. data/app/controllers/users/unlocks_controller.rb +30 -0
  24. data/app/helpers/lesli_shield/application_helper.rb +4 -0
  25. data/app/helpers/lesli_shield/dashboards_helper.rb +4 -0
  26. data/app/jobs/lesli_shield/application_job.rb +4 -0
  27. data/app/mailers/lesli_shield/application_mailer.rb +6 -0
  28. data/app/models/lesli_shield/application_record.rb +5 -0
  29. data/app/models/lesli_shield/dashboard/component.rb +18 -0
  30. data/app/models/lesli_shield/dashboard.rb +31 -0
  31. data/app/views/devise/confirmations/new.html.erb +2 -0
  32. data/app/views/devise/confirmations/show.html.erb +63 -0
  33. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  34. data/app/views/devise/mailer/email_changed.html.erb +7 -0
  35. data/app/views/devise/mailer/password_change.html.erb +3 -0
  36. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  37. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  38. data/app/views/devise/passwords/edit.html.erb +79 -0
  39. data/app/views/devise/passwords/new.html.erb +75 -0
  40. data/app/views/devise/registrations/edit.html.erb +43 -0
  41. data/app/views/devise/registrations/new.html.erb +151 -0
  42. data/app/views/devise/sessions/new.html.erb +114 -0
  43. data/app/views/devise/shared/_demo.html.erb +7 -0
  44. data/app/views/devise/shared/_error_messages.html.erb +15 -0
  45. data/app/views/devise/shared/_links.html.erb +96 -0
  46. data/app/views/devise/unlocks/new.html.erb +16 -0
  47. data/app/views/layouts/lesli_shield/application.html.erb +15 -0
  48. data/app/views/lesli_shield/dashboards/edit.html.erb +1 -0
  49. data/app/views/lesli_shield/dashboards/index.html.erb +1 -0
  50. data/app/views/lesli_shield/dashboards/new.html.erb +1 -0
  51. data/app/views/lesli_shield/dashboards/show.html.erb +1 -0
  52. data/config/initializers/devise.rb +336 -0
  53. data/config/locales/translations.en.yml +21 -0
  54. data/config/locales/translations.es.yml +21 -0
  55. data/config/locales/translations.fr.yml +21 -0
  56. data/config/locales/translations.it.yml +21 -0
  57. data/config/locales/translations.pt.yml +21 -0
  58. data/config/routes.rb +57 -0
  59. data/db/migrate/v1/0801000110_create_lesli_shield_accounts.rb +42 -0
  60. data/db/migrate/v1/0801050110_create_lesli_shield_dashboards.rb +51 -0
  61. data/db/migrate/v1/0801050210_create_lesli_shield_dashboard_components.rb +53 -0
  62. data/lib/lesli_shield/engine.rb +54 -0
  63. data/lib/lesli_shield/routing.rb +26 -0
  64. data/lib/lesli_shield/version.rb +4 -0
  65. data/lib/lesli_shield.rb +6 -0
  66. data/lib/scss/application.scss +0 -0
  67. data/lib/scss/confirmations.scss +58 -0
  68. data/lib/scss/devise/oauth.scss +34 -0
  69. data/lib/scss/passwords.scss +33 -0
  70. data/lib/scss/registrations.scss +35 -0
  71. data/lib/scss/sessions.scss +35 -0
  72. data/lib/tasks/lesli_shield_tasks.rake +4 -0
  73. data/lib/vue/application.js +76 -0
  74. data/lib/vue/apps/dashboards/components/engine-version.vue +71 -0
  75. data/lib/vue/confirmations.js +33 -0
  76. data/lib/vue/passwords.js +137 -0
  77. data/lib/vue/registrations.js +144 -0
  78. data/lib/vue/sessions.js +148 -0
  79. data/lib/vue/stores/translations.json +152 -0
  80. data/license +674 -0
  81. data/readme.md +71 -0
  82. metadata +168 -0
@@ -0,0 +1,42 @@
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
+ class CreateLesliShieldAccounts < ActiveRecord::Migration[6.0]
34
+ def change
35
+ create_table :lesli_shield_accounts do |t|
36
+ t.integer :status
37
+ t.datetime :deleted_at, index: true
38
+ t.timestamps
39
+ end
40
+ add_reference(:lesli_shield_accounts, :account, foreign_key: { to_table: :lesli_accounts })
41
+ end
42
+ end
@@ -0,0 +1,51 @@
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
+ class CreateLesliShieldDashboards < ActiveRecord::Migration[6.1]
34
+ def change
35
+ gem_path = Lesli::System.engine("Lesli", "dir")
36
+ table_base_structure = JSON.parse(File.read(File.join(gem_path, "db", "structure", "00000501_dashboards.json")))
37
+ create_table :lesli_shield_dashboards do |t|
38
+ table_base_structure.each do |column|
39
+ t.send(
40
+ column["type"].parameterize.underscore.to_sym,
41
+ column["name"].parameterize.underscore.to_sym
42
+ )
43
+ end
44
+ t.timestamps
45
+ end
46
+
47
+ add_reference(:lesli_shield_dashboards, :account, foreign_key: { to_table: :lesli_shield_accounts })
48
+ add_reference(:lesli_shield_dashboards, :user, foreign_key: { to_table: :lesli_users })
49
+ #add_reference(:lesli_admin_dashboards, :role, foreign_key: { to_table: :roles })
50
+ end
51
+ end
@@ -0,0 +1,53 @@
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
+ class CreateLesliShieldDashboardComponents < ActiveRecord::Migration[6.1]
34
+ def change
35
+ gem_path = Lesli::System.engine("Lesli", "dir")
36
+ table_base_structure = JSON.parse(File.read(File.join(gem_path, "db", "structure", "00000502_dashboard_components.json")))
37
+ create_table :lesli_shield_dashboard_components do |t|
38
+ table_base_structure.each do |column|
39
+ t.send(
40
+ column["type"].parameterize.underscore.to_sym,
41
+ column["name"].parameterize.underscore.to_sym
42
+ )
43
+ end
44
+ t.timestamps
45
+ end
46
+
47
+ add_reference(
48
+ :lesli_shield_dashboard_components, :dashboard,
49
+ foreign_key: { to_table: :lesli_shield_dashboards },
50
+ index: { name: "lesli_shield_dashboard_components_index" }
51
+ )
52
+ end
53
+ end
@@ -0,0 +1,54 @@
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.dev
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+
34
+ # · Tools used to build the Lesli Framework
35
+ require "devise"
36
+
37
+ module LesliShield
38
+ class Engine < ::Rails::Engine
39
+ isolate_namespace LesliShield
40
+
41
+ initializer :lesli_admin do |app|
42
+
43
+ # register assets manifest
44
+ config.assets.precompile += %w[lesli_shield_manifest.js]
45
+
46
+ # register engine migrations path
47
+ unless app.root.to_s.match root.to_s
48
+ config.paths["db/migrate"].expanded.each do |expanded_path|
49
+ app.config.paths["db/migrate"] << expanded_path
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,26 @@
1
+ module LesliShield
2
+ module Routing
3
+ def self.mount_login
4
+ mount_login_at()
5
+ end
6
+ def self.mount_login_at path=""
7
+ Rails.application.routes.draw do
8
+ devise_for :users, class_name: "Lesli::User", module: :devise,
9
+ :path => path,
10
+ :path_names => {
11
+ :sign_in => "login",
12
+ :sign_out => "logout",
13
+ :sign_up => "register",
14
+ :password => "password",
15
+ :confirmation => "confirmation"
16
+ },
17
+ :controllers => {
18
+ :registrations => "users/registrations",
19
+ :confirmations => "users/confirmations",
20
+ :passwords => "users/passwords",
21
+ :sessions => "users/sessions"
22
+ }
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,4 @@
1
+ module LesliShield
2
+ VERSION = "0.1.0"
3
+ BUILD = "1713121383"
4
+ end
@@ -0,0 +1,6 @@
1
+ require "lesli_shield/routing"
2
+ require "lesli_shield/version"
3
+ require "lesli_shield/engine"
4
+ module LesliShield
5
+ # Your code goes here...
6
+ end
File without changes
@@ -0,0 +1,58 @@
1
+ /*
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
+ */
32
+
33
+
34
+ // ·
35
+ @import "Lesli/scss/pages/devise-simple";
36
+
37
+
38
+ // ·
39
+ div.confirmation-message {
40
+ //box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
41
+ padding: 4rem 0 5rem;
42
+ text-align: center;
43
+ max-width: 800px;
44
+ margin: 0 auto;
45
+ width: 90%;
46
+
47
+ svg {
48
+ max-width: 90px;
49
+ margin-bottom: 1rem;
50
+ fill: lesli-css-color(lime, 300);
51
+ }
52
+
53
+ p {
54
+ font-weight: 100;
55
+ font-size: 2rem;
56
+ }
57
+
58
+ }
@@ -0,0 +1,34 @@
1
+ /*
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 · Your Smart Business Assistant.
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://lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+
32
+ */
33
+
34
+ @import "templates/component";
@@ -0,0 +1,33 @@
1
+ /*
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 LesliTech
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
+ */
32
+
33
+ @import "Lesli/scss/pages/devise-simple";
@@ -0,0 +1,35 @@
1
+ /*
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 LesliTech
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
+ */
32
+
33
+
34
+ // ·
35
+ @import "Lesli/scss/pages/devise";
@@ -0,0 +1,35 @@
1
+ /*
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 LesliTech
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
+ */
32
+
33
+
34
+ // ·
35
+ @import "Lesli/scss/pages/devise";
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :lesli_shield do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,76 @@
1
+ /*
2
+ Lesli
3
+
4
+ Copyright (c) 2023, Lesli Technologies, S. A.
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see http://www.gnu.org/licenses/.
18
+
19
+ Lesli · Ruby on Rails SaaS Development Framework.
20
+
21
+ Made with ♥ by LesliTech
22
+ Building a better future, one line of code at a time.
23
+
24
+ @contact hello@lesli.tech
25
+ @website https://www.lesli.tech
26
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
+
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // ·
30
+ */
31
+
32
+
33
+ // · Import Lesli builders
34
+ import application from "Lesli/vue/application"
35
+ import translation from "Lesli/vue/translation"
36
+
37
+
38
+ // · Import engine translations
39
+ import translations from "LesliShield/vue/stores/translations.json"
40
+
41
+
42
+ // ·
43
+ import appDashboardShow from "Lesli/vue/shared/dashboards/apps/show.vue"
44
+ import appDashboardEdit from "Lesli/vue/shared/dashboards/apps/edit.vue"
45
+
46
+
47
+ // ·
48
+ import componentDashboardEngineVersion from "LesliShield/vue/apps/dashboards/components/engine-version.vue"
49
+
50
+
51
+ // ·
52
+ const dashboardProps = {
53
+ components: {
54
+ "engine-version": componentDashboardEngineVersion
55
+ }
56
+ }
57
+
58
+
59
+ // · Buil Lesli translations
60
+ translation(translations)
61
+
62
+
63
+ // · Build a new Lesli application
64
+ application("LesliShield", [{
65
+ path: "/",
66
+ component: appDashboardShow,
67
+ props: dashboardProps
68
+ }, {
69
+ path: "/dashboard",
70
+ component: appDashboardShow,
71
+ props: dashboardProps
72
+ }, {
73
+ path: "/dashboards/:id/edit",
74
+ component: appDashboardEdit,
75
+ props: dashboardProps
76
+ }])
@@ -0,0 +1,71 @@
1
+ <script setup>
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
+ */
32
+
33
+
34
+ // ·
35
+ import { onMounted, inject, ref } from "vue"
36
+
37
+
38
+ // ·
39
+ const url = inject("url")
40
+ const http = inject("http")
41
+
42
+
43
+ // ·
44
+ const lesliVersion = ref({
45
+ name: "",
46
+ code: "",
47
+ path: "",
48
+ version: "",
49
+ build: ""
50
+ })
51
+
52
+
53
+ // ·
54
+ onMounted(() => {
55
+ http.get(url.lesli("about")).then(result => {
56
+ lesliVersion.value = result.find(engine => engine.name == "Lesli")
57
+ }).catch(error => {
58
+ console.log(error)
59
+ })
60
+ })
61
+ </script>
62
+ <template>
63
+ <lesli-card>
64
+ <h6 class="title is-6 mb-2">
65
+ {{ lesliVersion.name }}
66
+ </h6>
67
+ <p class="p-0 m-0">version: {{ lesliVersion.version }}</p>
68
+ <p class="p-0 m-0">buid: {{ lesliVersion.build }}</p>
69
+ <p class="p-0 m-0">path: {{ lesliVersion.path }}</p>
70
+ </lesli-card>
71
+ </template>
@@ -0,0 +1,33 @@
1
+ /*
2
+ Lesli
3
+
4
+ Copyright (c) 2023, Lesli Technologies, S. A.
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see http://www.gnu.org/licenses/.
18
+
19
+ Lesli · Your Smart Business Assistant.
20
+
21
+ Made with ♥ by https://www.lesli.tech
22
+ Building a better future, one line of code at a time.
23
+
24
+ @contact hello@lesli.tech
25
+ @website https://lesli.tech
26
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
+
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // ·
30
+ */
31
+
32
+
33
+ // ·