Skip to content

Commit 6fe0bbf

Browse files
committed
chore: wip
chore: wip
1 parent d5efd82 commit 6fe0bbf

File tree

1 file changed

+41
-31
lines changed
  • storage/framework/defaults/views/dashboard/errors

1 file changed

+41
-31
lines changed

storage/framework/defaults/views/dashboard/errors/index.vue

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts" setup>
22
import { ref, computed } from 'vue'
33
import { useHead } from '@vueuse/head'
4+
import Tooltip from '../../../components/Dashboard/Tooltip.vue'
45
// import { useToast } from '../../../../../../composables/useToast'
56
67
// Set page title
@@ -12,6 +13,7 @@ useHead({
1213
const activeTab = ref('active') // 'active' or 'resolved'
1314
const selectedEnvironment = ref('all') // 'all', 'production', or 'staging'
1415
const isAiAnalyzing = ref(false)
16+
const isDark = ref(false) // You might want to use useDark() from @vueuse/core instead
1517
1618
interface ErrorStats {
1719
total: number
@@ -359,45 +361,53 @@ const analyzeWithAI = async (errorId: string) => {
359361
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
360362
<div class="inline-flex rounded-md shadow-sm" role="group">
361363
<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">
362393
<button
363-
@click="resolveError(error.id)"
364394
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"
367398
>
368-
<div class="i-hugeicons-checkmark-circle-02 h-4 w-4" />
399+
<div class="i-hugeicons-share-01 h-4 w-4" />
369400
</button>
401+
</Tooltip>
402+
<Tooltip text="View error details" position="top" :dark="isDark" :usePortal="true">
370403
<button
371-
@click="analyzeWithAI(error.id)"
372404
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"
379407
>
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" />
384409
</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>
401411
</div>
402412
</td>
403413
</tr>

0 commit comments

Comments
 (0)