mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update voice script
This commit is contained in:
parent
99f5167804
commit
9bdb4a323f
10 changed files with 125 additions and 29 deletions
|
@ -920,7 +920,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
padding-top: 3px;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
background: rgba(51, 136, 204, .8);
|
||||
background: rgba(82, 181, 75, .8);
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
|
@ -928,6 +928,59 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
background: rgba(255, 106, 0, .8);
|
||||
}
|
||||
|
||||
.pieIndicator {
|
||||
height: 24px;
|
||||
position: absolute;
|
||||
top: 32px;
|
||||
right: 29px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.pieBackground {
|
||||
background-color: rgb(82, 181, 75);
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
-moz-border-radius: 50px;
|
||||
-webkit-border-radius: 50px;
|
||||
-o-border-radius: 50px;
|
||||
border-radius: 50px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.pieIndicator .fa {
|
||||
color: #fff;
|
||||
z-index: 4;
|
||||
position: absolute;
|
||||
margin: 5px 0 0 6px;
|
||||
}
|
||||
|
||||
.pie {
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
-moz-border-radius: 50px;
|
||||
-webkit-border-radius: 50px;
|
||||
-o-border-radius: 50px;
|
||||
border-radius: 50px;
|
||||
clip: rect(0px, 12px, 24px, 0px);
|
||||
background-color: rgba(31, 31, 31, .8);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.hold {
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
-moz-border-radius: 50px;
|
||||
-webkit-border-radius: 50px;
|
||||
-o-border-radius: 50px;
|
||||
border-radius: 50px;
|
||||
clip: rect(0px, 24px, 24px, 12px);
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.playedIndicator {
|
||||
display: block;
|
||||
position: absolute;
|
||||
|
@ -1387,6 +1440,12 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
.listItem a:first-child {
|
||||
margin-right: 0 !important;
|
||||
background-color: transparent !important;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.listItem.ui-li-has-thumb .ui-btn {
|
||||
padding-left: 5.9em !important;
|
||||
}
|
||||
|
||||
.ui-page-theme-a .listItem a:first-child {
|
||||
|
@ -1410,6 +1469,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
background-color: rgba(51,51,51,.6) !important;
|
||||
}
|
||||
|
||||
.listviewSubLink:hover {
|
||||
color: #2ad;
|
||||
}
|
||||
|
||||
@media all and (max-width: 600px) {
|
||||
|
||||
.itemsListview .ui-li-aside {
|
||||
|
|
|
@ -154,15 +154,6 @@ h1 a:hover {
|
|||
bottom: 0;
|
||||
right: 0;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
-ms-overflow-style: none;
|
||||
overflow: -moz-scrollbars-none;
|
||||
}
|
||||
|
||||
.ui-panel-inner::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ui-slider-track.ui-mini .ui-slider-handle {
|
||||
|
@ -189,15 +180,15 @@ h1 a:hover {
|
|||
}
|
||||
|
||||
|
||||
.hiddenScrollY {
|
||||
overflow-y: scroll;
|
||||
.hiddenScrollY, .ui-panel-inner {
|
||||
overflow-y: auto;
|
||||
-ms-overflow-style: none;
|
||||
overflow: -moz-scrollbars-none;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.hiddenScrollY::-webkit-scrollbar {
|
||||
.touch .hiddenScrollY::-webkit-scrollbar, .touch .ui-panel-inner::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -452,7 +452,6 @@
|
|||
|
||||
html = LibraryBrowser.getListViewHtml({
|
||||
items: result.Items,
|
||||
smallIcon: true,
|
||||
playFromHere: true,
|
||||
defaultAction: 'playallfromhere'
|
||||
});
|
||||
|
@ -504,8 +503,7 @@
|
|||
else {
|
||||
|
||||
html = LibraryBrowser.getListViewHtml({
|
||||
items: result.Items,
|
||||
smallIcon: true
|
||||
items: result.Items
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -811,11 +811,27 @@
|
|||
}
|
||||
textlines.push(displayName);
|
||||
|
||||
var verticalTextLines = 2;
|
||||
var enableSubLinks = !AppInfo.isTouchPreferred;
|
||||
|
||||
if (item.Type == 'Audio') {
|
||||
textlines.push(item.ArtistItems.map(function (a) {
|
||||
if (enableSubLinks) {
|
||||
return '<span class="listviewSubLink" data-href="itembynamedetails.html?id=' + a.Id + '&context=music">' + a.Name + '</span>';
|
||||
} else {
|
||||
return a.Name;
|
||||
}
|
||||
|
||||
}).join(', ') || ' ');
|
||||
|
||||
if (item.Album && item.AlbumId && !options.smallIcon) {
|
||||
verticalTextLines++;
|
||||
if (enableSubLinks) {
|
||||
textlines.push('<span class="listviewSubLink" data-href="itemdetails.html?id=' + item.AlbumId + '&context=music">' + item.Album + '</span>');
|
||||
} else {
|
||||
textlines.push(item.Album);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.Type == 'Game') {
|
||||
|
@ -836,14 +852,20 @@
|
|||
html += textlines[0];
|
||||
html += '</h3>';
|
||||
|
||||
if (textlines.length > 1) {
|
||||
if (textlines.length > 1 && verticalTextLines > 1) {
|
||||
html += '<p>';
|
||||
html += textlines[1];
|
||||
html += '</p>';
|
||||
}
|
||||
|
||||
if (textlines.length > 2 && verticalTextLines > 2) {
|
||||
html += '<p>';
|
||||
html += textlines[2];
|
||||
html += '</p>';
|
||||
}
|
||||
|
||||
html += '<div class="ui-li-aside">';
|
||||
html += textlines[2] || LibraryBrowser.getRatingHtml(item, false);
|
||||
html += textlines[verticalTextLines] || LibraryBrowser.getRatingHtml(item, false);
|
||||
html += '</div>';
|
||||
|
||||
if (item.Type == 'Series' || item.Type == 'Season' || item.Type == 'BoxSet' || item.MediaType == 'Video') {
|
||||
|
@ -1852,6 +1874,16 @@
|
|||
|
||||
getSyncIndicator: function (item) {
|
||||
|
||||
if (item.SyncPercent) {
|
||||
|
||||
if (item.SyncPercent >= 100) {
|
||||
return '<div class="syncIndicator"><i class="fa fa-refresh"></i></div>';
|
||||
}
|
||||
|
||||
var degree = (item.SyncPercent / 100) * 360;
|
||||
return '<div class="pieIndicator"><i class="fa fa-refresh"></i><div class="pieBackground"></div><div class="hold"><div class="pie" style="-webkit-transform: rotate(' + degree + 'deg);-moz-transform: rotate(' + degree + 'deg);-o-transform: rotate(' + degree + 'deg);transform: rotate(' + degree + 'deg);"></div></div></div>';
|
||||
}
|
||||
|
||||
if (item.SyncStatus) {
|
||||
if (item.SyncStatus == 'Queued' || item.SyncStatus == 'Converting' || item.SyncStatus == 'ReadyToTransfer' || item.SyncStatus == 'Transferring') {
|
||||
|
||||
|
|
|
@ -1049,6 +1049,13 @@
|
|||
PlaylistManager.showPanel(selection);
|
||||
}
|
||||
|
||||
function onListviewSubLinkClick(e) {
|
||||
|
||||
var elem = e.target;
|
||||
Dashboard.navigate(elem.getAttribute('data-href'));
|
||||
return false;
|
||||
}
|
||||
|
||||
function onItemWithActionClick(e) {
|
||||
|
||||
var elem = this;
|
||||
|
@ -1129,7 +1136,7 @@
|
|||
|
||||
toggleSelections(page);
|
||||
|
||||
}).on('click', '.itemWithAction', onItemWithActionClick);
|
||||
}).on('click', '.itemWithAction', onItemWithActionClick).on('click', '.listviewSubLink', onListviewSubLinkClick);
|
||||
|
||||
$('.itemsContainer', page).createCardMenus();
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
$('.btnCast', header).show();
|
||||
$('.headerSearchButton', header).show();
|
||||
|
||||
requirejs(['scripts/voice'], function () {
|
||||
requirejs(['voice/voice'], function () {
|
||||
|
||||
if (VoiceInputManager.isSupported()) {
|
||||
$('.headerVoiceButton', header).show();
|
||||
|
|
|
@ -98,7 +98,6 @@
|
|||
showIndex: false,
|
||||
title: item.Name,
|
||||
showRemoveFromPlaylist: true,
|
||||
smallIcon: true,
|
||||
playFromHere: true,
|
||||
defaultAction: 'playallfromhere'
|
||||
});
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
|
||||
html += LibraryBrowser.getListViewHtml({
|
||||
items: result.Items,
|
||||
smallIcon: true,
|
||||
showIndex: true,
|
||||
defaultAction: 'play'
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.voiceInputHelp {
|
||||
background-image: url(images/splash.jpg);
|
||||
background-image: url(../css/images/splash.jpg);
|
||||
top: 50px;
|
||||
left: 0;
|
||||
right: 0;
|
|
@ -148,7 +148,7 @@
|
|||
|
||||
var words = text.toLowerCase().split(' ');
|
||||
|
||||
if (words.indexOf('show') != -1 || words.indexOf('pull') != -1 || words.indexOf('display') != -1) {
|
||||
if (words.indexOf('show') != -1 || words.indexOf('pull') != -1 || words.indexOf('display') != -1 || words.indexOf('go') != -1) {
|
||||
|
||||
if (words.indexOf('guide') != -1) {
|
||||
result.action = 'show';
|
||||
|
@ -164,6 +164,7 @@
|
|||
result.removeWords.push('pull up');
|
||||
result.removeWords.push('pull');
|
||||
result.removeWords.push('display');
|
||||
result.removeWords.push('go to');
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -450,7 +451,7 @@
|
|||
destroyCurrentRecognition();
|
||||
|
||||
require([
|
||||
'css!/web/css/voice'
|
||||
'css!voice/voice'
|
||||
], function () {
|
||||
|
||||
startListeningInternal();
|
||||
|
@ -486,6 +487,12 @@
|
|||
window.VoiceInputManager = {
|
||||
|
||||
isSupported: function () {
|
||||
|
||||
// Crashing. Don't want to fight it right now
|
||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return window.SpeechRecognition || window.webkitSpeechRecognition;
|
||||
},
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue