mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-04 17:07:22 +00:00
Add styles for InputBox
This commit is contained in:
parent
f6fd5da6f7
commit
fce8be2af0
4 changed files with 10 additions and 4 deletions
|
|
@ -81,7 +81,8 @@ export default function ({ currentWindow, inputType, sendMessage }) {
|
||||||
value={inputText}
|
value={inputText}
|
||||||
placeholder={placeholder[inputType]}
|
placeholder={placeholder[inputType]}
|
||||||
autofocus
|
autofocus
|
||||||
|
autocomplete="off"
|
||||||
onInput={({ target: { value } }) => setInputText(value)}
|
onInput={({ target: { value } }) => setInputText(value)}
|
||||||
type='text' />
|
type='search' />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,13 +55,13 @@ const Handlers = ({
|
||||||
onFileRead: ({ filename }) => {
|
onFileRead: ({ filename }) => {
|
||||||
if (filename === 'save') return null
|
if (filename === 'save') return null
|
||||||
|
|
||||||
const lsName = prompt('Enter RecordID:')
|
const lsName = prompt('Enter the name of the saved file:')
|
||||||
|
|
||||||
const record = localStorage.getItem(`save-${lsName}`)
|
const record = localStorage.getItem(`save-${lsName}`)
|
||||||
return decode(record)
|
return decode(record)
|
||||||
},
|
},
|
||||||
onFileWrite: ({ filename }, content) => {
|
onFileWrite: ({ filename }, content) => {
|
||||||
const lsName = prompt('Choose RecordID:')
|
const lsName = prompt('Select a name for the saved file:')
|
||||||
const record = encode(content)
|
const record = encode(content)
|
||||||
|
|
||||||
localStorage.setItem(`save-${lsName}`, record)
|
localStorage.setItem(`save-${lsName}`, record)
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
.inputBox {
|
.inputBox {
|
||||||
flex: 0 1 auto;
|
flex: 0 1 auto;
|
||||||
|
|
||||||
|
font: inherit;
|
||||||
|
outline: 0;
|
||||||
border: 2px solid #000;
|
border: 2px solid #000;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
html, body {
|
html, body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100vh;
|
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 27px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#root {
|
#root {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue