From 4c00d6e11b75044c4fde770466a1595217fd7c75 Mon Sep 17 00:00:00 2001 From: Henry Gross-Hellsen <6283258+cowpod@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:53:38 -0700 Subject: [PATCH] configure.php: properly hide elements if using sqlite, add warning --- configure.php | 70 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/configure.php b/configure.php index 5690530..d82be07 100644 --- a/configure.php +++ b/configure.php @@ -246,34 +246,42 @@
+ + +
+
+
+
+
+ +
- If you already have installed the original version of solder, do not use the same database. - You can migrate your data later. It's recommended to use an empty database. +
  • If migrating from original solder, use a new database.
  • +
  • If MySQL was previously used, your data will not be transferred to SQLite, and vice-versa.
  • - -
    -
    -
    -
    - Five tables will be created: users, clients, modpacks, builds, mods
    -
    -
    - + +
    +
    + You can find you API Key in your profile at technicpack.net @@ -291,8 +299,16 @@ } }); + $("#host").on("keyup", function() { + let hostval = $("#host").val(); + if (hostval.startsWith("https://") || hostval.startsWith("http://")) { + $("#host-warning").show(); + } else if ($("#host-warning").is(":visible")) { + $("#host-warning").hide(); + } + }); $("#pass2").on("keyup", function() { - console.log($("#pass2").val()+"=="+$("#pass").val()) + // console.log($("#pass2").val()+"=="+$("#pass").val()) if ($("#pass2").val()==$("#pass").val()) { $("#pass2").addClass("is-valid"); $("#pass2").removeClass("is-invalid"); @@ -310,19 +326,15 @@ $("#db-user").removeAttr('required'); $("#db-name").removeAttr('required'); $("#db-pass").removeAttr('required'); - $("#db-host").hide(); - $("#db-user").hide(); - $("#db-name").hide(); - $("#db-pass").hide(); + $("#mysql-options").hide(); + $("#sqlite-warning").show(); } else { $("#db-host").attr('required','required'); $("#db-user").attr('required','required'); $("#db-name").attr('required','required'); $("#db-pass").attr('required','required'); - $("#db-host").show(); - $("#db-user").show(); - $("#db-name").show(); - $("#db-pass").show(); + $("#mysql-options").show(); + $("#sqlite-warning").hide(); } });