style(logs): translate cleanup categories to Chinese and optimize log detail mobile layout
This commit is contained in:
@@ -201,7 +201,20 @@ func (s *AppLogService) CleanUp() {
|
|||||||
catTotal := daysDeleted + countDeleted
|
catTotal := daysDeleted + countDeleted
|
||||||
if catTotal > 0 {
|
if catTotal > 0 {
|
||||||
totalDeleted += catTotal
|
totalDeleted += catTotal
|
||||||
summaryBuilder.WriteString(fmt.Sprintf("分类 [%s]: 过期清理 %d 条,溢出限制清理 %d 条;\n", cat, daysDeleted, countDeleted))
|
var catLabel string
|
||||||
|
switch cat {
|
||||||
|
case constant.LogCategorySystemNotice:
|
||||||
|
catLabel = "系统通知"
|
||||||
|
case constant.LogCategoryPushLog:
|
||||||
|
catLabel = "推送日志"
|
||||||
|
case constant.LogCategoryLoginLog:
|
||||||
|
catLabel = "登录日志"
|
||||||
|
case constant.LogCategorySchedulerLog:
|
||||||
|
catLabel = "调度日志"
|
||||||
|
default:
|
||||||
|
catLabel = cat
|
||||||
|
}
|
||||||
|
summaryBuilder.WriteString(fmt.Sprintf("分类 [%s]: 过期清理 %d 条,溢出限制清理 %d 条;\n", catLabel, daysDeleted, countDeleted))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ function onDialogClose(open: boolean) {
|
|||||||
<span>{{ selectedLog.level === LOG_LEVEL.INFO ? '信息' : selectedLog.level === LOG_LEVEL.WARNING ? '警告' : '错误' }}</span>
|
<span>{{ selectedLog.level === LOG_LEVEL.INFO ? '信息' : selectedLog.level === LOG_LEVEL.WARNING ? '警告' : '错误' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</Badge>
|
</Badge>
|
||||||
<span class="text-[10px] text-muted-foreground font-mono">{{ selectedLog ? formatDate(selectedLog.created_at) : '-' }}</span>
|
<span class="hidden sm:inline text-[10px] text-muted-foreground font-mono">{{ selectedLog ? formatDate(selectedLog.created_at) : '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -289,6 +289,11 @@ function onDialogClose(open: boolean) {
|
|||||||
{{ detailDialogProps.error }}
|
{{ detailDialogProps.error }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 移动端/小屏下在右下角展示时间 -->
|
||||||
|
<div v-if="selectedLog" class="sm:hidden flex justify-end text-[10px] text-muted-foreground font-mono opacity-80 pt-1">
|
||||||
|
{{ formatDate(selectedLog.created_at) }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</BaihuDialog>
|
</BaihuDialog>
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ function onDialogClose(open: boolean) {
|
|||||||
<span>{{ selectedLog.level === LOG_LEVEL.INFO ? '信息' : selectedLog.level === LOG_LEVEL.WARNING ? '警告' : '错误' }}</span>
|
<span>{{ selectedLog.level === LOG_LEVEL.INFO ? '信息' : selectedLog.level === LOG_LEVEL.WARNING ? '警告' : '错误' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</Badge>
|
</Badge>
|
||||||
<span class="text-[10px] text-muted-foreground font-mono">{{ selectedLog ? formatDate(selectedLog.created_at) : '-' }}</span>
|
<span class="hidden sm:inline text-[10px] text-muted-foreground font-mono">{{ selectedLog ? formatDate(selectedLog.created_at) : '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -289,6 +289,11 @@ function onDialogClose(open: boolean) {
|
|||||||
{{ detailDialogProps.error }}
|
{{ detailDialogProps.error }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 移动端/小屏下在右下角展示时间 -->
|
||||||
|
<div v-if="selectedLog" class="sm:hidden flex justify-end text-[10px] text-muted-foreground font-mono opacity-80 pt-1">
|
||||||
|
{{ formatDate(selectedLog.created_at) }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</BaihuDialog>
|
</BaihuDialog>
|
||||||
|
|||||||
Reference in New Issue
Block a user