Skip to content
Open

WIP #14

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
13 changes: 12 additions & 1 deletion components/TheToolbar.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<script setup lang="ts">
import { useEditorState } from '~/composables/useEditorState';
import { useDiagramStore } from '~/composables/useDiagramStore';
import { Download, Share2, Copy, Check, Plus, PanelLeft, Palette, X, ChevronDown, Image as ImageIcon, Info } from 'lucide-vue-next';
import { useTutorial } from '~/composables/useTutorial';
import { Download, Share2, Copy, Check, Plus, PanelLeft, Palette, X, ChevronDown, Image as ImageIcon, Info, GraduationCap } from 'lucide-vue-next';
import TheTooltip from '~/components/TheTooltip.vue';
import { onClickOutside, onKeyStroke } from '@vueuse/core';
import { track } from '@plausible-analytics/tracker';

const { themes, themeId, currentTheme, currentSvg, isInfoOpen, isShareOpen, isWelcomeOpen, isThemeSwitcherOpen } = useEditorState();
const { isSidebarOpen } = useDiagramStore();
const { isTutorialActive, startTutorial, stopTutorial } = useTutorial();

// Close theme switcher when clicking outside
const themeDropdownRef = ref(null);
Expand Down Expand Up @@ -354,6 +356,15 @@ const getPillStyle = (theme: any, isActive: boolean) => ({
</button>
</TheTooltip>

<!-- Tutorial -->
<TheTooltip text="Interactive Tutorial">
<button class="icon-btn" title="Tutorial Mode"
@click="isTutorialActive ? stopTutorial() : startTutorial(); track('Toggle', { props: { target: 'tutorial' } })"
:class="{ active: isTutorialActive }" id="btn-tutorial">
<GraduationCap :size="16" />
</button>
</TheTooltip>

<!-- Export Menu -->
<div class="relative" ref="exportDropdownRef">
<div class="export-button-group">
Expand Down
Loading