Skip to content
Snippets Groups Projects
Verified Commit 6886b93f authored by Jakob Moser's avatar Jakob Moser
Browse files

Automatically detect internal services

parent 0f5fa4cc
No related branches found
No related tags found
1 merge request!1Add more services
......@@ -7,7 +7,10 @@ export const ServiceLink = {
view(vnode) {
return [
m("div.service", [
m(BoxedButton, vnode.attrs),
m(BoxedButton, {
...vnode.attrs,
sameTab: !vnode.attrs.external,
}),
vnode.attrs.account &&
m(AccountRequired, { accountType: vnode.attrs.account }),
vnode.attrs.unlockRequired && m(UnlockRequired),
......
......@@ -14,4 +14,12 @@ export class Service {
this.unlockRequired = unlockRequired
this.passwordInVault = passwordInVault
}
/**
* Return if the service is an external one, i.e., not a part of the portal web application.
* This will be the case for almost all services.
*/
get external() {
return !!this.href.match(/^(https?:)?\/\/.*/)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment