Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

details -> citations #28

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
6 changes: 3 additions & 3 deletions src/lib/components/ContentContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Iframe from "$lib/components/Iframe.svelte";
import Gallery from "$lib/components/Gallery.svelte";
import Details from "$lib/components/Details.svelte";
import Citations from "$lib/components/Citations.svelte";
import DropZone from "$lib/components/DropZone.svelte";
import UrlInput from "$lib/components/UrlInput.svelte";
import Provenance from "$lib/components/Provenance.svelte";
Expand Down Expand Up @@ -68,11 +68,11 @@
{/if}
{#if $readerModel.rawSrc}
<div
class={$url.pathname.replaceAll("/", "") === "details" && $loading.status !== "LOADING"
class={$url.pathname.replaceAll("/", "") === "citations" && $loading.status !== "LOADING"
? "tab"
: "hidden-tab"}
>
<Details />
<Citations />
</div>
<!-- Extra class baggage to make this tab fullscreen -->
<div
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/NavButtons.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
{#if $readerModel.rawSrc}
<li>
<button
class={$url.pathname.replaceAll("/", "") === "details" ? "selected-nav-button nav-button" : "nav-button"}
on:click={() => (history.pushState({}, "", "/details/"+window.location.search))}
class={$url.pathname.replaceAll("/", "") === "citations" ? "selected-nav-button nav-button" : "nav-button"}
on:click={() => (history.pushState({}, "", "/citations/"+window.location.search))}
>
Details
Citations
</button>
</li>
<li>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/models/readerModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ class ReaderModel {

_getTab() {
// If we have an index path we are a visualization and auto redirect to that
// tab otherwise we are an artifact and auto redirect to the details tab
return this.indexPath ? "visualization" : "details";
// tab otherwise we are an artifact and auto redirect to the citations tab
return this.indexPath ? "visualization" : "citations";
}

async _getRemoteFile(url: string): Promise<Blob> {
Expand Down
Loading