Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Toolkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Web Component Framework
Toolkit
Commits
58d409ec
Commit
58d409ec
authored
4 years ago
by
Reiter, Christoph
Browse files
Options
Downloads
Patches
Plain Diff
Port to EventBus
parent
ff698664
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/app-shell/src/app-shell.js
+5
-5
5 additions, 5 deletions
packages/app-shell/src/app-shell.js
packages/app-shell/vendor/auth
+1
-1
1 addition, 1 deletion
packages/app-shell/vendor/auth
with
6 additions
and
6 deletions
packages/app-shell/src/app-shell.js
+
5
−
5
View file @
58d409ec
...
@@ -2,7 +2,7 @@ import {createI18nInstance} from './i18n.js';
...
@@ -2,7 +2,7 @@ import {createI18nInstance} from './i18n.js';
import
{
html
,
css
,
LitElement
}
from
'
lit-element
'
;
import
{
html
,
css
,
LitElement
}
from
'
lit-element
'
;
import
{
ScopedElementsMixin
}
from
'
@open-wc/scoped-elements
'
;
import
{
ScopedElementsMixin
}
from
'
@open-wc/scoped-elements
'
;
import
{
LanguageSelect
}
from
'
vpu-language-select
'
;
import
{
LanguageSelect
}
from
'
vpu-language-select
'
;
import
{
Icon
}
from
'
vpu-common
'
;
import
{
Icon
,
EventBus
}
from
'
vpu-common
'
;
import
{
Auth
}
from
'
vpu-auth
'
;
import
{
Auth
}
from
'
vpu-auth
'
;
import
{
Notification
}
from
'
vpu-notification
'
;
import
{
Notification
}
from
'
vpu-notification
'
;
import
*
as
commonStyles
from
'
vpu-common/styles
'
;
import
*
as
commonStyles
from
'
vpu-common/styles
'
;
...
@@ -10,7 +10,6 @@ import * as commonUtils from 'vpu-common/utils';
...
@@ -10,7 +10,6 @@ import * as commonUtils from 'vpu-common/utils';
import
buildinfo
from
'
consts:buildinfo
'
;
import
buildinfo
from
'
consts:buildinfo
'
;
import
{
classMap
}
from
'
lit-html/directives/class-map.js
'
;
import
{
classMap
}
from
'
lit-html/directives/class-map.js
'
;
import
{
Router
}
from
'
./router.js
'
;
import
{
Router
}
from
'
./router.js
'
;
import
*
as
events
from
'
vpu-common/events.js
'
;
import
{
BuildInfo
}
from
'
./build-info.js
'
;
import
{
BuildInfo
}
from
'
./build-info.js
'
;
import
{
TUGrazLogo
}
from
'
./tugraz-logo.js
'
;
import
{
TUGrazLogo
}
from
'
./tugraz-logo.js
'
;
import
{
send
as
notify
}
from
'
vpu-common/notification
'
;
import
{
send
as
notify
}
from
'
vpu-common/notification
'
;
...
@@ -57,7 +56,6 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
...
@@ -57,7 +56,6 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
this
.
_updateAuth
=
this
.
_updateAuth
.
bind
(
this
);
this
.
_updateAuth
=
this
.
_updateAuth
.
bind
(
this
);
this
.
_loginStatus
=
'
unknown
'
;
this
.
_loginStatus
=
'
unknown
'
;
this
.
_subscriber
=
new
events
.
EventSubscriber
(
'
vpu-auth-update
'
,
'
vpu-auth-update-request
'
);
this
.
_attrObserver
=
new
MutationObserver
(
this
.
onAttributeObserved
);
this
.
_attrObserver
=
new
MutationObserver
(
this
.
onAttributeObserved
);
}
}
...
@@ -241,15 +239,17 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
...
@@ -241,15 +239,17 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
connectedCallback
()
{
connectedCallback
()
{
super
.
connectedCallback
();
super
.
connectedCallback
();
this
.
_bus
=
new
EventBus
();
if
(
this
.
src
)
if
(
this
.
src
)
this
.
fetchMetadata
(
this
.
src
);
this
.
fetchMetadata
(
this
.
src
);
this
.
initRouter
();
this
.
initRouter
();
this
.
_
subscriber
.
subscribe
(
this
.
_updateAuth
);
this
.
_
bus
.
subscribe
(
'
auth-update
'
,
this
.
_updateAuth
);
}
}
disconnectedCallback
()
{
disconnectedCallback
()
{
this
.
_
subscriber
.
unsubscribe
(
this
.
_updateAuth
);
this
.
_
bus
.
close
(
);
super
.
disconnectedCallback
();
super
.
disconnectedCallback
();
}
}
...
...
This diff is collapsed.
Click to expand it.
auth
@
4594a220
Subproject commit
f3aa17bcc
a0c0
4055ad2835ed620146a741a107d
Subproject commit
4594a22095b2a7
a0
6
c0
f91ec0a51a0a55125b356
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment