update UI
This commit is contained in:
1 parent
041c2d033f
commit
3fe3ba63b9
3 files changed
+76
-74
No files matched your search
@@ -120,12 +120,12 @@ const submitFeedback = async () => {
|
||||
v-if="modelValue"
|
||||
class="fixed inset-0 z-[80] flex items-start justify-center overflow-y-auto bg-black/40 p-3 backdrop-blur-sm sm:items-center sm:p-4"
|
||||
>
|
||||
<div class="flex max-h-[92vh] w-full max-w-2xl flex-col rounded-2xl bg-white shadow-2xl">
|
||||
<div class="flex items-center justify-between border-b border-gray-100 px-5 pb-4 pt-5 sm:px-8 sm:pb-4 sm:pt-7">
|
||||
<h3 class="text-2xl font-bold text-gray-900">{{ t('feedback.title') }}</h3>
|
||||
<div class="flex max-h-[92vh] w-full max-w-2xl flex-col rounded-2xl border border-transparent bg-white shadow-2xl dark:border-slate-700 dark:bg-slate-900">
|
||||
<div class="flex items-center justify-between border-b border-gray-100 px-5 pb-4 pt-5 dark:border-slate-800 sm:px-8 sm:pb-4 sm:pt-7">
|
||||
<h3 class="text-2xl font-bold text-gray-900 dark:text-slate-100">{{ t('feedback.title') }}</h3>
|
||||
<button
|
||||
@click="closeDialog"
|
||||
class="rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600"
|
||||
class="rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:text-slate-500 dark:hover:bg-slate-800 dark:hover:text-slate-300"
|
||||
aria-label="Close"
|
||||
>
|
||||
<X class="h-5 w-5" />
|
||||
@@ -134,7 +134,7 @@ const submitFeedback = async () => {
|
||||
|
||||
<div class="space-y-5 overflow-y-auto px-5 py-5 sm:px-8">
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-sm font-semibold text-gray-600">{{ t('feedback.labels.type') }}</label>
|
||||
<label class="block text-sm font-semibold text-gray-600 dark:text-slate-400">{{ t('feedback.labels.type') }}</label>
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<button
|
||||
v-for="item in typeOptions"
|
||||
@@ -143,8 +143,8 @@ const submitFeedback = async () => {
|
||||
class="rounded-xl border px-4 py-2.5 text-base font-medium transition-colors"
|
||||
:class="
|
||||
selectedType === item
|
||||
? 'border-blue-500 bg-blue-50 text-blue-700'
|
||||
: 'border-gray-200 bg-gray-50 text-gray-700 hover:bg-gray-100'
|
||||
? 'border-blue-500 bg-blue-50 text-blue-700 dark:border-brand-500 dark:bg-brand-500/15 dark:text-brand-300'
|
||||
: 'border-gray-200 bg-gray-50 text-gray-700 hover:bg-gray-100 dark:border-slate-600 dark:bg-slate-800/80 dark:text-slate-300 dark:hover:border-slate-500 dark:hover:bg-slate-700/80'
|
||||
"
|
||||
>
|
||||
{{ item }}
|
||||
@@ -153,43 +153,43 @@ const submitFeedback = async () => {
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-sm font-semibold text-gray-600">{{ t('feedback.labels.module') }}</label>
|
||||
<label class="block text-sm font-semibold text-gray-600 dark:text-slate-400">{{ t('feedback.labels.module') }}</label>
|
||||
<select
|
||||
v-model="selectedModule"
|
||||
class="w-full rounded-xl border-gray-200 bg-gray-50 px-4 py-3 text-base shadow-sm outline-none transition-all focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-500/20"
|
||||
class="w-full rounded-xl border border-gray-200 bg-gray-50 px-4 py-3 text-base text-gray-900 shadow-sm outline-none transition-all focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-500/20 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-200 dark:focus:border-brand-500 dark:focus:bg-slate-800 dark:focus:ring-brand-500/20"
|
||||
>
|
||||
<option v-for="item in moduleOptions" :key="item" :value="item">{{ item }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-sm font-semibold text-gray-600">{{ t('feedback.labels.content') }}<span class="ml-0.5 text-red-500">*</span></label>
|
||||
<label class="block text-sm font-semibold text-gray-600 dark:text-slate-400">{{ t('feedback.labels.content') }}<span class="ml-0.5 text-red-500 dark:text-red-400">*</span></label>
|
||||
<textarea
|
||||
v-model="content"
|
||||
rows="5"
|
||||
maxlength="2000"
|
||||
class="w-full resize-none rounded-xl border-gray-200 bg-gray-50 px-4 py-3 text-base shadow-sm outline-none transition-all focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-500/20"
|
||||
class="w-full resize-none rounded-xl border border-gray-200 bg-gray-50 px-4 py-3 text-base text-gray-900 shadow-sm outline-none transition-all placeholder:text-gray-400 focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-500/20 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-200 dark:placeholder:text-slate-500 dark:focus:border-brand-500 dark:focus:bg-slate-800 dark:focus:ring-brand-500/20"
|
||||
:placeholder="t('feedback.placeholder.content')"
|
||||
/>
|
||||
<div class="mt-2 flex items-center justify-between">
|
||||
<div v-if="error" class="text-base text-red-600">{{ error }}</div>
|
||||
<div v-if="error" class="text-base text-red-600 dark:text-red-400">{{ error }}</div>
|
||||
<div v-else class="text-base text-gray-400"> </div>
|
||||
<div class="text-base text-gray-400">{{ content.length }}/2000</div>
|
||||
<div class="text-base text-gray-400 dark:text-slate-500">{{ content.length }}/2000</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-3 rounded-b-2xl border-t border-gray-100 bg-white px-5 py-4 sm:px-8">
|
||||
<div class="flex justify-end gap-3 rounded-b-2xl border-t border-gray-100 bg-white px-5 py-4 dark:border-slate-800 dark:bg-slate-900 sm:px-8">
|
||||
<button
|
||||
@click="closeDialog"
|
||||
class="rounded-xl px-5 py-2.5 text-base font-medium text-gray-600 transition-colors hover:bg-gray-100"
|
||||
class="rounded-xl px-5 py-2.5 text-base font-medium text-gray-600 transition-colors hover:bg-gray-100 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-200"
|
||||
:disabled="submitting"
|
||||
>
|
||||
{{ t('feedback.cancel') }}
|
||||
</button>
|
||||
<button
|
||||
@click="submitFeedback"
|
||||
class="inline-flex items-center justify-center gap-2 rounded-xl bg-blue-600 px-5 py-2.5 text-base font-medium text-white shadow-md shadow-blue-200 transition-all hover:bg-blue-700 active:scale-95 disabled:cursor-not-allowed disabled:opacity-70"
|
||||
class="inline-flex items-center justify-center gap-2 rounded-xl bg-blue-600 px-5 py-2.5 text-base font-medium text-white shadow-md shadow-blue-200 transition-all hover:bg-blue-700 active:scale-95 disabled:cursor-not-allowed disabled:opacity-70 dark:bg-brand-600 dark:shadow-none dark:hover:bg-brand-500"
|
||||
:disabled="!canSubmit"
|
||||
>
|
||||
<MessageSquareText class="h-5 w-5" />
|
||||
|
||||
@@ -26,21 +26,21 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mt-6 rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<div class="mt-6 rounded-2xl border border-slate-200 bg-white p-5 dark:border-slate-700 dark:bg-slate-800">
|
||||
<div class="mb-4 flex items-center justify-between">
|
||||
<h3 class="text-lg font-semibold text-slate-900">{{ t('scheduleRuns.title') }}</h3>
|
||||
<button class="rounded-lg border border-slate-300 px-3 py-1.5 text-sm text-slate-700 hover:bg-slate-50" @click="loadRuns">
|
||||
<h3 class="text-lg font-semibold text-slate-900 dark:text-slate-100">{{ t('scheduleRuns.title') }}</h3>
|
||||
<button class="rounded-lg border border-slate-300 px-3 py-1.5 text-sm text-slate-700 transition-colors hover:bg-slate-50 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-700" @click="loadRuns">
|
||||
{{ t('scheduleRuns.refresh') }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="mb-3 text-xs text-slate-500">{{ t('scheduleRuns.tip') }}</p>
|
||||
<div v-if="isLoading" class="py-6 text-sm text-slate-500">{{ t('scheduleRuns.loading') }}</div>
|
||||
<div v-else-if="error" class="py-6 text-sm text-rose-500">{{ error }}</div>
|
||||
<div v-else-if="runs.length === 0" class="py-6 text-sm text-slate-400">{{ t('scheduleRuns.empty') }}</div>
|
||||
<p class="mb-3 text-xs text-slate-500 dark:text-slate-400">{{ t('scheduleRuns.tip') }}</p>
|
||||
<div v-if="isLoading" class="py-6 text-sm text-slate-500 dark:text-slate-400">{{ t('scheduleRuns.loading') }}</div>
|
||||
<div v-else-if="error" class="py-6 text-sm text-rose-500 dark:text-rose-400">{{ error }}</div>
|
||||
<div v-else-if="runs.length === 0" class="py-6 text-sm text-slate-400 dark:text-slate-500">{{ t('scheduleRuns.empty') }}</div>
|
||||
<div v-else class="overflow-x-auto">
|
||||
<table class="w-full min-w-[920px] text-sm">
|
||||
<thead>
|
||||
<tr class="border-b border-slate-200 text-left text-slate-500">
|
||||
<tr class="border-b border-slate-200 text-left text-slate-500 dark:border-slate-700 dark:text-slate-400">
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.runNo') }}</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.schedule') }}</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.start') }}</th>
|
||||
@@ -53,7 +53,7 @@ onMounted(() => {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="run in runs" :key="run.id" class="border-b border-slate-100 text-slate-700">
|
||||
<tr v-for="run in runs" :key="run.id" class="border-b border-slate-100 text-slate-700 dark:border-slate-700 dark:text-slate-300">
|
||||
<td class="px-2 py-2">{{ run.run_no }}</td>
|
||||
<td class="px-2 py-2">{{ run.schedule_name || '-' }}</td>
|
||||
<td class="px-2 py-2">{{ run.started_at || '-' }}</td>
|
||||
@@ -63,7 +63,7 @@ onMounted(() => {
|
||||
<td class="px-2 py-2">{{ run.success_count }}</td>
|
||||
<td class="px-2 py-2">{{ run.failed_count }}</td>
|
||||
<td class="px-2 py-2">
|
||||
<a class="text-brand-600 hover:underline" :href="workspaceRunExcelUrl(run.id)" target="_blank">{{ t('scheduleRuns.viewExcel') }}</a>
|
||||
<a class="text-brand-600 hover:underline dark:text-brand-400" :href="workspaceRunExcelUrl(run.id)" target="_blank">{{ t('scheduleRuns.viewExcel') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in new issue
Block a user