diff --git a/resources/icons/download.svg b/resources/icons/download.svg new file mode 100644 index 0000000..8baf9ed --- /dev/null +++ b/resources/icons/download.svg @@ -0,0 +1,11 @@ + +Created with Fabric.js 1.7.22 + + + + + + + + + \ No newline at end of file diff --git a/resources/index.html b/resources/index.html index 41b951e..6b86265 100644 --- a/resources/index.html +++ b/resources/index.html @@ -134,7 +134,7 @@
- Download Stable Build + Download Grasscutter Stable Build
@@ -143,13 +143,22 @@
- Download Development Build + Download Grasscutter Development Build
Install Grasscutter development branch. This build sometimes has bugs, and is frequently updated. Use at your own risk.
+
+
+ Download Grasscutter Resources + +
+ + Downloads Grasscutter resources into the currently set Grasscutter folder. This should be done unless you plan on getting resources externally. + +
diff --git a/resources/js/index.js b/resources/js/index.js index 2656464..db2b550 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -248,10 +248,20 @@ async function handleFavoriteList() { async function openDownloads() { const downloads = document.querySelector('#downloadPanel') + const config = await getCfg() if (downloads.style.display === 'none') { downloads.style.removeProperty('display') } + + // Disable the resource download button if a serverFolder path is not set + if (!config.serverFolder) { + document.querySelector('#resourceInstall').disabled = true + document.querySelector('#resourceInstall').classList.add('disabled') + } else { + document.querySelector('#resourceInstall').disabled = false + document.querySelector('#resourceInstall').classList.remove('disabled') + } } async function closeDownloads() { diff --git a/resources/style/index.css b/resources/style/index.css index d466177..d1e2ea6 100644 --- a/resources/style/index.css +++ b/resources/style/index.css @@ -216,6 +216,10 @@ a { margin: 10px 0px; } +.downloadLabel { + margin: 14px 0px; +} + .downloadSubtitle, .settingSubtitle { color: rgb(165, 165, 165);