modify ui
This commit is contained in:
@@ -44,8 +44,11 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
const logs = ref<{ timestamp: string; type: 'request' | 'response' | 'error'; content: any }[]>([]);
|
||||
|
||||
const addLog = (type: 'request' | 'response' | 'error', content: any) => {
|
||||
const now = new Date();
|
||||
const timestamp = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`;
|
||||
|
||||
logs.value.unshift({
|
||||
timestamp: new Date().toLocaleTimeString(),
|
||||
timestamp,
|
||||
type,
|
||||
content
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user