|
|
|
@ -4,7 +4,6 @@ import { Cache, Layers, Object3D } from 'three';
|
|
|
|
|
import { ErrorMonitoring, ReportError } from './Common/ErrorMonitoring';
|
|
|
|
|
import { LogEnable, ReportErrorWrap } from './Common/Log';
|
|
|
|
|
import { copyTextToClipboard } from './Common/Utils';
|
|
|
|
|
import { ExtrudeConfig } from './DatabaseServices/Entity/ExtrudeConfig';
|
|
|
|
|
import { AppToaster } from './UI/Components/Toaster';
|
|
|
|
|
import './UI/Css/blue.less';
|
|
|
|
|
import './UI/Css/golden.less';
|
|
|
|
@ -12,45 +11,6 @@ import './UI/Css/style.less';
|
|
|
|
|
import './UI/Css/switchTheme.less';
|
|
|
|
|
import { WebCAD } from './UI/Layout/ApplicationLayout';
|
|
|
|
|
|
|
|
|
|
declare const version: string;
|
|
|
|
|
|
|
|
|
|
console.log(`当前版本:${version}`);
|
|
|
|
|
if (location.hostname !== "localhost")
|
|
|
|
|
{
|
|
|
|
|
let headers = new Headers();
|
|
|
|
|
headers.append('pragma', 'no-cache');
|
|
|
|
|
headers.append('cache-control', 'no-cache');
|
|
|
|
|
|
|
|
|
|
let init = {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: headers,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
let request = new Request('ver.json');
|
|
|
|
|
|
|
|
|
|
fetch(request, init).then(res =>
|
|
|
|
|
{
|
|
|
|
|
if (!res.ok) return;
|
|
|
|
|
res.text().then(serverVersion =>
|
|
|
|
|
{
|
|
|
|
|
if (res.status && serverVersion && version !== serverVersion)
|
|
|
|
|
{
|
|
|
|
|
document.body.style.cssText = `
|
|
|
|
|
text-align: center;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-size: 30px;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
`;
|
|
|
|
|
document.body.textContent = "发现新版本,升级中!";
|
|
|
|
|
location.reload();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cache.enabled = true;
|
|
|
|
|
|
|
|
|
|
//禁止用户选中
|
|
|
|
@ -191,8 +151,7 @@ window.onload = function ()
|
|
|
|
|
|
|
|
|
|
ReportErrorWrap.ReportError = ReportError;
|
|
|
|
|
|
|
|
|
|
let cad = new WebCAD();
|
|
|
|
|
cad.app.Editor.Prompt(`当前版本编译时间:${version}`);
|
|
|
|
|
new WebCAD();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
globalThis["copy"] = (text: string) =>
|
|
|
|
|