fix: Clear file list when selected models do not support file uploads
This commit is contained in:
@@ -56,6 +56,10 @@
|
|||||||
fileUploadCapableModels.length === selectedModels.length &&
|
fileUploadCapableModels.length === selectedModels.length &&
|
||||||
($user?.role === 'admin' || $user?.permissions?.chat?.file_upload);
|
($user?.role === 'admin' || $user?.permissions?.chat?.file_upload);
|
||||||
|
|
||||||
|
$: if (!fileUploadEnabled && files.length > 0) {
|
||||||
|
files = [];
|
||||||
|
}
|
||||||
|
|
||||||
const detectMobile = () => {
|
const detectMobile = () => {
|
||||||
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
||||||
return /android|iphone|ipad|ipod|windows phone/i.test(userAgent);
|
return /android|iphone|ipad|ipod|windows phone/i.test(userAgent);
|
||||||
|
|||||||
Reference in New Issue
Block a user