Skip to content

Commit

Permalink
Link to OC page on Token Terminal from main menu (#6665)
Browse files Browse the repository at this point in the history
  • Loading branch information
megrogan authored Oct 24, 2024
1 parent 02f2dfe commit 988b400
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/app/src/components/MenuItem.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
export let href: string | undefined = undefined;
export let disabled: boolean = false;
export let selected: boolean = false;
export let warning: boolean = false;
Expand All @@ -16,7 +17,10 @@
{:else if separator}
<hr class="separator" />
{:else}
<div
<a
{href}
target="_blank"
rel="noreferrer"
class:unpadded
tabindex="0"
class="menu-item"
Expand All @@ -28,7 +32,7 @@
<slot name="icon" />
</span>
<slot name="text" />
</div>
</a>
{/if}

<style lang="scss">
Expand Down
5 changes: 5 additions & 0 deletions frontend/app/src/components/home/nav/MainMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import AccountSettings from "svelte-material-icons/AccountSettingsOutline.svelte";
import CogOutline from "svelte-material-icons/CogOutline.svelte";
import Home from "svelte-material-icons/Home.svelte";
import ChartLine from "svelte-material-icons/ChartLine.svelte";
import Road from "svelte-material-icons/RoadVariant.svelte";
import Note from "svelte-material-icons/NoteTextOutline.svelte";
import Graph from "svelte-material-icons/GraphOutline.svelte";
Expand Down Expand Up @@ -84,6 +85,10 @@
<Security size={$iconSize} color={"var(--icon-inverted-txt)"} slot="icon" />
<span slot="text">Guidelines</span>
</MenuItem>
<MenuItem href="https://tokenterminal.com/terminal/projects/openchat">
<ChartLine size={$iconSize} color={"var(--icon-inverted-txt)"} slot="icon" />
<span slot="text">Metrics</span>
</MenuItem>
{#if admin}
<MenuItem separator />
<MenuItem on:click={() => page("/admin")}>
Expand Down

0 comments on commit 988b400

Please sign in to comment.