mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add option to enable smooth scroll
This commit is contained in:
parent
ba0e227b17
commit
639f99f82a
5 changed files with 30 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
import browser from 'scripts/browser';
|
||||
import Events from '../../utils/events.ts';
|
||||
import { toBoolean } from '../../utils/string.ts';
|
||||
|
||||
|
@ -31,6 +32,19 @@ class AppSettings {
|
|||
return toBoolean(this.get('enableGamepad'), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set 'Enable smooth scroll' state.
|
||||
* @param {boolean|undefined} val - Flag to enable 'Enable smooth scroll' or undefined.
|
||||
* @return {boolean} 'Enable smooth scroll' state.
|
||||
*/
|
||||
enableSmoothScroll(val) {
|
||||
if (val !== undefined) {
|
||||
return this.set('enableSmoothScroll', val.toString());
|
||||
}
|
||||
|
||||
return toBoolean(this.get('enableSmoothScroll'), !!browser.tizen);
|
||||
}
|
||||
|
||||
enableSystemExternalPlayers(val) {
|
||||
if (val !== undefined) {
|
||||
this.set('enableSystemExternalPlayers', val.toString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue