|
192 | 192 | v-for="app of computedApps" |
193 | 193 | :key="app.id" |
194 | 194 | class="flex relative flex-row gap-2 justify-between items-center p-2 my-0 backdrop-blur-xl backdrop-brightness-150 cursor-pointer generic-hover bg-neutral-800/20" |
195 | | - :class="{ 'bg-gradient-to-r from-yellow-600/20 bg-neutral-800/20': app.Source === 'custom' }" |
196 | | - @click="winboat.launchApp(app)" |
| 195 | + :class="{ |
| 196 | + 'bg-gradient-to-r from-yellow-600/20 bg-neutral-800/20': app.Source === 'custom', |
| 197 | + 'app-launching': launchingAppId === app.id, |
| 198 | + }" |
| 199 | + @click="handleLaunchApp(app)" |
197 | 200 | @contextmenu="openContextMenu($event, app)" |
198 | 201 | > |
199 | 202 | <div class="flex flex-row items-center gap-2 w-[85%]"> |
@@ -400,6 +403,16 @@ const customAppAddErrors = computed(() => { |
400 | 403 | return errors; |
401 | 404 | }); |
402 | 405 |
|
| 406 | +const launchingAppId = ref<string | null>(null); |
| 407 | +
|
| 408 | +function handleLaunchApp(app: WinApp) { |
| 409 | + launchingAppId.value = app.id!; |
| 410 | + winboat.launchApp(app); |
| 411 | + setTimeout(() => { |
| 412 | + launchingAppId.value = null; |
| 413 | + }, 1200); |
| 414 | +} |
| 415 | +
|
403 | 416 | const contextMenuRef = ref(); |
404 | 417 | const contextMenuTarget = ref<WinApp | null>(null); |
405 | 418 |
|
@@ -547,7 +560,30 @@ x-menu .qualifier { |
547 | 560 | display: none; |
548 | 561 | } |
549 | 562 |
|
550 | | -x-menu |
| 563 | +@keyframes launch-pulse { |
| 564 | + 0% { |
| 565 | + transform: scale(1); |
| 566 | + box-shadow: 0 0 0 0 rgba(167, 138, 249, 0); |
| 567 | + } |
| 568 | + 10% { |
| 569 | + transform: scale(0.97); |
| 570 | + } |
| 571 | + 30% { |
| 572 | + transform: scale(1); |
| 573 | + box-shadow: 0 0 14px 3px rgba(167, 138, 249, 0.4); |
| 574 | + } |
| 575 | + 65% { |
| 576 | + box-shadow: 0 0 20px 5px rgba(167, 138, 249, 0.15); |
| 577 | + } |
| 578 | + 100% { |
| 579 | + transform: scale(1); |
| 580 | + box-shadow: 0 0 0 0 rgba(167, 138, 249, 0); |
| 581 | + } |
| 582 | +} |
| 583 | +
|
| 584 | +.app-launching { |
| 585 | + animation: launch-pulse 1.2s ease-out; |
| 586 | +} |
551 | 587 |
|
552 | 588 | .apps-move, /* apply transition to moving elements */ |
553 | 589 | .apps-enter-active, |
|
0 commit comments