mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
rewrite notification table
This commit is contained in:
@@ -39,8 +39,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import {
|
||||
getCoreRowModel,
|
||||
getFilteredRowModel,
|
||||
@@ -49,6 +47,8 @@
|
||||
useVueTable
|
||||
} from '@tanstack/vue-table';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
TooltipProvider,
|
||||
TooltipTrigger
|
||||
} from '../../components/ui/tooltip';
|
||||
import { ArrowUpDown, X } from 'lucide-vue-next';
|
||||
import { ArrowUpDown } from 'lucide-vue-next';
|
||||
import { storeToRefs } from 'pinia';
|
||||
|
||||
import { formatDateFilter } from '../../shared/utils';
|
||||
@@ -129,29 +129,24 @@ export const createColumns = ({ onDelete, onDeletePrompt }) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (shiftHeld.value) {
|
||||
return (
|
||||
<div class="flex justify-end">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
class="h-6 text-destructive"
|
||||
onClick={() => onDelete(original)}
|
||||
>
|
||||
<X />
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div class="flex justify-end">
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex h-6 items-center justify-center text-muted-foreground hover:text-foreground"
|
||||
onClick={() => onDeletePrompt(original)}
|
||||
onClick={() =>
|
||||
shiftHeld.value
|
||||
? onDelete(original)
|
||||
: onDeletePrompt(original)
|
||||
}
|
||||
>
|
||||
<i class="ri-delete-bin-line" />
|
||||
<i
|
||||
class={
|
||||
shiftHeld.value
|
||||
? 'ri-close-line text-red-600'
|
||||
: 'ri-delete-bin-line'
|
||||
}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user