wco_models 3.1.0.69 → 3.1.0.71

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: ccaac0453a8e3bc7547214646136c37c0a9704ed39c21e1d548e5c45d5b568f0
4
- data.tar.gz: c1ee1eb79c03a19d908275c495f9ff79cc6dd3e0709293873910e78bbcd066b8
3
+ metadata.gz: ed7fdcee13ed63a005f411a0667304c20e4b9304a31ddce91ef0ccb2c7eb40c0
4
+ data.tar.gz: a0496d639675de1bd566b68dcaff1f1f790b9e52d578511c05ca93438a71b9c9
5
5
  SHA512:
6
- metadata.gz: 8fa9faf6600eecb6164d617f769d3658de0501c5b0648b83ea6c660236345277701cdca020e6ff14b3cbf773a91c895993cd72a6b06c237c96547a19db740c9f
7
- data.tar.gz: 0460b8b7ea57ddcef05a57b72f6978587b4ae8850a5718ff3ff571639a413b54d5770a5fddb0a77ca44666f160b3e6e6a76b27f8a1bf20457ed4e95a837bd774
6
+ metadata.gz: 197e54b9da6b3e53f2bb1ab3041ccfed04163b56ae609be3b664c64c7e462b84622cf8b9f2dd6a486e4669b0bd13806ae77771f99ef5ec901676c31f0593add8
7
+ data.tar.gz: bab77602004ffada4035abee34b573653ec61b57ad80953e9195c13b09ac82a5ebaf4cb809c111767493f986fb3e358eb846ac1ee19dad333d15e7121a4bca8c
@@ -0,0 +1,68 @@
1
+
2
+ html {
3
+ // --wco-color-1: red;
4
+ --wco-color-2: #ddd;
5
+ }
6
+
7
+ .chip,
8
+ .Chip {
9
+ display: inline;
10
+
11
+ border: 1px solid var(--wco-color-1);
12
+ border-radius: 0.5em;
13
+ padding: 0.1em .3em;
14
+ margin-bottom: 0.1em;
15
+ background: var(--wco-color-2);
16
+
17
+ }
18
+ .chip,
19
+ .Chip {
20
+ // border: 1px solid black;
21
+ border-radius: 1em 0 0 1em;
22
+
23
+ margin-right: 32px;
24
+
25
+ padding: 0.2em 0.2em 0.2em 0.6em;
26
+
27
+ height: 32px;
28
+
29
+ background: var(--wco-color-2);
30
+
31
+ position: relative;
32
+
33
+ &::before {
34
+ // border: 1px solid red;
35
+ // background: yellow;
36
+
37
+ content: "";
38
+ display: block;
39
+
40
+ position: absolute;
41
+ right: -16px;
42
+ top: 0;
43
+
44
+ width: 16px;
45
+ height: 32px;
46
+
47
+ // border-left: 12px solid white;
48
+ border-top: 17px solid var(--wco-color-2);
49
+ border-right: 12px solid transparent;
50
+ // border-bottom: 12px solid transparent;
51
+ }
52
+ &::after {
53
+ // border: 1px solid red;
54
+
55
+ content: "";
56
+ display: block;
57
+
58
+ position: absolute;
59
+ right: -16px;
60
+ bottom: 0;
61
+
62
+ width: 16px;
63
+ height: 32px;
64
+
65
+ border-bottom: 17px solid var(--wco-color-2);
66
+ border-right: 12px solid transparent;
67
+ }
68
+ }
@@ -14,18 +14,18 @@ module Wco::ApplicationHelper
14
14
  end
15
15
 
16
16
  def pretty_date date
17
- # date.to_s[0, 10]
18
- date&.strftime('%Y-%m-%d')
17
+ return nil if !date
18
+ date.in_time_zone( Rails.application.config.time_zone ).strftime('%Y-%m-%d')
19
19
  end
20
20
  def pp_date a; pretty_date a; end
21
21
 
22
22
  def pp_datetime date
23
- date&.strftime('%Y-%m-%d %l:%M%P %z')
23
+ return nil if !date
24
+ return date.in_time_zone( Rails.application.config.time_zone ).strftime('%Y-%m-%d %l:%M%P %Z')
24
25
  end
25
26
 
26
27
  def pp_time date
27
28
  return nil if !date
28
- # return date.strftime('%l:%M%P %z')
29
29
  return date.in_time_zone( Rails.application.config.time_zone ).strftime('%l:%M%P %Z')
30
30
  end
31
31
 
@@ -31,8 +31,15 @@ class Wco::Tag
31
31
  find_or_create_by({ slug: TRASH })
32
32
  end
33
33
 
34
+ SPAM = 'spam'
35
+ def self.spam
36
+ find_or_create_by({ slug: SPAM })
37
+ end
38
+
39
+ def to_s
40
+ slug
41
+ end
34
42
  def self.list
35
43
  [[nil,nil]] + all.map { |p| [ p.slug, p.id ] }
36
44
  end
37
-
38
45
  end
@@ -71,7 +71,7 @@ class WcoEmail::Context
71
71
  end
72
72
 
73
73
  def self.scheduled
74
- where( :send_at.gte => Time.now )
74
+ where( :send_at.lte => Time.now )
75
75
  end
76
76
 
77
77
 
@@ -89,7 +89,7 @@ class WcoEmail::Message
89
89
 
90
90
  when WcoEmail::EmailFilter::KIND_ADD_TAG
91
91
  conv.tags.push filter.tag
92
- if filter.tag == Wco::Tag.trash
92
+ if filter.tag == Wco::Tag.trash || filter.tag == Wco::Tag.spam
93
93
  conv.tags -= [ Wco::Tag.inbox ]
94
94
  end
95
95
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.69
4
+ version: 3.1.0.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -363,6 +363,7 @@ files:
363
363
  - app/assets/stylesheets/vendor/bootstrap-4.6.2.min.css
364
364
  - app/assets/stylesheets/wco/alerts_notices.scss
365
365
  - app/assets/stylesheets/wco/application.css
366
+ - app/assets/stylesheets/wco/chip.scss
366
367
  - app/assets/stylesheets/wco/galleries.scss
367
368
  - app/assets/stylesheets/wco/pagination.scss
368
369
  - app/assets/stylesheets/wco/photos.scss