kopia lustrzana https://github.com/robinmoisson/staticrypt
add color customization of template
rodzic
707d05c83f
commit
ff55a69c99
78
README.md
78
README.md
|
@ -71,47 +71,53 @@ The password argument is optional if `STATICRYPT_PASSWORD` is set in the environ
|
|||
Usage: staticrypt <filename> [options]
|
||||
|
||||
Options:
|
||||
--help Show help [boolean]
|
||||
--version Show version number [boolean]
|
||||
-c, --config Path to the config file. Set to "false" to
|
||||
disable. [string] [default: ".staticrypt.json"]
|
||||
-d, --directory Name of the directory where the encrypted files
|
||||
will be saved. [string] [default: "encrypted/"]
|
||||
-p, --password The password to encrypt your file with. Leave
|
||||
empty to be prompted for it. If
|
||||
STATICRYPT_PASSWORD is set in the env, we'll use
|
||||
that instead. [string] [default: null]
|
||||
--remember Expiration in days of the "Remember me" checkbox
|
||||
that will save the (salted + hashed) password in
|
||||
localStorage when entered by the user. Set to
|
||||
"false" to hide the box. Default: "0", no
|
||||
expiration. [number] [default: 0]
|
||||
-s, --salt Generate a config file or set the salt manually.
|
||||
Pass a 32-character-long hexadecimal string to
|
||||
use as salt, or leave empty to generate, display
|
||||
and save to config a random salt. This won't
|
||||
overwrite an existing config file. [string]
|
||||
--share Get a link containing your hashed password that
|
||||
will auto-decrypt the page. Pass your URL as a
|
||||
value to append "#staticrypt_pwd=<hashed_pwd>",
|
||||
or leave empty to display the hash to append.
|
||||
[string]
|
||||
--short Hide the "short password" warning.
|
||||
--help Show help [boolean]
|
||||
--version Show version number [boolean]
|
||||
-c, --config Path to the config file. Set to "false" to
|
||||
disable.[string] [default: ".staticrypt.json"]
|
||||
-d, --directory Name of the directory where the encrypted
|
||||
files will be saved.
|
||||
[string] [default: "encrypted/"]
|
||||
-p, --password The password to encrypt your file with. Leave
|
||||
empty to be prompted for it. If
|
||||
STATICRYPT_PASSWORD is set in the env, we'll
|
||||
use that instead. [string] [default: null]
|
||||
--remember Expiration in days of the "Remember me"
|
||||
checkbox that will save the (salted + hashed)
|
||||
password in localStorage when entered by the
|
||||
user. Set to "false" to hide the box. Default:
|
||||
"0", no expiration. [number] [default: 0]
|
||||
-s, --salt Generate a config file or set the salt
|
||||
manually. Pass a 32-character-long hexadecimal
|
||||
string to use as salt, or leave empty to
|
||||
generate, display and save to config a random
|
||||
salt. This won't overwrite an existing config
|
||||
file. [string]
|
||||
--share Get a link containing your hashed password
|
||||
that will auto-decrypt the page. Pass your URL
|
||||
as a value to append
|
||||
"#staticrypt_pwd=<hashed_pwd>", or leave empty
|
||||
to display the hash to append. [string]
|
||||
--short Hide the "short password" warning.
|
||||
[boolean] [default: false]
|
||||
-t, --template Path to custom HTML template with password
|
||||
prompt.
|
||||
-t, --template Path to custom HTML template with password
|
||||
prompt.
|
||||
[string] [default: "/code/staticrypt/lib/password_template.html"]
|
||||
--template-button Label to use for the decrypt button. Default:
|
||||
"DECRYPT". [string] [default: "DECRYPT"]
|
||||
--template-instructions Special instructions to display to the user.
|
||||
--template-button Label to use for the decrypt button. Default:
|
||||
"DECRYPT". [string] [default: "DECRYPT"]
|
||||
--template-color-primary Primary color (button...)
|
||||
[string] [default: "#4CAF50"]
|
||||
--template-color-secondary Secondary color (page background...)
|
||||
[string] [default: "#76B852"]
|
||||
--template-instructions Special instructions to display to the user.
|
||||
[string] [default: ""]
|
||||
--template-error Error message to display on entering wrong
|
||||
password. [string] [default: "Bad password!"]
|
||||
--template-placeholder Placeholder to use for the password input.
|
||||
--template-error Error message to display on entering wrong
|
||||
password. [string] [default: "Bad password!"]
|
||||
--template-placeholder Placeholder to use for the password input.
|
||||
[string] [default: "Password"]
|
||||
--template-remember Label to use for the "Remember me" checkbox.
|
||||
--template-remember Label to use for the "Remember me" checkbox.
|
||||
[string] [default: "Remember me"]
|
||||
--template-title Title for the output HTML page.
|
||||
--template-title Title for the output HTML page.
|
||||
[string] [default: "Protected Page"]
|
||||
|
||||
|
||||
|
|
|
@ -350,6 +350,16 @@ function parseCommandLineArguments() {
|
|||
describe: 'Label to use for the decrypt button. Default: "DECRYPT".',
|
||||
default: "DECRYPT",
|
||||
})
|
||||
.option("template-color-primary", {
|
||||
type: "string",
|
||||
describe: "Primary color (button...)",
|
||||
default: "#4CAF50",
|
||||
})
|
||||
.option("template-color-secondary", {
|
||||
type: "string",
|
||||
describe: "Secondary color (page background...)",
|
||||
default: "#76B852",
|
||||
})
|
||||
.option("template-instructions", {
|
||||
type: "string",
|
||||
describe: "Special instructions to display to the user.",
|
||||
|
@ -374,16 +384,6 @@ function parseCommandLineArguments() {
|
|||
type: "string",
|
||||
describe: "Title for the output HTML page.",
|
||||
default: "Protected Page",
|
||||
})
|
||||
.option("template-color-primary", {
|
||||
type: "string",
|
||||
describe: "Button color.",
|
||||
default: "#4CAF50",
|
||||
})
|
||||
.option("template-color-secondary", {
|
||||
type: "string",
|
||||
describe: "Background color of the page.",
|
||||
default: "#76b852",
|
||||
})
|
||||
});
|
||||
}
|
||||
exports.parseCommandLineArguments = parseCommandLineArguments;
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
.staticrypt-form .staticrypt-decrypt-button:hover, .staticrypt-form .staticrypt-decrypt-button:active, .staticrypt-form .staticrypt-decrypt-button:focus {
|
||||
background: /*[|template_color_primary|]*/0;
|
||||
filter: brightness(95%);
|
||||
filter: brightness(92%);
|
||||
}
|
||||
|
||||
.staticrypt-html {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "staticrypt",
|
||||
"version": "3.0.4",
|
||||
"version": "3.1.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "staticrypt",
|
||||
"version": "3.0.4",
|
||||
"version": "3.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.0.3",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "staticrypt",
|
||||
"version": "3.0.4",
|
||||
"version": "3.1.0",
|
||||
"description": "Based on the [crypto-js](https://github.com/brix/crypto-js) library, StatiCrypt uses AES-256 to encrypt your input with your passphrase and put it in a HTML file with a password prompt that can decrypted in-browser (client side).",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
|
|
Ładowanie…
Reference in New Issue