voidable-hotwire 0.7.2 → 0.8.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.
- checksums.yaml +4 -4
- data/README.md +39 -4
- data/app/views/devise/confirmations/new.html.erb +16 -14
- data/app/views/devise/passwords/edit.html.erb +19 -17
- data/app/views/devise/passwords/new.html.erb +15 -13
- data/app/views/devise/registrations/edit.html.erb +35 -30
- data/app/views/devise/registrations/new.html.erb +21 -19
- data/app/views/devise/sessions/new.html.erb +25 -23
- data/app/views/devise/shared/_error_messages.html.erb +8 -6
- data/app/views/devise/unlocks/new.html.erb +16 -14
- data/config/importmap.rb +11 -2
- data/lib/generators/voidable/install/install_generator.rb +62 -18
- data/lib/generators/voidable/install/templates/_settings_menu.html.erb +31 -29
- data/lib/generators/voidable/install/templates/application_sidebar.html.erb.tt +12 -5
- data/lib/generators/voidable/install/templates/application_topbar.html.erb.tt +12 -5
- data/lib/generators/voidable/install/templates/sidebar.html.erb.tt +12 -5
- data/lib/generators/voidable/install/templates/topbar.html.erb.tt +12 -5
- data/lib/generators/voidable/install/templates/voidable-layout-sidebar.css +2 -11
- data/lib/generators/voidable/install/templates/voidable-layout-topbar.css +0 -5
- data/lib/generators/voidable/install/templates/voidable-layout.js +16 -10
- data/lib/templates/erb/scaffold/_form.html.erb.tt +13 -9
- data/lib/templates/erb/scaffold/index.html.erb.tt +45 -33
- data/lib/voidable/hotwire/cdn.rb +49 -0
- data/lib/voidable/hotwire/dev.rb +27 -0
- data/lib/voidable/hotwire/helpers.rb +40 -14
- data/lib/voidable/hotwire/version.rb +4 -1
- data/lib/voidable/hotwire.rb +2 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22b4a90adbb1a03f026e7b2a7e36774e551e1390bf7b42f11a6dfd7f2f0fed81
|
|
4
|
+
data.tar.gz: 0b59087d8da8127a901fa49eb2914197b70e12fe933bee7146a2f70cb42393a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eadb745f864ec74ac3fbd6fd7f6a5d76e334f8048864fec7784f43d79252ae764851a57f3c87d8ec2eb78286666b86a73bfac83169285c2407c4d22c640a7919
|
|
7
|
+
data.tar.gz: 4cce3b4682a0a7f8226ac9a0d4a93f09cbd24542af57a17e8471ecb8f14c0db4df95ef9d7db9a6b429086e37e7563cf031e675e2c2c510ab07764eeb9fda126a
|
data/README.md
CHANGED
|
@@ -18,17 +18,40 @@ Run:
|
|
|
18
18
|
|
|
19
19
|
The gem automatically pins `@voidable/ui` and `@voidable/ui-hotwire` to your importmap.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Start the Turbo morph integration in your `application.js`. No Stimulus
|
|
22
|
+
controller is needed: Stimulus handles Voidable's custom events natively via
|
|
23
|
+
`data-action`.
|
|
22
24
|
|
|
23
25
|
```js
|
|
24
|
-
import { VoidEventController } from "@voidable/ui-hotwire"
|
|
25
26
|
import { VoidTurbo } from "@voidable/ui-hotwire"
|
|
26
27
|
import "@voidable/ui"
|
|
27
28
|
|
|
28
|
-
application.register("void-event", VoidEventController)
|
|
29
29
|
VoidTurbo.start()
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
The gem pins `@voidable/ui`, `@voidable/ui-hotwire` and `@voidable/theme`
|
|
33
|
+
from the CDN at the gem's own version: every Voidable package is released
|
|
34
|
+
together under one version number, so `voidable-hotwire` 0.8.0 pins the 0.8.0
|
|
35
|
+
npm packages (`Voidable::Hotwire::CDN`, derived from `Voidable::Hotwire::VERSION`).
|
|
36
|
+
Installed from a git checkout or a path, where the version is the unreleased
|
|
37
|
+
placeholder 0.0.0, it pins the latest published packages instead.
|
|
38
|
+
|
|
39
|
+
To load components on demand instead, run `rails generate voidable:install --components=autoloader`,
|
|
40
|
+
or pin the autoloader yourself. It imports each component from a file beside it, so it is
|
|
41
|
+
pinned as the raw `dist` file with Lit's entry points pinned next to it
|
|
42
|
+
(`Voidable::Hotwire::CDN::AUTOLOADER_PINS` holds the four pins):
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
Voidable::Hotwire::CDN::AUTOLOADER_PINS.each { |name, url| pin name, to: url }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import "@voidable/ui/autoloader"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Prefer the full `@voidable/ui` import when most pages use most components; see
|
|
53
|
+
[Loading components](https://voidable.dev/getting-started/loading/).
|
|
54
|
+
|
|
32
55
|
### With jsbundling-rails
|
|
33
56
|
|
|
34
57
|
Install the npm packages:
|
|
@@ -45,7 +68,8 @@ Or use a custom theme — any CSS that sets the `--void-*` custom properties wil
|
|
|
45
68
|
|
|
46
69
|
## View helpers
|
|
47
70
|
|
|
48
|
-
Use `void_attrs` to generate Stimulus data
|
|
71
|
+
Use `void_attrs` to generate the Stimulus `data-action` attribute (or write
|
|
72
|
+
`data-action="void-click->form#submit"` by hand):
|
|
49
73
|
|
|
50
74
|
```erb
|
|
51
75
|
<%= tag.void_button "Save", variant: "filled",
|
|
@@ -55,6 +79,17 @@ Use `void_attrs` to generate Stimulus data attributes:
|
|
|
55
79
|
**void_attrs("void-change", "search#filter") %>
|
|
56
80
|
```
|
|
57
81
|
|
|
82
|
+
## Development warnings
|
|
83
|
+
|
|
84
|
+
In the development environment the gem loads `@voidable/ui/dev`, so misused `<void-*>` markup (a wrong attribute, a value outside the allowed set, a child in the wrong parent) is reported in the browser console, including markup your views and Turbo Streams render at runtime. The install generator pins it for development only and adds `<%= voidable_dev_tags %>` after `javascript_importmap_tags` in the layouts it writes (Vite apps get `if (import.meta.env.DEV) import("@voidable/ui/dev")` in `application.js`); add the helper by hand to a layout you already have. It renders nothing in other environments.
|
|
85
|
+
|
|
86
|
+
```ruby
|
|
87
|
+
# config/initializers/voidable.rb
|
|
88
|
+
Voidable::Hotwire.dev_warnings = false # off everywhere
|
|
89
|
+
Voidable::Hotwire.dev_warnings = true # on, even outside development
|
|
90
|
+
Voidable::Hotwire.dev_warnings = :throw # thrown errors, for system tests
|
|
91
|
+
```
|
|
92
|
+
|
|
58
93
|
## License
|
|
59
94
|
|
|
60
95
|
MIT
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
<div class="devise-container">
|
|
2
2
|
<void-card>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
3
|
+
<void-card-body>
|
|
4
|
+
<div class="devise-card-body">
|
|
5
|
+
<h1 class="devise-heading">Resend confirmation instructions</h1>
|
|
6
|
+
<p class="devise-description">Enter the email address you used to register and we'll send you a new confirmation link.</p>
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: "devise-form" }) do |f| %>
|
|
9
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
<void-field label="Email">
|
|
12
|
+
<void-input type="email" name="<%= resource_name %>[email]" value="<%= (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>" autofocus autocomplete="email" placeholder="you@example.com"></void-input>
|
|
13
|
+
</void-field>
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
<div class="devise-submit">
|
|
16
|
+
<void-button type="submit" color="success" class="devise-btn-full">Resend confirmation instructions</void-button>
|
|
17
|
+
</div>
|
|
18
|
+
<% end %>
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
<%= render "devise/shared/links" %>
|
|
21
|
+
</div>
|
|
22
|
+
</void-card-body>
|
|
21
23
|
</void-card>
|
|
22
24
|
</div>
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
<div class="devise-container">
|
|
2
2
|
<void-card>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
3
|
+
<void-card-body>
|
|
4
|
+
<div class="devise-card-body">
|
|
5
|
+
<h1 class="devise-heading">Change your password</h1>
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "devise-form" }) do |f| %>
|
|
8
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
<%= f.hidden_field :reset_password_token %>
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
<void-field label="New password" helper="6 characters minimum">
|
|
13
|
+
<void-action-input type="password" name="<%= resource_name %>[password]" icon="eye" action-label="Toggle visibility" autofocus autocomplete="new-password"></void-action-input>
|
|
14
|
+
</void-field>
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
<void-field label="Confirm new password">
|
|
17
|
+
<void-action-input type="password" name="<%= resource_name %>[password_confirmation]" icon="eye" action-label="Toggle visibility" autocomplete="new-password"></void-action-input>
|
|
18
|
+
</void-field>
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
<div class="devise-submit">
|
|
21
|
+
<void-button type="submit" color="success" class="devise-btn-full">Change my password</void-button>
|
|
22
|
+
</div>
|
|
23
|
+
<% end %>
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
<%= render "devise/shared/links" %>
|
|
26
|
+
</div>
|
|
27
|
+
</void-card-body>
|
|
26
28
|
</void-card>
|
|
27
29
|
</div>
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
<div class="devise-container">
|
|
2
2
|
<void-card>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
3
|
+
<void-card-body>
|
|
4
|
+
<div class="devise-card-body">
|
|
5
|
+
<h1 class="devise-heading">Forgot your password?</h1>
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: "devise-form" }) do |f| %>
|
|
8
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
<void-field label="Email">
|
|
11
|
+
<void-input type="email" name="<%= resource_name %>[email]" value="<%= resource.email %>" autofocus autocomplete="email" placeholder="you@example.com"></void-input>
|
|
12
|
+
</void-field>
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
<div class="devise-submit">
|
|
15
|
+
<void-button type="submit" color="success" class="devise-btn-full">Send reset instructions</void-button>
|
|
16
|
+
</div>
|
|
17
|
+
<% end %>
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
<%= render "devise/shared/links" %>
|
|
20
|
+
</div>
|
|
21
|
+
</void-card-body>
|
|
20
22
|
</void-card>
|
|
21
23
|
</div>
|
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
<div class="devise-container devise-container--wide">
|
|
2
2
|
<void-card>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
3
|
+
<void-card-body>
|
|
4
|
+
<div class="devise-card-body">
|
|
5
|
+
<h1 class="devise-heading">Account settings</h1>
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: "devise-form" }) do |f| %>
|
|
8
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
<void-field label="Email">
|
|
11
|
+
<void-input type="email" name="<%= resource_name %>[email]" value="<%= resource.email %>" autofocus autocomplete="email"></void-input>
|
|
12
|
+
</void-field>
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
15
|
+
<void-alert><void-alert-description>Currently waiting confirmation for: <%= resource.unconfirmed_email %></void-alert-description></void-alert>
|
|
16
|
+
<% end %>
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
<void-field label="New password" helper="Leave blank if you don't want to change it">
|
|
19
|
+
<void-action-input type="password" name="<%= resource_name %>[password]" icon="eye" action-label="Toggle visibility" autocomplete="new-password"></void-action-input>
|
|
20
|
+
</void-field>
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
<void-field label="Confirm new password">
|
|
23
|
+
<void-action-input type="password" name="<%= resource_name %>[password_confirmation]" icon="eye" action-label="Toggle visibility" autocomplete="new-password"></void-action-input>
|
|
24
|
+
</void-field>
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
<void-field label="Current password" helper="We need your current password to confirm changes">
|
|
27
|
+
<void-action-input type="password" name="<%= resource_name %>[current_password]" icon="eye" action-label="Toggle visibility" autocomplete="current-password"></void-action-input>
|
|
28
|
+
</void-field>
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
<div class="devise-submit">
|
|
31
|
+
<void-button type="submit" color="success" class="devise-btn-full">Update</void-button>
|
|
32
|
+
</div>
|
|
33
|
+
<% end %>
|
|
34
|
+
</div>
|
|
35
|
+
</void-card-body>
|
|
34
36
|
</void-card>
|
|
35
37
|
|
|
36
38
|
<div class="danger-zone">
|
|
@@ -38,13 +40,16 @@
|
|
|
38
40
|
<void-button variant="outline" color="error" size="sm" data-open-dialog="delete-dialog">Delete my account</void-button>
|
|
39
41
|
</div>
|
|
40
42
|
|
|
41
|
-
<void-dialog id="delete-dialog"
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
<void-dialog id="delete-dialog" size="sm">
|
|
44
|
+
<void-dialog-title>Delete account</void-dialog-title>
|
|
45
|
+
<void-dialog-body>
|
|
46
|
+
<p class="danger-zone-description">
|
|
47
|
+
Are you sure you want to delete your account? This action cannot be undone.
|
|
48
|
+
</p>
|
|
49
|
+
</void-dialog-body>
|
|
50
|
+
<void-dialog-actions>
|
|
46
51
|
<void-button variant="ghost" size="sm" data-close-dialog="delete-dialog">Cancel</void-button>
|
|
47
52
|
<void-button color="error" size="sm"><a href="<%= registration_path(resource_name) %>" data-turbo-method="delete">Delete</a></void-button>
|
|
48
|
-
</
|
|
53
|
+
</void-dialog-actions>
|
|
49
54
|
</void-dialog>
|
|
50
55
|
</div>
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<div class="devise-container">
|
|
2
2
|
<void-card>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
3
|
+
<void-card-body>
|
|
4
|
+
<div class="devise-card-body">
|
|
5
|
+
<h1 class="devise-heading">Sign up</h1>
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "devise-form" }) do |f| %>
|
|
8
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
<void-field label="Email">
|
|
11
|
+
<void-input type="email" name="<%= resource_name %>[email]" value="<%= resource.email %>" autofocus autocomplete="email" placeholder="you@example.com"></void-input>
|
|
12
|
+
</void-field>
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
<void-field label="Password" helper="<%= @minimum_password_length %> characters minimum">
|
|
15
|
+
<void-action-input type="password" name="<%= resource_name %>[password]" icon="eye" action-label="Toggle visibility" autocomplete="new-password" minlength="<%= @minimum_password_length %>"></void-action-input>
|
|
16
|
+
</void-field>
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
<void-field label="Password confirmation">
|
|
19
|
+
<void-action-input type="password" name="<%= resource_name %>[password_confirmation]" icon="eye" action-label="Toggle visibility" autocomplete="new-password"></void-action-input>
|
|
20
|
+
</void-field>
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
<div class="devise-submit">
|
|
23
|
+
<void-button type="submit" color="success" class="devise-btn-full">Sign up</void-button>
|
|
24
|
+
</div>
|
|
25
|
+
<% end %>
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
<%= render "devise/shared/links" %>
|
|
28
|
+
</div>
|
|
29
|
+
</void-card-body>
|
|
28
30
|
</void-card>
|
|
29
31
|
</div>
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
<div class="devise-container">
|
|
2
2
|
<void-card>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
3
|
+
<void-card-body>
|
|
4
|
+
<div class="devise-card-body">
|
|
5
|
+
<h1 class="devise-heading">Sign in</h1>
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: "devise-form" }) do |f| %>
|
|
8
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<void-field label="Password">
|
|
14
|
-
<void-action-input type="password" name="<%= resource_name %>[password]" icon="eye" action-label="Toggle visibility" autocomplete="current-password"></void-action-input>
|
|
15
|
-
</void-field>
|
|
10
|
+
<void-field label="Email">
|
|
11
|
+
<void-input type="email" name="<%= resource_name %>[email]" value="<%= resource.email %>" autofocus autocomplete="email" placeholder="you@example.com"></void-input>
|
|
12
|
+
</void-field>
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<void-switch name="<%= resource_name %>[remember_me]"></void-switch>
|
|
14
|
+
<void-field label="Password">
|
|
15
|
+
<void-action-input type="password" name="<%= resource_name %>[password]" icon="eye" action-label="Toggle visibility" autocomplete="current-password"></void-action-input>
|
|
20
16
|
</void-field>
|
|
21
|
-
<% end %>
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
<% if devise_mapping.rememberable? %>
|
|
19
|
+
<void-field label="Remember me">
|
|
20
|
+
<void-switch name="<%= resource_name %>[remember_me]"></void-switch>
|
|
21
|
+
</void-field>
|
|
22
|
+
<% end %>
|
|
23
|
+
|
|
24
|
+
<div class="devise-submit">
|
|
25
|
+
<void-button type="submit" color="success" class="devise-btn-full">Sign in</void-button>
|
|
26
|
+
</div>
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
<% if devise_mapping.recoverable? %>
|
|
29
|
+
<void-button variant="ghost" class="devise-btn-full"><a href="<%= new_password_path(resource_name) %>">Forgot your password?</a></void-button>
|
|
30
|
+
<% end %>
|
|
29
31
|
<% end %>
|
|
30
|
-
<% end %>
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
<%= render "devise/shared/links" %>
|
|
34
|
+
</div>
|
|
35
|
+
</void-card-body>
|
|
34
36
|
</void-card>
|
|
35
37
|
</div>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<% if resource.errors.any? %>
|
|
2
2
|
<void-alert color="error" data-turbo-temporary>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
<void-alert-description>
|
|
4
|
+
<%= pluralize(resource.errors.count, "error") %> prohibited this operation:
|
|
5
|
+
<ul class="devise-error-list">
|
|
6
|
+
<% resource.errors.full_messages.each do |message| %>
|
|
7
|
+
<li><%= message %></li>
|
|
8
|
+
<% end %>
|
|
9
|
+
</ul>
|
|
10
|
+
</void-alert-description>
|
|
9
11
|
</void-alert>
|
|
10
12
|
<% end %>
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
<div class="devise-container">
|
|
2
2
|
<void-card>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
3
|
+
<void-card-body>
|
|
4
|
+
<div class="devise-card-body">
|
|
5
|
+
<h1 class="devise-heading">Resend unlock instructions</h1>
|
|
6
|
+
<p class="devise-description">Enter your email address and we'll send you instructions to unlock your account.</p>
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post, class: "devise-form" }) do |f| %>
|
|
9
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
<void-field label="Email">
|
|
12
|
+
<void-input type="email" name="<%= resource_name %>[email]" value="<%= resource.email %>" autofocus autocomplete="email" placeholder="you@example.com"></void-input>
|
|
13
|
+
</void-field>
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
<div class="devise-submit">
|
|
16
|
+
<void-button type="submit" color="success" class="devise-btn-full">Resend unlock instructions</void-button>
|
|
17
|
+
</div>
|
|
18
|
+
<% end %>
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
<%= render "devise/shared/links" %>
|
|
21
|
+
</div>
|
|
22
|
+
</void-card-body>
|
|
21
23
|
</void-card>
|
|
22
24
|
</div>
|
data/config/importmap.rb
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
require "voidable/hotwire/cdn"
|
|
2
|
+
|
|
3
|
+
pin "@voidable/ui", to: Voidable::Hotwire::CDN::UI_URL
|
|
4
|
+
pin "@voidable/ui-hotwire", to: Voidable::Hotwire::CDN::UI_HOTWIRE_URL
|
|
5
|
+
# Development warnings: pinned only in development and never preloaded, so a
|
|
6
|
+
# page loads the file only where the layout helper `voidable_dev_tags`
|
|
7
|
+
# imports it (an app that does not call the helper never fetches it).
|
|
8
|
+
# Not pinned at all from an unreleased checkout (Voidable::Hotwire::CDN::UI_DEV_URL is nil).
|
|
9
|
+
if Voidable::Hotwire::CDN::UI_DEV_URL && defined?(Rails) && Rails.env.development?
|
|
10
|
+
pin "@voidable/ui/dev", to: Voidable::Hotwire::CDN::UI_DEV_URL, preload: false
|
|
11
|
+
end
|