diff --git a/core/images/locked-padlock.tid b/core/images/locked-padlock.tid new file mode 100644 index 000000000..ebcbd92e5 --- /dev/null +++ b/core/images/locked-padlock.tid @@ -0,0 +1,8 @@ +title: $:/core/images/locked-padlock +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/unlocked-padlock.tid b/core/images/unlocked-padlock.tid new file mode 100644 index 000000000..fc0b2bf97 --- /dev/null +++ b/core/images/unlocked-padlock.tid @@ -0,0 +1,8 @@ +title: $:/core/images/unlocked-padlock +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index edcff716b..9d5c1896a 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -16,6 +16,11 @@ Delete/Caption: delete Delete/Hint: Delete this tiddler Edit/Caption: edit Edit/Hint: Edit this tiddler +Encryption/Caption: encryption +Encryption/ClearPassword/Caption: clear password +Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption +Encryption/SetPassword/Caption: set password +Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption Info/Caption: info Info/Hint: Show information for this tiddler Home/Caption: home diff --git a/core/ui/PageControls/encryption.tid b/core/ui/PageControls/encryption.tid new file mode 100644 index 000000000..2859a1a46 --- /dev/null +++ b/core/ui/PageControls/encryption.tid @@ -0,0 +1,24 @@ +title: $:/core/ui/Buttons/encryption +tags: $:/tags/PageControls +caption: {{$:/core/images/locked-padlock}} {{$:/language/Buttons/Encryption/Caption}} + +<$reveal type="match" state="$:/isEncrypted" text="yes"> +<$button message="tw-clear-password" title={{$:/language/Buttons/Encryption/ClearPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/ClearPassword/Caption}} class=<>> +<$list filter="[prefix[yes]]"> +{{$:/core/images/locked-padlock}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/> + + + +<$reveal type="nomatch" state="$:/isEncrypted" text="yes"> +<$button message="tw-set-password" title={{$:/language/Buttons/Encryption/SetPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/SetPassword/Caption}} class=<>> +<$list filter="[prefix[yes]]"> +{{$:/core/images/unlocked-padlock}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/> + + + diff --git a/core/wiki/config/PageControlButtons.multids b/core/wiki/config/PageControlButtons.multids index c3a4a8e6b..7d80b6d44 100644 --- a/core/wiki/config/PageControlButtons.multids +++ b/core/wiki/config/PageControlButtons.multids @@ -1,4 +1,5 @@ title: $:/config/PageControlButtons/Visibility/$:/ +core/ui/Buttons/encryption: hide core/ui/Buttons/home: hide core/ui/Buttons/permaview: hide