diff --git a/src/lib/components/layouts/DocumentLayout.svelte b/src/lib/components/layouts/DocumentLayout.svelte index e2a26123f..79ceaac11 100644 --- a/src/lib/components/layouts/DocumentLayout.svelte +++ b/src/lib/components/layouts/DocumentLayout.svelte @@ -6,7 +6,6 @@ Assumes it's a child of a ViewerContext import type { Project } from "$lib/api/types"; import { _ } from "svelte-i18n"; - import ViewerActions from "$lib/components/sidebar/ViewerActions.svelte"; import AddOns from "$lib/components/sidebar/AddOns.svelte"; import Avatar from "../accounts/Avatar.svelte"; import Data from "../documents/Data.svelte"; @@ -18,6 +17,7 @@ Assumes it's a child of a ViewerContext import Projects from "../documents/Projects.svelte"; import SidebarLayout from "./SidebarLayout.svelte"; import Viewer from "../viewer/Viewer.svelte"; + import ViewerActions from "$lib/components/sidebar/ViewerActions.svelte"; import { getCurrentUser } from "$lib/utils/permissions"; import { isOrg } from "$lib/api/accounts"; diff --git a/src/lib/components/sidebar/ViewerActions.svelte b/src/lib/components/sidebar/ViewerActions.svelte index 2afc6d3b4..7a221263f 100644 --- a/src/lib/components/sidebar/ViewerActions.svelte +++ b/src/lib/components/sidebar/ViewerActions.svelte @@ -9,6 +9,7 @@ Pencil16, Share16, Trash16, + Undo16, } from "svelte-octicons"; import Button from "$lib/components/common/Button.svelte"; @@ -26,7 +27,7 @@ import Share from "$lib/components/documents/Share.svelte"; import { getUpgradeUrl } from "$lib/api/accounts"; - import { pdfUrl } from "$lib/api/documents"; + import { pdfUrl, canonicalUrl } from "$lib/api/documents"; export let document: Document; export let user: User; @@ -41,6 +42,11 @@ $: organization = typeof user?.organization === "object" ? (user.organization as Org) : null; $: plan = organization?.plan ?? "Free"; + $: canonical = canonicalUrl(document); + $: legacy = new URL( + canonical.pathname, + "https://legacy.www.documentcloud.org", + );