You've already forked Vaultwarden
Inital Commit
This commit is contained in:
127
root/usr/lib/vaultwarden/templates/admin/settings.hbs
Normal file
127
root/usr/lib/vaultwarden/templates/admin/settings.hbs
Normal file
@@ -0,0 +1,127 @@
|
||||
<main class="container-xl">
|
||||
<div id="admin_token_warning" class="alert alert-warning alert-dismissible fade show d-none">
|
||||
<button type="button" class="btn-close" data-bs-target="admin_token_warning" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
Sie benutzen einen unverschlüsselten 'ADMIN_TOKEN', was ein Sicherheitsrisiko darstellt.<br>
|
||||
Bitte generieren Sie einen sicheren Schlüssel mit der Argon2 PHC Methode.<br>
|
||||
Sie können dafür den Befehl 'vaultwarden hash' verwenden.<br>
|
||||
Den 'ADMIN_TOKEN' ändern Sie entsprechend in der Vaultwaren Konfiguration (/etc/vaultwarden/vaultwarden.conf).
|
||||
</div>
|
||||
<div id="config-block" class="align-items-center p-3 mb-3 bg-secondary rounded shadow">
|
||||
<div>
|
||||
<form class="form needs-validation" id="config-form" novalidate>
|
||||
{{#each page_data.config}}
|
||||
{{#if groupdoc}}
|
||||
<div class="card mb-3">
|
||||
<button id="b_{{group}}" type="button" class="card-header text-start btn btn-link text-decoration-none" aria-expanded="false" aria-controls="g_{{group}}" data-bs-toggle="collapse" data-bs-target="#g_{{group}}">{{groupdoc}}</button>
|
||||
<div id="g_{{group}}" class="card-body collapse">
|
||||
{{#each elements}}
|
||||
{{#if editable}}
|
||||
<div class="row my-2 align-items-center is-overridden-{{overridden}} alert-row" title="[{{name}}] {{doc.description}}">
|
||||
{{#case type "text" "number" "password"}}
|
||||
<label for="input_{{name}}" class="col-sm-3 col-form-label">{{doc.name}}</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control conf-{{type}}" id="input_{{name}}" type="{{type}}"
|
||||
name="{{name}}" value="{{value}}" {{#if default}} placeholder="Standard: {{default}}"{{/if}}>
|
||||
{{#case type "password"}}
|
||||
<button class="btn btn-outline-secondary input-group-text" type="button" data-vw-pw-toggle="input_{{name}}">Anzeigen / Verbergen</button>
|
||||
{{/case}}
|
||||
</div>
|
||||
</div>
|
||||
{{/case}}
|
||||
{{#case type "checkbox"}}
|
||||
<div class="col-sm-3 col-form-label">{{doc.name}}</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input conf-{{type}}" type="checkbox" id="input_{{name}}"
|
||||
name="{{name}}" {{#if value}} checked {{/if}}>
|
||||
|
||||
<label class="form-check-label" for="input_{{name}}"> Standard: {{default}} </label>
|
||||
</div>
|
||||
</div>
|
||||
{{/case}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#case group "smtp"}}
|
||||
<div class="row my-2 align-items-center pt-3 border-top" title="Verschickt eine Test-E-Mail an die angegebene E-Mail-Adresse.">
|
||||
<label for="smtp-test-email" class="col-sm-3 col-form-label">SMTP-Konfigurationstest</label>
|
||||
<div class="col-sm-8 input-group">
|
||||
<input class="form-control" id="smtp-test-email" type="email" placeholder="E-Mail-Adresse" required spellcheck="false">
|
||||
<button style="color: #333; background-color: #fda34a; border-color: #fda34a;" type="button" class="btn btn-outline-primary input-group-text" id="smtpTest">Abschicken</button>
|
||||
<div class="invalid-tooltip">Bitte geben Sie eine korrekte E-Mail-Adresse an.</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/case}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
<div class="card mb-3">
|
||||
<button id="b_readonly" type="button" class="card-header text-start btn btn-link text-decoration-none" aria-expanded="false" aria-controls="g_readonly"
|
||||
data-bs-toggle="collapse" data-bs-target="#g_readonly">Read-Only Settings</button>
|
||||
<div id="g_readonly" class="card-body collapse">
|
||||
{{#each page_data.config}}
|
||||
{{#each elements}}
|
||||
{{#unless editable}}
|
||||
<div class="row my-2 align-items-center alert-row" title="[{{name}}] {{doc.description}}">
|
||||
{{#case type "text" "number" "password"}}
|
||||
<label for="input_{{name}}" class="col-sm-3 col-form-label">{{doc.name}}</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
{{!--
|
||||
Also set the database_url input as password here.
|
||||
If we would set it to password in config.rs it will not be character masked for the support string.
|
||||
And sometimes this is more useful for providing support than just 3 asterisk.
|
||||
--}}
|
||||
{{#if (eq name "database_url")}}
|
||||
<input readonly class="form-control" id="input_{{name}}" type="password" value="{{value}}" {{#if default}} placeholder="Default: {{default}}" {{/if}}>
|
||||
<button class="btn btn-outline-secondary" type="button" data-vw-pw-toggle="input_{{name}}">Anzeigen / Verbergen</button>
|
||||
{{else}}
|
||||
<input readonly class="form-control" id="input_{{name}}" type="{{type}}" value="{{value}}" {{#if default}} placeholder="Default: {{default}}" {{/if}} spellcheck="false">
|
||||
{{#case type "password"}}
|
||||
<button class="btn btn-outline-secondary" type="button" data-vw-pw-toggle="input_{{name}}">Anzeigen / Verbergen</button>
|
||||
{{/case}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/case}}
|
||||
{{#case type "checkbox"}}
|
||||
<div class="col-sm-3 col-form-label">{{doc.name}}</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-check align-middle">
|
||||
<input disabled class="form-check-input" type="checkbox" id="input_{{name}}"
|
||||
{{#if value}} checked {{/if}}>
|
||||
|
||||
<label class="form-check-label" for="input_{{name}}"> Standard: {{default}} </label>
|
||||
</div>
|
||||
</div>
|
||||
{{/case}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button style="color: #333; background-color: #fda34a; border-color: #fda34a;" type="submit" class="btn btn-primary">Speichern</button>
|
||||
<button style="color: #333; background-color: #fda34a; border-color: #fda34a;" type="button" class="btn btn-danger float-end" id="deleteConf">Zurücksetzen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<style>
|
||||
#config-block ::placeholder {
|
||||
/* Most modern browsers support this now. */
|
||||
color: orangered;
|
||||
}
|
||||
|
||||
.is-overridden-true {
|
||||
--bs-alert-color: #664d03;
|
||||
--bs-alert-bg: #fff3cd;
|
||||
--bs-alert-border-color: #ffecb5;
|
||||
}
|
||||
</style>
|
||||
<script src="{{urlpath}}/vw_static/admin_settings.js"></script>
|
||||
Reference in New Issue
Block a user