Reformat all project files to use the prettier config file.

This commit is contained in:
Patrick Fic
2024-03-27 15:35:07 -07:00
parent b161530381
commit e1df64d592
873 changed files with 111387 additions and 125473 deletions

View File

@@ -1,54 +1,69 @@
import {AlertOutlined} from "@ant-design/icons";
import {Button, notification, Space} from "antd";
import { AlertOutlined } from "@ant-design/icons";
import { Button, notification, Space } from "antd";
import i18n from "i18next";
import React from "react";
import * as serviceWorkerRegistration from "../serviceWorkerRegistration";
import {store} from "../redux/store";
import { store } from "../redux/store";
import InstanceRenderManager from "./instanceRenderMgr";
const onServiceWorkerUpdate = (registration) => {
console.log("onServiceWorkerUpdate", registration);
console.log("onServiceWorkerUpdate", registration);
const btn = (
<Space flex>
<Button
onClick={async () => {
window.open(
InstanceRenderManager({imex:"https://imex-online.noticeable.news/",
rome: "https://rome-online.noticeable.news/"})
, "_blank");
}}
>
{i18n.t("general.actions.viewreleasenotes")}
</Button>
<Button
type="primary"
onClick={async () => {
if (registration && registration.waiting) {
await registration.unregister();
// Makes Workbox call skipWaiting()
registration.waiting.postMessage({type: "SKIP_WAITING"});
// Once the service worker is unregistered, we can reload the page to let
// the browser download a fresh copy of our app (invalidating the cache)
window.location.reload();
}
}}
>
{i18n.t("general.actions.refresh")}
</Button>
</Space>
);
const btn = (
<Space flex>
<Button
onClick={async () => {
window.open(
InstanceRenderManager({
imex: "https://imex-online.noticeable.news/",
rome: "https://rome-online.noticeable.news/"
}),
"_blank"
);
}}
>
{i18n.t("general.actions.viewreleasenotes")}
</Button>
<Button
type="primary"
onClick={async () => {
if (registration && registration.waiting) {
await registration.unregister();
// Makes Workbox call skipWaiting()
registration.waiting.postMessage({ type: "SKIP_WAITING" });
// Once the service worker is unregistered, we can reload the page to let
// the browser download a fresh copy of our app (invalidating the cache)
window.location.reload();
}
}}
>
{i18n.t("general.actions.refresh")}
</Button>
</Space>
);
store.dispatch()
store.dispatch();
notification.open({
icon: <AlertOutlined/>,
message: i18n.t("general.messages.newversiontitle",{app: InstanceRenderManager({imex:'$t(titles.imexonline)', rome: '$t(titles.romeonline)', promanager: '$t(titles.promanager)'})}),
description: i18n.t("general.messages.newversionmessage", {app: InstanceRenderManager({imex:'$t(titles.imexonline)', rome: '$t(titles.romeonline)', promanager: '$t(titles.promanager)'})}),
duration: 0,
btn,
key: "updateavailable",
});
notification.open({
icon: <AlertOutlined />,
message: i18n.t("general.messages.newversiontitle", {
app: InstanceRenderManager({
imex: "$t(titles.imexonline)",
rome: "$t(titles.romeonline)",
promanager: "$t(titles.promanager)"
})
}),
description: i18n.t("general.messages.newversionmessage", {
app: InstanceRenderManager({
imex: "$t(titles.imexonline)",
rome: "$t(titles.romeonline)",
promanager: "$t(titles.promanager)"
})
}),
duration: 0,
btn,
key: "updateavailable"
});
};
serviceWorkerRegistration.register({onUpdate: onServiceWorkerUpdate});
serviceWorkerRegistration.register({ onUpdate: onServiceWorkerUpdate });