appscms-tools-theme 1.1.6 → 1.2.1

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: ab262b7915008e88c23d27902315a577bd32840bb8910957cff1ec1de08b9734
4
- data.tar.gz: 3f5bf7d712de8f742203517d2eeb9002d0631b355bd20b7f2a034470b588f606
3
+ metadata.gz: d5660c6c8d30fafcde3cc7f33bb5989fde3c42474efbbb395d889d87fa3e5c60
4
+ data.tar.gz: ee605be8266d14e51bc154c5f556569f081a6ce2103184f384ad255eca0869df
5
5
  SHA512:
6
- metadata.gz: b80f31bd5c19f29a35a34fcc9ccf85667ee775fcff4dd2fce809f1810188dfaea2a637a958d9e1b212b90be17e48ded964fd63c299200cfbffdeae6f8dbe0fa8
7
- data.tar.gz: 47ce43dd715ed372399646b2ca5c796a6ef2568531b61a7a8b73ea0fbccb18173850f0ed0961f6628d06ac1e2ff6aa704e51ba44235d250bb5218db15628b3e2
6
+ metadata.gz: 6b090f84f376ed0f02c620ecb55c4a3ab70ebe6d188a7bae78bacaa0c1701260e62d12bd25b8768a502af028a814b5ca2ec892f690508f22462eea36260a95ed
7
+ data.tar.gz: 0a190f93bf38161dd74af76e93b0853573c72574586cdeb56122ff652cddaf3c55baa1e9595bb61a2dbf1f45e3f4ced157e7c2614ae8ea4526de738714081c79
@@ -0,0 +1,118 @@
1
+ ---
2
+ ---
3
+
4
+ var mimeTypes
5
+ export const addScripts=()=>{
6
+ const scripts=document.getElementsByTagName('script')
7
+ const check= Array.from(scripts).find(item=>item.src==='https://www.dropbox.com/static/api/2/dropins.js')
8
+ if(!check){
9
+ const dropboxscript = document.createElement('script')
10
+ dropboxscript.src = 'https://www.dropbox.com/static/api/2/dropins.js'
11
+ dropboxscript.dataset.appKey = '{{site.dropboxapikey}}'
12
+ dropboxscript.id='dropboxjs'
13
+ document.head.append(dropboxscript)
14
+ }
15
+ const checkgooglescript= Array.from(scripts).find(item=>item.src==='https://apis.google.com/js/api.js')
16
+ if(!checkgooglescript){
17
+ const googlescript = document.createElement('script')
18
+ googlescript.src = 'https://apis.google.com/js/api.js'
19
+ document.head.append(googlescript)
20
+ }
21
+ }
22
+ const developerKey = '{{site.developerKey}}'
23
+ const clientId ='{{site.clientId}}'
24
+ const appId = '{{site.appId}}'
25
+ const scope = [
26
+ 'https://www.googleapis.com/auth/drive.file',
27
+ 'https://www.googleapis.com/auth/drive.appdata',
28
+ ]
29
+ let pickerApiLoaded = false
30
+ let oauthToken
31
+ export const loadPicker = (mimeType,showLoader,closeLoader,getFile) => {
32
+ gapi.load('auth', { callback: onAuthApiLoad })
33
+ gapi.load('picker', { callback: onPickerApiLoad(mimeType,showLoader,closeLoader,getFile) })
34
+ }
35
+ const onAuthApiLoad = (mimeType,showLoader,closeLoader,getFile) => {
36
+ window.gapi.auth.authorize(
37
+ {
38
+ client_id: clientId,
39
+ scope: scope,
40
+ immediate: false,
41
+ },
42
+ handleAuthResult(authResult,mimeType,showLoader,closeLoader,getFile)
43
+ )
44
+ }
45
+ let onPickerApiLoad = () => {
46
+ pickerApiLoaded = true
47
+ createPicker()
48
+ }
49
+ const handleAuthResult = (authResult,mimeType,showLoader,closeLoader,getFile) => {
50
+ if (authResult && !authResult.error) {
51
+ oauthToken = authResult.access_token
52
+ createPicker(mimeType,showLoader,closeLoader,getFile)
53
+ }
54
+ }
55
+ const createPicker = (mimeType,showLoader,closeLoader,getFile) => {
56
+ if (pickerApiLoaded && oauthToken) {
57
+ const view = new google.picker.View(google.picker.ViewId.DOCS)
58
+ view.setMimeTypes(mimeType)
59
+ const picker = new google.picker.PickerBuilder()
60
+ .enableFeature(google.picker.Feature.NAV_HIDDEN)
61
+ .enableFeature(google.picker.Feature.MULTISELECT_ENABLED)
62
+ .setAppId(appId)
63
+ .setOAuthToken(oauthToken)
64
+ .addView(view)
65
+ .addView(new google.picker.DocsUploadView())
66
+ .setDeveloperKey(developerKey)
67
+ .setCallback(pickerCallback(data,showLoader,closeLoader,getFile))
68
+ .build()
69
+ picker.setVisible(true)
70
+ }
71
+ }
72
+ const pickerCallback = async (data,showLoader,closeLoader,getFile) => {
73
+ if (data.action == google.picker.Action.PICKED) {
74
+ showLoader()
75
+ const res = await fetch(
76
+ `https://www.googleapis.com/drive/v3/files/${data.docs[0].id}?alt=media`,
77
+ {
78
+ headers: {
79
+ Authorization: `Bearer ${oauthToken}`,
80
+ },
81
+ }
82
+ ).then((res) => res.blob())
83
+ let metadata = {
84
+ type: data.docs[0].mimeType,
85
+ }
86
+ let file = new File([res], data.docs[0].name, metadata)
87
+ closeLoader()
88
+ getFile(file)
89
+ }
90
+ }
91
+ export const chooseFromDropbox=(filemimes,showLoader,closeLoader,getDropBoxFile)=> {
92
+ Dropbox.choose({
93
+ success: async (files) => {
94
+ if (files.length < 0) {
95
+ return
96
+ }
97
+ var file = files[0]
98
+ const url = new URL(file.link)
99
+ showLoader()
100
+ const response = await fetch(url).then((res) => res.blob())
101
+ let metadata = {
102
+ type: response.type,
103
+ }
104
+ let newFile = new File([response], file.name, metadata)
105
+ closeLoader()
106
+ getDropBoxFile(newFile)
107
+ },
108
+ cancel: function () {},
109
+ linkType: 'direct',
110
+ multiselect: false,
111
+ extensions: [...filemimes],
112
+ folderselect: false,
113
+ })
114
+ }
115
+
116
+
117
+
118
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appscms-tools-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-06 00:00:00.000000000 Z
11
+ date: 2021-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -291,9 +291,8 @@ files:
291
291
  - assets/images/rating.png
