Now errors are nested dictionaries.
This commit is contained in:
parent
9bde9e6492
commit
9371ddfef6
@ -64,8 +64,9 @@ LeDatabase >> docTreeForLink: aString [
|
|||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LeDatabase >> errorCardFor: error [
|
LeDatabase >> errorCardFor: error [
|
||||||
|
|
||||||
| keepButton overwriteButton backupButton errorMessageUI localPage |
|
| keepButton overwriteButton backupButton errorMessageUI localPage errorKey |
|
||||||
localPage := self pageWithID: (error at: 'key').
|
errorKey := error keys first.
|
||||||
|
localPage := self pageWithID: errorKey.
|
||||||
keepButton := BrButton new
|
keepButton := BrButton new
|
||||||
aptitude: BrGlamorousButtonWithIconAndLabelAptitude;
|
aptitude: BrGlamorousButtonWithIconAndLabelAptitude;
|
||||||
label: 'Keep existing local page';
|
label: 'Keep existing local page';
|
||||||
@ -80,7 +81,7 @@ 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: 'remote'))
|
aButton phlow spawnObject: (self addPageFromMarkdeepUrl: (error at: errorKey at: 'remote'))
|
||||||
];
|
];
|
||||||
margin: (BlInsets left: 10).
|
margin: (BlInsets left: 10).
|
||||||
backupButton := BrButton new
|
backupButton := BrButton new
|
||||||
@ -92,7 +93,7 @@ LeDatabase >> errorCardFor: error [
|
|||||||
|
|
||||||
errorMessageUI := BrEditor new
|
errorMessageUI := BrEditor new
|
||||||
aptitude: BrGlamorousRegularEditorAptitude new ;
|
aptitude: BrGlamorousRegularEditorAptitude new ;
|
||||||
text: (error at: 'message');
|
text: (error at: errorKey at: 'message');
|
||||||
vFitContent.
|
vFitContent.
|
||||||
^ { errorMessageUI. keepButton. overwriteButton. backupButton }
|
^ { errorMessageUI. keepButton. overwriteButton. backupButton }
|
||||||
]
|
]
|
||||||
@ -100,7 +101,7 @@ LeDatabase >> errorCardFor: error [
|
|||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LeDatabase >> errors [
|
LeDatabase >> errors [
|
||||||
|
|
||||||
^ self optionAt: 'errors' ifAbsent: [ self optionAt: 'errors' put: Dictionary new ]
|
^ self optionAt: 'errors' ifAbsentPut: [ Dictionary new ]
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
@ -117,7 +118,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 first)
|
addChildren: (self errorCardFor: self errors)
|
||||||
].
|
].
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -148,11 +149,10 @@ LeDatabase >> importErrorForLocal: page withRemote: externalDocLocation [
|
|||||||
'Please choose one of the following options to addres the issue:
|
'Please choose one of the following options to addres the issue:
|
||||||
' ].
|
' ].
|
||||||
error := Dictionary new
|
error := Dictionary new
|
||||||
at: 'key' put: id;
|
at: 'remote' put: externalDocLocation;
|
||||||
at:'remote' put: externalDocLocation;
|
at: 'message' put: message ;
|
||||||
at: 'message' put: message;
|
|
||||||
yourself.
|
yourself.
|
||||||
self errors add: error
|
self errors at: id put: error
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
|
Loading…
Reference in New Issue
Block a user