Icons: battery + bt
This commit is contained in:
parent
a4107c87c0
commit
74cf71755b
2 changed files with 15 additions and 16 deletions
|
|
@ -49,39 +49,38 @@ Singleton {
|
|||
})
|
||||
}
|
||||
|
||||
// FIXME
|
||||
function getDeviceIcon(device) {
|
||||
if (!device) {
|
||||
return "bluetooth"
|
||||
return Bootstrap.icons["bluetooth"]
|
||||
}
|
||||
|
||||
var name = (device.name || device.deviceName || "").toLowerCase()
|
||||
var icon = (device.icon || "").toLowerCase()
|
||||
if (icon.includes("headset") || icon.includes("audio") || name.includes("headphone") || name.includes("airpod")
|
||||
|| name.includes("headset") || name.includes("arctis")) {
|
||||
return "headset"
|
||||
return Bootstrap.icons["headset"]
|
||||
}
|
||||
|
||||
if (icon.includes("mouse") || name.includes("mouse")) {
|
||||
return "mouse"
|
||||
return Bootstrap.icons["mouse-2"]
|
||||
}
|
||||
if (icon.includes("keyboard") || name.includes("keyboard")) {
|
||||
return "keyboard"
|
||||
return Bootstrap.icons["keyboard"]
|
||||
}
|
||||
if (icon.includes("phone") || name.includes("phone") || name.includes("iphone") || name.includes("android")
|
||||
|| name.includes("samsung")) {
|
||||
return "smartphone"
|
||||
return Bootstrap.icons["phone"]
|
||||
}
|
||||
if (icon.includes("watch") || name.includes("watch")) {
|
||||
return "watch"
|
||||
return Bootstrap.icons["smartwatch"]
|
||||
}
|
||||
if (icon.includes("speaker") || name.includes("speaker")) {
|
||||
return "speaker"
|
||||
return Bootstrap.icons["speaker"]
|
||||
}
|
||||
if (icon.includes("display") || name.includes("tv")) {
|
||||
return "tv"
|
||||
return Bootstrap.icons["tv"]
|
||||
}
|
||||
return "bluetooth"
|
||||
return Bootstrap.icons["bluetooth"]
|
||||
}
|
||||
|
||||
function canConnect(device) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue