|
|
@@ -5,6 +5,7 @@ import {
|
|
|
OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction, OnPutBackedFunction,
|
|
|
} from '~/interfaces/ui';
|
|
|
import { IUserGroupHasId } from '~/interfaces/user';
|
|
|
+import { dwawioConfig } from '~/utils/drawio-config';
|
|
|
|
|
|
import { useStaticSWR } from './use-static-swr';
|
|
|
|
|
|
@@ -467,8 +468,6 @@ export const useDrawioModal = (status?: DrawioModalStatus): SWRResponse<DrawioMo
|
|
|
};
|
|
|
|
|
|
const receiveFromDrawio = (event, drawioMxFile: string) => {
|
|
|
- const headerColor = '#334455';
|
|
|
- const fontFamily = "Lato, -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif";
|
|
|
|
|
|
if (event.data === 'ready') {
|
|
|
event.source.postMessage(drawioMxFile, '*');
|
|
|
@@ -486,18 +485,7 @@ export const useDrawioModal = (status?: DrawioModalStatus): SWRResponse<DrawioMo
|
|
|
// * https://desk.draw.io/support/solutions/articles/16000058316-how-to-configure-draw-io-
|
|
|
event.source.postMessage(JSON.stringify({
|
|
|
action: 'configure',
|
|
|
- config: {
|
|
|
- css: `
|
|
|
- .geMenubarContainer { background-color: ${headerColor} !important; }
|
|
|
- .geMenubar { background-color: ${headerColor} !important; }
|
|
|
- .geEditor { font-family: ${fontFamily} !important; }
|
|
|
- html td.mxPopupMenuItem {
|
|
|
- font-family: ${fontFamily} !important;
|
|
|
- font-size: 8pt !important;
|
|
|
- }
|
|
|
- `,
|
|
|
- customFonts: ['Lato', 'Charter'],
|
|
|
- },
|
|
|
+ config: dwawioConfig,
|
|
|
}), '*');
|
|
|
|
|
|
return;
|