Modifying baseline and error pane for importer in lepiter database.

This commit is contained in:
ruidajo 2022-10-07 16:59:57 -05:00
parent 0bb618610b
commit 9b65bac64e
2 changed files with 6 additions and 36 deletions

View File

@ -13,11 +13,11 @@ BaselineOfMiniDocs >> baseline: spec [
"Dependencies"
spec
baseline: 'Mustache' with: [ spec repository: 'github://noha/mustache'].
self xmlParserHTML: spec.
"self xmlParserHTML: spec."
"Packages"
spec
package: 'MiniDocs'
with: [ spec requires: #('Mustache' 'XMLParserHTML') ]
with: [ spec requires: #('Mustache' "'XMLParserHTML'") ]
].
spec

View File

@ -28,7 +28,7 @@ LeDatabase >> addPageFromMarkdeep: markdeepDocTree [
ifTrue: [ | existingPage |
existingPage := self pages detect: [ :pageTemp |
pageTemp includesSnippetUid: snippet uid ].
^ self importErrorMessage: existingPage. ]
^ self errorCardFor: (self importErrorMessage: existingPage) ]
ifFalse: [
snippet database: self.
self registerSnippet: snippet ] ].
@ -41,7 +41,8 @@ LeDatabase >> addPageFromMarkdeepUrl: aString [
| page |
page := self detectLocalPageForRemote: aString.
page ifNotNil: [ :arg | ^ self importErrorMessage: page ].
page ifNotNil: [ :arg | self errorCardFor: (self importErrorMessage: page).
^ self ].
^ self addPageFromMarkdeep: (self docTreeForLink: aString)
]
@ -63,34 +64,6 @@ LeDatabase >> docTreeForLink: aString [
{ #category : #'*MiniDocs' }
LeDatabase >> gtViewErrorDetailsOn: aView [
<gtView>
| keepButton overwriteButton backupButton errorMessage |
keepButton := BrButton new
aptitude: BrGlamorousButtonWithIconAndLabelAptitude;
beTinySize;
label: 'Keep existing page';
icon: BrGlamorousVectorIcons cancel;
action: [ :aButton | ];
margin: (BlInsets left: 10).
overwriteButton := BrButton new
aptitude: BrGlamorousButtonWithIconAndLabelAptitude;
beTinySize;
label: 'Overwrite page';
icon: BrGlamorousVectorIcons edit;
action: [ :aButton | ];
margin: (BlInsets left: 10).
backupButton := BrButton new
aptitude: BrGlamorousButtonWithIconAndLabelAptitude;
beTinySize;
label: 'BackUp page';
icon: BrGlamorousVectorIcons changes;
action: [ :aButton | ];
margin: (BlInsets left: 10).
errorMessage := BrEditor new
aptitude: BrGlamorousRegularEditorAptitude new "+ aModeLook;";
text: String loremIpsum;
vFitContent.
^ aView explicit
title: 'Errors' translated;
priority: 5;
@ -103,10 +76,7 @@ LeDatabase >> gtViewErrorDetailsOn: aView [
c horizontal matchParent ];
padding: (BlInsets all: 10).
container
addChild: errorMessage;
addChild: keepButton;
addChild: overwriteButton;
addChild: backupButton
addChildren: (self errorCardFor: String loremIpsum)
"container addChild: self asCardElement "].
]