sonar 58 left

This commit is contained in:
Cindy Chang
2024-08-01 16:06:30 +08:00
parent a426f22db0
commit a33eaa3a41
3 changed files with 10 additions and 9 deletions

View File

@@ -132,7 +132,9 @@ export async function leaveFilter(next, addFilterId, toPath, logOut) {
// console.log("PageAdminStore.activePage", PageAdminStore.activePage); // console.log("PageAdminStore.activePage", PageAdminStore.activePage);
pageAdminStore.keepPreviousPage(); pageAdminStore.keepPreviousPage();
logOut ? null : next(false); if(!logOut){
next(false);
};
} }
}; };
@@ -209,7 +211,9 @@ export async function leaveConformance(next, addConformanceCreateCheckId, toPath
conformanceStore.conformanceLogTempCheckId = null; conformanceStore.conformanceLogTempCheckId = null;
logOut ? logOut() : next(toPath); logOut ? logOut() : next(toPath);
} else if(result.dismiss === 'backdrop') { } else if(result.dismiss === 'backdrop') {
logOut ? null : next(false); if(!logOut){
next(false);
}
} }
}; };
/** /**
@@ -403,8 +407,7 @@ export async function renameModal(rename, type, id, baseName) {
// 改名成功 // 改名成功
if(isConfirmed) await rename(type, id, value); if(isConfirmed) await rename(type, id, value);
// 清空欄位 // 清空欄位 fileName = '';
// fileName = '';
} }
/** /**
* Delete File * Delete File
@@ -464,7 +467,6 @@ export async function reallyDeldetInformation(files, reallyDeldetData) {
const filesStore = FilesStore(); const filesStore = FilesStore();
const deleteCustomClass = { ...customClass }; const deleteCustomClass = { ...customClass };
const htmlText = `<div class="text-left mx-4 space-y-1"><p>The following file(s) have been deleted by other user(s):</p><ul class="list-disc ml-6">${files}</ul></div>`; const htmlText = `<div class="text-left mx-4 space-y-1"><p>The following file(s) have been deleted by other user(s):</p><ul class="list-disc ml-6">${files}</ul></div>`;
let recordIdData = [];
deleteCustomClass.confirmButton = '!inline-block !rounded-full !text-sm !font-medium !text-center !align-middle !transition-colors !duration-300 !px-5 !py-2 !w-[100px] !h-[40px] !text-primary !bg-neutral-10 !border !border-primary'; deleteCustomClass.confirmButton = '!inline-block !rounded-full !text-sm !font-medium !text-center !align-middle !transition-colors !duration-300 !px-5 !py-2 !w-[100px] !h-[40px] !text-primary !bg-neutral-10 !border !border-primary';
deleteCustomClass.cancelButton = null; deleteCustomClass.cancelButton = null;
@@ -481,7 +483,7 @@ export async function reallyDeldetInformation(files, reallyDeldetData) {
confirmButton.style.border = '1px solid #0099FF'; confirmButton.style.border = '1px solid #0099FF';
} }
}); });
recordIdData = await Promise.all(reallyDeldetData.map(file => filesStore.deletionRecord(file.id))); await Promise.all(reallyDeldetData.map(file => filesStore.deletionRecord(file.id)));
await filesStore.fetchAllFiles(); await filesStore.fetchAllFiles();
} }

View File

@@ -86,7 +86,7 @@ export default function cytoscapeMapTrace(nodes, edges, graphId) {
// creat tippy.js // creat tippy.js
let tip; let tip;
cy.on('mouseover', 'node', function(event) { cy.on('mouseover', 'node', function(event) {
var node = event.target const node = event.target
let ref = node.popperRef() let ref = node.popperRef()
let dummyDomEle = document.createElement('div'); let dummyDomEle = document.createElement('div');
let content = document.createElement('div'); let content = document.createElement('div');
@@ -97,7 +97,6 @@ export default function cytoscapeMapTrace(nodes, edges, graphId) {
content:content content:content
}); });
tip.show(); tip.show();
// if(node.data("label").length > 18) tip.show();
}) })
cy.on('mouseout', 'node', function(event) { cy.on('mouseout', 'node', function(event) {
tip.hide(); tip.hide();

View File

@@ -87,7 +87,7 @@ export default {
}, },
created() { created() {
// Save token in Headers. // Save token in Headers.
const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*\=\s*([^;]*).*$)|^.*$/, "$1"); const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*=\s*([^;]*).*$)|^.*$/, "$1");
this.$http.defaults.headers.common['Authorization'] = `Bearer ${token}`; this.$http.defaults.headers.common['Authorization'] = `Bearer ${token}`;
}, },
// 重新整理畫面以及第一次進入網頁時beforeRouteEnter這個hook會被執行然而beforeRouteUpdate不會被執行 // 重新整理畫面以及第一次進入網頁時beforeRouteEnter這個hook會被執行然而beforeRouteUpdate不會被執行