mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Player: group all output windows
This commit is contained in:
parent
b914144ae5
commit
19369c56c8
2 changed files with 23 additions and 6 deletions
|
|
@ -42,7 +42,10 @@ const Handlers = ({
|
||||||
onUpdateWindows: windows => {
|
onUpdateWindows: windows => {
|
||||||
setWindows(windows)
|
setWindows(windows)
|
||||||
},
|
},
|
||||||
onUpdateInputs: ([{type, id}]) => {
|
onUpdateInputs: data => {
|
||||||
|
if (data.length === 0) return void null
|
||||||
|
|
||||||
|
const {type, id} = data[0]
|
||||||
setCurrentWindowId(id)
|
setCurrentWindowId(id)
|
||||||
setInputType(type)
|
setInputType(type)
|
||||||
},
|
},
|
||||||
|
|
@ -111,12 +114,18 @@ export default function ({ vmParts: { file, engine } }) {
|
||||||
})[currentWindow.type]
|
})[currentWindow.type]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const byTop = (a, b) =>
|
||||||
|
a.top - b.top
|
||||||
|
|
||||||
return status.stage !== 'ready'
|
return status.stage !== 'ready'
|
||||||
? (<Status {...status} />)
|
? (<Status {...status} />)
|
||||||
: (<section className='ifplayer'>
|
: (<section className='ifplayer'>
|
||||||
{ windows
|
<section className='output'>{
|
||||||
|
windows
|
||||||
|
.sort(byTop)
|
||||||
// .filter(({id}) => id === currentWindowId)
|
// .filter(({id}) => id === currentWindowId)
|
||||||
.map(textWindow(inbox))}
|
.map(textWindow(inbox))}
|
||||||
|
</section>
|
||||||
<InputBox {...{
|
<InputBox {...{
|
||||||
inputType,
|
inputType,
|
||||||
windows,
|
windows,
|
||||||
|
|
|
||||||
|
|
@ -35,11 +35,19 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ifplayer .output {
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 2;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow-y: hidden;
|
||||||
|
|
||||||
|
border: var(--border-width) solid var(--main-color);
|
||||||
|
}
|
||||||
|
|
||||||
.ifplayer .buffer {
|
.ifplayer .buffer {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
border: var(--border-width) solid var(--main-color);
|
|
||||||
padding: var(--inner-padding);
|
padding: var(--inner-padding);
|
||||||
|
|
||||||
scrollbar-color: var(--main-color) var(--bg-color);
|
scrollbar-color: var(--main-color) var(--bg-color);
|
||||||
|
|
@ -58,11 +66,11 @@
|
||||||
|
|
||||||
.ifplayer .gridBuffer {
|
.ifplayer .gridBuffer {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-bottom: 0;
|
border-bottom: var(--border-width) solid var(--main-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifplayer .textBuffer {
|
.ifplayer .textBuffer {
|
||||||
flex: 2 1 auto;
|
flex: 2 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifplayer .textBuffer > br:first-child,
|
.ifplayer .textBuffer > br:first-child,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue