Skip to content

Commit

Permalink
Merge pull request #891 from MuckRock/883-hide-actions-embeds
Browse files Browse the repository at this point in the history
Hide page actions on embeds
  • Loading branch information
eyeseast authored Nov 25, 2024
2 parents 0bf5531 + e09703e commit 7190ed2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/lib/components/viewer/Page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ Assumes it's a child of a ViewerContext
</a>
</h4>

<PageActions {document} {page_number} pageWidth={width} />
{#if !embed}
<PageActions {document} {page_number} pageWidth={width} />
{/if}
</header>
<slot {id} {href} {visible} {documentHref} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/viewer/Viewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Assumes it's a child of a ViewerContext
-->

<script lang="ts">
import { onMount } from "svelte";
import { SidebarExpand16 } from "svelte-octicons";
import Button from "$lib/components/common/Button.svelte";
Expand All @@ -31,7 +32,6 @@ Assumes it's a child of a ViewerContext
isEmbedded,
} from "./ViewerContext.svelte";
import LoadingToolbar from "./LoadingToolbar.svelte";
import { onMount } from "svelte";
const embed = isEmbedded();
const currentMode = getCurrentMode();
Expand Down

0 comments on commit 7190ed2

Please sign in to comment.