1
1
<script lang="ts" setup>
2
2
import { ref , computed } from ' vue'
3
3
import { useHead } from ' @vueuse/head'
4
+ import Tooltip from ' ../../../components/Dashboard/Tooltip.vue'
4
5
// import { useToast } from '../../../../../../composables/useToast'
5
6
6
7
// Set page title
@@ -12,6 +13,7 @@ useHead({
12
13
const activeTab = ref (' active' ) // 'active' or 'resolved'
13
14
const selectedEnvironment = ref (' all' ) // 'all', 'production', or 'staging'
14
15
const isAiAnalyzing = ref (false )
16
+ const isDark = ref (false ) // You might want to use useDark() from @vueuse/core instead
15
17
16
18
interface ErrorStats {
17
19
total: number
@@ -359,45 +361,53 @@ const analyzeWithAI = async (errorId: string) => {
359
361
<td class =" relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6" >
360
362
<div class =" inline-flex rounded-md shadow-sm" role =" group" >
361
363
<template v-if =" activeTab === ' active' " >
364
+ <Tooltip text =" Mark as resolved" position =" top" :dark =" isDark" :usePortal =" true" >
365
+ <button
366
+ @click =" resolveError(error.id)"
367
+ type =" button"
368
+ class =" relative inline-flex items-center rounded-l-md px-3 py-2 text-sm font-semibold text-gray-600 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 hover:text-green-600 focus:z-10 dark:text-gray-400 dark:ring-gray-600 dark:hover:bg-gray-700 dark:hover:text-green-400"
369
+ aria-label =" Mark error as resolved"
370
+ >
371
+ <div class =" i-hugeicons-checkmark-circle-02 h-4 w-4" />
372
+ </button >
373
+ </Tooltip >
374
+ <Tooltip text =" Analyze with AI" position =" top" :dark =" isDark" :usePortal =" true" >
375
+ <button
376
+ @click =" analyzeWithAI(error.id)"
377
+ type =" button"
378
+ :class =" [
379
+ 'relative -ml-px inline-flex items-center px-3 py-2 text-sm font-semibold ring-1 ring-inset ring-gray-300 hover:bg-gray-50 hover:text-purple-600 focus:z-10 dark:ring-gray-600 dark:hover:bg-gray-700 dark:hover:text-purple-400',
380
+ isAiAnalyzing ? 'text-gray-400 cursor-not-allowed' : 'text-gray-600 dark:text-gray-400'
381
+ ]"
382
+ :disabled =" isAiAnalyzing"
383
+ aria-label =" Analyze error with AI"
384
+ >
385
+ <div :class =" [
386
+ 'h-4 w-4',
387
+ isAiAnalyzing ? 'i-hugeicons-arrow-path animate-spin' : 'i-hugeicons-sparkles'
388
+ ]" />
389
+ </button >
390
+ </Tooltip >
391
+ </template >
392
+ <Tooltip text =" Share error details" position =" top" :dark =" isDark" :usePortal =" true" >
362
393
<button
363
- @click =" resolveError(error.id)"
364
394
type =" button"
365
- class =" relative inline-flex items-center rounded-l-md px-3 py-2 text-sm font-semibold text-gray-600 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 hover:text-green-600 focus:z-10 dark:text-gray-400 dark:ring-gray-600 dark:hover:bg-gray-700 dark:hover:text-green-400"
366
- aria-label =" Mark error as resolved"
395
+ class =" relative -ml-px inline-flex items-center px-3 py-2 text-sm font-semibold text-gray-600 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 hover:text-blue-600 focus:z-10 dark:text-gray-400 dark:ring-gray-600 dark:hover:bg-gray-700 dark:hover:text-blue-400"
396
+ :class =" { 'rounded-l-md': activeTab === 'resolved' }"
397
+ aria-label =" Share error details"
367
398
>
368
- <div class =" i-hugeicons-checkmark-circle-02 h-4 w-4" />
399
+ <div class =" i-hugeicons-share-01 h-4 w-4" />
369
400
</button >
401
+ </Tooltip >
402
+ <Tooltip text =" View error details" position =" top" :dark =" isDark" :usePortal =" true" >
370
403
<button
371
- @click =" analyzeWithAI(error.id)"
372
404
type =" button"
373
- :class =" [
374
- 'relative -ml-px inline-flex items-center px-3 py-2 text-sm font-semibold ring-1 ring-inset ring-gray-300 hover:bg-gray-50 hover:text-purple-600 focus:z-10 dark:ring-gray-600 dark:hover:bg-gray-700 dark:hover:text-purple-400',
375
- isAiAnalyzing ? 'text-gray-400 cursor-not-allowed' : 'text-gray-600 dark:text-gray-400'
376
- ]"
377
- :disabled =" isAiAnalyzing"
378
- aria-label =" Analyze error with AI"
405
+ class =" relative -ml-px inline-flex items-center rounded-r-md px-3 py-2 text-sm font-semibold text-gray-600 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 hover:text-indigo-600 focus:z-10 dark:text-gray-400 dark:ring-gray-600 dark:hover:bg-gray-700 dark:hover:text-indigo-400"
406
+ aria-label =" View error details"
379
407
>
380
- <div :class =" [
381
- 'h-4 w-4',
382
- isAiAnalyzing ? 'i-hugeicons-arrow-path animate-spin' : 'i-hugeicons-sparkles'
383
- ]" />
408
+ <div class =" i-hugeicons-view h-4 w-4" />
384
409
</button >
385
- </template >
386
- <button
387
- type =" button"
388
- class =" relative -ml-px inline-flex items-center px-3 py-2 text-sm font-semibold text-gray-600 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 hover:text-blue-600 focus:z-10 dark:text-gray-400 dark:ring-gray-600 dark:hover:bg-gray-700 dark:hover:text-blue-400"
389
- :class =" { 'rounded-l-md': activeTab === 'resolved' }"
390
- aria-label =" Share error details"
391
- >
392
- <div class =" i-hugeicons-share h-4 w-4" />
393
- </button >
394
- <button
395
- type =" button"
396
- class =" relative -ml-px inline-flex items-center rounded-r-md px-3 py-2 text-sm font-semibold text-gray-600 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 hover:text-indigo-600 focus:z-10 dark:text-gray-400 dark:ring-gray-600 dark:hover:bg-gray-700 dark:hover:text-indigo-400"
397
- aria-label =" View error details"
398
- >
399
- <div class =" i-hugeicons-eye h-4 w-4" />
400
- </button >
410
+ </Tooltip >
401
411
</div >
402
412
</td >
403
413
</tr >
0 commit comments