Skip to content

Commit

Permalink
Default theatre mode no sidebar (#3981)
Browse files Browse the repository at this point in the history
* Revert "! Fix watch page layout when theatre mode enabled and sidebar "hidden" (#3931)"

This reverts commit 621cc27.

* Fix the watch page layout when the sidebar is hidden and theatre mode mode is enabled by default

* Do not use theatre mode while loading
  • Loading branch information
absidue authored Sep 7, 2023
1 parent 1543734 commit e832f22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export default defineComponent({
mounted: function () {
this.videoId = this.$route.params.id
this.activeFormat = this.defaultVideoFormat
this.useTheatreMode = this.defaultTheatreMode
this.useTheatreMode = this.defaultTheatreMode && this.theatrePossible

this.checkIfPlaylist()
this.checkIfTimestamp()
Expand Down
12 changes: 1 addition & 11 deletions src/renderer/views/Watch/Watch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,7 @@
}

@mixin theatre-mode-template {
grid-template: 'video video video' auto
'info info sidebar' auto
'info info sidebar' auto / 1fr 1fr 1fr;

// When there is no sidebar (but the empty container element still exists)
// The info element need to be expanded with following rule(s)
@at-root .videoLayout.noSidebar {
grid-template: 'video video video' auto
'info info info' auto
'info info info' auto / 1fr 1fr 1fr;
}
grid-template: 'video video video' auto 'info info sidebar' auto 'info info sidebar' auto / 1fr 1fr 1fr;
}

@mixin single-column-template {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/Watch/Watch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="videoLayout"
:class="{
isLoading,
useTheatreMode,
useTheatreMode: useTheatreMode && !isLoading,
noSidebar: !theatrePossible
}"
>
Expand Down

0 comments on commit e832f22

Please sign in to comment.