292
292
  - assets/instagram.svg
293
293
  - assets/js/TopScroll.js
294
- - assets/js/files/en/jpg.json
295
- - assets/js/files/en/png.json
296
294
  - assets/js/googledrive.js
295
+ - assets/js/googledriveinput.js
297
296
  - assets/js/manifest.json
298
297
  - assets/js/multiselect.js
299
298
  - assets/linkdin.svg
@@ -1,153 +0,0 @@
1
- {
2
- "Format": "Jpg file",
3
- "ShortName": "Jpg",
4
- "FullName": "Jpge",
5
- "Category": "Image",
6
- "Pros": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
7
- "Cons": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
8
- "CreatedbyName": "jpg",
9
- "CreatedbyLink": "jpg",
10
- "CreatedInYear": "2021",
11
- "BasicInformation": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
12
- "DetailedInformation": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
13
- "Softwaresused": [
14
- {
15
- "platform": "Windows",
16
- "softwares": [
17
- {
18
- "name": "Adobe Audition CC 2021",
19
- "link": "/",
20
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
21
- "type": "free"
22
- },
23
- {
24
- "name": "Adobe Audition CC 2021",
25
- "link": "/",
26
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
27
- "type": "paid"
28
- },
29
- {
30
- "name": "Adobe Audition CC 2021",
31
- "link": "/",
32
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
33
- "type": "freemium"
34
- }
35
- ]
36
- },
37
- {
38
- "platform": "Windows",
39
- "softwares": [
40
- {
41
- "name": "Adobe Audition CC 2021",
42
- "link": "/",
43
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
44
- "type": "free"
45
- },
46
- {
47
- "name": "Adobe Audition CC 2021",
48
- "link": "/",
49
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
50
- "type": "paid"
51
- },
52
- {
53
- "name": "Adobe Audition CC 2021",
54
- "link": "/",
55
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
56
- "type": "freemium"
57
- }
58
- ]
59
- },
60
- {
61
- "platform": "Windows",
62
- "softwares": [
63
- {
64
- "name": "Adobe Audition CC 2021",
65
- "link": "/",
66
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
67
- "type": "free"
68
- },
69
- {
70
- "name": "Adobe Audition CC 2021",
71
- "link": "/",
72
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
73
- "type": "paid"
74
- },
75
- {
76
- "name": "Adobe Audition CC 2021",
77
- "link": "/",
78
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
79
- "type": "freemium"
80
- }
81
- ]
82
- },
83
- {
84
- "platform": "Windows",
85
- "softwares": [
86
- {
87
- "name": "Adobe Audition CC 2021",
88
- "link": "/",
89
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
90
- "type": "free"
91
- },
92
- {
93
- "name": "Adobe Audition CC 2021",
94
- "link": "/",
95
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
96
- "type": "paid"
97
- },
98
- {
99
- "name": "Adobe Audition CC 2021",
100
- "link": "/",
101
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
102
- "type": "freemium"
103
- }
104
- ]
105
- },
106
- {
107
- "platform": "Windows",
108
- "softwares": [
109
- {
110
- "name": "Adobe Audition CC 2021",
111
- "link": "/",
112
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
113
- "type": "free"
114
- },
115
- {
116
- "name": "Adobe Audition CC 2021",
117
- "link": "/",
118
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
119
- "type": "paid"
120
- },
121
- {
122
- "name": "Adobe Audition CC 2021",
123
- "link": "/",
124
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
125
- "type": "freemium"
126
- }
127
- ]
128
- },
129
- {
130
- "platform": "Android",
131
- "softwares": [
132
- {
133
- "name": "Google",
134
- "link": "/",
135
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
136
- "type": "free"
137
- },
138
- {
139
- "name": "Apple",
140
- "link": "/",
141
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
142
- "type": "paid"
143
- },
144
- {
145
- "name": "Adobe Audition CC 2021",
146
- "link": "/",
147
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
148
- "type": "premium"
149
- }
150
- ]
151
- }
152
- ]
153
- }
@@ -1,61 +0,0 @@
1
- {
2
- "Format": "Png File",
3
- "ShortName": "Png",
4
- "FullName": "Png",
5
- "Category": "Png",
6
- "Pros": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
7
- "Cons": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
8
- "CreatedbyName": "Png",
9
- "CreatedbyLink": "Png",
10
- "CreatedInYear": "2021",
11
- "BasicInformation": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
12
- "DetailedInformation": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
13
- "Softwaresused": [
14
- {
15
- "platform": "Windows",
16
- "softwares": [
17
- {
18
- "name": "Adobe Audition CC 2021",
19
- "link": "/",
20
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
21
- "type": "free"
22
- },
23
- {
24
- "name": "Adobe Audition CC 2021",
25
- "link": "/",
26
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
27
- "type": "paid"
28
- },
29
- {
30
- "name": "Adobe Audition CC 2021",
31
- "link": "/",
32
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
33
- "type": "freemium"
34
- }
35
- ]
36
- },
37
- {
38
- "platform": "Android",
39
- "softwares": [
40
- {
41
- "name": "Google",
42
- "link": "/",
43
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
44
- "type": "free"
45
- },
46
- {
47
- "name": "Apple",
48
- "link": "/",
49
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
50
- "type": "paid"
51
- },
52
- {
53
- "name": "Adobe Audition CC 2021",
54
- "link": "/",
55
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
56
- "type": "premium"
57
- }
58
- ]
59
- }
60
- ]
61
- }