ruby-pass-qt 2.0.4 → 2.0.6
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 +2 -2
- data/lib/pass-qt/app/components/passlistwidget/treewidget/treefilter.rb +3 -1
- data/lib/pass-qt/app/components/passlistwidget/treewidget.rb +16 -7
- data/lib/pass-qt/app/components/passlistwidget.rb +2 -0
- data/lib/pass-qt/app/views/mainwindow.rb +7 -1
- data/lib/pass-qt/app/views/newonetimepassworddialog.rb +11 -10
- data/lib/pass-qt/app/views/newpassworddialog.rb +11 -10
- data/lib/pass-qt/version.rb +1 -1
- metadata +6 -9
- /data/exe/{pass-qt → ruby-pass-qt} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ccf6b7039c5cb6f8031411669023603b89b141ef7b70a1c43841823edaa43ba9
|
|
4
|
+
data.tar.gz: acca47730f2fcaeec6a3ab3dbde623a6f14aa6c23b6a370b7b753fa581e9e03a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 218b95a3dc22dc62348daaf00d1be28e9d0b3230c2eb894518c60f188b6e7caa861275088fb6876929d299aa42d323c75f5b14a4d31d4431e8db2426afac2dfc
|
|
7
|
+
data.tar.gz: cfa0427bf5310897557e10dd72f4f558979abf96157d24b0c38c94eae2d716d4d4569d75a2f4795bcf89ea6b6b2b0c0ce61e413ee31ed966d31a80703fc5a8d5
|
data/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
class PassListWidget < RubyQt6::Bando::QWidget
|
|
2
2
|
class TreeWidget < RubyQt6::Bando::QTreeWidget
|
|
3
3
|
class TreeFilter
|
|
4
|
-
def perform(
|
|
4
|
+
def perform(treewidget, dataitems, text)
|
|
5
|
+
treewidget.set_current_item(nil)
|
|
6
|
+
|
|
5
7
|
if text.empty?
|
|
6
8
|
dataitems.each do |_, item|
|
|
7
9
|
item.treewidgetitem.set_hidden(false)
|
|
@@ -5,9 +5,10 @@ require_relative "treewidget/treefilter"
|
|
|
5
5
|
class PassListWidget < RubyQt6::Bando::QWidget
|
|
6
6
|
class TreeWidget < RubyQt6::Bando::QTreeWidget
|
|
7
7
|
q_object do
|
|
8
|
+
signal "nil_selected(QString)"
|
|
8
9
|
signal "passfile_selected(QString,QString)"
|
|
9
10
|
signal "passfolder_selected(QString,QString)"
|
|
10
|
-
slot "
|
|
11
|
+
slot "_on_current_item_changed(QTreeWidgetItem*,QTreeWidgetItem*)"
|
|
11
12
|
slot "_on_new_password_action_triggered()"
|
|
12
13
|
slot "_on_new_otp_action_triggered()"
|
|
13
14
|
slot "_on_delete_action_triggered()"
|
|
@@ -23,7 +24,7 @@ class PassListWidget < RubyQt6::Bando::QWidget
|
|
|
23
24
|
|
|
24
25
|
initialize_actions
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
current_item_changed.connect(self, :_on_current_item_changed)
|
|
27
28
|
end
|
|
28
29
|
|
|
29
30
|
def context_menu_event(evt)
|
|
@@ -52,9 +53,12 @@ class PassListWidget < RubyQt6::Bando::QWidget
|
|
|
52
53
|
builder.perform(self, @store, @dataitems)
|
|
53
54
|
|
|
54
55
|
expand_all
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
if selected_passname.nil?
|
|
57
|
+
set_current_item(nil)
|
|
58
|
+
else
|
|
59
|
+
@dataitems.each do |_, item|
|
|
60
|
+
next if item.passname != selected_passname
|
|
61
|
+
set_current_item(item.treewidgetitem)
|
|
58
62
|
break
|
|
59
63
|
end
|
|
60
64
|
end
|
|
@@ -81,8 +85,13 @@ class PassListWidget < RubyQt6::Bando::QWidget
|
|
|
81
85
|
action
|
|
82
86
|
end
|
|
83
87
|
|
|
84
|
-
def
|
|
85
|
-
|
|
88
|
+
def _on_current_item_changed(curr, _prev)
|
|
89
|
+
if curr.nil?
|
|
90
|
+
nil_selected.emit(@store)
|
|
91
|
+
return
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
filepath = curr.data(1, Qt::DisplayRole).value
|
|
86
95
|
dataitem = @dataitems[filepath]
|
|
87
96
|
Helpers.passfile?(filepath) ?
|
|
88
97
|
passfile_selected.emit(@store, dataitem.passname) :
|
|
@@ -3,6 +3,7 @@ require_relative "passlistwidget/treewidget"
|
|
|
3
3
|
class PassListWidget < RubyQt6::Bando::QWidget
|
|
4
4
|
q_object do
|
|
5
5
|
signal "store_changed(QString)"
|
|
6
|
+
signal "nil_selected(QString)"
|
|
6
7
|
signal "passfile_selected(QString,QString)"
|
|
7
8
|
signal "passfolder_selected(QString,QString)"
|
|
8
9
|
slot "_on_combobox_current_text_changed(QString)"
|
|
@@ -57,6 +58,7 @@ class PassListWidget < RubyQt6::Bando::QWidget
|
|
|
57
58
|
def initialize_treewidget
|
|
58
59
|
@treewidget = TreeWidget.new
|
|
59
60
|
@treewidget.set_header_hidden(true)
|
|
61
|
+
@treewidget.nil_selected.connect(self, :nil_selected)
|
|
60
62
|
@treewidget.passfile_selected.connect(self, :passfile_selected)
|
|
61
63
|
@treewidget.passfolder_selected.connect(self, :passfolder_selected)
|
|
62
64
|
end
|
|
@@ -3,6 +3,7 @@ class MainWindow < RubyQt6::Bando::QMainWindow
|
|
|
3
3
|
slot "_on_browse_action_triggered()"
|
|
4
4
|
slot "_on_browsestoresdialog_stores_changed()"
|
|
5
5
|
slot "_on_passlistwidget_store_changed(QString)"
|
|
6
|
+
slot "_on_passlistwidget_nil_selected(QString)"
|
|
6
7
|
slot "_on_passlistwidget_passfile_selected(QString,QString)"
|
|
7
8
|
slot "_on_passlistwidget_passfolder_selected(QString,QString)"
|
|
8
9
|
end
|
|
@@ -39,6 +40,7 @@ class MainWindow < RubyQt6::Bando::QMainWindow
|
|
|
39
40
|
def initialize_central_widget
|
|
40
41
|
@passlistwidget = PassListWidget.new
|
|
41
42
|
@passlistwidget.store_changed.connect(self, :_on_passlistwidget_store_changed)
|
|
43
|
+
@passlistwidget.nil_selected.connect(self, :_on_passlistwidget_nil_selected)
|
|
42
44
|
@passlistwidget.passfile_selected.connect(self, :_on_passlistwidget_passfile_selected)
|
|
43
45
|
@passlistwidget.passfolder_selected.connect(self, :_on_passlistwidget_passfolder_selected)
|
|
44
46
|
|
|
@@ -64,7 +66,11 @@ class MainWindow < RubyQt6::Bando::QMainWindow
|
|
|
64
66
|
@passlistwidget.refresh
|
|
65
67
|
end
|
|
66
68
|
|
|
67
|
-
def _on_passlistwidget_store_changed(
|
|
69
|
+
def _on_passlistwidget_store_changed(_store)
|
|
70
|
+
@passinfowidget.use_infocard
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def _on_passlistwidget_nil_selected(_store)
|
|
68
74
|
@passinfowidget.use_infocard
|
|
69
75
|
end
|
|
70
76
|
|
|
@@ -31,9 +31,10 @@ class NewOneTimePasswordDialog < RubyQt6::Bando::QDialog
|
|
|
31
31
|
@errinfolabel.set_style_sheet("background: white; color: red; padding: 8px; margin: 4px;")
|
|
32
32
|
@errinfolabel.set_hidden(true)
|
|
33
33
|
|
|
34
|
-
placeholder = (@folder == "") ? "
|
|
34
|
+
placeholder = (@folder == "") ? "example.com-otp" : "#{@folder}/example.com-otp"
|
|
35
35
|
@passnamelabel = initialize_form_label("File")
|
|
36
36
|
@passnameinput = initialize_form_inputfield(placeholder)
|
|
37
|
+
@passnameinput.set_text(placeholder)
|
|
37
38
|
set_focus_proxy(@passnameinput)
|
|
38
39
|
|
|
39
40
|
@passwordlabel = initialize_form_label("OTP URI")
|
|
@@ -71,17 +72,17 @@ class NewOneTimePasswordDialog < RubyQt6::Bando::QDialog
|
|
|
71
72
|
end
|
|
72
73
|
|
|
73
74
|
def initialize_btngroup
|
|
74
|
-
@
|
|
75
|
-
@
|
|
75
|
+
@btngroup = QDialogButtonBox.new(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal)
|
|
76
|
+
@btngroup.accepted.connect(self, :_on_okbutton_clicked)
|
|
77
|
+
@btngroup.rejected.connect(self, :_on_cancelbutton_clicked)
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
okbutton = @btngroup.button(QDialogButtonBox::Ok)
|
|
80
|
+
okbutton.set_text("Create")
|
|
81
|
+
okbutton.set_default(true)
|
|
82
|
+
okbutton.set_auto_default(true)
|
|
79
83
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
layout.add_stretch
|
|
83
|
-
layout.add_widget(@okbutton)
|
|
84
|
-
layout.add_widget(@cancelbutton)
|
|
84
|
+
cancelbutton = @btngroup.button(QDialogButtonBox::Cancel)
|
|
85
|
+
cancelbutton.set_auto_default(true)
|
|
85
86
|
end
|
|
86
87
|
|
|
87
88
|
def update_form_errinfo(info)
|
|
@@ -32,9 +32,10 @@ class NewPasswordDialog < RubyQt6::Bando::QDialog
|
|
|
32
32
|
@errinfolabel.set_style_sheet("background: white; color: red; padding: 8px; margin: 4px;")
|
|
33
33
|
@errinfolabel.set_hidden(true)
|
|
34
34
|
|
|
35
|
-
placeholder = (@folder == "") ? "
|
|
35
|
+
placeholder = (@folder == "") ? "example.com" : "#{@folder}/example.com"
|
|
36
36
|
@passnamelabel = initialize_form_label("File")
|
|
37
37
|
@passnameinput = initialize_form_inputfield(placeholder)
|
|
38
|
+
@passnameinput.set_text(placeholder)
|
|
38
39
|
set_focus_proxy(@passnameinput)
|
|
39
40
|
|
|
40
41
|
@passwordlabel = initialize_form_label("Password")
|
|
@@ -93,17 +94,17 @@ class NewPasswordDialog < RubyQt6::Bando::QDialog
|
|
|
93
94
|
end
|
|
94
95
|
|
|
95
96
|
def initialize_btngroup
|
|
96
|
-
@
|
|
97
|
-
@
|
|
97
|
+
@btngroup = QDialogButtonBox.new(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal)
|
|
98
|
+
@btngroup.accepted.connect(self, :_on_okbutton_clicked)
|
|
99
|
+
@btngroup.rejected.connect(self, :_on_cancelbutton_clicked)
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
okbutton = @btngroup.button(QDialogButtonBox::Ok)
|
|
102
|
+
okbutton.set_text("Create")
|
|
103
|
+
okbutton.set_default(true)
|
|
104
|
+
okbutton.set_auto_default(true)
|
|
101
105
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
layout.add_stretch
|
|
105
|
-
layout.add_widget(@okbutton)
|
|
106
|
-
layout.add_widget(@cancelbutton)
|
|
106
|
+
cancelbutton = @btngroup.button(QDialogButtonBox::Cancel)
|
|
107
|
+
cancelbutton.set_auto_default(true)
|
|
107
108
|
end
|
|
108
109
|
|
|
109
110
|
def update_form_errinfo(info)
|
data/lib/pass-qt/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby-pass-qt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Doe
|
|
@@ -23,11 +23,10 @@ dependencies:
|
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: '6.0'
|
|
26
|
-
description: A simple GUI for pass on Linux.
|
|
27
26
|
email:
|
|
28
27
|
- johndoe@example.com
|
|
29
28
|
executables:
|
|
30
|
-
- pass-qt
|
|
29
|
+
- ruby-pass-qt
|
|
31
30
|
extensions: []
|
|
32
31
|
extra_rdoc_files: []
|
|
33
32
|
files:
|
|
@@ -36,7 +35,7 @@ files:
|
|
|
36
35
|
- LICENSE
|
|
37
36
|
- README.md
|
|
38
37
|
- Rakefile
|
|
39
|
-
- exe/pass-qt
|
|
38
|
+
- exe/ruby-pass-qt
|
|
40
39
|
- lib/pass-qt.rb
|
|
41
40
|
- lib/pass-qt/app.rb
|
|
42
41
|
- lib/pass-qt/app/assets/README.md
|
|
@@ -68,11 +67,9 @@ files:
|
|
|
68
67
|
- lib/pass-qt/version.rb
|
|
69
68
|
- misc/screenshots/mainwindow.png
|
|
70
69
|
homepage: https://github.com/souk4711/ruby-pass-qt
|
|
71
|
-
licenses:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
source_code_uri: https://github.com/souk4711/ruby-pass-qt
|
|
75
|
-
changelog_uri: https://github.com/souk4711/ruby-pass-qt
|
|
70
|
+
licenses:
|
|
71
|
+
- GPL-3.0-only
|
|
72
|
+
metadata: {}
|
|
76
73
|
rdoc_options: []
|
|
77
74
|
require_paths:
|
|
78
75
|
- lib
|
|
File without changes
|