mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
24 lines
525 B
JavaScript
24 lines
525 B
JavaScript
define(['browser'], function (browser) {
|
|
|
|
function layoutManager() {
|
|
|
|
var self = this;
|
|
|
|
self.setFormFactor = function (formFactor) {
|
|
|
|
self.mobile = false;
|
|
self.tv = false;
|
|
|
|
self[formFactor] = true;
|
|
};
|
|
|
|
// Take a guess at initial layout. The consuming app can override
|
|
if (browser.mobile) {
|
|
self.setFormFactor('mobile');
|
|
} else {
|
|
self.setFormFactor('desktop');
|
|
}
|
|
};
|
|
|
|
return new layoutManager();
|
|
}); |