Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
videoag
frontend
Commits
e3d8e49c
Verified
Commit
e3d8e49c
authored
10 months ago
by
Dorian Koch
Browse files
Options
Downloads
Patches
Plain Diff
Translations for Download Manager, Fix error handling in lecture import
parent
9c1ab43d
No related branches found
No related tags found
No related merge requests found
Pipeline
#6358
passed
10 months ago
Stage: test
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
lang/de.slf
+10
-0
10 additions, 0 deletions
lang/de.slf
lang/en.slf
+10
-0
10 additions, 0 deletions
lang/en.slf
src/components/DownloadManager.tsx
+13
-7
13 additions, 7 deletions
src/components/DownloadManager.tsx
src/pages/internal/import.tsx
+26
-6
26 additions, 6 deletions
src/pages/internal/import.tsx
with
59 additions
and
13 deletions
lang/de.slf
+
10
−
0
View file @
e3d8e49c
...
@@ -150,6 +150,7 @@ ui.generic.create = "Erstellen"
...
@@ -150,6 +150,7 @@ ui.generic.create = "Erstellen"
// ui.generic.download = "Download"
// ui.generic.download = "Download"
ui.generic.search = "Suche"
ui.generic.search = "Suche"
ui.generic.login = "Anmelden"
ui.generic.login = "Anmelden"
ui.generic.close = "Schließen"
ui.generic.filter.any = "Alle"
ui.generic.filter.any = "Alle"
...
@@ -167,6 +168,15 @@ ui.course_list.show_only_public_courses = "Nur öffentliche Veranstaltungen anze
...
@@ -167,6 +168,15 @@ ui.course_list.show_only_public_courses = "Nur öffentliche Veranstaltungen anze
ui.course.back_to_list = "Zur Kursliste"
ui.course.back_to_list = "Zur Kursliste"
ui.course.download_all_videos = "Download aller Videos"
ui.course.download_all_videos = "Download aller Videos"
// ui.download_manager.title = "Download Manager"
// ui.download_manager.start_download = "Start Download"
// ui.download_manager.stop_download = "Stop Download"
ui.download_manager.select_all = "Alle auswählen"
ui.download_manager.select_none = "Keine auswählen"
ui.download_manager.quality = "Qualität"
// ui.download_manager.download_now = #ui.generic.download
// ui.download_manager.close = #ui.generic.close
ui.video_player.back_to_course = "Zur Veranstaltungsseite"
ui.video_player.back_to_course = "Zur Veranstaltungsseite"
ui.video_player.suggest_chapter = "Kapitelmarker vorschlagen"
ui.video_player.suggest_chapter = "Kapitelmarker vorschlagen"
ui.video_player.embed = "Einbetten"
ui.video_player.embed = "Einbetten"
...
...
This diff is collapsed.
Click to expand it.
lang/en.slf
+
10
−
0
View file @
e3d8e49c
...
@@ -154,6 +154,7 @@ ui.generic.create = "Create"
...
@@ -154,6 +154,7 @@ ui.generic.create = "Create"
ui.generic.download = "Download"
ui.generic.download = "Download"
ui.generic.search = "Search"
ui.generic.search = "Search"
ui.generic.login = "Login"
ui.generic.login = "Login"
ui.generic.close = "Close"
ui.generic.filter.any = "Any"
ui.generic.filter.any = "Any"
...
@@ -171,6 +172,15 @@ ui.course_list.show_only_public_courses = "Show only public courses"
...
@@ -171,6 +172,15 @@ ui.course_list.show_only_public_courses = "Show only public courses"
ui.course.back_to_list = "Back to course list"
ui.course.back_to_list = "Back to course list"
ui.course.download_all_videos = "Download all videos"
ui.course.download_all_videos = "Download all videos"
ui.download_manager.title = "Download Manager"
ui.download_manager.start_download = "Start Download"
ui.download_manager.stop_download = "Stop Download"
ui.download_manager.select_all = "Select all"
ui.download_manager.select_none = "Select none"
ui.download_manager.quality = "Quality"
ui.download_manager.download_now = #ui.generic.download
ui.download_manager.close = #ui.generic.close
ui.video_player.back_to_course = "Back to course"
ui.video_player.back_to_course = "Back to course"
ui.video_player.suggest_chapter = "Suggest chapter"
ui.video_player.suggest_chapter = "Suggest chapter"
ui.video_player.embed = "Embed"
ui.video_player.embed = "Embed"
...
...
This diff is collapsed.
Click to expand it.
src/components/DownloadManager.tsx
+
13
−
7
View file @
e3d8e49c
...
@@ -408,7 +408,7 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
...
@@ -408,7 +408,7 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
className
=
"btn btn-primary"
className
=
"btn btn-primary"
disabled
=
{
chosenQualities
.
current
.
get
(
lecture
.
id
)
===
undefined
}
disabled
=
{
chosenQualities
.
current
.
get
(
lecture
.
id
)
===
undefined
}
>
>
Download Now
{
language
.
get
(
"
ui.download_manager.download_now
"
)
}
</
button
>
</
button
>
</
a
>
</
a
>
);
);
...
@@ -566,7 +566,7 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
...
@@ -566,7 +566,7 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
</
button
>
</
button
>
<
Modal
show
=
{
showModal
}
size
=
"xl"
onHide
=
{
closeClicked
}
>
<
Modal
show
=
{
showModal
}
size
=
"xl"
onHide
=
{
closeClicked
}
>
<
Modal
.
Header
closeButton
>
<
Modal
.
Header
closeButton
>
<
Modal
.
Title
>
D
ownload
M
anager
</
Modal
.
Title
>
<
Modal
.
Title
>
{
language
.
get
(
"
ui.d
ownload
_m
anager
.title
"
)
}
</
Modal
.
Title
>
</
Modal
.
Header
>
</
Modal
.
Header
>
<
Modal
.
Body
>
<
Modal
.
Body
>
<
div
className
=
"mb-2"
>
<
div
className
=
"mb-2"
>
...
@@ -582,7 +582,9 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
...
@@ -582,7 +582,9 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
(
downloadStarted
?
"
bi-pause-fill
"
:
"
bi-play-fill
"
)
(
downloadStarted
?
"
bi-pause-fill
"
:
"
bi-play-fill
"
)
}
}
/>
/>
{
downloadStarted
?
"
Stop
"
:
"
Start
"
}
Download
{
downloadStarted
?
language
.
get
(
"
ui.download_manager.stop_download
"
)
:
language
.
get
(
"
ui.download_manager.start_download
"
)
}
</
button
>
</
button
>
</
div
>
</
div
>
<
div
className
=
"mb-2 d-flex"
>
<
div
className
=
"mb-2 d-flex"
>
...
@@ -592,7 +594,7 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
...
@@ -592,7 +594,7 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
onClick
=
{
selectAll
}
onClick
=
{
selectAll
}
disabled
=
{
downloadStarted
}
disabled
=
{
downloadStarted
}
>
>
Select All
{
language
.
get
(
"
ui.download_manager.select_all
"
)
}
</
button
>
</
button
>
<
button
<
button
...
@@ -601,10 +603,14 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
...
@@ -601,10 +603,14 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
onClick
=
{
selectNone
}
onClick
=
{
selectNone
}
disabled
=
{
downloadStarted
}
disabled
=
{
downloadStarted
}
>
>
S
elect
N
one
{
language
.
get
(
"
ui.download_manager.s
elect
_n
one
"
)
}
</
button
>
</
button
>
<
DropdownButton
variant
=
"primary"
title
=
{
"
Quality
"
}
className
=
""
>
<
DropdownButton
variant
=
"primary"
title
=
{
language
.
get
(
"
ui.download_manager.quality
"
)
}
className
=
""
>
{
allQualities
.
map
((
q
)
=>
(
{
allQualities
.
map
((
q
)
=>
(
<
DropdownItem
<
DropdownItem
key
=
{
q
}
key
=
{
q
}
...
@@ -630,7 +636,7 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
...
@@ -630,7 +636,7 @@ export default function DownloadAllModal({ course }: { course: GetCourseResponse
onClick
=
{
closeClicked
}
onClick
=
{
closeClicked
}
disabled
=
{
downloadStarted
}
disabled
=
{
downloadStarted
}
>
>
C
lose
{
language
.
get
(
"
ui.download_manager.c
lose
"
)
}
</
button
>
</
button
>
</
Modal
.
Footer
>
</
Modal
.
Footer
>
</
Modal
>
</
Modal
>
...
...
This diff is collapsed.
Click to expand it.
src/pages/internal/import.tsx
+
26
−
6
View file @
e3d8e49c
...
@@ -80,7 +80,7 @@ function TerminBody({
...
@@ -80,7 +80,7 @@ function TerminBody({
.
then
((
res
:
GetNewConfigurationResponse
)
=>
{
.
then
((
res
:
GetNewConfigurationResponse
)
=>
{
const
defaultValues
:
any
=
{};
const
defaultValues
:
any
=
{};
res
.
fields
?.
forEach
((
field
)
=>
{
res
.
fields
?.
forEach
((
field
)
=>
{
if
(
field
.
default_value
!==
undefined
&&
field
.
default_value
!==
undefined
)
{
if
(
field
.
default_value
!==
undefined
)
{
defaultValues
[
field
.
id
]
=
field
.
default_value
;
defaultValues
[
field
.
id
]
=
field
.
default_value
;
}
else
if
(
}
else
if
(
field
.
type
===
"
string
"
&&
field
.
type
===
"
string
"
&&
...
@@ -124,7 +124,7 @@ function TerminBody({
...
@@ -124,7 +124,7 @@ function TerminBody({
.
then
((
res
:
GetNewConfigurationResponse
)
=>
{
.
then
((
res
:
GetNewConfigurationResponse
)
=>
{
const
defaultValues
:
any
=
{};
const
defaultValues
:
any
=
{};
res
.
fields
?.
forEach
((
field
)
=>
{
res
.
fields
?.
forEach
((
field
)
=>
{
if
(
field
.
default_value
!==
undefined
&&
field
.
default_value
!==
undefined
)
{
if
(
field
.
default_value
!==
undefined
)
{
defaultValues
[
field
.
id
]
=
field
.
default_value
;
defaultValues
[
field
.
id
]
=
field
.
default_value
;
}
else
if
(
}
else
if
(
field
.
type
===
"
string
"
&&
field
.
type
===
"
string
"
&&
...
@@ -151,8 +151,18 @@ function TerminBody({
...
@@ -151,8 +151,18 @@ function TerminBody({
}),
}),
);
);
})
})
.
catch
((
e
)
=>
{
.
then
((
results
)
=>
{
showError
(
e
,
"
Unable to create lectures
"
);
let
failed
=
0
;
results
.
forEach
((
result
,
idx
)
=>
{
if
(
result
.
status
===
"
rejected
"
)
{
failed
++
;
}
});
if
(
failed
>
0
)
{
showErrorToast
(
`
${
failed
}
lectures could not be imported, see console for details`
,
);
}
})
})
.
then
(
reloadFunc
)
.
then
(
reloadFunc
)
.
finally
(()
=>
{
.
finally
(()
=>
{
...
@@ -200,8 +210,18 @@ function TerminBody({
...
@@ -200,8 +210,18 @@ function TerminBody({
return
[
api
.
deleteOMObject
(
"
lecture
"
,
event
.
id_in_videoag_system
)];
return
[
api
.
deleteOMObject
(
"
lecture
"
,
event
.
id_in_videoag_system
)];
});
});
Promise
.
allSettled
(
promises
)
Promise
.
allSettled
(
promises
)
.
catch
((
e
)
=>
{
.
then
((
results
)
=>
{
showError
(
e
,
"
Unable to delete lectures
"
);
let
failed
=
0
;
results
.
forEach
((
result
,
idx
)
=>
{
if
(
result
.
status
===
"
rejected
"
)
{
failed
++
;
}
});
if
(
failed
>
0
)
{
showErrorToast
(
`
${
failed
}
lectures could not be deleted, see console for details`
,
);
}
})
})
.
then
(
reloadFunc
)
.
then
(
reloadFunc
)
.
finally
(()
=>
{
.
finally
(()
=>
{
...
...
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