Fixing errors' log view.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-10-28 19:13:02 -05:00
parent 253a5df692
commit 6143da2db9

View File

@ -119,10 +119,10 @@ LeDatabase >> docTreeForLink: aString [
] ]
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LeDatabase >> errorCardFor: error [ LeDatabase >> errorCardFor: errorKey [
| keepButton overwriteButton loadCopyButton errorMessageUI localPage |
| keepButton overwriteButton backupButton errorMessageUI localPage errorKey |
errorKey := error keys first.
localPage := self pageWithID: errorKey. localPage := self pageWithID: errorKey.
keepButton := BrButton new keepButton := BrButton new
aptitude: BrGlamorousButtonWithIconAndLabelAptitude; aptitude: BrGlamorousButtonWithIconAndLabelAptitude;
@ -139,11 +139,11 @@ LeDatabase >> errorCardFor: error [
icon: BrGlamorousVectorIcons edit; icon: BrGlamorousVectorIcons edit;
action: [ :aButton | action: [ :aButton |
self removePage: localPage. self removePage: localPage.
aButton phlow spawnObject: (self addPageFromMarkdeepUrl: (error at: errorKey at: 'remote')). aButton phlow spawnObject: (self addPageFromMarkdeepUrl: (self errors at: errorKey at: 'remote')).
self errors removeKey: errorKey self errors removeKey: errorKey
]; ];
margin: (BlInsets left: 10). margin: (BlInsets left: 10).
backupButton := BrButton new loadCopyButton := BrButton new
aptitude: BrGlamorousButtonWithIconAndLabelAptitude; aptitude: BrGlamorousButtonWithIconAndLabelAptitude;
label: 'Backup local page'; label: 'Backup local page';
icon: BrGlamorousVectorIcons changes; icon: BrGlamorousVectorIcons changes;
@ -152,9 +152,9 @@ LeDatabase >> errorCardFor: error [
errorMessageUI := BrEditor new errorMessageUI := BrEditor new
aptitude: BrGlamorousRegularEditorAptitude new ; aptitude: BrGlamorousRegularEditorAptitude new ;
text: (error at: errorKey at: 'message'); text: (self errors at: errorKey at: 'message');
vFitContent. vFitContent.
^ { errorMessageUI. keepButton. overwriteButton. backupButton } ^ { errorMessageUI. keepButton. overwriteButton. loadCopyButton }
] ]
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
@ -164,7 +164,7 @@ LeDatabase >> errors [
] ]
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LeDatabase >> gtViewErrorDetailsOn: aView [ LeDatabase >> gtViewErrorDetailsOn: aView withKey: erroKey [
<gtView> <gtView>
^ aView explicit ^ aView explicit
title: 'Errors' translated; title: 'Errors' translated;
@ -177,7 +177,7 @@ LeDatabase >> gtViewErrorDetailsOn: aView [
c horizontal matchParent ]; c horizontal matchParent ];
padding: (BlInsets all: 10). padding: (BlInsets all: 10).
container container
addChildren: (self errorCardFor: self errors) addChildren: (self errorCardFor: erroKey)
]. ].
] ]
@ -211,7 +211,7 @@ LeDatabase >> importErrorForLocal: page withRemote: externalDocLocation [
at: 'remote' put: externalDocLocation; at: 'remote' put: externalDocLocation;
at: 'message' put: message ; at: 'message' put: message ;
yourself. yourself.
self errors at: id put: error self errors at: id put: error.
] ]
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }