pg_rails 7.1.14 → 7.1.15
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 266cfada8ad43cc522e6208107c12715f29ac0393c93154046d377f0ca434598
|
4
|
+
data.tar.gz: 1fec4b327371b492aa75ec6640b7c9a85f93afceb7d89074aec369f67f85cb11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a985cde74ba0a65f4f234d0b5648cf7465291dfcd16da6d92ea9d3a1b62c1bb8a9a0c70a4936dcf7bbf679b2f8b6d8ba56b3a9e8bdf8133e3d81b8e5d28a9941
|
7
|
+
data.tar.gz: 9213cd8758d1f4ea9a9ead1c5f0aa8ba26e67cb83ec2a643e7635a0e6ce37caa02e722f174b5b5b10ecfac6f65eb386d0356e8f54bb12c9e34bc91552fb8bed9
|
@@ -91,11 +91,12 @@ module PgEngine
|
|
91
91
|
end
|
92
92
|
|
93
93
|
if Current.user.present?
|
94
|
+
# TODO: quitar el limit 3, discard en events
|
94
95
|
@notifications = Current.user.notifications.order(id: :desc).includes(:event)
|
95
96
|
.where(type: 'SimpleUserNotifier::Notification')
|
97
|
+
.limit(3)
|
96
98
|
unseen = @notifications.unseen.any?
|
97
|
-
|
98
|
-
tooltip = @notifications.unseen.map(&:tooltip).first
|
99
|
+
tooltip = @notifications.unseen.map(&:tooltip).select(&:presence).first
|
99
100
|
@notifications_bell = NotificationsBellComponent.new(
|
100
101
|
unseen:,
|
101
102
|
tooltip:
|
@@ -5,10 +5,24 @@ export default class extends Controller {
|
|
5
5
|
tooltip = null
|
6
6
|
|
7
7
|
connect () {
|
8
|
-
|
8
|
+
if (this.element.dataset.bsTrigger === 'contextmenu') {
|
9
|
+
this.element.addEventListener('contextmenu', (ev) => {
|
10
|
+
ev.preventDefault()
|
11
|
+
if (!this.tooltip) {
|
12
|
+
this.tooltip = new bootstrap.Tooltip(this.element, {
|
13
|
+
trigger: 'focus'
|
14
|
+
})
|
15
|
+
this.tooltip.show()
|
16
|
+
}
|
17
|
+
})
|
18
|
+
} else {
|
19
|
+
this.tooltip = new bootstrap.Tooltip(this.element)
|
20
|
+
}
|
9
21
|
}
|
10
22
|
|
11
23
|
disconnect () {
|
12
|
-
this.tooltip
|
24
|
+
if (this.tooltip) {
|
25
|
+
this.tooltip.dispose()
|
26
|
+
}
|
13
27
|
}
|
14
28
|
}
|
data/pg_rails/lib/version.rb
CHANGED