Separate Graphite header logo from menu bar

This commit is contained in:
Keavon Chambers 2021-06-25 00:38:32 -07:00
parent e551ba529f
commit 923e63c045
1 changed files with 8 additions and 5 deletions

View File

@ -1,5 +1,10 @@
<template> <template>
<div class="menu-bar-input"> <div class="menu-bar-input">
<div class="entry-container">
<div @click="handleLogoClick(entry)" class="entry">
<Icon :icon="'GraphiteLogo'" />
</div>
</div>
<div class="entry-container" v-for="entry in menuEntries" :key="entry"> <div class="entry-container" v-for="entry in menuEntries" :key="entry">
<div @click="handleEntryClick(entry)" class="entry" :class="{ open: entry.ref && entry.ref.isOpen() }" data-hover-menu-spawner> <div @click="handleEntryClick(entry)" class="entry" :class="{ open: entry.ref && entry.ref.isOpen() }" data-hover-menu-spawner>
<Icon :icon="entry.icon" v-if="entry.icon" /> <Icon :icon="entry.icon" v-if="entry.icon" />
@ -63,11 +68,6 @@ import { MenuDirection } from "../floating-menus/FloatingMenu.vue";
const wasm = import("../../../../wasm/pkg"); const wasm = import("../../../../wasm/pkg");
const menuEntries: MenuListEntries = [ const menuEntries: MenuListEntries = [
{
icon: "GraphiteLogo",
ref: undefined,
children: [[{ label: "Visit project GitHub…", action: () => window.open("https://github.com/GraphiteEditor/Graphite", "_blank") }]],
},
{ {
label: "File", label: "File",
ref: undefined, ref: undefined,
@ -148,6 +148,9 @@ export default defineComponent({
if (menuEntry.ref) menuEntry.ref.setOpen(); if (menuEntry.ref) menuEntry.ref.setOpen();
else throw new Error("The menu bar floating menu has no associated ref"); else throw new Error("The menu bar floating menu has no associated ref");
}, },
handleLogoClick() {
window.open("https://www.graphite.design", "_blank");
},
actionNotImplemented() { actionNotImplemented() {
alert("This action is not yet implemented"); alert("This action is not yet implemented");
}, },