mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
refactor: format with GPT4
This commit is contained in:
parent
32cbd53423
commit
4fb841b6cf
@ -6,32 +6,96 @@ first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[d
|
||||
\define input-cancel-actions() <$list filter="[<storeTitle>get[text]] [<currentTiddler>get[type]] +[limit[1]]" emptyMessage="""<<cancel-delete-tiddler-actions "cancel">>"""><$action-sendmessage $message="tm-remove-field" $param="type"/><$action-deletetiddler $filter="[<typeInputTiddler>] [<refreshTitle>] [<typeSelectionTiddler>]"/></$list>
|
||||
\whitespace trim
|
||||
<$set name="refreshTitle" value=<<qualify "$:/temp/type-search/refresh">>>
|
||||
<div class="tc-edit-type-selector-wrapper">
|
||||
<em class="tc-edit tc-small-gap-right"><<lingo Type/Prompt>></em>
|
||||
<div class="tc-type-selector-dropdown-wrapper">
|
||||
<div class="tc-type-selector"><$fieldmangler>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler=<<currentTiddler>> storeTitle=<<typeInputTiddler>> refreshTitle=<<refreshTitle>> selectionStateTitle=<<typeSelectionTiddler>> field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify "$:/state/popup/type-dropdown">> class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}} cancelPopups="yes" configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]" inputCancelActions=<<input-cancel-actions>>/><$button popup=<<qualify "$:/state/popup/type-dropdown">> class="tc-btn-invisible tc-btn-dropdown tc-small-gap" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button><$button message="tm-remove-field" param="type" class="tc-btn-invisible tc-btn-icon" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}<$action-deletetiddler $filter="[<typeInputTiddler>] [<storeTitle>] [<refreshTitle>] [<selectionStateTitle>]"/></$button>
|
||||
</$fieldmangler></div>
|
||||
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<$set name="tv-show-missing-links" value="yes">
|
||||
<$reveal state=<<qualify "$:/state/popup/type-dropdown">> type="nomatch" text="" default="">
|
||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
||||
<$linkcatcher to="!!type">
|
||||
<$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group-sort]]'>
|
||||
<div class="tc-dropdown-item">
|
||||
<$text text={{!!group}}/>
|
||||
</div>
|
||||
<$set name="userInput" value={{{ [<typeInputTiddler>get[text]] }}}>
|
||||
<$list filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]] +[removeprefix[$:/language/Docs/Types/]] +[search<userInput>]"><span class={{{ [<currentTiddler>addsuffix[-primaryList]] -[<typeSelectionTiddler>get[text]] +[then[]else[tc-list-item-selected]] }}}><$link to={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]get[name]] }}}><$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="description"/><$text text=" "/>(<$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="name"/>)</$link></span>
|
||||
</$list>
|
||||
</$set>
|
||||
</$list>
|
||||
</$linkcatcher>
|
||||
</div>
|
||||
</$reveal>
|
||||
</$set>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tc-edit-type-selector-wrapper">
|
||||
<em class="tc-edit tc-small-gap-right"><<lingo Type/Prompt>></em>
|
||||
<div class="tc-type-selector-dropdown-wrapper">
|
||||
<div class="tc-type-selector">
|
||||
<$fieldmangler>
|
||||
<$macrocall
|
||||
$name="keyboard-driven-input"
|
||||
tiddler=<<currentTiddler>>
|
||||
storeTitle=<<typeInputTiddler>>
|
||||
refreshTitle=<<refreshTitle>>
|
||||
selectionStateTitle=<<typeSelectionTiddler>>
|
||||
field="type"
|
||||
tag="input"
|
||||
default=""
|
||||
placeholder={{$:/language/EditTemplate/Type/Placeholder}}
|
||||
focusPopup=<<qualify "$:/state/popup/type-dropdown">>
|
||||
class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle"
|
||||
tabindex={{$:/config/EditTabIndex}}
|
||||
focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}}
|
||||
cancelPopups="yes"
|
||||
configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]"
|
||||
inputCancelActions=<<input-cancel-actions>>
|
||||
/>
|
||||
<$button
|
||||
popup=<<qualify "$:/state/popup/type-dropdown">>
|
||||
class="tc-btn-invisible tc-btn-dropdown tc-small-gap"
|
||||
tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}}
|
||||
aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}
|
||||
>
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
<$button
|
||||
message="tm-remove-field"
|
||||
param="type"
|
||||
class="tc-btn-invisible tc-btn-icon"
|
||||
tooltip={{$:/language/EditTemplate/Type/Delete/Hint}}
|
||||
aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}
|
||||
>
|
||||
{{$:/core/images/delete-button}}
|
||||
<$action-deletetiddler
|
||||
$filter="[<typeInputTiddler>] [<storeTitle>] [<refreshTitle>] [<selectionStateTitle>]"
|
||||
/>
|
||||
</$button>
|
||||
</$fieldmangler>
|
||||
</div>
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<$set name="tv-show-missing-links" value="yes">
|
||||
<$reveal
|
||||
state=<<qualify "$:/state/popup/type-dropdown">>
|
||||
type="nomatch"
|
||||
text=""
|
||||
default=""
|
||||
>
|
||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
||||
<$linkcatcher to="!!type">
|
||||
<$list
|
||||
filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group-sort]]'
|
||||
>
|
||||
<div class="tc-dropdown-item">
|
||||
<$text text={{!!group}}/>
|
||||
</div>
|
||||
<$set name="userInput" value={{{ [<typeInputTiddler>get[text]] }}}>
|
||||
<$list
|
||||
filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]] +[removeprefix[$:/language/Docs/Types/]] +[search<userInput>]"
|
||||
>
|
||||
<span
|
||||
class={{{ [<currentTiddler>addsuffix[-primaryList]] -[<typeSelectionTiddler>get[text]] +[then[]else[tc-list-item-selected]] }}}
|
||||
>
|
||||
<$link
|
||||
to={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]get[name]] }}}
|
||||
>
|
||||
<$view
|
||||
tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}}
|
||||
field="description"
|
||||
/>
|
||||
<$text text=" "/>
|
||||
(<$view
|
||||
tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}}
|
||||
field="name"
|
||||
/>)
|
||||
</$link>
|
||||
</span>
|
||||
</$list>
|
||||
</$set>
|
||||
</$list>
|
||||
</$linkcatcher>
|
||||
</div>
|
||||
</$reveal>
|
||||
</$set>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</$set>
|
||||
|
Loading…
Reference in New Issue
Block a user