11<script setup lang="ts">
2+ import { useIdle , useTimeoutFn } from ' @vueuse/core'
3+
24import Badge from ' @/components/Badge.vue'
35import IconButton from ' @/components/IconButton.vue'
46import Minus from ' @/components/icons/Minus.vue'
@@ -16,6 +18,8 @@ import { options, runtimeMode } from '@/ui/state'
1618useSelection ()
1719useKeyLock ()
1820
21+ const HINT_IDLE_MS = 10000
22+
1923function toggleMinimized() {
2024 options .value .minimized = ! options .value .minimized
2125}
@@ -56,6 +60,21 @@ const mcpBadgeActiveClass = computed(() =>
5660 isMcpConnected .value ? (selfActive .value ? ' tp-mcp-badge-active' : ' tp-mcp-badge-inactive' ) : null
5761)
5862
63+ const showHint = ref (true )
64+ const initialLock = ref (true )
65+ const { idle } = useIdle (HINT_IDLE_MS , {
66+ initialState: true
67+ })
68+
69+ watch (idle , (isIdle ) => {
70+ showHint .value = isIdle || initialLock .value
71+ })
72+
73+ useTimeoutFn (() => {
74+ initialLock .value = false
75+ showHint .value = idle .value
76+ }, 3000 )
77+
5978function activateMcp() {
6079 if (isMcpConnected .value ) {
6180 activate ()
@@ -64,7 +83,10 @@ function activateMcp() {
6483 </script >
6584
6685<template >
67- <Panel class =" tp-main" :class =" { 'tp-main-minimized': options.minimized }" >
86+ <Panel
87+ class =" tp-main"
88+ :class =" { 'tp-main-minimized': options.minimized, 'tp-main-hint': showHint }"
89+ >
6890 <template #header >
6991 <div class =" tp-row tp-gap-l" >
7092 <span >TemPad Dev</span >
@@ -108,14 +130,20 @@ function activateMcp() {
108130
109131<style scoped>
110132.tp-main {
111- transition : height 0.2s cubic-bezier (0.87 , 0 , 0.13 , 1 );
133+ transition :
134+ height 0.2s cubic-bezier (0.87 , 0 , 0.13 , 1 ),
135+ box-shadow 0.2s ease ;
112136}
113137
114138.tp-main-minimized {
115139 height : 41px ;
116140 border-bottom-width : 0 ;
117141}
118142
143+ .tp-main-hint {
144+ box-shadow : 0 0 0 4px color-mix(in srgb , currentColor 30% , var (--color-bg ) 30% );
145+ }
146+
119147.tp-main.tp-panel-dragging ,
120148.tp-main.tp-panel-resizing {
121149 transition : none ;
0 commit comments