mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
feat: support Linux. Refactor resources architecture. Create build script
Currently, themes are disabled and firefox notification too.
This commit is contained in:
@@ -290,6 +290,7 @@
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="script/toast.js"></script>
|
||||
<script src="script/customConfiguration.js"></script>
|
||||
<script src="script/clipboardPaste.js"></script>
|
||||
<script src="script/custompath.js"></script>
|
||||
<script src="script/settingsPanel.js"></script>
|
||||
|
||||
30
public/script/customConfiguration.js
Normal file
30
public/script/customConfiguration.js
Normal file
@@ -0,0 +1,30 @@
|
||||
async function initPlatformRestrictions() {
|
||||
const platform = await window.electronAPI.getProcessPlatform();
|
||||
|
||||
const themeSelect = document.getElementById("themeSelect");
|
||||
const refreshBtn = document.getElementById("refresh-themes-btn");
|
||||
|
||||
/**
|
||||
* Is the OS windows
|
||||
* @type {boolean}
|
||||
*/
|
||||
const isWindows = platform === "win32";
|
||||
|
||||
console.log(isWindows);
|
||||
|
||||
// If it's windows, the button is not disabled.
|
||||
themeSelect.disabled = !isWindows;
|
||||
refreshBtn.disabled = !isWindows;
|
||||
|
||||
themeSelect.classList.toggle("disabled", !isWindows);
|
||||
refreshBtn.classList.toggle("disabled", !isWindows);
|
||||
|
||||
if (!isWindows) {
|
||||
themeSelect.title = "Themes are only available on Windows";
|
||||
refreshBtn.title = "Themes are only available on Windows";
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
initPlatformRestrictions();
|
||||
})
|
||||
@@ -16,6 +16,14 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
||||
|
||||
|
||||
/* Mark element as disabled */
|
||||
.disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
filter: grayscale(40%);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Because why not */
|
||||
#reference{
|
||||
position: fixed;
|
||||
|
||||
Reference in New Issue
Block a user