|
|
@ -1,23 +1,44 @@
|
|
|
|
const MaintenancePage = (props) => {
|
|
|
|
import { clearAllCaches } from '@/utils/commons';
|
|
|
|
function handleClearCache() {
|
|
|
|
|
|
|
|
// Implement your cache clearing logic here
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleReloadUpdate() {
|
|
|
|
const MaintenancePage = () => {
|
|
|
|
// Implement your update reloading logic here
|
|
|
|
const handleClearCache = async () => {
|
|
|
|
}
|
|
|
|
await clearAllCaches();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function handleVersionCheck() {
|
|
|
|
const handleReload = () => {
|
|
|
|
// Implement your version checking logic here
|
|
|
|
const url = new URL(window.location.href);
|
|
|
|
}
|
|
|
|
url.searchParams.forEach((value, name) => {
|
|
|
|
|
|
|
|
url.searchParams.delete(name);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
const _num = Date.now();
|
|
|
|
|
|
|
|
url.searchParams.set('_spam' + _num, _num);
|
|
|
|
|
|
|
|
window.location.href = url.toString();
|
|
|
|
|
|
|
|
// window.location.href = window.location.href + '?versionCheck=true';
|
|
|
|
|
|
|
|
// window.location.reload(true);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleVersionCheck = () => {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const __BUILD_DATE__ = `__BUILD_DATE__`;
|
|
|
|
|
|
|
|
const __BUILD_VERSION__ = `__BUILD_VERSION__`;
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div>
|
|
|
|
<div className='flex flex-col items-center justify-center h-5/6 bg-gray-100'>
|
|
|
|
<h1>Maintenance Page</h1>
|
|
|
|
<h1 className='text-2xl font-bold mb-4 text-slate-800'>Sales CRM Maintenance Page</h1>
|
|
|
|
<button onClick={handleClearCache}>Clear Cache</button>
|
|
|
|
<button onClick={handleClearCache} className='px-4 py-2 mb-4 bg-blue-500 text-white rounded-md border-0'>
|
|
|
|
<button onClick={handleReloadUpdate}>Reload Update</button>
|
|
|
|
清除缓存
|
|
|
|
<button onClick={handleVersionCheck}>Check Version</button>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button onClick={handleReload} className='px-4 py-2 mb-2 bg-green-500 text-white rounded-md border-0'>
|
|
|
|
|
|
|
|
重新加载
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
{/* <button onClick={handleVersionCheck} className='px-4 py-2 mb-2 bg-yellow-500 text-white rounded-md border-0'>
|
|
|
|
|
|
|
|
检查版本
|
|
|
|
|
|
|
|
</button> */}
|
|
|
|
|
|
|
|
<p>Version: {__BUILD_VERSION__}</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
Build Date: {__BUILD_DATE__} <span>GMT+00:00</span>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
);
|
|
|
|