From f40199ff17946f9182c39d2874e64de8dc53fedd Mon Sep 17 00:00:00 2001 From: Logan-Fouts Date: Sat, 18 May 2024 16:24:10 +0200 Subject: [PATCH] fix: cleanup --- Client/src/components/Banner.tsx | 6 +- Client/src/components/Darkmode.tsx | 10 +-- Client/src/components/Options.tsx | 2 - Client/vite.config.ts | 6 +- .../Layers/__pycache__/layers.cpython-312.pyc | Bin 9204 -> 9314 bytes .../Framework/Integration/Layers/layers.py | 5 ++ Electron/Framework/main.py | 65 +++++++++++++----- Electron/main.js | 6 +- Electron/preload.js | 6 +- 9 files changed, 70 insertions(+), 36 deletions(-) diff --git a/Client/src/components/Banner.tsx b/Client/src/components/Banner.tsx index d567cb8..eea0036 100644 --- a/Client/src/components/Banner.tsx +++ b/Client/src/components/Banner.tsx @@ -1,11 +1,13 @@ -import React from "react"; import "./Banner.css"; import logo from "./images/logo-no-background.png"; function Banner() { const handleHelpClick = () => { // Replace 'https://your-help-page-url.com' with the actual URL of your help page - window.open("https://github.com/Logan-Fouts/PicPurge/blob/GUI/README.md", "_blank"); + window.open( + "https://github.com/Logan-Fouts/PicPurge/blob/GUI/README.md", + "_blank", + ); }; return ( diff --git a/Client/src/components/Darkmode.tsx b/Client/src/components/Darkmode.tsx index db966e4..cfea76b 100644 --- a/Client/src/components/Darkmode.tsx +++ b/Client/src/components/Darkmode.tsx @@ -1,10 +1,9 @@ -import React from 'react'; -import * as Switch from '@radix-ui/react-switch'; -import './Darkmode.css'; +import * as Switch from "@radix-ui/react-switch"; +import "./Darkmode.css"; const Darkmode = () => (
-
+
@@ -12,4 +11,5 @@ const Darkmode = () => ( ); -export default Darkmode; \ No newline at end of file +export default Darkmode; + diff --git a/Client/src/components/Options.tsx b/Client/src/components/Options.tsx index d00fcf6..b091acb 100644 --- a/Client/src/components/Options.tsx +++ b/Client/src/components/Options.tsx @@ -2,8 +2,6 @@ import React, { useState, useEffect } from "react"; import "./Options.css"; import DetectionWheel from "./DetectionWheel"; import ProgressBar from "./Progress"; -import Fire from "./Fire"; -import Darkmode from "./Darkmode"; function Options() { const [folderPath, setFolderPath] = useState(""); diff --git a/Client/vite.config.ts b/Client/vite.config.ts index 5a33944..9cc50ea 100644 --- a/Client/vite.config.ts +++ b/Client/vite.config.ts @@ -1,7 +1,7 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], -}) +}); diff --git a/Electron/Framework/Integration/Layers/__pycache__/layers.cpython-312.pyc b/Electron/Framework/Integration/Layers/__pycache__/layers.cpython-312.pyc index 44089f700bf914893a15e4d8a5e9c0709a5398f0..266342e77f519081a024dd4f8bd48ccc272a29d8 100644 GIT binary patch delta 1183 zcmYLIZA@EL7(Vaqy|=w>Z$F@=e6+o784P56C=yh?cO3` zDX^HCZH6e#Yl6#u41Z`y_Dh>3CPou~8vWs94Wu+W(fu-UP!@^5^c+apy*JPM-sk-~ z=e+NEHn2Tt`%#w7gg!$L2H)NAWNel2cIJ3PH;nVce4NC&abZFn7J+bNfW!?qNSwdV zF@HjajR%}SIq`@yeR=&e0DCsXy#e6PUNfWseE5`q3ibG#@FAG9W8&`s?b)-Yet<|8 zrN0f(lYL)q0nWAt|Y(rH%LDP%p_o@>YnDc~i<#@`*#q1|%hy*fCp4 zdoJVLbI+w?JV}!==aCi7UNipc_2GB+MoCIbIxLB)a*SHM*y1pY^X9a1%!A-92Q#)g z6fofHj*A!ap1zss@#N*vlseKsH8U9>Ij8FSXhKai_j>=@?yNr5Xw{CmO7{RBK6KY=2$5nMY@4}4Rg+Dnez=D4`qF(LfK}=Z9iP2b09=hfJs&Wca;Pb0Xv?mS*3oTS|9DOjC9mo+`Io+wxyAD_8>X8FCG z)xRT9+m4BZ>NkRshr!6#9UIZ}52NSTgG0CYM<)MccNPBU?6&)eeE@Wk7Wf_p2xH6bHt|HNUQ!=O*W z1+NPOyo68u!2{{@{tI`||Zhw!XrXIr=t=ujQTiSn0qQ12yy%&jlKq`steUk~%pvp=z{Oc~QSI zlS+=~`O8z&b6Op>HkvgycAAQx2O7i+OpW1sAleqE>NWZ7=$xwQEhDp9GNrCjN}r^Y zd7W(9%Qx(Gzu47%Q6rQ)9VADj0d(C_{)??_i@Dj zj(&Fw7GH9mf)v(W0@M}R)nQ;kDffNMKpXe^KjLyMA#Ds;+y)6|NfTO(XjeY> zO#yt3jQ>Z-;6491Bf9aT5FFM1`?x?B#~QsfYj+g6rtUVm!z{zmnch;_#cx=GJ^tr3 zOp(WG;5~5RlRyB@qFKls37!~w@qa}oSu#s!RQuYTV}2NAAvQMGe|EZ1E(!HQNy9hc+nGxC|G z$eQEXEvL6VDNiox?hbXF@yE`-RbPBX_wC%OH`Q^bsT7UejpJY_VNI!h { ipcMain.handle( "runScript", - async (event, folderPath, aggressiveness, removeNonMedia) => { + async (event, folderPath, preset, removeNonMedia) => { let pythonArgs = null; - pythonArgs = [String(folderPath)]; + pythonArgs = [String(folderPath), String(preset)]; const progressUpdates = []; try { diff --git a/Electron/preload.js b/Electron/preload.js index 0f00fb1..ed470f1 100644 --- a/Electron/preload.js +++ b/Electron/preload.js @@ -5,12 +5,12 @@ contextBridge.exposeInMainWorld("electronAPI", { const selectedPath = await ipcRenderer.invoke("openFileExplorer"); return selectedPath; }, - process: async (folderPath, aggressiveness, removeNonMedia) => { + process: async (folderPath, preset, removeNonMedia) => { const progressUpdates = await ipcRenderer.invoke( "runScript", folderPath, - aggressiveness, - removeNonMedia + preset, + removeNonMedia, ); }, receive: (channel, callback) => {