This commit is contained in:
Jeremy Ruston 2024-05-02 06:06:40 +02:00 committed by GitHub
commit 04bde320bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 53 additions and 2 deletions

View File

@ -1594,6 +1594,8 @@ $tw.Wiki.prototype.processSafeMode = function() {
this.addTiddler(new $tw.Tiddler({title: titleReportTiddler, text: report.join("\n\n")}));
// Set $:/DefaultTiddlers to point to our report
this.addTiddler(new $tw.Tiddler({title: "$:/DefaultTiddlers", text: "[[" + titleReportTiddler + "]]"}));
// Switch to the safe mode layout
this.addTiddler({title: "$:/layout", text: "$:/core/ui/SafeLayout"});
};
/*

View File

@ -58,6 +58,7 @@ Manager/Controls/Show/Option/Tiddlers: tiddlers
Manager/Controls/Show/Prompt: Show:
Manager/Controls/Sort/Prompt: Sort by:
Manager/Item/Colour: Colour
Manager/Item/Editor: Editor
Manager/Item/Fields: Fields
Manager/Item/Icon/None: (none)
Manager/Item/Icon: Icon

View File

@ -214,7 +214,7 @@ function updateLocationHash(options) {
break;
}
// Only change the location hash if we must, thus avoiding unnecessary onhashchange events
if($tw.utils.getLocationHash() !== $tw.locationHash) {
if($tw.utils.getLocationHash() !== $tw.locationHash && !$tw.safeMode) {
if(options.updateHistory === "yes") {
// Assign the location hash so that history is updated
window.location.hash = $tw.locationHash;

View File

@ -0,0 +1,5 @@
title: $:/Manager/ItemMain/Editor
tags: $:/tags/Manager/ItemMain
caption: {{$:/language/Manager/Item/Editor}}
<$edit-text tag="textarea" class="tc-edit-texteditor tc-edit-texteditor-body tc-max-width"/>

View File

@ -13,3 +13,8 @@ caption: {{$:/language/Manager/Item/Tools}}
{{$:/core/images/edit-button}}&#32;edit
</$button>
</p>
<p>
<$button message="tm-delete-tiddler" param=<<currentTiddler>>>
{{$:/core/images/delete-button}}&#32;delete
</$button>
</p>

View File

@ -0,0 +1,37 @@
title: $:/core/ui/SafeLayout
tags: $:/tags/Layout
name: Safe Mode Layout
description: Safe Mode Layout
icon: $:/core/images/list
\whitespace trim
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
\define tv-config-toolbar-class() tc-btn-invisible
\define tv-config-toolbar-icons() yes
\define tv-config-toolbar-text() no
<div style="margin: 1em;">
<$navigator story="$:/StoryList" history="$:/HistoryList">
<h2>Layout</h2>
{{$:/snippets/LayoutSwitcher}}
<h2>Controls</h2>
<div class="tc-page-controls">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]">
<$transclude mode="inline"/>
</$list>
</div>
<h2>Tiddlers</h2>
<$transclude tiddler="$:/Manager" mode="block"/>
</$navigator>
</div>

View File

@ -1,3 +1,4 @@
title: $:/state/popup/manager/item/$:/Manager/
ItemMain/RawText: hide
ItemMain/RawText: hide
ItemMain/Editor: hide