mirror of https://github.com/keeweb/keeweb.git
renames some ms teams constants
This commit is contained in:
parent
f8af64e45b
commit
208a1b551e
|
@ -90,10 +90,10 @@ const DefaultAppSettings = {
|
||||||
onedriveClientSecret: null, // custom OneDrive client secret
|
onedriveClientSecret: null, // custom OneDrive client secret
|
||||||
onedriveTenantId: null, // custom OneDrive tenant id
|
onedriveTenantId: null, // custom OneDrive tenant id
|
||||||
|
|
||||||
teams: true, // enable Teams integration
|
msteams: false, // enable Microsoft Teams integration
|
||||||
teamsClientId: null, // custom Teams client id
|
msteamsClientId: null, // custom Microsoft Teams client id
|
||||||
teamsClientSecret: null, // custom Teams client secret
|
msteamsClientSecret: null, // custom Microsoft Teams client secret
|
||||||
teamsTenantId: null // custom Teams tenant id
|
msteamsTenantId: null // custom Microsoft Teams tenant id
|
||||||
};
|
};
|
||||||
|
|
||||||
export { DefaultAppSettings };
|
export { DefaultAppSettings };
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
"dropbox": "Dropbox",
|
"dropbox": "Dropbox",
|
||||||
"gdrive": "Google Drive",
|
"gdrive": "Google Drive",
|
||||||
"onedrive": "OneDrive",
|
"onedrive": "OneDrive",
|
||||||
"teams": "Microsoft Teams",
|
"msteams": "Microsoft Teams",
|
||||||
"menuAllItems": "All Items",
|
"menuAllItems": "All Items",
|
||||||
"menuColors": "Colors",
|
"menuColors": "Colors",
|
||||||
"menuTrash": "Trash",
|
"menuTrash": "Trash",
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { Features } from 'util/features';
|
||||||
// https://graph.microsoft.com/v1.0/groups/{group id}/drive/root/children
|
// https://graph.microsoft.com/v1.0/groups/{group id}/drive/root/children
|
||||||
|
|
||||||
class StorageTeams extends StorageBase {
|
class StorageTeams extends StorageBase {
|
||||||
name = 'teams';
|
name = 'msteams';
|
||||||
enabled = true;
|
enabled = true;
|
||||||
uipos = 50;
|
uipos = 50;
|
||||||
icon = 'user-friends';
|
icon = 'user-friends';
|
||||||
|
@ -34,7 +34,6 @@ class StorageTeams extends StorageBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
genUrl(path) {
|
genUrl(path) {
|
||||||
// console.warn('genUrl', path);
|
|
||||||
if (!path) {
|
if (!path) {
|
||||||
const groupId = null;
|
const groupId = null;
|
||||||
const dir = null;
|
const dir = null;
|
||||||
|
@ -212,17 +211,11 @@ class StorageTeams extends StorageBase {
|
||||||
this.logger.debug('List', dir);
|
this.logger.debug('List', dir);
|
||||||
const ts = this.logger.ts();
|
const ts = this.logger.ts();
|
||||||
|
|
||||||
// console.warn('dir ', dir);
|
|
||||||
const urlParts = this.genUrl(dir);
|
const urlParts = this.genUrl(dir);
|
||||||
const groupId = urlParts[0];
|
const groupId = urlParts[0];
|
||||||
dir = urlParts[1];
|
dir = urlParts[1];
|
||||||
const urlPath = groupId ? (dir ? ':/children' : '/drive/root/children') : '';
|
const urlPath = groupId ? (dir ? ':/children' : '/drive/root/children') : '';
|
||||||
const url = urlParts[2] + urlPath;
|
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;
|
const self = this;
|
||||||
self._groupId = groupId;
|
self._groupId = groupId;
|
||||||
|
@ -337,9 +330,9 @@ class StorageTeams extends StorageBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
_getOAuthConfig() {
|
_getOAuthConfig() {
|
||||||
let clientId = this.appSettings.teamsClientId;
|
let clientId = this.appSettings.msteamsClientId;
|
||||||
let clientSecret = this.appSettings.teamsClientSecret;
|
let clientSecret = this.appSettings.msteamsClientSecret;
|
||||||
let tenant = this.appSettings.teamsTenantId;
|
let tenant = this.appSettings.msteamsTenantId;
|
||||||
|
|
||||||
if (!clientId) {
|
if (!clientId) {
|
||||||
if (Features.isDesktop) {
|
if (Features.isDesktop) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ const ThirdPartyStorage = {
|
||||||
dropbox: new StorageDropbox(),
|
dropbox: new StorageDropbox(),
|
||||||
gdrive: new StorageGDrive(),
|
gdrive: new StorageGDrive(),
|
||||||
onedrive: new StorageOneDrive(),
|
onedrive: new StorageOneDrive(),
|
||||||
teams: new StorageTeams(),
|
msteams: new StorageTeams(),
|
||||||
webdav: new StorageWebDav()
|
webdav: new StorageWebDav()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue