ishapi 0.1.8.239 → 0.1.8.241
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/app/assets/stylesheets/ishapi/{application.css → application.scss} +2 -1
- data/app/assets/stylesheets/ishapi/locations.scss +8 -0
- data/app/controllers/ishapi/email_conversations_controller.rb +11 -0
- data/app/controllers/ishapi/locations_controller.rb +54 -0
- data/app/controllers/ishapi/maps_controller.rb +3 -0
- data/app/jobs/ishapi/email_message_intake_job.rb +6 -3
- data/app/models/ishapi/ability.rb +1 -1
- data/app/views/ishapi/locations/show.haml +14 -0
- data/app/views/ishapi/markers/_card.haml +28 -0
- data/config/routes.rb +6 -2
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f333a98ac2350222402236a59d620a370f15baa3aa85e0ccc73b910b0a6fc14c
|
4
|
+
data.tar.gz: 69814c20939ae6ac255355f18b7375109a38aa911f37c5cb30de3d477b1d60ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9dea2a030a9eaab8955b5a53c4646dbfa3f617e7bb3dd560be968483571a5428fb16118cecbf3a56eb1dc6d7cfcf3b8192f0cd0e9ef5ad4a9908e845d8b0ed2
|
7
|
+
data.tar.gz: fabd2be1cfc8e0005b0e51a2cdc9e7dac4d7ba81ee255dfdde186c32028a79f0dacc4e4faf8ea43f6ca3bd405433eddf4df3341cd7906e7996d4629a7fe7d146
|
@@ -10,6 +10,7 @@
|
|
10
10
|
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
11
|
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
|
-
*= require ./galleries.scss
|
14
13
|
*= require_self
|
14
|
+
*= require ./galleries.scss
|
15
|
+
*= require ./locations.scss
|
15
16
|
*/
|
@@ -9,6 +9,16 @@ module Ishapi
|
|
9
9
|
|
10
10
|
before_action :check_jwt
|
11
11
|
|
12
|
+
def rmtag
|
13
|
+
authorize! :email_conversations_rmtag, ::Ishapi
|
14
|
+
convos = Office::EmailConversation.find params[:ids]
|
15
|
+
outs = convos.map do |convo|
|
16
|
+
convo.rmtag( params[:emailtag] )
|
17
|
+
end
|
18
|
+
flash[:notice] = "outcome: #{outs}"
|
19
|
+
render json: { status: :ok }
|
20
|
+
end
|
21
|
+
|
12
22
|
def delete
|
13
23
|
authorize! :email_conversations_delete, ::Ishapi
|
14
24
|
convos = Office::EmailConversation.find params[:ids]
|
@@ -17,6 +27,7 @@ module Ishapi
|
|
17
27
|
convo.remove_tag( WpTag::EMAILTAG_INBOX )
|
18
28
|
end
|
19
29
|
flash[:notice] = "outcome: #{outs}"
|
30
|
+
render json: { status: :ok }
|
20
31
|
end
|
21
32
|
|
22
33
|
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
|
2
|
+
require_dependency "ishapi/application_controller"
|
3
|
+
|
4
|
+
##
|
5
|
+
## supersedes Ishapi::MapsController
|
6
|
+
##
|
7
|
+
class Ishapi::LocationsController < Ishapi::ApplicationController
|
8
|
+
|
9
|
+
before_action :check_profile # , only: [ :show, :show_marker ]
|
10
|
+
|
11
|
+
def show
|
12
|
+
if 'self' == params[:slug] # @TODO: constantize _vp_ 2023-01-11
|
13
|
+
@location = ::Gameui::Map.where( slug: @current_profile[:email] ).first
|
14
|
+
else
|
15
|
+
@location = ::Gameui::Map.where( slug: params[:slug] ).first
|
16
|
+
@location ||= ::Gameui::Map.find params[:slug]
|
17
|
+
end
|
18
|
+
|
19
|
+
authorize! :show, @location
|
20
|
+
map = @location.map || @location # @TODO: remove _vp_ 2023-03-20
|
21
|
+
|
22
|
+
@newsitems = @location.newsitems.page( params[:newsitems_page]
|
23
|
+
).per( @location.newsitems_page_size )
|
24
|
+
|
25
|
+
@markers = map.markers.permitted_to(@current_profile).order_by(ordering: :asc)
|
26
|
+
# case map.ordering_type
|
27
|
+
# when ::Gameui::Map::ORDERING_TYPE_ALPHABETIC
|
28
|
+
# @markers = @markers.order_by( name: :asc )
|
29
|
+
# when ::Gameui::Map::ORDERING_TYPE_CUSTOM
|
30
|
+
# @markers = @markers.order_by( ordering: :asc )
|
31
|
+
# end
|
32
|
+
|
33
|
+
if map.is_premium && !@current_profile.has_premium_purchase( map )
|
34
|
+
render 'show_restricted'
|
35
|
+
else
|
36
|
+
respond_to do |format|
|
37
|
+
format.json do
|
38
|
+
render 'show'
|
39
|
+
end
|
40
|
+
format.html do
|
41
|
+
render 'show'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def show_marker
|
48
|
+
@marker = ::Gameui::Marker.find_by slug: params[:slug]
|
49
|
+
authorize! :show, @marker
|
50
|
+
render json: @marker
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
@@ -28,7 +28,8 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
|
|
28
28
|
# "image/jpeg; name=TX_DL_2.jpg"
|
29
29
|
# "text/plain; charset=UTF-8"
|
30
30
|
def churn_subpart message, part
|
31
|
-
if part.content_type.include?("multipart/related")
|
31
|
+
if part.content_type.include?("multipart/related") ||
|
32
|
+
part.content_type.include?("multipart/alternative")
|
32
33
|
|
33
34
|
part.parts.each do |subpart|
|
34
35
|
churn_subpart( message, subpart )
|
@@ -64,7 +65,7 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
|
|
64
65
|
the_mail = Mail.new(_mail)
|
65
66
|
message_id = the_mail.header['message-id'].decoded
|
66
67
|
in_reply_to_id = the_mail.header['in-reply-to']&.to_s
|
67
|
-
email_inbox_tag_id = WpTag.
|
68
|
+
email_inbox_tag_id = WpTag.emailtag(WpTag::INBOX)
|
68
69
|
|
69
70
|
@message = ::Office::EmailMessage.where( message_id: message_id ).first
|
70
71
|
@message ||= ::Office::EmailMessage.new
|
@@ -141,7 +142,9 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
|
|
141
142
|
## Actions & Filters
|
142
143
|
email_filters = Office::EmailFilter.active
|
143
144
|
email_filters.each do |filter|
|
144
|
-
if @message.from.match( filter.from_regex )
|
145
|
+
if @message.from.match( filter.from_regex )
|
146
|
+
# || @message.part_html.match( filter.body_regex ) )
|
147
|
+
# || MiaTagger.analyze( @message.part_html, :is_spammy_recruite ).score > .5
|
145
148
|
@message.apply_filter( filter )
|
146
149
|
end
|
147
150
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
.locations-show
|
3
|
+
.max-width
|
4
|
+
.header
|
5
|
+
%h3.title Location #{@location.slug}
|
6
|
+
|
7
|
+
.map
|
8
|
+
.markers
|
9
|
+
.title Markers (#{@markers.length}):
|
10
|
+
.items
|
11
|
+
- @markers.each do |marker|
|
12
|
+
= render 'ishapi/markers/card', marker: marker
|
13
|
+
.actions
|
14
|
+
.newsitems
|
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
- destination = marker.destination
|
3
|
+
|
4
|
+
.markers--card.Card
|
5
|
+
- if destination.premium_tier && !@current_profile&.has_premium_purchase( destination )
|
6
|
+
#{marker.name} [purchase]
|
7
|
+
- else
|
8
|
+
- if marker.url
|
9
|
+
#{marker.url} [external]
|
10
|
+
- else
|
11
|
+
= link_to marker.name, location_path(destination)
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
-# const goto = (e) => {
|
16
|
+
-# e.preventDefault()
|
17
|
+
-# if (marker.premium_tier && !marker.is_purchased) {
|
18
|
+
-# setItemToUnlock(marker)
|
19
|
+
-# } else {
|
20
|
+
-# if (marker.url) {
|
21
|
+
-# setShowUrl(marker.url) // @TODO: this should be encoded in the (server-side) router eventually. _vp_ 2022-09-11
|
22
|
+
-# }
|
23
|
+
-# else {
|
24
|
+
-# history.push(href)
|
25
|
+
-# }
|
26
|
+
-# }
|
27
|
+
-# }
|
28
|
+
|
data/config/routes.rb
CHANGED
@@ -8,10 +8,11 @@ Ishapi::Engine.routes.draw do
|
|
8
8
|
resources :addresses
|
9
9
|
|
10
10
|
# E
|
11
|
-
post 'email_messages',
|
11
|
+
post 'email_messages', to: 'email_messages#receive'
|
12
12
|
get 'email_messages/:id', to: 'email_messages#show', as: :email_message
|
13
13
|
|
14
|
-
delete 'email_conversations',
|
14
|
+
delete 'email_conversations', to: 'email_conversations#delete'
|
15
|
+
post 'email_conversations/rmtag/:emailtag', to: 'email_conversations#rmtag'
|
15
16
|
|
16
17
|
# G
|
17
18
|
get 'galleries', :to => 'galleries#index'
|
@@ -27,6 +28,9 @@ Ishapi::Engine.routes.draw do
|
|
27
28
|
get 'leadsets', to: 'leadsets#index'
|
28
29
|
delete 'leadsets', to: 'leadsets#destroy'
|
29
30
|
|
31
|
+
get 'locations/show/:slug', to: 'locations#show'
|
32
|
+
resources :locations
|
33
|
+
|
30
34
|
get 'maps', to: 'maps#index'
|
31
35
|
get 'maps/view/:slug', to: 'maps#show'
|
32
36
|
get 'markers/view/:slug', to: 'maps#show_marker'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ishapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.241
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -204,8 +204,9 @@ files:
|
|
204
204
|
- Rakefile
|
205
205
|
- app/assets/config/ishapi_manifest.js
|
206
206
|
- app/assets/javascripts/ishapi/application.js
|
207
|
-
- app/assets/stylesheets/ishapi/application.
|
207
|
+
- app/assets/stylesheets/ishapi/application.scss
|
208
208
|
- app/assets/stylesheets/ishapi/galleries.scss
|
209
|
+
- app/assets/stylesheets/ishapi/locations.scss
|
209
210
|
- app/assets/stylesheets/scaffold.css
|
210
211
|
- app/controllers/ishapi/addresses_controller.rb
|
211
212
|
- app/controllers/ishapi/application_controller.rb
|
@@ -215,6 +216,7 @@ files:
|
|
215
216
|
- app/controllers/ishapi/gameui_controller.rb
|
216
217
|
- app/controllers/ishapi/invoices_controller.rb
|
217
218
|
- app/controllers/ishapi/leadsets_controller.rb
|
219
|
+
- app/controllers/ishapi/locations_controller.rb
|
218
220
|
- app/controllers/ishapi/maps_controller.rb
|
219
221
|
- app/controllers/ishapi/my/galleries_controller.rb
|
220
222
|
- app/controllers/ishapi/my/reports_controller.rb
|
@@ -249,6 +251,7 @@ files:
|
|
249
251
|
- app/views/ishapi/galleries/show.json.jbuilder
|
250
252
|
- app/views/ishapi/galleries/show_premium_locked.jbuilder
|
251
253
|
- app/views/ishapi/galleries/show_premium_unlocked.jbuilder
|
254
|
+
- app/views/ishapi/locations/show.haml
|
252
255
|
- app/views/ishapi/mailer/confirmation_instructions.html.erb
|
253
256
|
- app/views/ishapi/mailer/email_changed.html.erb
|
254
257
|
- app/views/ishapi/mailer/password_change.html.erb
|
@@ -259,6 +262,7 @@ files:
|
|
259
262
|
- app/views/ishapi/maps/index.jbuilder
|
260
263
|
- app/views/ishapi/maps/show.jbuilder
|
261
264
|
- app/views/ishapi/maps/show_restricted.jbuilder
|
265
|
+
- app/views/ishapi/markers/_card.haml
|
262
266
|
- app/views/ishapi/markers/_index.jbuilder
|
263
267
|
- app/views/ishapi/my/videos/index.jbuilder
|
264
268
|
- app/views/ishapi/newsitems/_index.jbuilder
|