1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-13 05:19:58 +00:00

improve procedure names and ControlPanel texts

This commit is contained in:
pmario 2024-01-25 22:23:16 +01:00
parent 7629036009
commit 9323fbc893
2 changed files with 14 additions and 15 deletions

View File

@ -57,8 +57,8 @@ LayoutSwitcher/Caption: Layout
LoadedModules/Caption: Loaded Modules
LoadedModules/Hint: These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process.
Palette/Caption: Palette
Palette/Config/DefaultDark/Caption: Default Dark
Palette/Config/DefaultLight/Caption: Default Light
Palette/Config/DefaultDark/Caption: Dark palette
Palette/Config/DefaultLight/Caption: Light palette
Palette/Config/Detection/Caption: Detect Browser Ligh/Dark Setting
Palette/Editor/Clone/Caption: clone
Palette/Editor/Clone/Prompt: It is recommended that you clone this shadow palette before editing it

View File

@ -4,9 +4,9 @@ tags: Features
title: DarkLightChangeActions
type: text/vnd.tiddlywiki
\procedure createLightDarkSwitcherTitle() _/startup/light-dark/detection
\procedure lightDarkSwitcherTitle() _/startup/light-dark/detection
\procedure startupLightDarkTemplate()
\procedure startupLightDarkActionTemplate()
<$reveal type="match" stateTitle="$:/config/palette/enable-light-dark-detection" text="yes">
<$let default={{{ [<dark-mode>match[yes]then[$:/config/palette/default-dark]else[$:/config/palette/default-light]] }}}>
<$action-setfield $tiddler="$:/palette" text={{{ [<default>get[text]] }}}/>
@ -15,19 +15,18 @@ type: text/vnd.tiddlywiki
\end
\procedure createLightDarkSwitcher()
<% if [<createLightDarkSwitcherTitle>!has[text]] %>
<% if [<lightDarkSwitcherTitle>!has[text]] %>
<$action-createtiddler
$basetitle=<<createLightDarkSwitcherTitle>>
text=<<startupLightDarkTemplate>>
caption= "{{$:/language/ControlPanel/Palette/Config/Detection/Caption}}"
code-body= "yes"
tags= "$:/tags/DarkLightChangeActions"
$basetitle=<<lightDarkSwitcherTitle>>
text=<<startupLightDarkActionTemplate>>
caption= "{{$:/language/ControlPanel/Palette/Config/Detection/Caption}}"
code-body= "yes"
tags= "$:/tags/DarkLightChangeActions"
/>
<$action-navigate $to=<<createLightDarkSwitcherTitle>>/>
<$action-navigate $to=<<lightDarkSwitcherTitle>>/>
<% else %>
<$action-navigate $to=<<createLightDarkSwitcherTitle>>/>
<$action-navigate $to=<<lightDarkSwitcherTitle>>/>
<% endif %>
\end
<<.from-version "5.3.4">> Actions tagged <<tag "$:/tags/DarkLightChangeActions">> are executed whenever the browser or OS dark / light setting is changed.
@ -53,7 +52,7 @@ The following variable is defined for all actions DarkLightChangeActions
The following example defines the $:/palette tiddler based on the dark / light mode setting. Palettes are tagged: <<tag "$:/tags/Palette">> -- The tag-pill dropdown can be used to see all possible palette tiddlers.
<$button actions=<<createLightDarkSwitcher>> >Create <<createLightDarkSwitcherTitle>> tiddler</$button>
<$button actions=<<createLightDarkSwitcher>> >Create <<lightDarkSwitcherTitle>> tiddler</$button>
```
title: _/startup/light-dark/detection
@ -62,4 +61,4 @@ code-body: yes
tags: $:/tags/DarkLightChangeActions
```
<pre><code><$transclude $variable="startupLightDarkTemplate" $mode=block $output="text/plain" $type="text/plain" /></code></pre>
<pre><code><$transclude $variable="startupLightDarkActionTemplate" $mode=block $output="text/plain" $type="text/plain" /></code></pre>