Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Signature Frontend
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
Electronic Signature Service
Signature Frontend
Commits
afddc5c9
Unverified
Commit
afddc5c9
authored
4 years ago
by
Bekerle, Patrizio
Browse files
Options
Downloads
Patches
Plain Diff
Migrate from EventBus to provider
parent
ed98dbe0
No related branches found
No related tags found
No related merge requests found
Pipeline
#16681
passed
4 years ago
Stage: test
Stage: e2e-stage1
Stage: e2e-stage2
Stage: e2e-stage3
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
assets/dbp-signature.html.ejs
+1
-1
1 addition, 1 deletion
assets/dbp-signature.html.ejs
src/dbp-signature-lit-element.js
+16
-12
16 additions, 12 deletions
src/dbp-signature-lit-element.js
vendor/toolkit
+1
-1
1 addition, 1 deletion
vendor/toolkit
with
18 additions
and
14 deletions
assets/dbp-signature.html.ejs
+
1
−
1
View file @
afddc5c9
...
...
@@ -63,7 +63,7 @@
nextcloud-file-url="
<
%=
nextcloudFileURL
%
>
">
<
<%=
name
%
>
subscribe="lang:lang,entry-point-url:entry-point-url"
auth
auth
requested-login-status
src="
<
%=
getUrl
(
name
+
'.
topic.metadata.json
')
%
>
"
base-path="
<
%=
getUrl
('')
%
>
"
keycloak-config='{"url": "
<
%=
keyCloakBaseURL
%
>
", "realm": "tugraz", "clientId": "
<
%=
keyCloakClientId
%
>
", "silentCheckSsoRedirectUri": "
<
%=
getUrl
('
silent-check-sso.html
')
%
>
"}'
...
...
This diff is collapsed.
Click to expand it.
src/dbp-signature-lit-element.js
+
16
−
12
View file @
afddc5c9
import
{
EventBus
}
from
'
@dbp-toolkit/common
'
;
import
*
as
utils
from
"
./utils
"
;
import
{
AdapterLitElement
}
from
"
@dbp-toolkit/provider/src/adapter-lit-element
"
;
import
JSONLD
from
"
@dbp-toolkit/common/jsonld
"
;
export
class
DBPSignatureBaseLitElement
extends
AdapterLitElement
{
constructor
()
{
...
...
@@ -23,8 +23,8 @@ export class DBPSignatureBaseLitElement extends AdapterLitElement {
return
(
this
.
auth
.
person
&&
Array
.
isArray
(
this
.
auth
.
person
.
roles
)
&&
this
.
auth
.
person
.
roles
.
indexOf
(
roleName
)
!==
-
1
);
}
_updateAuth
(
e
)
{
this
.
_loginStatus
=
e
.
status
;
_updateAuth
()
{
this
.
_loginStatus
=
this
.
auth
[
'
login-
status
'
]
;
// Every time isLoggedIn()/isLoading() return something different we request a re-render
let
newLoginState
=
[
this
.
isLoggedIn
(),
this
.
isLoading
()];
if
(
this
.
_loginState
.
toString
()
!==
newLoginState
.
toString
())
{
...
...
@@ -33,20 +33,24 @@ export class DBPSignatureBaseLitElement extends AdapterLitElement {
this
.
_loginState
=
newLoginState
;
}
update
(
changedProperties
)
{
changedProperties
.
forEach
((
oldValue
,
propName
)
=>
{
switch
(
propName
)
{
case
"
auth
"
:
JSONLD
.
doInitializationOnce
(
this
.
entryPointUrl
,
this
.
auth
.
token
);
this
.
_updateAuth
();
break
;
}
});
super
.
update
(
changedProperties
);
}
connectedCallback
()
{
super
.
connectedCallback
();
this
.
_loginStatus
=
''
;
this
.
_loginState
=
[];
this
.
_bus
=
new
EventBus
();
this
.
_updateAuth
=
this
.
_updateAuth
.
bind
(
this
);
this
.
_bus
.
subscribe
(
'
auth-update
'
,
this
.
_updateAuth
);
}
disconnectedCallback
()
{
this
.
_bus
.
close
();
super
.
disconnectedCallback
();
}
isLoggedIn
()
{
...
...
This diff is collapsed.
Click to expand it.
toolkit
@
e86f8264
Compare
92da0f59
...
e86f8264
Subproject commit
92da0f592b3828477fde02a784436be89d67d660
Subproject commit
e86f826479612647cf9b945c987d87f5a165beb6
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