mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add mic to header
This commit is contained in:
parent
962908d145
commit
99f5167804
36 changed files with 715 additions and 106 deletions
|
@ -31,7 +31,11 @@
|
|||
html += '</form>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<a href="dashboard.html" class="headerButton headerButtonRight dashboardEntryHeaderButton" style="display:none;"><i class="material-icons">settings</i></a>';
|
||||
html += '<button onclick="VoiceInputManager.startListening();" type="button" data-role="none" class="headerButton headerButtonRight headerVoiceButton" style="display:none;"><i class="material-icons">mic</i></button>';
|
||||
|
||||
if (!$.browser.mobile) {
|
||||
html += '<a href="dashboard.html" class="headerButton headerButtonRight dashboardEntryHeaderButton" style="display:none;"><i class="material-icons">settings</i></a>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
||||
|
@ -51,8 +55,20 @@
|
|||
if (user.localUser) {
|
||||
$('.btnCast', header).show();
|
||||
$('.headerSearchButton', header).show();
|
||||
|
||||
requirejs(['scripts/voice'], function () {
|
||||
|
||||
if (VoiceInputManager.isSupported()) {
|
||||
$('.headerVoiceButton', header).show();
|
||||
} else {
|
||||
$('.headerVoiceButton', header).hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
$('.btnCast', header).hide();
|
||||
$('.headerVoiceButton', header).hide();
|
||||
$('.headerSearchButton', header).hide();
|
||||
}
|
||||
|
||||
|
@ -324,7 +340,7 @@
|
|||
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="remote" href="nowplaying.html"><span class="fa fa-tablet sidebarLinkIcon"></span>' + Globalize.translate('ButtonRemote') + '</a>';
|
||||
|
||||
html += '<a class="sidebarLink lnkMediaFolder syncViewMenu" data-itemid="mysync" href="mysync.html"><span class="fa fa-cloud sidebarLinkIcon"></span>' + Globalize.translate('ButtonSync') + '</a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder syncViewMenu" data-itemid="mysync" href="mysync.html"><span class="fa fa-refresh sidebarLinkIcon"></span>' + Globalize.translate('ButtonSync') + '</a>';
|
||||
|
||||
html += '<div class="sidebarDivider"></div>';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue