[FEAT] More menu and UI enhancements
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<div class="flex items-center gap-3 mr-2">
|
||||
<div class="flex items-center gap-2 group">
|
||||
<div class="flex items-center gap-3">
|
||||
<div v-if="isEditorActive" class="flex items-center gap-2 group">
|
||||
<div class="text-right hidden lg:block">
|
||||
<p class="text-[10px] uppercase tracking-wider font-bold text-gray-400 dark:text-gray-500 mb-[-2px]">Current Project</p>
|
||||
<button @click="$emit('open-save-modal')" class="text-sm font-bold text-gray-800 dark:text-gray-200 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors truncate max-w-[160px]" title="Rename Project">
|
||||
{{ projectStore.currentProject?.name || 'Untitled Project' }}
|
||||
</button>
|
||||
<Tooltip text="Rename project">
|
||||
<button @click="$emit('open-save-modal')" class="text-sm font-bold text-gray-800 dark:text-gray-200 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors truncate max-w-[160px]">
|
||||
{{ projectStore.currentProject?.name || 'Untitled project' }}
|
||||
</button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<!-- Mobile/Tablet simplified view -->
|
||||
@@ -14,26 +16,38 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="h-8 w-px bg-gray-200 dark:bg-gray-700 mx-1"></div>
|
||||
<div v-if="isEditorActive" class="h-8 w-px bg-gray-200 dark:bg-gray-700 mx-1"></div>
|
||||
|
||||
<div class="flex items-center gap-1">
|
||||
<button @click="$emit('open-save-modal')" class="w-8 h-8 rounded-lg flex items-center justify-center text-gray-500 hover:text-indigo-600 hover:bg-indigo-50 dark:hover:bg-indigo-900/30 transition-all" title="Save Project">
|
||||
<i class="fas fa-save"></i>
|
||||
</button>
|
||||
<button @click="$emit('open-new-project-modal')" class="w-8 h-8 rounded-lg flex items-center justify-center text-gray-500 hover:text-indigo-600 hover:bg-indigo-50 dark:hover:bg-indigo-900/30 transition-all" title="New Project">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
<button @click="$emit('open-project-list')" class="w-8 h-8 rounded-lg flex items-center justify-center text-gray-500 hover:text-indigo-600 hover:bg-indigo-50 dark:hover:bg-indigo-900/30 transition-all" title="My Projects">
|
||||
<i class="fas fa-folder-open"></i>
|
||||
</button>
|
||||
<Tooltip v-if="isEditorActive" text="Save project">
|
||||
<button @click="$emit('open-save-modal')" class="w-8 h-8 rounded-lg flex items-center justify-center text-gray-500 hover:text-indigo-600 hover:bg-indigo-50 dark:hover:bg-indigo-900/30 transition-all">
|
||||
<i class="fas fa-save"></i>
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip text="New project">
|
||||
<button @click="$emit('open-new-project-modal')" class="w-8 h-8 rounded-lg flex items-center justify-center text-gray-500 hover:text-indigo-600 hover:bg-indigo-50 dark:hover:bg-indigo-900/30 transition-all">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip text="My projects">
|
||||
<button @click="$emit('open-project-list')" class="w-8 h-8 rounded-lg flex items-center justify-center text-gray-500 hover:text-indigo-600 hover:bg-indigo-50 dark:hover:bg-indigo-900/30 transition-all">
|
||||
<i class="fas fa-folder-open"></i>
|
||||
</button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useProjectStore } from '@/stores/useProjectStore';
|
||||
import { useProjectManager } from '@/composables/useProjectManager';
|
||||
import Tooltip from '@/components/utilities/Tooltip.vue';
|
||||
|
||||
defineEmits(['open-save-modal', 'open-project-list', 'open-new-project-modal']);
|
||||
|
||||
const projectStore = useProjectStore();
|
||||
const { isEditorActive } = useProjectManager();
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user