zendesk_apps_support 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/translations/zendesk_apps_support.yml +1 -1
- data/lib/zendesk_apps_support/assets/src.js.erb +1 -0
- data/lib/zendesk_apps_support/location.rb +8 -1
- data/lib/zendesk_apps_support/manifest.rb +1 -1
- data/lib/zendesk_apps_support/package.rb +27 -0
- data/lib/zendesk_apps_support/validations/marketplace.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0135f4e989070c7aed5d46bfeea4b70d6b8db5cd
|
4
|
+
data.tar.gz: 9f0f660725a7a3d29e0c55472276c23e8767505d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c82edf95d8a62192e522af3dd43dc33ba2c1ac5fdc78d38b3256166b58d0dbc51772bb3321c7b98664c740fb64a0b90037b00af4d8cf859c1f40f1eab1af923e
|
7
|
+
data.tar.gz: 83b3fc838adeb1c6203405c6fd41fd76777d764b3ee7d40603bc0edc75a22b9e8732d4f07dff6629d38694ed702b9ed1cdaeb266e29b4488aec8e515f8cb1039
|
@@ -46,7 +46,7 @@ parts:
|
|
46
46
|
value: "Symlinks are not allowed in the zip file"
|
47
47
|
- translation:
|
48
48
|
key: "txt.apps.admin.error.app_build.invalid_experiment"
|
49
|
-
title: "App builder job: experiment has been specifed that is not publically available or otherwise invalid"
|
49
|
+
title: "App builder job: an experiment has been specifed that is not publically available or otherwise invalid. https://en.wikipedia.org/wiki/Manifest_file"
|
50
50
|
value: "Manifest specifies unknown or unavailable experiment: %{experiment}"
|
51
51
|
- translation:
|
52
52
|
key: "txt.apps.admin.error.app_build.missing_requirements"
|
@@ -19,6 +19,7 @@ var app = ZendeskApps.defineApp(<%= iframe_only ? 'null' : 'source' %>)
|
|
19
19
|
.reopen({
|
20
20
|
appName: <%= name.to_json %>,
|
21
21
|
appVersion: <%= version.to_json %>,
|
22
|
+
locationIcons: <%= location_icons.to_json %>,
|
22
23
|
assetUrlPrefix: <%= asset_url_prefix.to_json %>,
|
23
24
|
appClassName: <%= app_class_name.to_json %>,
|
24
25
|
author: {
|
@@ -3,8 +3,14 @@ module ZendeskAppsSupport
|
|
3
3
|
extend ZendeskAppsSupport::Finders
|
4
4
|
attr_reader :id, :name, :orderable, :product_code
|
5
5
|
|
6
|
+
def self.unique_ids
|
7
|
+
@ids ||= Set.new
|
8
|
+
end
|
9
|
+
|
6
10
|
def initialize(attrs)
|
7
11
|
@id = attrs.fetch(:id)
|
12
|
+
raise 'Duplicate id' if Location.unique_ids.include? @id
|
13
|
+
Location.unique_ids.add @id
|
8
14
|
@name = attrs.fetch(:name)
|
9
15
|
@orderable = attrs.fetch(:orderable)
|
10
16
|
@product_code = attrs.fetch(:product_code)
|
@@ -27,7 +33,8 @@ module ZendeskAppsSupport
|
|
27
33
|
Location.new(id: 5, orderable: true, name: 'user_sidebar', product_code: Product::SUPPORT.code),
|
28
34
|
Location.new(id: 6, orderable: true, name: 'organization_sidebar', product_code: Product::SUPPORT.code),
|
29
35
|
Location.new(id: 7, orderable: false, name: 'background', product_code: Product::SUPPORT.code),
|
30
|
-
Location.new(id: 8, orderable: true, name: 'chat_sidebar', product_code: Product::CHAT.code)
|
36
|
+
Location.new(id: 8, orderable: true, name: 'chat_sidebar', product_code: Product::CHAT.code),
|
37
|
+
Location.new(id: 9, orderable: false, name: 'modal', product_code: Product::SUPPORT.code)
|
31
38
|
].freeze
|
32
39
|
end
|
33
40
|
end
|
@@ -15,6 +15,8 @@ module ZendeskAppsSupport
|
|
15
15
|
DEFAULT_SCSS = File.read(File.expand_path('../assets/default_styles.scss', __FILE__))
|
16
16
|
SRC_TEMPLATE = Erubis::Eruby.new(File.read(File.expand_path('../assets/src.js.erb', __FILE__)))
|
17
17
|
|
18
|
+
LOCATIONS_WITH_ICONS = ['top_bar', 'nav_bar']
|
19
|
+
|
18
20
|
attr_reader :lib_root, :root, :warnings
|
19
21
|
|
20
22
|
def initialize(dir, is_cached = true)
|
@@ -131,6 +133,7 @@ module ZendeskAppsSupport
|
|
131
133
|
source: source,
|
132
134
|
app_settings: app_settings,
|
133
135
|
asset_url_prefix: asset_url_prefix,
|
136
|
+
location_icons: location_icons,
|
134
137
|
app_class_name: app_class_name,
|
135
138
|
author: manifest.author,
|
136
139
|
translations: runtime_translations(translations_for(locale)),
|
@@ -278,6 +281,30 @@ module ZendeskAppsSupport
|
|
278
281
|
read_file('app.js')
|
279
282
|
end
|
280
283
|
|
284
|
+
def location_icons
|
285
|
+
{}.tap do |location_icons|
|
286
|
+
manifest.locations.each do |host, locations_for_host|
|
287
|
+
next unless [Product::SUPPORT.name].include?(host)
|
288
|
+
|
289
|
+
locations_for_host.keys.each do |location|
|
290
|
+
next unless LOCATIONS_WITH_ICONS.include?(location)
|
291
|
+
location_icons[host] ||= {}
|
292
|
+
location_icons[host][location] = if (has_file?("assets/icon_#{location}.svg"))
|
293
|
+
{ 'svg' => "icon_#{location}.svg" }
|
294
|
+
elsif (has_file?("assets/icon_#{location}_inactive.png"))
|
295
|
+
{
|
296
|
+
'inactive' => "icon_#{location}_inactive.png",
|
297
|
+
'active' => has_file?("assets/icon_#{location}_active.png") ? "icon_#{location}_active.png" : "icon_#{location}_inactive.png",
|
298
|
+
'hover' => has_file?("assets/icon_#{location}_hover.png") ? "icon_#{location}_hover.png" : "icon_#{location}_inactive.png"
|
299
|
+
}
|
300
|
+
else
|
301
|
+
{}
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
281
308
|
def commonjs_modules
|
282
309
|
return {} unless has_lib_js?
|
283
310
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk_apps_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James A. Rosen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-10-
|
14
|
+
date: 2016-10-25 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: i18n
|