1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-12 05:43:16 +00:00

Merge c3ca72ebe21fc0a024d938866ee213dc01f9fff7 into 961e74f73d230d0028efb586db07699120eac888

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

@ -1592,6 +1592,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"});
};
/*

@ -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

@ -221,7 +221,7 @@ function updateLocationHash(options) {
$tw.utils.copyToClipboard(url,{successNotification: options.successNotification, failureNotification: options.failureNotification});
}
// 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;

@ -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"/>

@ -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>

@ -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>

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