Creating a confirmation button in importer UI.

This commit is contained in:
ruidajo 2025-03-12 20:07:19 -05:00
parent bd7fa11363
commit 3fffd37e8f

View File

@ -31,20 +31,28 @@ LeMiniDocsImport >> createDropdownExpandedHandleButton [
{ #category : #accessing }
LeMiniDocsImport >> createURLeditable [
| base editable |
| base editable button |
base := BlElement new
background: (Color white);
size: 200 @ 30;
margin: (BlInsets all: 10);
yourself.
background: Color white;
size: 300 @55;
margin: (BlInsets all: 10);
yourself.
editable := BrEditableLabel new
aptitude: BrGlamorousEditableLabelAptitude new glamorousRegularFontAndSize;
text: 'Document link';
switchToEditor.
editable when: BrEditorAcceptWish do: [ :aWish |
self importDocumentFrom: aWish text asString.
].
aptitude: BrGlamorousEditableLabelAptitude new glamorousRegularFontAndSize;
text: 'Document link';
fitContent;
switchToEditor.
editable
when: BrEditorAcceptWish
do: [ :aWish | self importDocumentFrom: aWish text asString ].
button := BrButton new
label: 'ok';
aptitude: BrGlamorousButtonWithLabelAptitude;
fitContent;
relocate: 0 @ 30.
button action: [ :aButton | editable acceptEdition ].
base addChild: editable.
base addChild: button.
^ base
]
@ -71,11 +79,9 @@ LeMiniDocsImport >> initialize [
icon: BrGlamorousVectorIcons downwards;
label: 'Add MiniDocs';
aptitude: BrGlamorousButtonWithIconAndLabelAptitude.
self addAptitude: (BrGlamorousWithDropdownAptitude
self addAptitude: (BrGlamorousWithExplicitDropdownAptitude
handle: [ self createDropdownExpandedHandleButton ]
content: [ self createURLeditable ]).
self aptitude - BrGlamorousButtonExteriorAptitude.
]
{ #category : #accessing }