mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
Merge pull request #17930 from selenecodes/feat/onedrive-file-picker-add-search-and-my-organisation-pivot
feat: Enable search and "My Organization" pivot in OneDrive integration
This commit is contained in:
commit
2341c2e729
1 changed files with 9 additions and 2 deletions
|
|
@ -51,7 +51,7 @@ class OneDriveConfig {
|
||||||
this.sharepointTenantId = config.onedrive?.sharepoint_tenant_id;
|
this.sharepointTenantId = config.onedrive?.sharepoint_tenant_id;
|
||||||
|
|
||||||
if (!this.clientIdPersonal && !this.clientIdBusiness) {
|
if (!this.clientIdPersonal && !this.clientIdBusiness) {
|
||||||
throw new Error('OneDrive personal or business client ID not configured');
|
throw new Error('OneDrive personal or business client ID not configured');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -176,6 +176,9 @@ interface PickerParams {
|
||||||
origin: string;
|
origin: string;
|
||||||
channelId: string;
|
channelId: string;
|
||||||
};
|
};
|
||||||
|
search: {
|
||||||
|
enabled: boolean;
|
||||||
|
};
|
||||||
typesAndSources: {
|
typesAndSources: {
|
||||||
mode: string;
|
mode: string;
|
||||||
pivots: Record<string, boolean>;
|
pivots: Record<string, boolean>;
|
||||||
|
|
@ -204,11 +207,15 @@ function getPickerParams(): PickerParams {
|
||||||
origin: window?.location?.origin || '',
|
origin: window?.location?.origin || '',
|
||||||
channelId
|
channelId
|
||||||
},
|
},
|
||||||
|
search: {
|
||||||
|
enabled: true
|
||||||
|
},
|
||||||
typesAndSources: {
|
typesAndSources: {
|
||||||
mode: 'files',
|
mode: 'files',
|
||||||
pivots: {
|
pivots: {
|
||||||
oneDrive: true,
|
oneDrive: true,
|
||||||
recent: true
|
recent: true,
|
||||||
|
myOrganization: config.getAuthorityType() === 'organizations'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue