aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2021-12-29 23:07:14 +0100
committerAlystrasz <contact@remyraes.com>2021-12-29 23:07:14 +0100
commita9744a0c5c6eaa9e17682c18e398ff9c5cf7e0fe (patch)
tree63ca1cdcd43a449b1c726bfd7b0f5c809ef2b58e /src/app
parent220e890af373daa5765026f7b2e60e66b38fb189 (diff)
parent474f2ae54000463a0a2dfc84ad678a7620cc3d44 (diff)
downloadViper-a9744a0c5c6eaa9e17682c18e398ff9c5cf7e0fe.tar.gz
Viper-a9744a0c5c6eaa9e17682c18e398ff9c5cf7e0fe.zip
Merge branch 'main' into chore/french-translation
Diffstat (limited to 'src/app')
-rw-r--r--src/app/index.html2
-rw-r--r--src/app/lang.js16
-rw-r--r--src/app/main.css5
-rw-r--r--src/app/main.js5
4 files changed, 20 insertions, 8 deletions
diff --git a/src/app/index.html b/src/app/index.html
index 1c34360..426b4c5 100644
--- a/src/app/index.html
+++ b/src/app/index.html
@@ -22,7 +22,7 @@
</div>
</div>
- <script src="main.js"></script>
<script src="lang.js"></script>
+ <script src="main.js"></script>
</body>
</html>
diff --git a/src/app/lang.js b/src/app/lang.js
index 8cf3d4b..5cc9708 100644
--- a/src/app/lang.js
+++ b/src/app/lang.js
@@ -1,10 +1,12 @@
-html = document.body.innerHTML.split("%%");
+function setlang() {
+ html = document.body.innerHTML.split("%%");
-for (let i = 0; i < html.length; i++) {
- if (html[i][0] != " " &&
- html[i][html[i].length - 1] != " ") {
- html[i] = lang(html[i])
+ for (let i = 0; i < html.length; i++) {
+ if (html[i][0] != " " &&
+ html[i][html[i].length - 1] != " ") {
+ html[i] = lang(html[i])
+ }
}
-}
-document.body.innerHTML = html.join("");
+ document.body.innerHTML = html.join("");
+}
diff --git a/src/app/main.css b/src/app/main.css
index 854c47a..c9c62fb 100644
--- a/src/app/main.css
+++ b/src/app/main.css
@@ -34,10 +34,14 @@ body, button, input {
}
.buttons {
+ text-align: right;
margin-left: auto;
margin-right: 7px;
}
+.text {max-width: 38vw}
+.buttons {max-width: 55vw}
+
button, .text {
border: none;
outline: none;
@@ -47,6 +51,7 @@ button, .text {
}
button {
+ margin-bottom: 10px;
color: var(--btnforeground);
-webkit-app-region: no-drag;
}
diff --git a/src/app/main.js b/src/app/main.js
index 579f785..0118b0c 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -34,3 +34,8 @@ function launchVanilla() {ipcRenderer.send("launchVanilla")}
ipcRenderer.on("newpath", (event, newpath) => {
settings.gamepath = newpath;
})
+
+setlang();
+setInterval(() => {
+ ipcRenderer.send("setsize", document.querySelector(".lines").offsetHeight + 25);
+}, 150)