mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08:00
proper selection, fixes
This commit is contained in:
parent
632820e277
commit
0d97307e9a
@ -18,10 +18,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="settingsPanel" style="display: none;">
|
||||
<div id="settingsTitleBar">
|
||||
<span id="fullSettingsTitle">Settings</span>
|
||||
<div id="settingsClose">
|
||||
<img src="icons/close.svg" onclick="closeSettings()" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="settingsPanelInner">
|
||||
<div class="settingTitle", id="scriptsTitle">
|
||||
<span>Scripts</span>
|
||||
|
@ -497,7 +497,7 @@ async function toggleServerLaunchSection() {
|
||||
|
||||
async function getLanguages() {
|
||||
const languageFiles = (await filesystem.readDirectory(`${NL_CWD}/languages`)).filter(file => file.entry.endsWith('.json'))
|
||||
|
||||
const config = await getCfg()
|
||||
|
||||
// Load all languages as options
|
||||
for (const file of languageFiles) {
|
||||
@ -508,8 +508,14 @@ async function getLanguages() {
|
||||
option.value = lang
|
||||
option.innerHTML = fullLanguageName
|
||||
|
||||
// Set language selected to config language
|
||||
if (lang === config.language) {
|
||||
option.selected = true
|
||||
}
|
||||
|
||||
document.querySelector('#languageSelect').appendChild(option)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function handleLanguageChange(elm) {
|
||||
|
@ -102,9 +102,15 @@ body {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
#settingsTitleBar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#settingsClose {
|
||||
display: inline-block;
|
||||
margin-left: 70%;
|
||||
transition: filter 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user