diff --git a/scripts/contextmenu/newfolder.js b/scripts/contextmenu/newfolder.js
index 8fd43c0..ed568a5 100644
--- a/scripts/contextmenu/newfolder.js
+++ b/scripts/contextmenu/newfolder.js
@@ -8,6 +8,7 @@ const postModal = require('../modal/post');
const showError = require('../modal/common/error');
const clearModals = require('../modal/clearmodals');
const newToast = require('../toast/createtoast');
+const refresh = require('../fileview/refresh');
module.exports = () => {
if (window.kade.modal) {return;}
@@ -55,7 +56,14 @@ module.exports = () => {
fs.mkdirSync(path.join(window.kade.cpath, input.value));
lightRefresh();
modalOut.remove();
- newToast("Folder created", [`Folder "${input.value}" created successfully`, `${window.kade.cpath}\\${input.value}`]);
+ newToast(
+ "Folder created", [`Folder "${input.value}" created successfully`, `${window.kade.cpath}\\${input.value}`], undefined, false, 5,
+ () => {
+ refresh(`${window.kade.cpath}\\${input.value}`);
+ require('electron').clipboard.writeText(`${window.kade.cpath}\\${input.value}`);
+ newToast("Copied!", "The folder's path has been copied to your clipboard.", "#19df46");
+ }
+ );
} catch {
newToast("Folder not Created", "An error caused that folder to not be created.", "#b24355", false, 5, () => {showError("Folder Creation", "There was an unknown error while trying to create that folder. It may be a permissions issue, or the host folder doesn't exist anymore.");});
clearModals();