feat(ui): add interactive App Launcher and Setup dropdowns; move Flow Builder and Object Manager to Settings
Some checks failed
Build, Test, and Deploy / build-and-deploy (push) Failing after 38s

This commit is contained in:
Goose 2026-09-27 02:57:40 +00:00
parent 7c2f46d697
commit e746a8d090
2 changed files with 138 additions and 20 deletions

View file

@ -1,23 +1,51 @@
<template> <template>
<header class="bg-white border-b border-slate-200 h-12 flex items-center justify-between px-4 z-20 shrink-0"> <header class="bg-white border-b border-slate-200 h-12 flex items-center justify-between px-4 z-20 shrink-0 relative">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<!-- App Launcher 3x3 dots --> <!-- App Launcher 3x3 dots -->
<button class="p-1.5 hover:bg-slate-100 rounded text-slate-600 transition" title="App Launcher"> <div class="relative">
<svg class="w-5 h-5 fill-current" viewBox="0 0 20 20"> <button
<circle cx="4" cy="4" r="2" /> @click="toggleAppLauncher"
<circle cx="10" cy="4" r="2" /> class="p-1.5 hover:bg-slate-100 rounded text-slate-600 transition cursor-pointer"
<circle cx="16" cy="4" r="2" /> title="App Launcher"
<circle cx="4" cy="10" r="2" /> >
<circle cx="10" cy="10" r="2" /> <svg class="w-5 h-5 fill-current" viewBox="0 0 20 20">
<circle cx="16" cy="10" r="2" /> <circle cx="4" cy="4" r="2" />
<circle cx="4" cy="16" r="2" /> <circle cx="10" cy="4" r="2" />
<circle cx="10" cy="16" r="2" /> <circle cx="16" cy="4" r="2" />
<circle cx="16" cy="16" r="2" /> <circle cx="4" cy="10" r="2" />
</svg> <circle cx="10" cy="10" r="2" />
</button> <circle cx="16" cy="10" r="2" />
<circle cx="4" cy="16" r="2" />
<circle cx="10" cy="16" r="2" />
<circle cx="16" cy="16" r="2" />
</svg>
</button>
<!-- App Launcher Dropdown -->
<div
v-if="showAppLauncher"
class="absolute left-0 mt-2 w-80 bg-white rounded-lg shadow-xl border border-slate-200 py-3 px-3 z-50 animate-in fade-in slide-in-from-top-1 duration-150"
>
<div class="text-xs font-bold text-slate-700 uppercase tracking-wider px-2 mb-2">
App Launcher
</div>
<div class="grid grid-cols-2 gap-2">
<button
v-for="app in apps"
:key="app.id"
@click="selectApp(app.id)"
class="flex flex-col items-start p-2.5 rounded-lg hover:bg-slate-50 transition border border-transparent hover:border-slate-200 text-left cursor-pointer"
>
<span class="text-lg mb-1">{{ app.icon }}</span>
<span class="text-xs font-semibold text-slate-800">{{ app.name }}</span>
<span class="text-[10px] text-slate-500 line-clamp-1">{{ app.desc }}</span>
</button>
</div>
</div>
</div>
<!-- Logo & Title --> <!-- Logo & Title -->
<div class="flex items-center gap-2"> <div class="flex items-center gap-2 cursor-pointer" @click="crmStore.setActiveTab('leads')">
<div class="w-7 h-7 bg-brand-500 rounded flex items-center justify-center text-white font-bold text-sm shadow-sm"> <div class="w-7 h-7 bg-brand-500 rounded flex items-center justify-center text-white font-bold text-sm shadow-sm">
⚡ ⚡
</div> </div>
@ -43,9 +71,47 @@
<!-- Utilities / User Avatar --> <!-- Utilities / User Avatar -->
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<button class="p-1 text-slate-500 hover:text-slate-700" title="Setup & Setup Automation"> <!-- Settings Menu -->
⚙️ <div class="relative">
</button> <button
@click="toggleSettings"
class="p-1 text-slate-500 hover:text-slate-700 transition cursor-pointer"
title="Setup & Settings"
>
⚙️
</button>
<!-- Settings Dropdown -->
<div
v-if="showSettings"
class="absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-xl border border-slate-200 py-2 z-50 animate-in fade-in slide-in-from-top-1 duration-150"
>
<div class="px-3 py-1.5 border-b border-slate-100 text-xs font-bold text-slate-700 uppercase tracking-wider">
Platform Setup
</div>
<button
@click="selectSetting('custom_objects')"
class="w-full flex items-center gap-2.5 px-3 py-2 text-left hover:bg-slate-50 transition text-xs text-slate-700 cursor-pointer"
>
<span class="text-base">🧩</span>
<div>
<div class="font-semibold text-slate-800">Object Manager</div>
<div class="text-[10px] text-slate-500">Custom objects, fields & schemas</div>
</div>
</button>
<button
@click="selectSetting('flows')"
class="w-full flex items-center gap-2.5 px-3 py-2 text-left hover:bg-slate-50 transition text-xs text-slate-700 cursor-pointer"
>
<span class="text-base">⚡</span>
<div>
<div class="font-semibold text-slate-800">Flow Builder & Automation</div>
<div class="text-[10px] text-slate-500">Visual DAG editor, rules & triggers</div>
</div>
</button>
</div>
</div>
<button class="p-1 text-slate-500 hover:text-slate-700" title="Notifications"> <button class="p-1 text-slate-500 hover:text-slate-700" title="Notifications">
🔔 🔔
</button> </button>
@ -55,3 +121,57 @@
</div> </div>
</header> </header>
</template> </template>
<script setup>
import { ref, onMounted, onUnmounted } from 'vue'
import { useCrmStore } from '../stores/crm'
const crmStore = useCrmStore()
const showAppLauncher = ref(false)
const showSettings = ref(false)
const apps = [
{ id: 'leads', name: 'Sales Cloud', desc: 'Leads, Opportunities & Accounts', icon: '💼' },
{ id: 'outreach', name: 'Marketing & Campaigns', desc: 'Email templates & tracking', icon: '✉️' },
{ id: 'tasks', name: 'Service & Activities', desc: 'Tasks, calls & follow-ups', icon: '✅' },
{ id: 'custom_objects', name: 'Object Manager', desc: 'Custom schema metamodel', icon: '🧩' },
{ id: 'flows', name: 'Flow Automation', desc: 'Visual DAG workflow editor', icon: '⚡' },
]
function toggleAppLauncher() {
showAppLauncher.value = !showAppLauncher.value
if (showAppLauncher.value) showSettings.value = false
}
function toggleSettings() {
showSettings.value = !showSettings.value
if (showSettings.value) showAppLauncher.value = false
}
function selectApp(tabId) {
crmStore.setActiveTab(tabId)
showAppLauncher.value = false
}
function selectSetting(tabId) {
crmStore.setActiveTab(tabId)
showSettings.value = false
}
function handleClickOutside(event) {
const target = event.target
if (!target.closest('header')) {
showAppLauncher.value = false
showSettings.value = false
}
}
onMounted(() => {
window.addEventListener('click', handleClickOutside)
})
onUnmounted(() => {
window.removeEventListener('click', handleClickOutside)
})
</script>

View file

@ -28,8 +28,6 @@ const tabs = [
{ id: 'contacts', label: 'Contacts', icon: '👤' }, { id: 'contacts', label: 'Contacts', icon: '👤' },
{ id: 'accounts', label: 'Accounts', icon: '🏢' }, { id: 'accounts', label: 'Accounts', icon: '🏢' },
{ id: 'tasks', label: 'Tasks & Activities', icon: '✅' }, { id: 'tasks', label: 'Tasks & Activities', icon: '✅' },
{ id: 'custom_objects', label: 'Custom Objects Engine', icon: '🧩' },
{ id: 'flows', label: 'Visual Flow Editor', icon: '⚡' },
{ id: 'outreach', label: 'Outreach & Campaigns', icon: '✉️' }, { id: 'outreach', label: 'Outreach & Campaigns', icon: '✉️' },
] ]
</script> </script>