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
d421e76c
Commit
d421e76c
authored
4 years ago
by
Reiter, Christoph
Browse files
Options
Downloads
Patches
Plain Diff
Remove the user profile from the app shell
parent
e4f3bc2a
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
+2
-10
2 additions, 10 deletions
packages/app-shell/src/app-shell.js
packages/app-shell/src/vpu-app-shell-user-profile.js
+0
-75
0 additions, 75 deletions
packages/app-shell/src/vpu-app-shell-user-profile.js
with
2 additions
and
85 deletions
packages/app-shell/src/app-shell.js
+
2
−
10
View file @
d421e76c
...
...
@@ -14,7 +14,6 @@ import * as events from 'vpu-common/events.js';
import
{
BuildInfo
}
from
'
./build-info.js
'
;
import
{
TUGrazLogo
}
from
'
./tugraz-logo.js
'
;
import
{
send
as
notify
}
from
'
vpu-common/notification
'
;
import
{
userProfileMeta
}
from
'
./vpu-app-shell-user-profile.js
'
;
import
{
appWelcomeMeta
}
from
'
./vpu-app-shell-welcome.js
'
;
...
...
@@ -133,11 +132,9 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
}
}
// Inject the user profile and welcome activity
routes
.
push
(
"
user-profile
"
);
// Inject the welcome activity
routes
.
unshift
(
"
welcome
"
);
metadata
=
Object
.
assign
(
metadata
,
{
"
user-profile
"
:
userProfileMeta
,
"
welcome
"
:
appWelcomeMeta
,
});
customElements
.
get
(
"
vpu-app-shell-welcome
"
).
app
=
this
;
...
...
@@ -248,11 +245,6 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
this
.
fetchMetadata
(
this
.
src
);
this
.
initRouter
();
// listen to the vpu-auth-profile event to switch to the person profile
window
.
addEventListener
(
"
vpu-auth-profile
"
,
()
=>
{
this
.
switchComponent
(
'
user-profile
'
);
});
this
.
_subscriber
.
subscribe
(
this
.
_updateAuth
);
}
...
...
@@ -685,7 +677,7 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
<div class="hd1-middle">
</div>
<div class="hd1-right">
<vpu-auth lang="
${
this
.
lang
}
"
show-profile
keycloak-config="
${
JSON
.
stringify
(
this
.
keycloakConfig
)}
" load-person try-login></vpu-auth>
<vpu-auth lang="
${
this
.
lang
}
" keycloak-config="
${
JSON
.
stringify
(
this
.
keycloakConfig
)}
" load-person try-login></vpu-auth>
</div>
<div class="hd2-left">
<div class="header">
...
...
This diff is collapsed.
Click to expand it.
packages/app-shell/src/vpu-app-shell-user-profile.js
deleted
100644 → 0
+
0
−
75
View file @
e4f3bc2a
import
{
createI18nInstance
}
from
'
./i18n.js
'
;
import
{
css
,
html
,
LitElement
}
from
'
lit-element
'
;
import
*
as
commonUtils
from
'
vpu-common/utils
'
;
import
*
as
commonStyles
from
'
vpu-common/styles
'
;
import
{
ScopedElementsMixin
}
from
'
@open-wc/scoped-elements
'
;
import
{
PersonProfile
}
from
'
vpu-person-profile
'
;
const
i18n
=
createI18nInstance
();
class
AppShellUserProfile
extends
ScopedElementsMixin
(
LitElement
)
{
constructor
()
{
super
();
this
.
lang
=
i18n
.
language
;
this
.
_personId
=
window
.
VPUPersonId
;
this
.
entryPointUrl
=
commonUtils
.
getAPiUrl
();
}
static
get
scopedElements
()
{
return
{
'
vpu-person-profile
'
:
PersonProfile
,
};
}
static
get
properties
()
{
return
{
lang
:
{
type
:
String
},
entryPointUrl
:
{
type
:
String
,
attribute
:
'
entry-point-url
'
},
_personId
:
{
type
:
String
,
attribute
:
false
},
};
}
connectedCallback
()
{
super
.
connectedCallback
();
window
.
addEventListener
(
"
vpu-auth-person-init
"
,
()
=>
{
this
.
_personId
=
window
.
VPUPersonId
;
});
}
static
get
styles
()
{
// language=css
return
css
`
${
commonStyles
.
getThemeCSS
()}
${
commonStyles
.
getGeneralCSS
()}
`
;
}
render
()
{
return
html
`
<vpu-person-profile value="
${
this
.
_personId
}
" entry-point-url="
${
this
.
entryPointUrl
}
" lang="
${
this
.
lang
}
"></vpu-person-profile>
`
;
}
}
export
const
userProfileMeta
=
{
"
element
"
:
"
vpu-app-shell-user-profile
"
,
"
module_src
"
:
""
,
"
routing_name
"
:
"
user-profile
"
,
"
name
"
:
{
"
de
"
:
"
Benutzerprofil
"
,
"
en
"
:
"
User profile
"
},
"
short_name
"
:
{
"
de
"
:
"
Profil
"
,
"
en
"
:
"
Profile
"
},
"
description
"
:
{
"
de
"
:
"
Zeigt informationen über den Benutzer an
"
,
"
en
"
:
"
Shows information about the user
"
},
visible
:
false
};
commonUtils
.
defineCustomElement
(
'
vpu-app-shell-user-profile
'
,
AppShellUserProfile
);
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