appscms-tools-theme 0.8.9 → 0.9.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/assets/js/googledrive.js +20 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74c80e5e73290857e21cb4d38f7b6d667a4f75872d82632b625ae090c7d036dc
4
- data.tar.gz: f57d4364becb7eeb90ec3260df18a6f6ae24382fc4dbb650c8c4ee0ae79500dc
3
+ metadata.gz: ca15a7c361170971239f1c88fad5544b70c52e58ef11445cd31f7ad0c52bbcc3
4
+ data.tar.gz: 42bfb2d4b4d0072ed83653acdc974f80b6f962e169879cb3088dc0436d4d5bee
5
5
  SHA512:
6
- metadata.gz: 93f37bedd59a78488636afaef48fc1f6552e81866c01b28b08232a0d0344b4d527237ab821686746c5e7c8114b5dbc403102e04dcf5998ea6fa38deeaa478b75
7
- data.tar.gz: 6a81516dbe48ae1f45687411eba3a0966fb3c3f0dca64b0b2ac72c870b7b2836837f081ad8ab5cb9e877a0da72c8db02ab3c643e38dded37bb3b35a8355a9f86
6
+ metadata.gz: b93720825ec1e547f3da872cfe38fc681a2263edde7142986c41448358564a839a7e7aabed45abb3fd008c975bc22c773f68fff68f3f28c712dce8f08cdbd851
7
+ data.tar.gz: d65782fc14252367d1d8771c5d58192b63a42d7f313d0a5904227742c0b3b7d97cc145553b3d483632f10aed56757232e910e5d22581c478360fb0d80c08d4ca
@@ -52,19 +52,34 @@ const createPicker = () => {
52
52
  const pickerCallback = async (data) => {
53
53
  if (data.action == google.picker.Action.PICKED) {
54
54
  const res = await fetch(
55
- `https://www.googleapis.com/drive/v2/files/${data.docs[0].id}?key=${developerKey}?alt=media`,
55
+ `https://www.googleapis.com/drive/v3/files/${data.docs[0].id}?alt=media`,
56
56
  {
57
57
  headers: {
58
58
  Authorization: `Bearer ${oauthToken}`,
59
- Accept: 'application/json',
60
59
  },
61
60
  }
62
- ).then((res) => res.json())
63
- const response = await fetch(res.webContentLink).then((res) => res.blob())
61
+ ).then((res) => res.blob())
64
62
  let metadata = {
65
63
  type: data.docs[0].mimeType,
66
64
  }
67
- let file = new File([response], data.docs[0].name, metadata)
65
+ let file = new File([res], data.docs[0].name, metadata)
68
66
  getFile(file)
69
67
  }
70
68
  }
69
+ function chooseFromDropbox() {
70
+ Dropbox.choose({
71
+ success: function (files) {
72
+ if (files.length < 0) {
73
+ return
74
+ }
75
+ var file = files[0]
76
+ alert('Download Link : ' + file.link + '\nFile Name : ' + file.name)
77
+ console.log(file.link)
78
+ },
79
+ cancel: function () {},
80
+ linkType: 'direct',
81
+ multiselect: false,
82
+ extensions: ['.jpg'],
83
+ folderselect: false,
84
+ })
85
+ }
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: 0.8.9
4
+ version: 0.9.0
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-06-15 00:00:00.000000000 Z
11
+ date: 2021-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll