feat: install code of 3 to 24 letters and digits with a button to make a new one; guesses are limited per address
This commit is contained in:
1 parent
47f1b2e55b
commit
29353e5e6a
4 files changed
+71
-12
No files matched your search
@@ -12,6 +12,10 @@
|
||||
.copybox .copy { position:absolute; top:7px; right:7px; width:30px; height:30px; padding:0;
|
||||
display:inline-flex; align-items:center; justify-content:center; background:var(--panel); }
|
||||
.copybox .copy.done { color:var(--ok); border-color:var(--ok); }
|
||||
.codeform { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin-top:10px; font-size:13px; }
|
||||
.codeform label { margin:0; }
|
||||
.codeform input[type=number] { width:72px; height:30px; padding:4px 8px; }
|
||||
.codeform .ico { display:inline-flex; align-items:center; gap:6px; height:30px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -35,6 +39,15 @@
|
||||
<label>Короткая команда (секрет уже вшит в ссылку)</label>
|
||||
<div class="copybox"><pre id="short">{{.InstallShort}}</pre><button type="button" class="btn ghost small icon sq copy" data-copy="short" title="Скопировать" aria-label="Скопировать"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1"/></svg></button></div>
|
||||
|
||||
<form method="post" action="/settings/install/code" class="codeform"
|
||||
onsubmit="return confirm('Сделать новый код? Старая короткая ссылка перестанет работать.')">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
<label for="codelen">Символов в коде</label>
|
||||
<input type="number" id="codelen" name="len" min="3" max="24" value="{{.CodeLen}}">
|
||||
<button type="submit" class="btn ghost small ico"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-3-6.7L21 8"/><path d="M21 3v5h-5"/></svg>Новый код</button>
|
||||
<span class="muted">латиница и цифры, от 3 до 24; новый код отменяет старую ссылку</span>
|
||||
</form>
|
||||
|
||||
<details style="margin-top:10px">
|
||||
<summary class="muted" style="cursor:pointer">Полные варианты (секрет в команде)</summary>
|
||||
<label>curl</label>
|
||||
|
||||
Reference in new issue
Block a user