diff --git a/manifest.json b/manifest.json index 624946b..0b21dd2 100644 --- a/manifest.json +++ b/manifest.json @@ -4,6 +4,7 @@ "description": "View your Jetbrains Space issues from Deskpro and link them to tickets you are working on", "appStoreUrl": "https://www.deskpro.com/product-embed/apps/jetbrain-space", "version": "1.0.9", + "isDeprecated": true, "scope": "agent", "isSingleInstall": false, "hasDevMode": true, @@ -17,71 +18,6 @@ } }, "settings": { - "space_url": { - "title": "Space Instance URL", - "description": "Enter the URL of your Space instance, or \"https://.jetbrains.space\"", - "validationPattern": "^https?:\\/\\/.+\\..+\\w$", - "type": "string", - "isRequired": true, - "isBackendOnly": false, - "order": 10 - }, - "client_id": { - "title": "Client ID", - "type": "string", - "isRequired": true, - "isBackendOnly": false, - "order": 20 - }, - "client_secret": { - "title": "Client Secret", - "type": "string", - "isRequired": true, - "isBackendOnly": true, - "order": 30 - }, - "callback_url": { - "title": "Callback URL", - "type": "app_embedded", - "options": { "entrypoint": "#/admin/callback" }, - "isRequired": false, - "isBackendOnly": true, - "order": 40 - }, - "add_comment_when_linking": { - "title": "Leave a comment on the issue in Space when it is linked to a ticket in Deskpro", - "description": "", - "type": "boolean", - "default": true, - "isRequired": false, - "isBackendOnly": false, - "order": 50 - }, - "default_comment_on_ticket_reply": { - "title": "Ticket reply as comment", - "description": "Enable option to add Deskpro replies as task comments when a Space issue is linked to a Deskpro ticket", - "type": "boolean", - "isRequired": false, - "isBackendOnly": false, - "order": 60 - }, - "default_comment_on_ticket_note": { - "title": "Ticket note as comment", - "description": "Enable option to add Deskpro notes as task comments when a Space issue is linked to a Deskpro ticket", - "type": "boolean", - "isRequired": false, - "isBackendOnly": false, - "order": 70 - }, - "add_deskpro_tag": { - "title": "Add \"Deskpro\" tag when creating or linking Issue", - "description": "Automatically adding a tag to indicate in Space that the issue is currently linked to a Deskpro ticket", - "type": "boolean", - "default": true, - "isRequired": false, - "isBackendOnly": false, - "order": 80 - } }, "proxy": { "whitelist": [ diff --git a/src/App.tsx b/src/App.tsx index 97604c6..2846afc 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,78 +1,8 @@ -import { Routes, Route, useNavigate } from "react-router-dom"; -import { useDebouncedCallback } from "use-debounce"; -import { match } from "ts-pattern"; -import { - LoadingSpinner, - useDeskproElements, - useDeskproAppClient, - useDeskproAppEvents, -} from "@deskpro/app-sdk"; -import { useLogout, useUnlinkIssue } from "./hooks"; -import { - isUnlinkPayload, - isNavigatePayload, -} from "./utils"; -import { - HomePage, - LoginPage, - ViewIssuePage, - EditIssuePage, - LinkIssuesPage, - LoadingAppPage, - CreateIssuePage, - AdminCallbackPage, - CreateIssueCommentPage, -} from "./pages"; -import type { FC } from "react"; -import type { EventPayload } from "./types"; - -const App: FC = () => { - const navigate = useNavigate(); - const { client } = useDeskproAppClient(); - const { logout, isLoading: isLoadingLogout } = useLogout(); - const { unlink, isLoading: isLoadingUnlink } = useUnlinkIssue(); - const isLoading = [isLoadingLogout, isLoadingUnlink].some((isLoading) => isLoading); - - useDeskproElements(({ registerElement }) => { - registerElement("refresh", { type: "refresh_button" }); - }); - - const debounceElementEvent = useDebouncedCallback((_, __, payload: EventPayload) => { - return match(payload.type) - .with("changePage", () => isNavigatePayload(payload) && navigate(payload.path)) - .with("logout", logout) - .with("unlink", () => isUnlinkPayload(payload) && unlink(payload.issue)) - .run(); - }, 500); - - useDeskproAppEvents({ - onShow: () => { - client && setTimeout(() => client.resize(), 200); - }, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - onElementEvent: debounceElementEvent, - }, [client]); - - if (!client || isLoading) { - return ( - - ); - } +import DeprecationNotice from "./components/DeprecationNotice"; +export function App(){ return ( - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - + ); }; -export { App }; diff --git a/src/components/DeprecationNotice/DeprecationNotice.tsx b/src/components/DeprecationNotice/DeprecationNotice.tsx new file mode 100644 index 0000000..af23562 --- /dev/null +++ b/src/components/DeprecationNotice/DeprecationNotice.tsx @@ -0,0 +1,17 @@ +import { Link } from "@deskpro/app-sdk"; +import { P1, Stack } from "@deskpro/deskpro-ui"; + +export default function DeprecationNotice(): JSX.Element { + + return ( + + + Jetbrains have announced the decision to deprecate Space: The Future of Space. + + + Ask your admin to uninstall this app from your help desk as it will no longer + be supported by Deskpro. + + + ) +} \ No newline at end of file diff --git a/src/components/DeprecationNotice/index.ts b/src/components/DeprecationNotice/index.ts new file mode 100644 index 0000000..1ea21b4 --- /dev/null +++ b/src/components/DeprecationNotice/index.ts @@ -0,0 +1 @@ +export { default } from "./DeprecationNotice" \ No newline at end of file