password_cheatsheet 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a69c690d173f1a053ade7e8a59922ce5fc74fbcf3a5ce73db6464f47564a871b
4
- data.tar.gz: f28c2894bd5f1a35e22f7aa0b1a713e3ac08e9fae2190cd4f01ccbc536f4d4ae
3
+ metadata.gz: d5b9fb3407abcf5823fec948c7a9f2e538a6b41cef93447524f48dcf2e682162
4
+ data.tar.gz: 8dabf1faac220dcc7f062314555f6f75ac160ad736d792e3238fb386108cc4c6
5
5
  SHA512:
6
- metadata.gz: 620644153bc8f89454e58e59248c4958bf6d35ad2e7d5296a45251f2353ac7be01daf75b71a3c733d41c8003884920a7bd5d40286e95498b884d007b65c271fa
7
- data.tar.gz: 46156f66094a859a513ba943c28312f5f3570311fe71645a16240fff5ffa9e3e52cf76af7c0b43526e26c4cde8638da24e250acd3f05c2ce94ac62abbaead1fc
6
+ metadata.gz: a034a5f0f5de30855b852e7512379d743987f2f82439dfa85435315001695a5b34ba8edc3c2f1336945cd70f55601efb70c193dc468052d4e5bf29d96877406d
7
+ data.tar.gz: d119746bd84eacf176d4eef4bc7442c4726a18081147099dd5013b844959b5f59725605dd25f98a0194a7856b5f1f87052e4762f0a432b9d7ab54d2e88d284a2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- password_cheatsheet (0.0.4)
4
+ password_cheatsheet (0.0.5)
5
5
  liquid (~> 5.4.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -27,6 +27,8 @@ Or install it yourself as:
27
27
  ## Usage
28
28
 
29
29
  ```ruby
30
+ require 'password_cheat_sheet'
31
+
30
32
  password_data = <<~EOS
31
33
  -
32
34
  url: https://example.com
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PasswordCheatSheet
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.5"
5
5
  end
@@ -16,7 +16,7 @@
16
16
 
17
17
  Stimulus.register("password", class extends Controller {
18
18
 
19
- static targets = ["result", "visible", "disable"]
19
+ static targets = ["result", "visible", "clipboard"]
20
20
  static classes = ["supported"]
21
21
 
22
22
  connect() {
@@ -30,6 +30,16 @@
30
30
  copy(event) {
31
31
  event.preventDefault()
32
32
  navigator.clipboard.writeText(this.resultTarget.value)
33
+
34
+ this.clipboardTarget.classList.remove('bi-clipboard')
35
+ this.clipboardTarget.classList.add('bi-clipboard-check')
36
+
37
+ clearTimeout(this.timeout)
38
+
39
+ this.timeout = setTimeout(() => {
40
+ this.clipboardTarget.classList.remove('bi-clipboard-check')
41
+ this.clipboardTarget.classList.add('bi-clipboard')
42
+ }, 1000 )
33
43
  }
34
44
 
35
45
  switch_eye(event) {
@@ -79,10 +89,7 @@
79
89
  <i data-password-target="visible" class="bi bi-eye"></i>
80
90
  </button>
81
91
  <button data-action="password#copy" class="btn btn-outline-secondary clipboard-button">
82
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
83
- <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"></path>
84
- <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"></path>
85
- </svg>
92
+ <i data-password-target="clipboard" class="bi bi-clipboard"></i>
86
93
  </button>
87
94
  </div>
88
95
  </td>
@@ -16,35 +16,7 @@
16
16
  </component>
17
17
  <component name="RakeTasksCache">
18
18
  <option name="myRootTask">
19
- <RakeTaskImpl id="rake">
20
- <subtasks>
21
- <RakeTaskImpl description="Build password_cheatsheet-0.0.1.gem into the pkg directory" fullCommand="build" id="build" />
22
- <RakeTaskImpl id="build">
23
- <subtasks>
24
- <RakeTaskImpl description="Generate SHA512 checksum if password_cheatsheet-0.0.1.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
25
- </subtasks>
26
- </RakeTaskImpl>
27
- <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
28
- <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
29
- <RakeTaskImpl description="Build and install password_cheatsheet-0.0.1.gem into system gems" fullCommand="install" id="install" />
30
- <RakeTaskImpl id="install">
31
- <subtasks>
32
- <RakeTaskImpl description="Build and install password_cheatsheet-0.0.1.gem into system gems without network access" fullCommand="install:local" id="local" />
33
- </subtasks>
34
- </RakeTaskImpl>
35
- <RakeTaskImpl description="Create tag v0.0.1 and build and push password_cheatsheet-0.0.1.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
36
- <RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
37
- <RakeTaskImpl description="" fullCommand="default" id="default" />
38
- <RakeTaskImpl description="" fullCommand="release" id="release" />
39
- <RakeTaskImpl id="release">
40
- <subtasks>
41
- <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
42
- <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
43
- <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
44
- </subtasks>
45
- </RakeTaskImpl>
46
- </subtasks>
47
- </RakeTaskImpl>
19
+ <RakeTaskImpl id="rake" />
48
20
  </option>
49
21
  </component>
50
22
  </module>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: password_cheatsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - oco
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-13 00:00:00.000000000 Z
11
+ date: 2023-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid