Update content/it/admin.md

This commit is contained in:
octt 2024-10-22 20:37:32 +00:00
parent a5cf31a5fd
commit 952833b3fa
1 changed files with 9 additions and 6 deletions

View File

@ -4,19 +4,22 @@ Hidden = true
<form name="admin">
<fieldset name="git" disabled>
<legend>Git Configuration</legend>
<p><label>Instance URL: &nbsp; <input type="url" name="InstanceUrl"/></label></p>
<p><label>Repository Path: &nbsp; <input type="text" name="RepoThis"/></label></p>
<p><label>Branch Name: &nbsp; <input type="text" name="BranchThis"/></label></p>
<p><label>Access Token: &nbsp; <input type="password" name="token" placeholder="***"/></label></p>
<p><label>Instance URL: &nbsp; <input type="url" name="GitInstanceUrl"/></label></p>
<p><label>Repository Path: &nbsp; <input type="text" name="GitRepoThis"/></label></p>
<p><label>Branch Name: &nbsp; <input type="text" name="GitBranchThis"/></label></p>
<p><label>Access Token: &nbsp; <input type="password" name="GitToken" placeholder="***"/></label></p>
</fieldset>
</form>
<style> form[name="admin"] input { float: right; } </style>
<style>
form[name="admin"] label { white-space: nowrap; }
form[name="admin"] input { float: right; }
</style>
<script>(() => {
const formEl = document.querySelector('form[name="admin"]');
const gitEl = formEl.querySelector('fieldset[name="git"]');
const gitData = (sitoctt.localStorage('gitAuth') || {});
for (const fieldEl of gitEl.querySelectorAll('input')) {
fieldEl.placeholder ||= sitoctt.Props[`Git${fieldEl.name}`];
fieldEl.placeholder ||= sitoctt.Props[fieldEl.name];
fieldEl.value = (gitData[fieldEl.name] || '');
fieldEl.oninput = fieldEl.onchange = fieldEl.onpaste = () => {
gitData[fieldEl.name] = fieldEl.value;