mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-21 22:58:24 +00:00
begin layout
This commit is contained in:
parent
82b81bbd6b
commit
23a4feac74
@ -10,9 +10,41 @@
|
||||
<body>
|
||||
<div id="base">
|
||||
<span>Select a banner to use as a base:</span>
|
||||
<select id="bannerDefaultSelect">
|
||||
<select id="bannerDefaultSelect" onchange="handleBaseBannerChange()">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div id="bannerEditor">
|
||||
<div id="mainChar">
|
||||
<span>Select the main character</span>
|
||||
<select id="mainCharSelect"></select>
|
||||
</div>
|
||||
<div id="secondaryChars">
|
||||
<span id="secondaryCharSelects">Select secondary characters</span>
|
||||
<select id="secondaryCharList"></select>
|
||||
</div>
|
||||
<div id="bannerConfig">
|
||||
<div>
|
||||
<span>Banner Type</span>
|
||||
<select>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<span>Banner Cost Item</span>
|
||||
<select>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<span>Banner Start</span>
|
||||
<input type="date" id="bannerStartDate" />
|
||||
</div>
|
||||
<div>
|
||||
<span>Banner End</span>
|
||||
<input type="date" id="bannerEndDate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,3 +1,18 @@
|
||||
async function fillDefaultBanners() {
|
||||
getBannerData()
|
||||
await getBannerData()
|
||||
|
||||
const selectList = document.getElementById('bannerDefaultSelect')
|
||||
|
||||
for (const banner in bannerObj) {
|
||||
const data = bannerObj[banner]
|
||||
|
||||
const option = document.createElement('option')
|
||||
option.value = banner
|
||||
option.innerText = banner
|
||||
selectList.appendChild(option)
|
||||
}
|
||||
}
|
||||
|
||||
async function handleBaseBannerChange() {
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
fillDefaultBanners()
|
||||
await fillDefaultBanners()
|
||||
|
||||
console.log('loaded')
|
||||
})
|
@ -1,11 +1,12 @@
|
||||
Neutralino.init()
|
||||
|
||||
const filesystem = Neutralino.filesystem
|
||||
let bannerObj
|
||||
|
||||
async function getBannerData() {
|
||||
const bannerData = await filesystem.readFile('resources/banner_creator/data/banners.txt')
|
||||
const lines = bannerData.split('\n')
|
||||
let bannerObj = {}
|
||||
bannerObj = {}
|
||||
|
||||
for (const line of lines) {
|
||||
const values = line.split(' ')
|
||||
@ -17,6 +18,4 @@ async function getBannerData() {
|
||||
fourStars: values.slice(3)
|
||||
}
|
||||
}
|
||||
|
||||
console.log(bannerObj)
|
||||
}
|
@ -14,13 +14,36 @@ body {
|
||||
flex-direction: column
|
||||
}
|
||||
|
||||
#bannerEditor span,
|
||||
#base span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
#bannerEditor select,
|
||||
#base select {
|
||||
display: block;
|
||||
width: 60%;
|
||||
height: 30px;
|
||||
margin: 10px auto;
|
||||
}
|
||||
}
|
||||
|
||||
#bannerEditor {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex: 1 0 50%;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
#bannerEditor div {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
flex: 1 0 50%;
|
||||
}
|
||||
|
||||
#bannerConfig {
|
||||
height: 100%;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user