mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 22:48:28 +03:00
Google Drive improvement
This commit is contained in:
parent
d8bef79fc5
commit
409e9fbdc2
6 changed files with 184 additions and 154 deletions
|
|
@ -1103,10 +1103,8 @@ PopupsComposeViewModel.prototype.driveOpenPopup = function ()
|
|||
{
|
||||
window.gapi.auth.authorize({
|
||||
'client_id': RL.settingsGet('GoogleClientID'),
|
||||
'scope': [
|
||||
'https://www.googleapis.com/auth/drive.readonly'
|
||||
].join(' '),
|
||||
'immediate': false
|
||||
'scope': 'https://www.googleapis.com/auth/drive.readonly',
|
||||
'immediate': true
|
||||
}, function (oAuthResult) {
|
||||
if (oAuthResult && !oAuthResult.error)
|
||||
{
|
||||
|
|
@ -1116,6 +1114,23 @@ PopupsComposeViewModel.prototype.driveOpenPopup = function ()
|
|||
self.driveCreatePiker(oAuthToken);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
window.gapi.auth.authorize({
|
||||
'client_id': RL.settingsGet('GoogleClientID'),
|
||||
'scope': 'https://www.googleapis.com/auth/drive.readonly',
|
||||
'immediate': false
|
||||
}, function (oAuthResult) {
|
||||
if (oAuthResult && !oAuthResult.error)
|
||||
{
|
||||
var oAuthToken = window.gapi.auth.getToken();
|
||||
if (oAuthToken)
|
||||
{
|
||||
self.driveCreatePiker(oAuthToken);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue