mirror of
https://github.com/colanode/colanode.git
synced 2025-12-29 00:25:03 +01:00
Fix fonts loading for desktop
This commit is contained in:
@@ -4,6 +4,7 @@ import path from 'path';
|
||||
|
||||
import {
|
||||
getAccountAvatarsDirectoryPath,
|
||||
getAssetsSourcePath,
|
||||
getWorkspaceFilesDirectoryPath,
|
||||
} from '@/main/lib/utils';
|
||||
import { appService } from '@/main/services/app-service';
|
||||
@@ -50,6 +51,12 @@ export const handleAssetRequest = async (
|
||||
}
|
||||
}
|
||||
|
||||
if (type === 'fonts') {
|
||||
const filePath = path.join(getAssetsSourcePath(), 'fonts', id);
|
||||
const fileUrl = `file://${filePath}`;
|
||||
return net.fetch(fileUrl);
|
||||
}
|
||||
|
||||
return new Response(null, { status: 404 });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user