-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Favorite Lecture View #1498
base: dev
Are you sure you want to change the base?
Favorite Lecture View #1498
Conversation
b2d34e8
to
c02bfdf
Compare
@@ -61,7 +61,7 @@ | |||
{{if $stream.PlaylistUrl}} | |||
<a class="text-left flex justify-start items-center w-full text-3 px-4 py-2 hover:cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-600" | |||
title="Combined view" | |||
@click="watch.switchView('/w/{{$course.Slug}}/{{$stream.Model.ID}}')"> | |||
@click="watch.switchView('/w/{{$course.Slug}}/{{$stream.Model.ID}}/COMB')"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to add the '/COMB' at the end of the URL and thus shouldn't because the URL looks cleaner without.
@@ -82,6 +82,21 @@ func (r mainRoutes) WatchPage(c *gin.Context) { | |||
} | |||
} | |||
|
|||
if c.Param("version") == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're already checking for version != "" so maybe we should combine these with an if/else so code is more readable
|
||
c.Redirect(http.StatusFound, c.Request.RequestURI+"/PRES") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unnecessary whitespace can be removed.
case "Camera": | ||
c.Redirect(http.StatusFound, c.Request.RequestURI+"/CAM") | ||
case "Combined": | ||
c.Redirect(http.StatusFound, c.Request.RequestURI+"/COMB") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we choose to leave out /COMB
at https://github.com/TUM-Dev/gocast/pull/1498/files#r1971590406, we can leave it out here as well afaik.
Motivation and Context
fixes issue #1426
Description
I have added a user setting "Preferred Lecture View" in the global user settings that allows the user to choose his preferred lecture mode : split, combined, presentation... I have then according to the preference updated the view shown ie the URL redirected to the preferred view of the student.
Steps for Testing
Prerequisites:
Screenshots