From 55e786f01cb3cd257ba5723242e4f989251a4750 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 28 Oct 2023 19:49:22 -0500 Subject: [PATCH] For the moment we need the previous method while we fix Socialmentrica loading. --- src/MiniDocs/LeDatabase.extension.st | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/MiniDocs/LeDatabase.extension.st b/src/MiniDocs/LeDatabase.extension.st index 4df7556..4959e01 100644 --- a/src/MiniDocs/LeDatabase.extension.st +++ b/src/MiniDocs/LeDatabase.extension.st @@ -119,10 +119,11 @@ LeDatabase >> docTreeForLink: aString [ ] { #category : #'*MiniDocs' } -LeDatabase >> errorCardFor: errorKey [ +LeDatabase >> errorCardFor: error [ - | keepButton overwriteButton loadCopyButton errorMessageUI localPage | + | keepButton overwriteButton loadCopyButton errorMessageUI localPage errorKey | + errorKey := error keys first. localPage := self pageWithID: errorKey. keepButton := BrButton new aptitude: BrGlamorousButtonWithIconAndLabelAptitude; @@ -145,9 +146,9 @@ LeDatabase >> errorCardFor: errorKey [ margin: (BlInsets left: 10). loadCopyButton := BrButton new aptitude: BrGlamorousButtonWithIconAndLabelAptitude; - label: 'Backup local page'; + label: 'Load remote page as a copy'; icon: BrGlamorousVectorIcons changes; - action: [ :aButton | ]; + action: [ :aButton | self ]; margin: (BlInsets left: 10). errorMessageUI := BrEditor new @@ -163,6 +164,24 @@ LeDatabase >> errors [ ^ self optionAt: 'errors' ifAbsentPut: [ Dictionary new ] ] +{ #category : #'*MiniDocs' } +LeDatabase >> gtViewErrorDetailsOn: aView [ + + ^ aView explicit + title: 'Errors' translated; + priority: 5; + stencil: [ | container | + container := BlElement new + layout: BlFlowLayout new; + constraintsDo: [ :c | + c vertical fitContent. + c horizontal matchParent ]; + padding: (BlInsets all: 10). + container + addChildren: (self errorCardFor: self errors) + ]. +] + { #category : #'*MiniDocs' } LeDatabase >> gtViewErrorDetailsOn: aView withKey: erroKey [