Fix design file metadata mapping in files store
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -91,15 +91,16 @@ export const useFilesStore = defineStore('filesStore', {
|
||||
*/
|
||||
async fetchAllFiles() {
|
||||
const api = '/api/files';
|
||||
let icon = '';
|
||||
let fileType = '';
|
||||
let parentLog = '';
|
||||
|
||||
try {
|
||||
const response = await apiClient.get(api);
|
||||
|
||||
this.allEventFiles = response.data;
|
||||
this.allEventFiles.forEach(o => {
|
||||
let icon = '';
|
||||
let fileType = '';
|
||||
let parentLog = o.name;
|
||||
|
||||
switch (o.type) {
|
||||
case 'log':
|
||||
icon = 'work_history';
|
||||
@@ -119,6 +120,8 @@ export const useFilesStore = defineStore('filesStore', {
|
||||
break;
|
||||
case 'design':
|
||||
icon = 'shape_line';
|
||||
fileType = 'Design';
|
||||
parentLog = o.name;
|
||||
break;
|
||||
}
|
||||
o.icon = icon;
|
||||
|
||||
Reference in New Issue
Block a user