Refresh web preview button initial version working.
This commit is contained in:
parent
ac0912cb75
commit
a587817790
@ -126,6 +126,14 @@ LePage >> latestEditTime: aLeTime [
|
||||
latestEditTime := aLeTime
|
||||
]
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LePage >> localHostAddress [
|
||||
| localUrl route |
|
||||
route := MiniDocsServer teapot staticRouter prefix joinUsing: '/'.
|
||||
localUrl := MiniDocsServer teapot server localUrl asString.
|
||||
^ localUrl, route, '/', self markdeepFileName
|
||||
]
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LePage >> markdeepFileName [
|
||||
|
||||
|
@ -23,8 +23,8 @@ LePageHeaderBuilder >> addRefreshWebViewButton [
|
||||
aptitude: BrGlamorousButtonWithIconAptitude;
|
||||
label: 'Refresh web view';
|
||||
icon: BrGlamorousVectorIcons refresh;
|
||||
action: [ :aButton |
|
||||
action: [
|
||||
self page asMarkdeep exportAsFileOn: (self page storage / self page markdeepFileName).
|
||||
aButton phlow spawnObject: self page localHostAddress ].
|
||||
WebBrowser openOn: self page localHostAddress ].
|
||||
self toolbarElement addItem: newButton.
|
||||
]
|
||||
|
6
src/MiniDocs/TeaCompositeRouter.extension.st
Normal file
6
src/MiniDocs/TeaCompositeRouter.extension.st
Normal file
@ -0,0 +1,6 @@
|
||||
Extension { #name : #TeaCompositeRouter }
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
TeaCompositeRouter >> staticRouters [
|
||||
^ routers
|
||||
]
|
6
src/MiniDocs/TeaStaticRouter.extension.st
Normal file
6
src/MiniDocs/TeaStaticRouter.extension.st
Normal file
@ -0,0 +1,6 @@
|
||||
Extension { #name : #TeaStaticRouter }
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
TeaStaticRouter >> delegate [
|
||||
^ delegate
|
||||
]
|
6
src/MiniDocs/Teapot.extension.st
Normal file
6
src/MiniDocs/Teapot.extension.st
Normal file
@ -0,0 +1,6 @@
|
||||
Extension { #name : #Teapot }
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
Teapot >> staticRouter [
|
||||
^ staticRouter delegate
|
||||
]
|
Loading…
Reference in New Issue
Block a user