From a2089a3b690f16363ecb6db68a60a5c96dc1510e Mon Sep 17 00:00:00 2001
From: mitosagi <54105954+mitosagi@users.noreply.github.com>
Date: Mon, 16 Oct 2023 22:43:29 +0900
Subject: [PATCH] feat: revert input element
---
src/renderer/main/core.ts | 8 ++++----
src/renderer/main/index.html | 9 ++++++++-
src/renderer/main/preload.ts | 18 +++++++++---------
3 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/src/renderer/main/core.ts b/src/renderer/main/core.ts
index cc62d74a..7d2f1d04 100644
--- a/src/renderer/main/core.ts
+++ b/src/renderer/main/core.ts
@@ -247,10 +247,10 @@ async function checkLatestVersion(instPath: string) {
/**
* Shows a dialog to select installation path and set it.
- * @param {HTMLInputElement} installationPath - A HTMLElement of input.
+ * @param {HTMLInputElement} input - A HTMLElement of input.
*/
-async function selectInstallationPath(installationPath: HTMLSpanElement) {
- const originalPath = installationPath.innerText;
+async function selectInstallationPath(input: HTMLInputElement) {
+ const originalPath = input.value;
const selectedPath = await openDirDialog(
'インストール先フォルダを選択',
originalPath,
@@ -267,7 +267,7 @@ async function selectInstallationPath(installationPath: HTMLSpanElement) {
const instPath = selectedPath[0];
await changeInstallationPath(instPath);
- installationPath.innerText = instPath;
+ input.value = instPath;
}
}
diff --git a/src/renderer/main/index.html b/src/renderer/main/index.html
index aec5c212..2a150c84 100644
--- a/src/renderer/main/index.html
+++ b/src/renderer/main/index.html
@@ -132,7 +132,14 @@
id="addon-wrapping"
>
-
+