mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Add a page control for encryption
This commit is contained in:
parent
4de1a1adbe
commit
2380392f35
8
core/images/locked-padlock.tid
Normal file
8
core/images/locked-padlock.tid
Normal file
@ -0,0 +1,8 @@
|
||||
title: $:/core/images/locked-padlock
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-locked-padlock tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M96.4723753,64 L105,64 L105,96.0097716 C105,113.673909 90.6736461,128 73.001193,128 L55.998807,128 C38.3179793,128 24,113.677487 24,96.0097716 L24,64 L32.0000269,64 C32.0028554,48.2766389 32.3030338,16.2688026 64.1594984,16.2688041 C95.9543927,16.2688056 96.4648869,48.325931 96.4723753,64 Z M80.5749059,64 L48.4413579,64 C48.4426205,47.71306 48.5829272,31.9999996 64.1595001,31.9999996 C79.8437473,31.9999996 81.1369461,48.1359182 80.5749059,64 Z M67.7315279,92.3641717 C70.8232551,91.0923621 73,88.0503841 73,84.5 C73,79.8055796 69.1944204,76 64.5,76 C59.8055796,76 56,79.8055796 56,84.5 C56,87.947435 58.0523387,90.9155206 61.0018621,92.2491029 L55.9067479,115.020857 L72.8008958,115.020857 L67.7315279,92.3641717 L67.7315279,92.3641717 Z"></path>
|
||||
</g>
|
||||
</svg>
|
8
core/images/unlocked-padlock.tid
Normal file
8
core/images/unlocked-padlock.tid
Normal file
@ -0,0 +1,8 @@
|
||||
title: $:/core/images/unlocked-padlock
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-unlocked-padlock tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M48.6266053,64 L105,64 L105,96.0097716 C105,113.673909 90.6736461,128 73.001193,128 L55.998807,128 C38.3179793,128 24,113.677487 24,96.0097716 L24,64 L30.136303,64 C19.6806213,51.3490406 2.77158986,28.2115132 25.8366966,8.85759246 C50.4723026,-11.8141335 71.6711028,13.2108337 81.613302,25.0594855 C91.5555012,36.9081373 78.9368488,47.4964439 69.1559674,34.9513593 C59.375086,22.4062748 47.9893192,10.8049522 35.9485154,20.9083862 C23.9077117,31.0118202 34.192312,43.2685325 44.7624679,55.8655518 C47.229397,58.805523 48.403443,61.5979188 48.6266053,64 Z M67.7315279,92.3641717 C70.8232551,91.0923621 73,88.0503841 73,84.5 C73,79.8055796 69.1944204,76 64.5,76 C59.8055796,76 56,79.8055796 56,84.5 C56,87.947435 58.0523387,90.9155206 61.0018621,92.2491029 L55.9067479,115.020857 L72.8008958,115.020857 L67.7315279,92.3641717 L67.7315279,92.3641717 Z"></path>
|
||||
</g>
|
||||
</svg>
|
@ -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
|
||||
|
24
core/ui/PageControls/encryption.tid
Normal file
24
core/ui/PageControls/encryption.tid
Normal file
@ -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=<<tw-config-toolbar-class>>>
|
||||
<$list filter="[<tw-config-toolbar-icons>prefix[yes]]">
|
||||
{{$:/core/images/locked-padlock}}
|
||||
</$list>
|
||||
<$list filter="[<tw-config-toolbar-text>prefix[yes]]">
|
||||
<$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/>
|
||||
</$list>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$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=<<tw-config-toolbar-class>>>
|
||||
<$list filter="[<tw-config-toolbar-icons>prefix[yes]]">
|
||||
{{$:/core/images/unlocked-padlock}}
|
||||
</$list>
|
||||
<$list filter="[<tw-config-toolbar-text>prefix[yes]]">
|
||||
<$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/>
|
||||
</$list>
|
||||
</$button>
|
||||
</$reveal>
|
@ -1,4 +1,5 @@
|
||||
title: $:/config/PageControlButtons/Visibility/$:/
|
||||
|
||||
core/ui/Buttons/encryption: hide
|
||||
core/ui/Buttons/home: hide
|
||||
core/ui/Buttons/permaview: hide
|
||||
|
Loading…
Reference in New Issue
Block a user