Skip to content

Commit 84fc403

Browse files
committed
version 0.4.9
1 parent 7316f5a commit 84fc403

File tree

5 files changed

+43
-36
lines changed

5 files changed

+43
-36
lines changed

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# cargo-features = ["profile-rustflags"]
22
[package]
33
name = "CoDriver"
4-
version = "0.4.88"
4+
version = "0.4.9"
55
description = "A simple file explorer"
66
authors = ["Ricky Dane Perlick"]
77
license = "BSD-2-Clause license"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "CoDriver",
11-
"version": "0.4.88"
11+
"version": "0.4.9"
1212
},
1313
"tauri": {
1414
"bundle": {

ui/main_logic.js

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,7 @@ async function compressItem(arrItems, compressionLevel = 3) {
18561856
async function closeCompressPopup() {
18571857
$(".compression-popup").remove();
18581858
IsPopUpOpen = false;
1859+
IsInputFocused = false;
18591860
}
18601861

18611862
function showLoadingPopup(msg) {
@@ -3631,12 +3632,12 @@ function showMultiRenamePopup() {
36313632
document.querySelector("body").append(popup);
36323633
$(".multi-rename-newname").focus();
36333634
document.querySelectorAll(".multi-rename-input").forEach((input) =>
3634-
input.addEventListener("keyup", (e) => {
3635+
input.addEventListener("keyup", async (e) => {
36353636
if (
36363637
((e.ctrlKey && Platform != "darwin") || e.metaKey) &&
36373638
e.key === "Enter"
36383639
) {
3639-
renameItemsWithFormat(
3640+
await renameItemsWithFormat(
36403641
arrItemsToRename.map((item) => item.getAttribute("itempath")),
36413642
$(".multi-rename-newname").val(),
36423643
$(".multi-rename-startat").val(),
@@ -3649,8 +3650,8 @@ function showMultiRenamePopup() {
36493650
);
36503651
document
36513652
.querySelector(".multi-rename-button-run")
3652-
.addEventListener("click", () => {
3653-
renameItemsWithFormat(
3653+
.addEventListener("click", async () => {
3654+
await renameItemsWithFormat(
36543655
arrItemsToRename.map((item) => item.getAttribute("itempath")),
36553656
$(".multi-rename-newname").val(),
36563657
$(".multi-rename-startat").val(),
@@ -3672,17 +3673,16 @@ async function renameItemsWithFormat(
36723673
startAt = parseInt(startAt);
36733674
stepBy = parseInt(stepBy);
36743675
nDigits = parseInt(nDigits);
3675-
await invoke("rename_elements_with_format", {
3676-
arrElements,
3677-
newName,
3678-
startAt,
3679-
stepBy,
3680-
nDigits,
3681-
ext,
3682-
}).then(async () => {
3683-
closeMultiRenamePopup();
3684-
await listDirectories();
3685-
});
3676+
closeMultiRenamePopup();
3677+
await invoke("rename_elements_with_format", {
3678+
arrElements,
3679+
newName,
3680+
startAt,
3681+
stepBy,
3682+
nDigits,
3683+
ext,
3684+
});
3685+
await listDirectories();
36863686
}
36873687

36883688
function closeMultiRenamePopup() {
@@ -4257,24 +4257,6 @@ async function fileOperationContextMenu() {
42574257
return FileOperation;
42584258
}
42594259

4260-
async function stopSearching() {
4261-
await invoke("stop_searching");
4262-
}
4263-
4264-
function createNewAction(actionId, actionName, actionDescription, path) {
4265-
let newAction = new ActiveAction(actionName, actionDescription, actionId, path);
4266-
ArrActiveActions.push(newAction);
4267-
$(".active-actions-container").append(newAction.getHTMLElement());
4268-
}
4269-
4270-
function removeAction(actionId) {
4271-
ArrActiveActions = ArrActiveActions.filter((action) => action.id !== actionId);
4272-
$(`.active-action-${actionId}`).css("opacity", "0");
4273-
setTimeout(() => {
4274-
$(`.active-action-${actionId}`).remove();
4275-
}, 300);
4276-
}
4277-
42784260
async function openDirAndSwitch(path) {
42794261
await invoke("open_dir", { path });
42804262
await setCurrentDir(path);

ui/utils.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,28 @@ function isImage(fileExt) {
167167
return false;
168168
}
169169
}
170+
171+
async function stopSearching() {
172+
await invoke("stop_searching");
173+
}
174+
175+
function createNewAction(actionId, actionName, actionDescription, path) {
176+
let newAction = new ActiveAction(
177+
actionName,
178+
actionDescription,
179+
actionId,
180+
path,
181+
);
182+
ArrActiveActions.push(newAction);
183+
$(".active-actions-container").append(newAction.getHTMLElement());
184+
}
185+
186+
function removeAction(actionId) {
187+
ArrActiveActions = ArrActiveActions.filter(
188+
(action) => action.id !== actionId,
189+
);
190+
$(`.active-action-${actionId}`).css("opacity", "0");
191+
setTimeout(() => {
192+
$(`.active-action-${actionId}`).remove();
193+
}, 300);
194+
}

0 commit comments

Comments
 (0)