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" "Dependencies"
spec spec
baseline: 'Mustache' with: [ spec repository: 'github://noha/mustache']. baseline: 'Mustache' with: [ spec repository: 'github://noha/mustache'].
self xmlParserHTML: spec. "self xmlParserHTML: spec."
"Packages" "Packages"
spec spec
package: 'MiniDocs' package: 'MiniDocs'
with: [ spec requires: #('Mustache' 'XMLParserHTML') ] with: [ spec requires: #('Mustache' "'XMLParserHTML'") ]
]. ].
spec spec

View File

@ -28,7 +28,7 @@ LeDatabase >> addPageFromMarkdeep: markdeepDocTree [
ifTrue: [ | existingPage | ifTrue: [ | existingPage |
existingPage := self pages detect: [ :pageTemp | existingPage := self pages detect: [ :pageTemp |
pageTemp includesSnippetUid: snippet uid ]. pageTemp includesSnippetUid: snippet uid ].
^ self importErrorMessage: existingPage. ] ^ self errorCardFor: (self importErrorMessage: existingPage) ]
ifFalse: [ ifFalse: [
snippet database: self. snippet database: self.
self registerSnippet: snippet ] ]. self registerSnippet: snippet ] ].
@ -41,7 +41,8 @@ LeDatabase >> addPageFromMarkdeepUrl: aString [
| page | | page |
page := self detectLocalPageForRemote: aString. page := self detectLocalPageForRemote: aString.
page ifNotNil: [ :arg | ^ self importErrorMessage: page ]. page ifNotNil: [ :arg | self errorCardFor: (self importErrorMessage: page).
^ self ].
^ self addPageFromMarkdeep: (self docTreeForLink: aString) ^ self addPageFromMarkdeep: (self docTreeForLink: aString)
] ]
@ -63,34 +64,6 @@ LeDatabase >> docTreeForLink: aString [
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LeDatabase >> gtViewErrorDetailsOn: aView [ LeDatabase >> gtViewErrorDetailsOn: aView [
<gtView> <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 ^ aView explicit
title: 'Errors' translated; title: 'Errors' translated;
priority: 5; priority: 5;
@ -103,10 +76,7 @@ LeDatabase >> gtViewErrorDetailsOn: aView [
c horizontal matchParent ]; c horizontal matchParent ];
padding: (BlInsets all: 10). padding: (BlInsets all: 10).
container container
addChild: errorMessage; addChildren: (self errorCardFor: String loremIpsum)
addChild: keepButton;
addChild: overwriteButton;
addChild: backupButton
"container addChild: self asCardElement "]. "container addChild: self asCardElement "].
] ]