Skip to content

Commit

Permalink
Merge pull request #185 from COS301-SE-2024/hotfix/helpPage
Browse files Browse the repository at this point in the history
Hotfix/help page
  • Loading branch information
Donatello-Carboni authored Sep 30, 2024
2 parents c61115c + 4d016f8 commit f6f4d5f
Show file tree
Hide file tree
Showing 38 changed files with 462 additions and 208 deletions.
Binary file added Desktop/public/images/carlaScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Desktop/public/images/teamNetwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Desktop/public/images/teamView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions Desktop/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
ttoken = window.electronAPI.getToken();
}
console.log(window.electronAPI.getToken());
onMount(async () => {
window.electronAPI.onPythonScriptDone((event, message) => {
toast.success(message, {
Expand All @@ -30,7 +28,6 @@
// call cuda-check and console.log
const isCuda = await window.electronAPI.checkCUDA();
console.log("Cuda: ", isCuda);
cuda.set(isCuda);
});
Expand Down
5 changes: 0 additions & 5 deletions Desktop/src/components/AddMember.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,17 @@
}
function addMember() {
console.log("addMember called");
sendEmails();
dispatch("save", { members: newMembers });
}
const sendEmails = async () => {
console.log("Sending invites");
console.log(newMembers);
console.log(window.electronAPI.getTeamName());
// Send the emails to the new members
try {
const response = await axios.post("http://" + HOST_IP + ":8000/sendInviteEmail/", {
newMembers: newMembers,
teamName: window.electronAPI.getTeamName(),
});
console.log(response);
} catch (error) {
console.error("Sending invites failed:", error);
}
Expand Down
1 change: 0 additions & 1 deletion Desktop/src/components/DeleteModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
try {
const response = await window.electronAPI.deleteVideoFile(videoPath);
if (response.success) {
console.log(`Deleted file: ${videoPath}`);
// Handle post-deletion actions, like updating the UI or redirecting
// For example, you might want to redirect to another page:
// location.goto("/some-other-page");
Expand Down
3 changes: 0 additions & 3 deletions Desktop/src/components/DriveCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
let processed = false;
function goToVideo() {
console.log("Go to video");
const encodedPath = encodeURIComponent(videoSource);
VideoURL.set(videoSource);
OriginalVideoURL.set(videoSource);
originalVideoURL.set(videoSource);
console.log(encodedPath);
push(`/drive/${encodedPath}`);
}
Expand Down Expand Up @@ -61,7 +59,6 @@
try {
processed = await window.electronAPI.checkIfVideoProcessed(videoSource);
console.log("Processed:", processed);
} catch (error) {
console.error("Error checking if video is processed:", error);
}
Expand Down
13 changes: 0 additions & 13 deletions Desktop/src/components/GallaryCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@
try {
let response = await window.electronAPI.openFTP(uid, token, size, "FAKENAME", "FAKEURL", "RETR");
console.log("Response: ", response);
if (response.success) {
console.log("IP:", response.ip);
console.log("Port:", response.port);
aip = response.ip;
aport = response.port;
} else {
Expand All @@ -54,19 +51,14 @@
await window.electronAPI.downloadVideo(videoName, videoSource);
// move the video to the download folder
let currentFilePath = videoName;
console.log("Current File Path: ", currentFilePath);
console.log("videoSource: ", videoSource);
isDownloading = false;
showMoreModal = false;
isDownloaded = true;
console.log("DOWNLOAD BUTTON");
};
function goToVideo() {
if (!isDownloaded) return;
console.log("Go to video");
const encodedPath = encodeURIComponent(videoSource);
VideoURL.set(videoSource);
OriginalVideoURL.set(videoSource);
Expand All @@ -75,13 +67,10 @@
}
function handleMore() {
console.log("More button clicked");
showMoreModal = true;
console.log(videoSource);
}
function handleBack(event) {
console.log("Back button clicked");
event.stopPropagation(); // Stop event propagation
showMoreModal = false;
}
Expand Down Expand Up @@ -120,7 +109,6 @@
captureSpecificFrame(10); // Specify the frame to get
try {
processed = await window.electronAPI.checkIfVideoProcessed(videoSource);
console.log("Processed:", processed);
} catch (error) {
console.error("Error checking if video is processed:", error);
}
Expand All @@ -132,7 +120,6 @@
);
let videoPaths = response;
firstFrameURL = videoPaths[0];
console.log(firstFrameURL);
} catch (error) {}
}
setInterval(() => {
Expand Down
1 change: 0 additions & 1 deletion Desktop/src/components/GallaryMore.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
}
function view(videoSource) {
console.log("TESTING", videoSource);
const encodedPath = encodeURIComponent(videoSource);
push(`/video/${encodedPath}`);
}
Expand Down
3 changes: 0 additions & 3 deletions Desktop/src/components/InviteMembers.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@
}
const sendEmails = async () => {
console.log("Sending invites");
console.log(newMembers);
// Send the emails to the new members
try {
const response = await axios.post("http://" + HOST_IP + ":8000/sendInviteEmail/", {
newMembers: newMembers,
teamName: window.electronAPI.getTeamName(),
});
console.log(response);
push("/install");
} catch (error) {
console.error("Sending invites failed:", error);
Expand Down
4 changes: 0 additions & 4 deletions Desktop/src/components/LoginForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@
});
uid = response.data.uid;
sString = response.data.salt;
console.log(sString);
console.log("uid from resp:", uid);
step = 2;
} catch (error) {
console.error("Failed to retrieve salt and UID:", error);
}
};
const onSubmitPassword = async () => {
console.log("Password Step");
console.log(pToken);
try {
const { hash } = await window.electronAPI.hashPasswordSalt(
Expand Down
5 changes: 0 additions & 5 deletions Desktop/src/components/ManagerNode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
}
function showConnectionToAgent() {
console.log(nodeData.id);
console.log(nodeType);
// Reset all edge colors
resetEdgeColors();
Expand Down Expand Up @@ -83,9 +81,6 @@
// Update the writable stores
TeamAgents.set(agentBooleans);
TeamClients.set(clientBooleans);
console.log("Updated TeamAgents:", agentBooleans);
console.log("Updated TeamClients:", clientBooleans);
}
function resetEdgeColors() {
Expand Down
3 changes: 0 additions & 3 deletions Desktop/src/components/ModelList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
await getOutputFiles();
console.log("Test", get(originalVideoURL));
mounting = false;
});
Expand Down Expand Up @@ -86,8 +85,6 @@
videoURL: video.videoURL,
});
});
console.log("Output files:", processedVideos);
} catch (error) {
console.error("Error fetching output files:", error);
}
Expand Down
1 change: 0 additions & 1 deletion Desktop/src/components/ModelsCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
const handleClick = () => {
selectedModel.set(Model);
console.log("handleClick for " + Model.mName);
};
</script>
Expand Down
3 changes: 0 additions & 3 deletions Desktop/src/components/OnboardJoin.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
let tokenValue = "";
const submit = async () => {
console.log("Joining a team");
// check if team exists, if not, create team and add user to team
try {
const response = await axios.post(
Expand All @@ -30,7 +28,6 @@
email: window.electronAPI.getUemail(),
},
);
console.log(response);
push("/install");
} catch (error) {
console.error("Joining a team failed:", error);
Expand Down
2 changes: 0 additions & 2 deletions Desktop/src/components/OnboardNewTeam.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
let teamName = "";
const submit = async () => {
console.log("Creating a new team");
// check if team exists, if not, create team and add user to team
try{
Expand All @@ -23,7 +22,6 @@
admin: true,
});
window.electronAPI.storeTeamName(teamName);
console.log(response);
push("/invite");
} catch (error) {
console.error("Creating a team failed:", error);
Expand Down
2 changes: 0 additions & 2 deletions Desktop/src/components/ProcessPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
function processVideo() {
isLoading.set(true);
dispatch("processVideo", { modelName: selectedModelName });
console.log("Processing video", showProcessPopup);
}
function handleModelChange(event) {
Expand All @@ -47,7 +46,6 @@
// onMount function
onMount(async () => {
hasCuda = get(cuda);
console.log("Cuda: ", hasCuda);
mounted = true;
});
</script>
Expand Down
1 change: 0 additions & 1 deletion Desktop/src/components/RemoveMember.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
memberUid: uid,
})
.then((response) => {
console.log(response);
toast.success("Removed member successfully", {
duration: 5000,
position: "top-center",
Expand Down
2 changes: 0 additions & 2 deletions Desktop/src/components/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
function navigate(route) {
updateCurrentRoute();
console.log(route);
push(route);
}
Expand All @@ -82,7 +81,6 @@
: $location;
for (let i = 0; i < items.length; i++) {
if (items[i].route === route) {
console.log(route, i);
return `translateY(calc(calc(50% / ${items.length}) * ${i}))`;
}
}
Expand Down
2 changes: 0 additions & 2 deletions Desktop/src/components/SidebarV2.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
function toggleAccountPopup() {
showAccountPopup = !showAccountPopup;
console.log("TOGGLE: ", showAccountPopup);
}
function closeAccountPopup() {
Expand Down Expand Up @@ -171,7 +170,6 @@
const emailHash = CryptoJS.SHA256(profileEmail);
profileImg = `https://www.gravatar.com/avatar/${emailHash}?d=retro`;
console.log(profileImg);
})
.catch((error) => {
console.error("Error fetching user data:", error);
Expand Down
8 changes: 0 additions & 8 deletions Desktop/src/components/UploadModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@
return;
}
isUploadLoading.set(true);
console.log("Uploading");
setInterval(async () => {
isUploadLoading.set(false);
console.log("Done");
}, 5000);
let uid = window.electronAPI.getUid();
Expand All @@ -65,11 +63,8 @@
file.path,
command,
);
console.log("Response: ", response);
if (response.success) {
console.log("IP:", response.ip);
console.log("Port:", response.port);
aip = response.ip;
aport = response.port;
// You can now use response.ip and response.port as needed
Expand Down Expand Up @@ -102,11 +97,9 @@
};
// Insert the record into the database
const response1 = await window.electronAPI.insertData(record);
console.log("resp1", response1);
// Select the record from the database
const response2 = await window.electronAPI.selectData(filename);
console.log("resp2", response2);
toast.success("Video uploaded successfully", {
duration: 5000,
Expand All @@ -121,7 +114,6 @@
const uid = window.electronAPI.getUid();
const token = window.electronAPI.getToken();
console.log($location);
} else {
console.error(
"Failed to retrieve the record:",
Expand Down
2 changes: 0 additions & 2 deletions Desktop/src/components/ViewVideoComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,12 @@
const videoName = getFileName(originalVideoPath);
videoNameExtract = videoName.split(".")[0];
console.log("Original video path", originalVideoPath);
const outputDir = `${appPath}/outputVideos/${videoNameExtract}`;
// Fetch the original video details from the database
let originalVideo = await window.electronAPI.getVideoByURL(originalVideoPath);
console.log("Original video", originalVideo);
// If the original video is not found, add it to the database
if (!originalVideo) {
Expand Down
1 change: 0 additions & 1 deletion Desktop/src/components/videoAside.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
remoteProcessingQueueList.push(detail.outputVideoPath);
});
console.log("Remote Queue", remoteProcessingQueueList);
if (remoteProcessingQueueList.includes(AIinfo.mURL)) {
console.log("The list contains the URL.");
Expand Down
Loading

0 comments on commit f6f4d5f

Please sign in to comment.