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