Media build part 2 (unreleased): drive wiring in every app (R-1024/R-1037), old-install repair (R-1047), drive events notice + real restart now/later + stream check, file browser lets go of dead/removed drives and recreates on return (R-1038), safe removal keeps the drive (R-1044), Plex claim on the running server + probe accept (R-1028/R-1045)
gates / gates (push) Successful in 45s
gates / gates (push) Successful in 45s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
78c894234c
commit
f580d88a14
46 files changed
+3700
-8
No files matched your search
@@ -112,6 +112,16 @@
|
||||
<h3>{{T "app_info.setup_gate_title"}}</h3>
|
||||
<p>{{T "app_info.setup_gate_closed"}}</p>{{- if .SignupNative}}
|
||||
<p class="form-hint" data-restarts-once="true">{{T "app_info.restarts_once"}}</p>{{- end}}
|
||||
{{- if .PlexClaim}}
|
||||
<div class="plex-claim" data-plex-claim="true">
|
||||
<p>{{T "app_info.plex_claim_intro"}}</p>
|
||||
<div class="input-with-button">
|
||||
<input type="text" id="plex-claim-code" class="form-control" placeholder="claim-xxxxxxxxxxxxxxxxxxxx" autocomplete="off" spellcheck="false">
|
||||
<button type="button" class="btn btn-sm btn-primary" id="plex-claim-btn" onclick="plexClaim(this)">{{T "app_info.plex_claim_btn"}}</button>
|
||||
</div>
|
||||
<span class="form-hint app-press-err" style="display:none;color:var(--red)"></span>
|
||||
</div>
|
||||
{{- end}}
|
||||
{{- if .SetupGateHasProbe}}
|
||||
<p class="form-hint">{{T "app_info.setup_gate_probe"}}</p>
|
||||
<button type="button" class="btn btn-sm btn-outline" onclick="appPress(this, '/apps/{{.Meta.Slug}}/setup-gate/open')">{{T "app_info.setup_gate_done_btn"}}</button>
|
||||
@@ -368,6 +378,16 @@ function icCopyPw(btn) {
|
||||
{{- if or .SetupGateClosed .SignupClosed .CloseSignupOffered (and .Stack.Deployed .KnownLoginLine) .LostFiles}}
|
||||
<script>
|
||||
// v0.280.0: the household's presses on this page — "Done, I set it up" (decision 46), "I changed it" (R-710).
|
||||
// R-1028: the household's Plex code, given to the RUNNING server; the gate opens when Plex says it is claimed.
|
||||
function plexClaim(btn) {
|
||||
var box = btn.closest('.plex-claim'), err = box.querySelector('.app-press-err');
|
||||
var code = (document.getElementById('plex-claim-code') || {}).value || '';
|
||||
err.style.display = 'none'; btn.disabled = true;
|
||||
fetch('/apps/plex/plex-claim', {method: 'POST', headers: Object.assign({'Content-Type': 'application/json'}, csrfHeaders()), credentials: 'same-origin', body: JSON.stringify({code: code.trim()})})
|
||||
.then(function (r) { return r.json(); })
|
||||
.then(function (j) { if (!j.ok) { throw new Error(j.error || ''); } window.location.reload(); })
|
||||
.catch(function (e) { btn.disabled = false; err.textContent = e.message; err.style.display = 'inline'; });
|
||||
}
|
||||
function appPress(btn, url) {
|
||||
var err = btn.parentNode.querySelector('.app-press-err');
|
||||
if (err) { err.style.display = 'none'; }
|
||||
|
||||
Reference in new issue
Block a user