diff --git a/assets/icons/grass.svg b/assets/icons/grass.svg
new file mode 100644
index 0000000..8b4ef76
--- /dev/null
+++ b/assets/icons/grass.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/index.css b/index.css
index 69b75b9..5cbc40f 100644
--- a/index.css
+++ b/index.css
@@ -273,4 +273,22 @@ button:active {
height: 100%;
border: 0;
border-radius: 20px;
+}
+
+.instances {
+ position: fixed;
+ width: 70%;
+ height: 80%;
+ padding: 0px;
+ margin: auto;
+ inset: 0px;
+ display: flex;
+ flex-direction: column;
+ backdrop-filter: blur(20px) brightness(40%);
+ border-radius: 20px;
+ box-shadow: 0px 0px 20px #00000055;
+ z-index: 7; /* i like the number 7 */
+ opacity: 0;
+ scale: 0.8;
+ pointer-events: none;
}
\ No newline at end of file
diff --git a/index.html b/index.html
index 73f9151..db79f5f 100644
--- a/index.html
+++ b/index.html
@@ -13,6 +13,9 @@
-
+
Current Instance: Loading...
diff --git a/index.js b/index.js
index 7a31fb2..d727ee1 100644
--- a/index.js
+++ b/index.js
@@ -157,6 +157,20 @@ function help(status) {
}
}
+function instances(status) {
+ var instmenu = document.getElementById("instances");
+
+ if (status == "show") {
+ instmenu.classList.add("popup");
+ instmenu.classList.remove("popout");
+ }
+
+ if (status == "hide") {
+ instmenu.classList.remove("popup");
+ instmenu.classList.add("popout");
+ }
+}
+
// Listen for messages from iframe
window.addEventListener('message', function(event) {
console.log(event)
@@ -187,6 +201,11 @@ window.addEventListener('message', function(event) {
help('hide');
}
+ if (event.data == 'hideInstances') {
+ // Call instances function in the parent window
+ instances('hide');
+ }
+
// if (event.data == 'offlinelogin') {
// let offlineacc_data = [ localStorage.getItem('offlineusername') , localStorage.getItem('offlineuuid') ];
// pywebview.api.offline_account(offlineacc_data);
@@ -202,4 +221,8 @@ window.addEventListener('message', function(event) {
lastuser.textContent = "Logged in as: " + localStorage.getItem('current-username');
// i will figure out how to save last account, soon...
};
+
+ if (event.data == 'launchminecraft') {
+ pywebview.api.launch_minecraft(localStorage.getItem('current-username'), localStorage.getItem('current-uuid'), localStorage.getItem('launchversion'));
+ };
});
\ No newline at end of file
diff --git a/instances.css b/instances.css
new file mode 100644
index 0000000..13aa8fb
--- /dev/null
+++ b/instances.css
@@ -0,0 +1,345 @@
+body {
+ /*background-color: darkred;*/
+ overflow-x: hidden;
+ overflow-y: auto;
+ padding-top: 40px;
+}
+
+/* Customize scrollbar for WebKit browsers */
+body::-webkit-scrollbar {
+ width: 5px; /* Specify the width of the scrollbar */
+}
+
+/* Customize scrollbar thumb for WebKit browsers */
+body::-webkit-scrollbar-thumb {
+ background-color: #36204d; /* Specify the color of the scrollbar thumb */
+ border-radius: 4px; /* Specify the border radius of the scrollbar thumb */
+}
+
+/* Hide the scrollbar track and button */
+body::-webkit-scrollbar-track {
+ background-color: transparent; /* Set background color of track to transparent */
+ border: none; /* Remove border */
+}
+
+body::-webkit-scrollbar-button {
+ display: none; /* Hide the scrollbar button */
+}
+
+@font-face {
+ font-family: 'Inter';
+ src: url('assets/fonts/inter/Inter-Regular.ttf');
+}
+
+@font-face {
+ font-family: 'InterThin';
+ src: url('assets/fonts/inter/Inter-Thin.ttf');
+}
+
+p, h1, h2, h3, h4, h5, h6, div {
+ font-family: 'Inter';
+ color: white;
+}
+
+p {
+ margin: 0;
+}
+
+iframe {
+ background-color: transparent;
+}
+
+.close {
+ background-color: #00000000;
+ border: 0;
+ width: 40px;
+ height: 40px;
+}
+
+.close:hover {
+ background-color: #00000050;
+ scale: 1.05;
+}
+
+.titlebar {
+ background-color: #00000070;
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 10px;
+ height: 40px;
+ z-index: 10;
+}
+
+button {
+ background-color: #00000070;
+ font-family: 'Inter';
+ color: white;
+ border: 0;
+ padding: 5px;
+ border-radius: 10px;
+ transition-duration: 0.2s
+}
+
+button:hover {
+ background-color: #00000060;
+ box-shadow: 0px 0px 7px #00000020;
+ scale: 1.05;
+}
+
+button:active {
+ background-color: #00000080;
+ scale: 0.97;
+}
+
+button:disabled {
+ color: #ffffff50;
+}
+
+.navbar {
+ background-color: #00000070;
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ gap: 10px;
+ height: 30px;
+ z-index: 10;
+ padding: 7px;
+}
+
+.align-right {
+ position: fixed;
+ right: 6px;
+}
+
+.instance-btn {
+ background-color: #00000070;
+ font-family: 'Inter';
+ color: white;
+ border: 0;
+ padding: 5px;
+ padding-left: 7px;
+ padding-right: 7px;
+ border-radius: 12px;
+ height: 30px;
+ transition-duration: 0.2s
+}
+
+.instances {
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+}
+
+.instance {
+ border: 2px solid #ffffff20;
+ border-radius: 12px;
+ width: 90px;
+ height: 90px;
+ margin: 10px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ scale: 1;
+ transition-duration: 0.15s;
+ box-shadow: 0px 0px 20px #000000cc;
+}
+
+.instance:hover {
+ scale: 1.05;
+ box-shadow: 0px 0px 10px #ffffff20;
+}
+
+.instance:active {
+ scale: 0.98;
+}
+
+/*hr {
+ opacity: 1;
+ margin: 0;
+ border: 1px solid #ffffff20;
+ width: 85%;
+}
+
+.inst-icon {
+ margin-top: -5px;
+}
+
+.inst-name {
+ margin-top: 5px;
+}*/
+
+.dialogbg {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: #00000050;
+ z-index: 12;
+ opacity: 0;
+ pointer-events: none;
+}
+
+.new-inst {
+ position: fixed;
+ width: 250px;
+ height: 125px;
+ padding: 10px;
+ margin: auto;
+ inset: 0px;
+ display: flex;
+ flex-direction: column;
+ background-color: #4d0101;
+ border-radius: 20px;
+ box-shadow: 0px 0px 40px #2b0000;
+ z-index: 14;
+ gap: 5px;
+ text-align: center;
+ justify-content: center;
+ align-items: center;
+ opacity: 0;
+ scale: 0.8;
+}
+
+.addaccbtn {
+ width: 100%;
+ box-shadow: 0px 0px 20px #00000050;
+}
+
+input {
+ background-color: #00000070;
+ border: 0;
+ border-radius: 5px;
+ padding: 2px;
+ color: white;
+ font-family: 'Inter';
+ outline: 0px solid #00000050;
+ transition-duration: 0.2s;
+ box-shadow: 0px 0px 20px #00000050;
+}
+
+input:focus {
+ outline: 2px solid #00000050;
+}
+
+select {
+ background-color: #00000070;
+ border: 0;
+ border-radius: 5px;
+ padding: 2px;
+ color: white;
+ font-family: 'Inter';
+ outline: 0px solid #00000050;
+ transition-duration: 0.2s;
+ box-shadow: 0px 0px 20px #00000050;
+}
+
+option {
+ background-color: #4d0101;
+ color: white;
+ font-family: 'Inter';
+ transition-duration: 0.2s;
+}
+
+option:hover {
+ font-size: 50px;
+}
+
+/* Style scrollbars of a container element (not the