Skip to content

Commit

Permalink
Merge branch 'master' into multi-wiki-support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jermolene committed Dec 9, 2024
2 parents 8defedd + 3fc9523 commit cb6c471
Show file tree
Hide file tree
Showing 133 changed files with 2,269 additions and 392 deletions.
18 changes: 8 additions & 10 deletions boot/boot.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/modules/server/routes/get-login-basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports.handler = function(request,response,state) {
response.end();
} else {
// Redirect to the root wiki if login worked
var location = ($tw.syncadaptor && $tw.syncadaptor.host)? $tw.syncadaptor.host: "/";
var location = ($tw.syncadaptor && $tw.syncadaptor.host)? $tw.syncadaptor.host: `${state.pathPrefix}/`;
response.writeHead(302,{
Location: location
});
Expand Down
5 changes: 4 additions & 1 deletion core/modules/widgets/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {
}
// Get the current value of the tiddler we're editing
var tiddler = this.wiki.getTiddler(targetTitle);
var defaultType = this.wiki.getTiddlerText("$:/config/DefaultMissingType", "").trim();
var defaultFields = { type: defaultType };
// Save the initial value of the draft tiddler
draftTitle = this.generateDraftTitle(targetTitle);
var draftTiddler = new $tw.Tiddler({
Expand All @@ -289,7 +291,8 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {
"draft.title": targetTitle,
"draft.of": targetTitle
},
this.wiki.getModificationFields()
this.wiki.getModificationFields(),
tiddler === null || tiddler === undefined ? defaultFields : {}
);
this.wiki.addTiddler(draftTiddler);
return draftTiddler;
Expand Down
2 changes: 2 additions & 0 deletions core/modules/widgets/testcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ TestCaseWidget.prototype.render = function(parent,nextSibling) {
this.execute();
// Create container DOM node
var domNode = this.document.createElement("div");
domNode.setAttribute("class", "tc-test-case " + this.testcaseClass);
this.domNodes.push(domNode);
parent.insertBefore(domNode,nextSibling);
// Render the children into a hidden DOM node
Expand Down Expand Up @@ -145,6 +146,7 @@ TestCaseWidget.prototype.execute = function() {
this.testcaseTestActions = this.getAttribute("testActions");
this.testcaseTestExpectedResult = this.getAttribute("testExpectedResult");
this.testcaseHideIfPass = this.getAttribute("testHideIfPass");
this.testcaseClass = this.getAttribute("class","");
};

/*
Expand Down
50 changes: 25 additions & 25 deletions core/palettes/FlexokiDark.tid
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ flexoki-bl-2: <<colour flexoki-blue-600>>
flexoki-pu-2: <<colour flexoki-purple-600>>
flexoki-ma-2: <<colour flexoki-magenta-600>>

alert-background: <<colour flexoki-yellow-100>>
alert-border: <<colour flexoki-ye-2>>
alert-background: <<colour flexoki-yellow-900>>
alert-border: <<colour flexoki-ye>>
alert-highlight: <<colour flexoki-re>>
alert-muted-foreground: <<colour flexoki-ye>>
background: #100F0F
Expand Down Expand Up @@ -103,8 +103,8 @@ external-link-foreground-visited: <<colour flexoki-bl>>
external-link-foreground: <<colour flexoki-bl>>
footnote-target-background: <<colour flexoki-bg-2>>
foreground: #CECDC3
highlight-background: #ffff00
highlight-foreground: #000000
highlight-background: <<colour flexoki-cyan-950>>
highlight-foreground: <<colour flexoki-cyan-400>>
menubar-background: <<colour primary>>
menubar-foreground: <<colour flexoki-paper>>
message-background: <<colour background>>
Expand All @@ -118,14 +118,14 @@ modal-footer-border: <<colour flexoki-ui-3>>
modal-header-border: <<colour flexoki-ui-3>>
muted-foreground: <<colour flexoki-tx-2>>
network-activity-foreground: <<colour flexoki-cy>>
notification-background: <<colour flexoki-ui-3>>
notification-border: <<colour flexoki-ui>>
notification-background: <<colour flexoki-bg>>
notification-border: <<colour flexoki-paper>>
page-background: <<colour flexoki-bg-2>>
pre-background: <<colour flexoki-ui-3>>
pre-background: <<colour flexoki-bg-2>>
pre-border: <<colour flexoki-ui-2>>
primary: <<colour flexoki-cy>>
selection-background: #2b7b73
selection-foreground: <<colour flexoki-tx>>
selection-background: <<colour primary>>
selection-foreground: <<colour background>>
select-tag-background: <<colour flexoki-bg>>
select-tag-foreground: <<colour flexoki-paper>>
sidebar-button-foreground: <<colour foreground>>
Expand Down Expand Up @@ -193,20 +193,20 @@ toolbar-cancel-button:
toolbar-done-button:
untagged-background: <<colour flexoki-tx-3>>
very-muted-foreground: <<colour flexoki-600>>
wikilist-background: #e5e5e5
wikilist-item: #fff
wikilist-info: #000
wikilist-title: #666
wikilist-background: <<colour flexoki-ui>>
wikilist-item: <<colour flexoki-black>>
wikilist-info: <<colour flexoki-paper>>
wikilist-title: <<colour flexoki-tx-2>>
wikilist-title-svg: <<colour wikilist-title>>
wikilist-url: #aaa
wikilist-button-open: #4fb82b
wikilist-button-open-hover: green
wikilist-button-reveal: #5778d8
wikilist-button-reveal-hover: blue
wikilist-button-remove: #d85778
wikilist-button-remove-hover: red
wikilist-toolbar-background: #d3d3d3
wikilist-toolbar-foreground: #888
wikilist-droplink-dragover: rgba(255,192,192,0.5)
wikilist-button-background: #acacac
wikilist-button-foreground: #000
wikilist-url: <<colour flexoki-tx-3>>
wikilist-button-open: <<colour flexoki-gr>>
wikilist-button-open-hover: <<colour flexoki-gr-2>>
wikilist-button-reveal: <<colour flexoki-cy>>
wikilist-button-reveal-hover: <<colour flexoki-cy-2>>
wikilist-button-remove: <<colour flexoki-re>>
wikilist-button-remove-hover: <<colour flexoki-re-2>>
wikilist-toolbar-background: <<colour flexoki-ui-2>>
wikilist-toolbar-foreground: <<colour flexoki-600>>
wikilist-droplink-dragover: <<colour flexoki-pu>>
wikilist-button-background: <<colour flexoki-tx-3>>
wikilist-button-foreground: <<colour flexoki-paper>>
40 changes: 20 additions & 20 deletions core/palettes/FlexokiLight.tid
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ dragger-background: <<colour foreground>>
dragger-foreground: <<colour background>>
dropdown-background: <<colour background>>
dropdown-border: <<colour muted-foreground>>
dropdown-tab-background-selected: #fff
dropdown-tab-background: #ececec
dropdown-tab-background-selected: <<colour background>>
dropdown-tab-background: <<colour flexoki-bg-2>>
dropzone-background: <<colour flexoki-gr>>
external-link-background-hover: inherit
external-link-background-visited: inherit
Expand All @@ -105,8 +105,8 @@ external-link-foreground-visited: <<colour flexoki-bl>>
external-link-foreground: <<colour flexoki-bl>>
footnote-target-background: <<colour flexoki-bg-2>>
foreground: #100F0F
highlight-background: #ffff00
highlight-foreground: #000000
highlight-background: <<colour flexoki-cyan-050>>
highlight-foreground: inherit
menubar-background: <<colour primary>>
menubar-foreground: <<colour flexoki-paper>>
message-background: <<colour flexoki-bg>>
Expand All @@ -123,7 +123,7 @@ network-activity-foreground: <<colour flexoki-cy-2>>
notification-background: <<colour flexoki-bg>>
notification-border: <<color flexoki-black>>
page-background: <<colour flexoki-bg-2>>
pre-background: <<colour flexoki-bg>>
pre-background: <<colour flexoki-bg-2>>
pre-border: <<colour flexoki-ui-2>>
primary: <<colour flexoki-cy-2>>
selection-background: <<colour flexoki-cy-2>>
Expand Down Expand Up @@ -196,19 +196,19 @@ toolbar-done-button:
untagged-background: <<colour flexoki-tx-3>>
very-muted-foreground: <<colour flexoki-500>>
wikilist-background: <<colour flexoki-ui>>
wikilist-item: #fff
wikilist-info: #000
wikilist-title: #666
wikilist-item: <<colour flexoki-paper>>
wikilist-info: <<colour flexoki-black>>
wikilist-title: <<colour flexoki-tx-2>>
wikilist-title-svg: <<colour wikilist-title>>
wikilist-url: #aaa
wikilist-button-open: #4fb82b
wikilist-button-open-hover: green
wikilist-button-reveal: #5778d8
wikilist-button-reveal-hover: blue
wikilist-button-remove: #d85778
wikilist-button-remove-hover: red
wikilist-toolbar-background: #d3d3d3
wikilist-toolbar-foreground: #888
wikilist-droplink-dragover: rgba(255,192,192,0.5)
wikilist-button-background: #acacac
wikilist-button-foreground: #000
wikilist-url: <<colour flexoki-tx-3>>
wikilist-button-open: <<colour flexoki-gr-2>>
wikilist-button-open-hover: <<colour flexoki-gr>>
wikilist-button-reveal: <<colour flexoki-cy-2>>
wikilist-button-reveal-hover: <<colour flexoki-cy>>
wikilist-button-remove: <<colour flexoki-re-2>>
wikilist-button-remove-hover: <<colour flexoki-re>>
wikilist-toolbar-background: <<colour flexoki-ui-2>>
wikilist-toolbar-foreground: <<colour flexoki-500>>
wikilist-droplink-dragover: <<colour flexoki-pu>>
wikilist-button-background: <<colour flexoki-tx-3>>
wikilist-button-foreground: <<colour flexoki-black>>
6 changes: 3 additions & 3 deletions core/palettes/GruvBoxDark.tid
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ diff-delete-foreground: <<colour foreground>>
diff-equal-background:
diff-equal-foreground: <<colour foreground>>
diff-insert-background: #b8bb26
diff-insert-foreground: <<colour foreground>>
diff-invisible-background:
diff-invisible-foreground: <<colour muted-foreground>>
diff-insert-foreground: <<colour background>>
diff-invisible-background: #ffff97
diff-invisible-foreground: #444347
dirty-indicator: #fb4934
download-background: #b8bb26
download-foreground: <<colour background>>
Expand Down
4 changes: 2 additions & 2 deletions core/palettes/Nord.tid
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ diff-delete-foreground: <<colour foreground>>
diff-equal-background:
diff-equal-foreground: <<colour foreground>>
diff-insert-background: #A3BE8C
diff-insert-foreground: <<colour foreground>>
diff-invisible-background:
diff-insert-foreground: <<colour background>>
diff-invisible-background: #f9f3b5
diff-invisible-foreground: <<colour muted-foreground>>
dirty-indicator: #BF616A
download-background: #A3BE8C
Expand Down
8 changes: 8 additions & 0 deletions core/palettes/SolarFlare.tid
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ foreground: #657b83
tiddler-link-foreground: <<colour primary>>

alert-border: #b99e2f
diff-delete-background: <<colour red>>
diff-delete-foreground: <<colour background>>
diff-equal-background: inherit
diff-equal-foreground: inherit
diff-insert-background: <<colour green>>
diff-insert-foreground: <<colour background>>
diff-invisible-background: <<colour yellow>>
diff-invisible-foreground: <<colour background>>
dirty-indicator: #ff0000
dropzone-background: rgba(0,200,0,0.7)
external-link-background-hover: inherit
Expand Down
8 changes: 8 additions & 0 deletions core/palettes/SolarizedDark.tid
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ button-foreground: #93a1a1
code-background: #073642
code-border: #586e75
code-foreground: #93a1a1
diff-delete-background: #dc322f
diff-delete-foreground: #eee8d5
diff-equal-background: inherit
diff-equal-foreground: inherit
diff-insert-background: #859900
diff-insert-foreground: #073642
diff-invisible-background: #b58900
diff-invisible-foreground: #eee8d5
dirty-indicator: #dc322f
download-background: #859900
download-foreground: #073642
Expand Down
8 changes: 8 additions & 0 deletions core/palettes/SolarizedLight.tid
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ button-foreground: #586e75
code-background: #eee8d5
code-border: #93a1a1
code-foreground: #586e75
diff-delete-background: #dc322f
diff-delete-foreground: #eee8d5
diff-equal-background: inherit
diff-equal-foreground: inherit
diff-insert-background: #859900
diff-insert-foreground: #eee8d5
diff-invisible-background: #b58900
diff-invisible-foreground: #eee8d5
dirty-indicator: #dc322f
download-background: #859900
download-foreground: #eee8d5
Expand Down
8 changes: 4 additions & 4 deletions core/palettes/Twilight.tid
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ code-background: rgba(0,0,0,0.03)
code-border: rgba(0,0,0,0.08)
code-foreground: rgb(255, 94, 94)
diff-delete-background: #ffc9c9
diff-delete-foreground: <<colour foreground>>
diff-delete-foreground: <<colour background>>
diff-equal-background:
diff-equal-foreground: <<colour foreground>>
diff-insert-background: #aaefad
diff-insert-foreground: <<colour foreground>>
diff-invisible-background:
diff-invisible-foreground: <<colour muted-foreground>>
diff-insert-foreground: <<colour background>>
diff-invisible-background: #fdfcbd
diff-invisible-foreground: <<colour background>>
dirty-indicator: rgb(255, 94, 94)
download-background: #19a974
download-foreground: rgb(38, 38, 38)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ title: $:/core/ui/ViewTemplate/body/rendered-plain-text
code-body: yes

\whitespace trim
\parameters (language:"css")
<$wikify name="text" text={{!!text}} type={{!!type}}>
<$codeblock code=<<text>> language="css"/>
<$codeblock code=<<text>> language=<<language>>/>
</$wikify>
4 changes: 4 additions & 0 deletions core/ui/ViewTemplate/body/rendered-plain-text/html.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: $:/core/ui/ViewTemplate/body/rendered-plain-text/html
code-body: yes

{{||$:/core/ui/ViewTemplate/body/rendered-plain-text|html}}
1 change: 1 addition & 0 deletions core/wiki/config/ViewTemplateBodyFilters.multids
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ tags: $:/tags/ViewTemplateBodyFilter

testcase: [tag[$:/tags/wiki-test-spec]type[text/vnd.tiddlywiki-multiple]] [tag[$:/tags/wiki-test-spec-failing]type[text/vnd.tiddlywiki-multiple]] :then[[$:/core/ui/TestCaseTemplate]]
stylesheet: [tag[$:/tags/Stylesheet]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]]
html: [tag[$:/tags/RawMarkupWikified]] [tag[$:/tags/RawMarkupWikified/TopHead]] [tag[$:/tags/RawMarkupWikified/TopBody]] [tag[$:/tags/RawMarkupWikified/BottomBody]] :then[[$:/core/ui/ViewTemplate/body/rendered-plain-text/html]]
core-ui-tags: [tag[$:/tags/PageTemplate]] [tag[$:/tags/EditTemplate]] [tag[$:/tags/ViewTemplate]] [tag[$:/tags/KeyboardShortcut]] [tag[$:/tags/ImportPreview]] [tag[$:/tags/EditPreview]] [tag[$:/tags/EditorToolbar]] [tag[$:/EditorTools]] [tag[$:/tags/Actions]] [tag[$:/tags/ToolbarButtonStyle]] :then[[$:/core/ui/ViewTemplate/body/code]]
system: [prefix[$:/boot/]] [prefix[$:/core/macros]] [prefix[$:/core/save/]] [prefix[$:/core/templates/]] [prefix[$:/config/]] [prefix[$:/core/config/]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/info/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/temp/]] :and[!is[image]] :then[[$:/core/ui/ViewTemplate/body/code]]
code-body: [field:code-body[yes]then[$:/core/ui/ViewTemplate/body/code]]
Expand Down
Loading

0 comments on commit cb6c471

Please sign in to comment.