Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nicolas PERNOUD
Vestibule
Commits
d8c0d859
Commit
d8c0d859
authored
Apr 07, 2022
by
Nicolas Pernoud
Browse files
fix: code smells
parent
70b88899
Pipeline
#24868
passed with stage
in 1 minute and 14 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
web/components/davs/explorer.js
View file @
d8c0d859
...
...
@@ -535,7 +535,7 @@ export class Explorer {
});
}
};
xhr
.
onerror
=
function
(
e
)
{
xhr
.
onerror
=
function
(
_
e
)
{
reject
({
status
:
this
.
status
,
statusText
:
`Error uploading
${
file
.
name
}
(status
${
xhr
.
status
}
)`
,
...
...
web/index.html
View file @
d8c0d859
...
...
@@ -32,7 +32,7 @@
<div
class=
"navbar-brand"
>
<div
class=
"navbar-item"
>
<a
class=
"button is-primary is-rounded is-outlined"
href=
"https://www.github.com/nicolaspernoud/Vestibule"
target=
"_blank"
rel=
"noopener noreferrer"
>
<span>
4.5.2
1
</span>
<span>
4.5.2
2
</span>
<span
class=
"icon"
>
<svg
class=
"svg-inline--fa fa-github fa-w-16"
...
...
web/services/common/common.js
View file @
d8c0d859
export
const
AnimateCSS
=
(
element
,
animation
,
prefix
=
"
animate__
"
)
=>
// We create a Promise and return it
new
Promise
((
resolve
,
reject
)
=>
{
new
Promise
((
resolve
,
_
reject
)
=>
{
const
animationName
=
`
${
prefix
}${
animation
}
`
;
element
.
classList
.
add
(
`
${
prefix
}
animated`
,
animationName
);
...
...
@@ -51,7 +51,7 @@ export function GetType(file) {
export
const
Truncate
=
(
input
)
=>
(
input
.
length
>
12
?
`
${
input
.
substring
(
0
,
12
)}
...`
:
input
);
export
function
EncodeURIWithSpecialsCharacters
(
str
)
{
return
encodeURI
(
str
).
replace
(
/
[
!'()*
]
/g
,
e
scape
);
return
encodeURI
(
str
).
replace
(
/
[
!'()*
]
/g
,
e
ncodeURIComponent
);
}
export
function
IsEmpty
(
obj
)
{
...
...
web/services/messages/messages.js
View file @
d8c0d859
...
...
@@ -20,16 +20,16 @@ export function Show(bulmaClass, message) {
offset
=
offset
+
height
;
messages
.
push
(
message
);
const
timer
=
setTimeout
(
function
()
{
removeMsg
(
msg
,
message
,
height
);
removeMsg
(
msg
,
message
);
},
5000
);
delBtn
.
addEventListener
(
"
click
"
,
function
()
{
removeMsg
(
msg
,
message
,
height
);
removeMsg
(
msg
,
message
);
clearTimeout
(
timer
);
});
}
}
async
function
removeMsg
(
msg
,
message
,
height
)
{
async
function
removeMsg
(
msg
,
message
)
{
const
index
=
messages
.
indexOf
(
message
);
if
(
index
>
-
1
)
{
messages
.
splice
(
index
,
1
);
...
...
Write
Preview
Supports
Markdown
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