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 [