-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ The values of settings are displayed in the interface (#13)
* Inteface helper better db managment * Better interfaces & script doesn't work on github docs * Displaying values state in nav
- Loading branch information
Showing
12 changed files
with
564 additions
and
328 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
appendCSS(` | ||
.u2n-text-input-wrapper { | ||
display: flex; | ||
gap: 5px; | ||
position: relative; | ||
} | ||
.u2n-text-input-wrapper input { | ||
width: 100%; | ||
padding-left: 10px; | ||
} | ||
.u2n-text-input-wrapper label { | ||
position: absolute; | ||
top: 0; | ||
left: 5px; | ||
transform: translateY(-50%); | ||
background-color: var(--u2n-nav-item-bg); | ||
padding: 2px 5px; | ||
border-radius: 2px; | ||
font-size: 9px; | ||
} | ||
`, { sourceName: 'interface-text-input' }); | ||
|
||
const getTextInput = ({ | ||
idInput, idButton, label, value = '', placeholder, | ||
}) => { | ||
return `<div class="u2n-text-input-wrapper"> | ||
<input id="${idInput}" type="text" value="${value}" placeholder="${placeholder}" /> | ||
${label ? `<label>${label}</label>` : ''} | ||
<button id="${idButton}" class="u2n-nav-popup-button" title="Save"> | ||
${IconSave} | ||
</button> | ||
</div>`; | ||
}; | ||
|
||
appendCSS(` | ||
.u2n-checkbox-wrapper { | ||
display: flex; | ||
align-items: center; | ||
gap: 5px; | ||
font-weight: 400; | ||
} | ||
.u2n-checkbox-wrapper input { | ||
margin-left: 5px; | ||
margin-right: 5px; | ||
} | ||
`, { sourceName: 'interface-value' }); | ||
|
||
const getCheckbox = ({ | ||
idInput, label, name, value, isChecked = false, type = 'checkbox', | ||
}) => { | ||
return `<label class="u2n-checkbox-wrapper"> | ||
<span> | ||
<input | ||
type="${type}" | ||
id="${idInput}" | ||
name="${name}" | ||
${value ? `value="${value}"` : ''} | ||
${isChecked ? ' checked' : ''} | ||
/> | ||
</span> | ||
<span>${label}</span> | ||
</label>`; | ||
}; | ||
|
||
const getRadiobox = (params) => { | ||
return getCheckbox({ ...params, type: 'radio' }); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.