Skip to content

Commit

Permalink
feat: button to back default layout
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed May 2, 2024
1 parent 89dc7b3 commit d590d12
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
14 changes: 14 additions & 0 deletions src/intention-tower-knowledge-graph/components/Buttons.tid
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
title: $:/plugins/linonetwo/intention-tower-knowledge-graph/Components/Buttons

\procedure lingo-base() $:/plugins/linonetwo/intention-tower-knowledge-graph/language/

\define create-task-under-current-tiddler()
<$button tooltip="点击创建子任务">
<$set name="tags" filter="[<currentTiddler>] [enlist{$:/plugins/linonetwo/intention-tower-knowledge-graph/Config/task-tag}]">
Expand Down Expand Up @@ -92,6 +94,18 @@ title: $:/plugins/linonetwo/intention-tower-knowledge-graph/Components/Buttons
</$button>
\end

\define back-to-default-layout-button()
<$button>
<$action-setfield
$tiddler="$:/layout"
text=""
$timestamp="no"
/>
{{$:/core/images/default-layout}}
<<lingo BackToDefaultLayout>>
</$button>
\end

\define counts-number-of-completions()
<$button tooltip="点击增加完成次数,默认递增为1,可修改tmo_repeatInterval字段来改变间隔次数">
<$action-listops $field="tmo_repeatInterval" $filter="[all[current]get[tmo_repeatInterval]else[1]]"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ title: $:/plugins/linonetwo/intention-tower-knowledge-graph/language/en-GB/
Name: Intention Tower Knowledge Graph
ShortName: ITKG
Description: ITKG is a knowledge and task management framework for tiddlywiki. ITKG short for intention tower & knowledge graph.
BackToDefaultLayout: Back To Default Layout
Configs/Description: These settings let you customise the behaviour of "Intention Tower Knowledge Graph" plugin.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ title: $:/plugins/linonetwo/intention-tower-knowledge-graph/language/zh-Hans/
Name: 意义之塔与知识图谱
ShortName: 意义之塔
Description: 这是一个提供上下文的太微任务管理插件,鼓励自己干活,在今日摸鱼过多的时候,提醒自己还有多少有趣的事情没做。同时它也可以帮你梳理自己的人生意义。
BackToDefaultLayout: 返回默认布局
Configs/Description: 通过这些设置,您可以自定义「意义之塔与知识图谱」插件的行为。
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ title: $:/plugins/linonetwo/intention-tower-knowledge-graph/layout/IntentionTowe

</div>

<div class="itkg-buttons">
<div class="itkg-intention-tower-buttons">
<<back-to-default-layout-button>>
<<create-task-without-parent>>
<<create-project-without-parent>>
<<create-intention-without-parent>>
Expand Down
4 changes: 2 additions & 2 deletions src/intention-tower-knowledge-graph/layout/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ div.intention-tower-knowledge-graph-container {
word-break: break-all;
}

.itkg-buttons {
.itkg-intention-tower-buttons {
padding: 10px 0;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.itkg-buttons button {
.itkg-intention-tower-buttons button {
padding: 15px 20px;
}
.itkg-create-task .tc-edit-texteditor {
Expand Down

0 comments on commit d590d12

Please sign in to comment.