Skip to content
This repository was archived by the owner on Mar 9, 2025. It is now read-only.

add: install with client #12

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "spacetheme-installer",
"private": true,
"version": "1.0.2",
"version": "1.0.3",
"main": "main.js",
"scripts": {
"start": "electron .",
Expand Down
30 changes: 28 additions & 2 deletions gui/src/select-theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
<div class="theme-options">
<div class="theme-option" id="install-theme">
<div class="theme-text">Please select a theme to install</div>
<div class="install-with" id="install-with">
<label class="checkbox-wrapper">
<input type="checkbox" class="custom-checkbox" id="millennium-install">
<p>with Millennium</p>
</label>
</div>
</div>

<div class="theme-option" id="reset-theme">
Expand Down Expand Up @@ -134,6 +140,10 @@
const steamPathSelector = document.querySelector('.steam-path-selector');
const selectSteamPathButton = document.querySelector('.select-steam-path-button');
const steamPathDisplay = document.getElementById('steam-path-display');
const millenniumInstallWrapper = document.getElementById('install-with');
const millenniumInstallCheckbox = document.getElementById('millennium-install');
millenniumInstallWrapper.style.display = 'none';

let selectedSteamPath = null;

themeSelector.addEventListener('click', (e) => {
Expand All @@ -146,7 +156,7 @@

const dropdownItems = document.querySelectorAll('.dropdown-item');
dropdownItems.forEach(item => {
item.addEventListener('click', () => {
item.addEventListener('click', async () => {
const selectedTheme = item.textContent;
document.querySelector('.theme-selector-text').textContent = selectedTheme;

Expand All @@ -155,6 +165,21 @@
uninstallText.textContent = `Uninstall ${selectedTheme}`;

steamPathSelector.style.display = selectedTheme === 'SteamTheme' ? 'flex' : 'none';
millenniumInstallWrapper.style.display = selectedTheme === 'SteamTheme' ? 'flex' : 'none';
if (selectedTheme === 'SteamTheme') {
const result = await ipcRenderer.invoke('get-steam-path');
if (result.success) {
selectedSteamPath = result.path;
if (selectedOption) {
nextButton.classList.add('available');
}
} else {
selectedSteamPath = null;
nextButton.classList.remove('available');
}
}
millenniumInstallWrapper.classList.toggle('fade-down', selectedTheme === 'SteamTheme');
millenniumInstallCheckbox.checked = false;

dropdownMenu.classList.remove('active');
themeSelector.classList.remove('active');
Expand Down Expand Up @@ -222,7 +247,8 @@
ipcRenderer.send('start-installation', {
option: selectedOption,
theme: selectedTheme,
steamPath: selectedSteamPath
steamPath: selectedSteamPath,
millenniumInstall: millenniumInstallCheckbox.checked
});
window.location.href = 'logs.html';
});
Expand Down
93 changes: 49 additions & 44 deletions gui/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ body {
transition: all 0.3s ease;
z-index: 1000;
}

.dropdown-menu.active {
opacity: 1;
transform: translateY(0);
Expand All @@ -282,10 +281,9 @@ body {
padding: 7.5px 16px;
border-radius: 5px;
}

.dropdown-item:hover {
background: rgb(35, 35, 35);
color: #fff;
background: rgb(40, 40, 40);
}

.theme-selector-text {
Expand All @@ -298,41 +296,10 @@ body {
transition: transform 0.3s ease;
}

.dropdown-item:hover {
background: rgb(40, 40, 40);
}

.theme-selector:hover {
background: rgb(25, 25, 25);
}

.theme-options {
flex: 1;
display: flex;
flex-direction: column;
gap: 12px;
}

.theme-option {
background: rgb(30, 30, 30);
border-radius: 8px;
padding: 18px;
cursor: pointer;
transition: background 0.3s ease;
}

.theme-option:hover {
background: rgb(25, 25, 25);
}

.theme-text {
color: #888;
font-weight: 400;
font-size: 14px;
align-items: center;
text-align: center;
}


.steam-path-selector {
gap: 6px;
Expand All @@ -358,13 +325,60 @@ body {
background-color: rgb(30, 30, 30);
cursor: pointer;
}

.select-steam-path-button:hover {
background-color: rgb(40, 40, 40);
}



.theme-options {
flex: 1;
display: flex;
flex-direction: column;
gap: 12px;
}

.theme-option#install-theme {
display: flex;
gap: 12px;
flex-direction: column;
padding: 0;
border-radius: 8px;
background-color: rgb(35, 35, 35);
}

.theme-text {
color: #888;
font-weight: 400;
font-size: 14px;
align-items: center;
text-align: center;
background: rgb(30, 30, 30);
border-radius: 8px;
padding: 18px;
cursor: pointer;
transition: background 0.3s ease;
}
.theme-text:hover {
background: rgb(25, 25, 25);
}
.theme-option.active .theme-text {
background: rgb(102, 108, 255) !important;
color: white;
}


.install-with {
display: flex;
padding: 0 12px 12px;
}

.install-with .checkbox-wrapper p {
color: #888;
}



.installation-header {
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -512,15 +526,6 @@ body {
color: white;
}

.theme-option.active {
background: rgb(102, 108, 255) !important;
color: white;
}

.theme-option.active .theme-text {
color: white;
}

.nav-button.next.available {
cursor: pointer;
opacity: 1;
Expand Down
2 changes: 1 addition & 1 deletion gui/src/version.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
const version = 'v1.0.2';
const version = 'v1.0.3';
document.getElementById('version-number').textContent = version;