1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

add method to source device icons locally

This commit is contained in:
dkanada 2019-07-01 14:29:46 -07:00
parent 2587ac94b3
commit f3707153a0
18 changed files with 62 additions and 76 deletions

View file

@ -0,0 +1,34 @@
define(["browser"], function (browser) {
"use strict";
function getDeviceIcon(device) {
var baseUrl = "img/devices/";
switch (device) {
case "Opera":
case "Opera TV":
return baseUrl + "opera.svg";
case "Samsung Smart TV":
return baseUrl + "samsung.svg";
case "Xbox One":
return baseUrl + "xbox.svg";
case "Sony PS4":
return baseUrl + "playstation.svg";
case "Chrome":
return baseUrl + "chrome.svg";
case "Firefox":
return baseUrl + "firefox.svg";
case "Edge":
return baseUrl + "edge.svg";
case "Internet Explorer":
return baseUrl + "msie.svg";
case "Web Browser":
return baseUrl + "html5.svg";
default:
return baseUrl + "other.svg";
}
}
return {
getDeviceIcon: getDeviceIcon,
};
});