Add web linking and proper share controls
This commit is contained in:
parent
39058cd36a
commit
ed146a582c
15 changed files with 50 additions and 243 deletions
|
@ -222,6 +222,24 @@ export class NavigationModel {
|
|||
this.tabs.find(t => t.id === ptr[0])?.setTitle(ptr[1], title)
|
||||
}
|
||||
|
||||
handleLink(url: string) {
|
||||
let path
|
||||
if (url.startsWith('/')) {
|
||||
path = url
|
||||
} else if (url.startsWith('http')) {
|
||||
try {
|
||||
path = new URL(url).pathname
|
||||
} catch (e) {
|
||||
console.error('Invalid url', url, e)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
console.error('Invalid url', url)
|
||||
return
|
||||
}
|
||||
this.navigate(path)
|
||||
}
|
||||
|
||||
// tab management
|
||||
// =
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue