Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
10cab468
Commit
10cab468
authored
Apr 11, 2024
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add link for changing password.
parent
077ff9a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
static/galene.css
static/galene.css
+10
-0
static/galene.html
static/galene.html
+1
-0
static/galene.js
static/galene.js
+31
-2
No files found.
static/galene.css
View file @
10cab468
...
@@ -99,6 +99,16 @@
...
@@ -99,6 +99,16 @@
font-style
:
italic
;
font-style
:
italic
;
}
}
#chpwspan
a
{
padding
:
4px
0
;
font-size
:
0.9em
;
color
:
#e4157e
;
}
#chpwspan
.invisible
{
display
:
none
;
}
.sidenav
.user-logout
a
{
.sidenav
.user-logout
a
{
font-size
:
1em
;
font-size
:
1em
;
padding
:
7px
0
0
;
padding
:
7px
0
0
;
...
...
static/galene.html
View file @
10cab468
...
@@ -153,6 +153,7 @@
...
@@ -153,6 +153,7 @@
<div
class=
"profile-info"
>
<div
class=
"profile-info"
>
<span
id=
"userspan"
></span>
<span
id=
"userspan"
></span>
<span
id=
"permspan"
></span>
<span
id=
"permspan"
></span>
<span
id=
"chpwspan"
class=
"invisible"
><a
id=
"change-password"
>
Change password
</a></span>
</div>
</div>
<div
class=
"user-logout"
>
<div
class=
"user-logout"
>
<a
id=
"disconnectbutton"
>
<a
id=
"disconnectbutton"
>
...
...
static/galene.js
View file @
10cab468
...
@@ -29,6 +29,9 @@ let serverConnection;
...
@@ -29,6 +29,9 @@ let serverConnection;
/** @type {Object} */
/** @type {Object} */
let
groupStatus
=
{};
let
groupStatus
=
{};
/** @type {boolean} */
let
pwAuth
=
false
;
/** @type {string} */
/** @type {string} */
let
token
=
null
;
let
token
=
null
;
...
@@ -331,6 +334,24 @@ async function gotConnected() {
...
@@ -331,6 +334,24 @@ async function gotConnected() {
await
join
(
again
);
await
join
(
again
);
}
}
/**
* @param {string} username
*/
function
setChangePassword
(
username
)
{
let
s
=
document
.
getElementById
(
'
chpwspan
'
);
let
a
=
s
.
children
[
0
];
if
(
!
(
a
instanceof
HTMLAnchorElement
))
throw
new
Error
(
'
Bad type for chpwspan
'
);
if
(
username
)
{
a
.
href
=
`/change-password.html?group=
${
encodeURI
(
group
)}
&username=
${
encodeURI
(
username
)}
`
;
a
.
target
=
'
_blank
'
;
s
.
classList
.
remove
(
'
invisible
'
);
}
else
{
a
.
href
=
null
;
s
.
classList
.
add
(
'
invisible
'
);
}
}
/**
/**
* @param {boolean} again
* @param {boolean} again
*/
*/
...
@@ -338,6 +359,7 @@ async function join(again) {
...
@@ -338,6 +359,7 @@ async function join(again) {
let
username
=
getInputElement
(
'
username
'
).
value
.
trim
();
let
username
=
getInputElement
(
'
username
'
).
value
.
trim
();
let
credentials
;
let
credentials
;
if
(
token
)
{
if
(
token
)
{
pwAuth
=
false
;
credentials
=
{
credentials
=
{
type
:
'
token
'
,
type
:
'
token
'
,
token
:
token
,
token
:
token
,
...
@@ -349,15 +371,18 @@ async function join(again) {
...
@@ -349,15 +371,18 @@ async function join(again) {
}
else
{
}
else
{
let
pw
=
getInputElement
(
'
password
'
).
value
;
let
pw
=
getInputElement
(
'
password
'
).
value
;
getInputElement
(
'
password
'
).
value
=
''
;
getInputElement
(
'
password
'
).
value
=
''
;
if
(
!
groupStatus
.
authServer
)
if
(
!
groupStatus
.
authServer
)
{
pwAuth
=
true
;
credentials
=
pw
;
credentials
=
pw
;
else
}
else
{
pwAuth
=
false
;
credentials
=
{
credentials
=
{
type
:
'
authServer
'
,
type
:
'
authServer
'
,
authServer
:
groupStatus
.
authServer
,
authServer
:
groupStatus
.
authServer
,
location
:
location
.
href
,
location
:
location
.
href
,
password
:
pw
,
password
:
pw
,
};
};
}
}
}
try
{
try
{
...
@@ -2459,6 +2484,7 @@ async function gotJoined(kind, group, perms, status, data, error, message) {
...
@@ -2459,6 +2484,7 @@ async function gotJoined(kind, group, perms, status, data, error, message) {
this
.
close
();
this
.
close
();
token
=
null
;
token
=
null
;
setButtonsVisibility
();
setButtonsVisibility
();
setChangePassword
(
null
);
return
;
return
;
case
'
join
'
:
case
'
join
'
:
case
'
change
'
:
case
'
change
'
:
...
@@ -2469,6 +2495,9 @@ async function gotJoined(kind, group, perms, status, data, error, message) {
...
@@ -2469,6 +2495,9 @@ async function gotJoined(kind, group, perms, status, data, error, message) {
setTitle
((
status
&&
status
.
displayName
)
||
capitalise
(
group
));
setTitle
((
status
&&
status
.
displayName
)
||
capitalise
(
group
));
displayUsername
();
displayUsername
();
setButtonsVisibility
();
setButtonsVisibility
();
setChangePassword
(
pwAuth
&&
!!
groupStatus
.
canChangePassword
&&
serverConnection
.
username
);
if
(
kind
===
'
change
'
)
if
(
kind
===
'
change
'
)
return
;
return
;
break
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment