From 208a1b551e5c08ae5f34571c3e63f2eea93b9766 Mon Sep 17 00:00:00 2001 From: antelle Date: Sun, 11 Jul 2021 16:22:38 +0200 Subject: [PATCH] renames some ms teams constants --- app/scripts/const/default-app-settings.js | 8 ++++---- app/scripts/locales/base.json | 2 +- app/scripts/storage/impl/storage-teams.js | 15 ++++----------- app/scripts/storage/index.js | 2 +- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/app/scripts/const/default-app-settings.js b/app/scripts/const/default-app-settings.js index eb0b1d4a..7afc88c3 100644 --- a/app/scripts/const/default-app-settings.js +++ b/app/scripts/const/default-app-settings.js @@ -90,10 +90,10 @@ const DefaultAppSettings = { onedriveClientSecret: null, // custom OneDrive client secret onedriveTenantId: null, // custom OneDrive tenant id - teams: true, // enable Teams integration - teamsClientId: null, // custom Teams client id - teamsClientSecret: null, // custom Teams client secret - teamsTenantId: null // custom Teams tenant id + msteams: false, // enable Microsoft Teams integration + msteamsClientId: null, // custom Microsoft Teams client id + msteamsClientSecret: null, // custom Microsoft Teams client secret + msteamsTenantId: null // custom Microsoft Teams tenant id }; export { DefaultAppSettings }; diff --git a/app/scripts/locales/base.json b/app/scripts/locales/base.json index a23691d3..d3f8c807 100644 --- a/app/scripts/locales/base.json +++ b/app/scripts/locales/base.json @@ -43,7 +43,7 @@ "dropbox": "Dropbox", "gdrive": "Google Drive", "onedrive": "OneDrive", - "teams": "Microsoft Teams", + "msteams": "Microsoft Teams", "menuAllItems": "All Items", "menuColors": "Colors", "menuTrash": "Trash", diff --git a/app/scripts/storage/impl/storage-teams.js b/app/scripts/storage/impl/storage-teams.js index 861486b0..1359757e 100644 --- a/app/scripts/storage/impl/storage-teams.js +++ b/app/scripts/storage/impl/storage-teams.js @@ -12,7 +12,7 @@ import { Features } from 'util/features'; // https://graph.microsoft.com/v1.0/groups/{group id}/drive/root/children class StorageTeams extends StorageBase { - name = 'teams'; + name = 'msteams'; enabled = true; uipos = 50; icon = 'user-friends'; @@ -34,7 +34,6 @@ class StorageTeams extends StorageBase { } genUrl(path) { - // console.warn('genUrl', path); if (!path) { const groupId = null; const dir = null; @@ -212,17 +211,11 @@ class StorageTeams extends StorageBase { this.logger.debug('List', dir); const ts = this.logger.ts(); - // console.warn('dir ', dir); const urlParts = this.genUrl(dir); const groupId = urlParts[0]; dir = urlParts[1]; const urlPath = groupId ? (dir ? ':/children' : '/drive/root/children') : ''; const url = urlParts[2] + urlPath; - // console.warn('urlParts', urlParts); - // console.warn('groupId ', groupId); - // console.warn('dir ', dir); - // console.warn('urlPath ', urlPath); - // console.warn('url ', url); const self = this; self._groupId = groupId; @@ -337,9 +330,9 @@ class StorageTeams extends StorageBase { } _getOAuthConfig() { - let clientId = this.appSettings.teamsClientId; - let clientSecret = this.appSettings.teamsClientSecret; - let tenant = this.appSettings.teamsTenantId; + let clientId = this.appSettings.msteamsClientId; + let clientSecret = this.appSettings.msteamsClientSecret; + let tenant = this.appSettings.msteamsTenantId; if (!clientId) { if (Features.isDesktop) { diff --git a/app/scripts/storage/index.js b/app/scripts/storage/index.js index b6ed5ac8..9e7f55c4 100644 --- a/app/scripts/storage/index.js +++ b/app/scripts/storage/index.js @@ -18,7 +18,7 @@ const ThirdPartyStorage = { dropbox: new StorageDropbox(), gdrive: new StorageGDrive(), onedrive: new StorageOneDrive(), - teams: new StorageTeams(), + msteams: new StorageTeams(), webdav: new StorageWebDav() };