kopia lustrzana https://github.com/robinmoisson/staticrypt
add color support to index.html
rodzic
b257919458
commit
65cb064e2d
24
index.html
24
index.html
|
@ -221,6 +221,26 @@
|
||||||
placeholder="Default: 'DECRYPT'"
|
placeholder="Default: 'DECRYPT'"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="template_color_primary">Primary color (button, ...)</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="template_color_primary"
|
||||||
|
placeholder="Default: '#4CAF50'"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="template_color_secondary">Secondary color (background, ...)</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="template_color_secondary"
|
||||||
|
placeholder="Default: '#76B852'"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-primary pull-right" type="submit">
|
<button class="btn btn-primary pull-right" type="submit">
|
||||||
|
@ -1321,6 +1341,8 @@ exports.init = init;
|
||||||
const encryptedMsg = await encode(unencrypted, password, salt);
|
const encryptedMsg = await encode(unencrypted, password, salt);
|
||||||
|
|
||||||
const templateButton = document.getElementById("template_button").value,
|
const templateButton = document.getElementById("template_button").value,
|
||||||
|
templateColorPrimary = document.getElementById("template_color_primary").value,
|
||||||
|
templateColorSecondary = document.getElementById("template_color_secondary").value,
|
||||||
templateInstructions = document.getElementById("template_instructions").value,
|
templateInstructions = document.getElementById("template_instructions").value,
|
||||||
isRememberEnabled = document.getElementById("remember").checked,
|
isRememberEnabled = document.getElementById("remember").checked,
|
||||||
templateTitle = document.getElementById("template_title").value.trim(),
|
templateTitle = document.getElementById("template_title").value.trim(),
|
||||||
|
@ -1338,6 +1360,8 @@ exports.init = init;
|
||||||
is_remember_enabled: JSON.stringify(isRememberEnabled),
|
is_remember_enabled: JSON.stringify(isRememberEnabled),
|
||||||
js_staticrypt: getScriptAsString("staticrypt"),
|
js_staticrypt: getScriptAsString("staticrypt"),
|
||||||
template_button: templateButton ? templateButton : "DECRYPT",
|
template_button: templateButton ? templateButton : "DECRYPT",
|
||||||
|
template_color_primary: templateColorPrimary || "#4CAF50",
|
||||||
|
template_color_secondary: templateColorSecondary || "#76B852",
|
||||||
template_instructions: templateInstructions || "",
|
template_instructions: templateInstructions || "",
|
||||||
template_placeholder: templatePlaceholder || "Password",
|
template_placeholder: templatePlaceholder || "Password",
|
||||||
template_remember: templateRemember || "Remember me",
|
template_remember: templateRemember || "Remember me",
|
||||||
|
|
|
@ -221,6 +221,26 @@
|
||||||
placeholder="Default: 'DECRYPT'"
|
placeholder="Default: 'DECRYPT'"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="template_color_primary">Primary color (button, ...)</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="template_color_primary"
|
||||||
|
placeholder="Default: '#4CAF50'"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="template_color_secondary">Secondary color (background, ...)</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="template_color_secondary"
|
||||||
|
placeholder="Default: '#76B852'"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-primary pull-right" type="submit">
|
<button class="btn btn-primary pull-right" type="submit">
|
||||||
|
@ -351,6 +371,8 @@
|
||||||
const encryptedMsg = await encode(unencrypted, password, salt);
|
const encryptedMsg = await encode(unencrypted, password, salt);
|
||||||
|
|
||||||
const templateButton = document.getElementById("template_button").value,
|
const templateButton = document.getElementById("template_button").value,
|
||||||
|
templateColorPrimary = document.getElementById("template_color_primary").value,
|
||||||
|
templateColorSecondary = document.getElementById("template_color_secondary").value,
|
||||||
templateInstructions = document.getElementById("template_instructions").value,
|
templateInstructions = document.getElementById("template_instructions").value,
|
||||||
isRememberEnabled = document.getElementById("remember").checked,
|
isRememberEnabled = document.getElementById("remember").checked,
|
||||||
templateTitle = document.getElementById("template_title").value.trim(),
|
templateTitle = document.getElementById("template_title").value.trim(),
|
||||||
|
@ -368,6 +390,8 @@
|
||||||
is_remember_enabled: JSON.stringify(isRememberEnabled),
|
is_remember_enabled: JSON.stringify(isRememberEnabled),
|
||||||
js_staticrypt: getScriptAsString("staticrypt"),
|
js_staticrypt: getScriptAsString("staticrypt"),
|
||||||
template_button: templateButton ? templateButton : "DECRYPT",
|
template_button: templateButton ? templateButton : "DECRYPT",
|
||||||
|
template_color_primary: templateColorPrimary || "#4CAF50",
|
||||||
|
template_color_secondary: templateColorSecondary || "#76B852",
|
||||||
template_instructions: templateInstructions || "",
|
template_instructions: templateInstructions || "",
|
||||||
template_placeholder: templatePlaceholder || "Password",
|
template_placeholder: templatePlaceholder || "Password",
|
||||||
template_remember: templateRemember || "Remember me",
|
template_remember: templateRemember || "Remember me",
|
||||||
|
|
Ładowanie…
Reference in New Issue