mirror of
https://github.com/makew0rld/amfora.git
synced 2024-12-04 14:46:29 -05:00
🐛 Allow open new tab while loading
This commit is contained in:
parent
56a56896c9
commit
420b8a83a2
@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Only one request is made for each URL - `v1.3.0` accidentally made two requests each time (#50)
|
- Only one request is made for each URL - `v1.3.0` accidentally made two requests each time (#50)
|
||||||
- Using the `..` command doesn't keep the query string (#49)
|
- Using the `..` command doesn't keep the query string (#49)
|
||||||
- Any error that occurs when downloading a file will be displayed, and the partially downloaded file will be deleted
|
- Any error that occurs when downloading a file will be displayed, and the partially downloaded file will be deleted
|
||||||
|
- Allow for opening a new tab while the current one is loading
|
||||||
|
|
||||||
|
|
||||||
## [1.3.0] - 2020-07-10
|
## [1.3.0] - 2020-07-10
|
||||||
|
3
NOTES.md
3
NOTES.md
@ -3,7 +3,8 @@
|
|||||||
## Issues
|
## Issues
|
||||||
- URL for each tab should not be stored as a string - in the current code there's lots of reparsing the URL
|
- URL for each tab should not be stored as a string - in the current code there's lots of reparsing the URL
|
||||||
- Can't go back or do other things while page is loading - need a way to stop `handleURL`
|
- Can't go back or do other things while page is loading - need a way to stop `handleURL`
|
||||||
- Allow for opening a new tab while the current one is loading
|
|
||||||
|
## Regressions
|
||||||
- Can't leave the help window
|
- Can't leave the help window
|
||||||
- Can't interact with page after clicking Cancel on bkmk (and other?) modal(s)
|
- Can't interact with page after clicking Cancel on bkmk (and other?) modal(s)
|
||||||
|
|
||||||
|
@ -253,19 +253,6 @@ func Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch event.Key() {
|
switch event.Key() {
|
||||||
case tcell.KeyCtrlT:
|
|
||||||
if tabs[curTab].page.Mode == structs.ModeLinkSelect {
|
|
||||||
next, err := resolveRelLink(tabs[curTab], tabs[curTab].page.Url, tabs[curTab].page.Selected)
|
|
||||||
if err != nil {
|
|
||||||
Error("URL Error", err.Error())
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
NewTab()
|
|
||||||
URL(next)
|
|
||||||
} else {
|
|
||||||
NewTab()
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
case tcell.KeyCtrlR:
|
case tcell.KeyCtrlR:
|
||||||
Reload()
|
Reload()
|
||||||
return nil
|
return nil
|
||||||
@ -341,6 +328,19 @@ func Init() {
|
|||||||
// All the keys and operations that can work while a tab IS loading
|
// All the keys and operations that can work while a tab IS loading
|
||||||
|
|
||||||
switch event.Key() {
|
switch event.Key() {
|
||||||
|
case tcell.KeyCtrlT:
|
||||||
|
if tabs[curTab].page.Mode == structs.ModeLinkSelect {
|
||||||
|
next, err := resolveRelLink(tabs[curTab], tabs[curTab].page.Url, tabs[curTab].page.Selected)
|
||||||
|
if err != nil {
|
||||||
|
Error("URL Error", err.Error())
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
NewTab()
|
||||||
|
URL(next)
|
||||||
|
} else {
|
||||||
|
NewTab()
|
||||||
|
}
|
||||||
|
return nil
|
||||||
case tcell.KeyCtrlW:
|
case tcell.KeyCtrlW:
|
||||||
CloseTab()
|
CloseTab()
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user