mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
Conflicts: MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/.bower.json MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/CHANGELOG.md MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/LICENSE MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/components.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/components/prism-core.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/components/prism-core.min.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/components/prism-jsx.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/components/prism-jsx.min.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/package.json MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/file-highlight/prism-file-highlight.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/file-highlight/prism-file-highlight.min.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/show-invisibles/prism-show-invisibles.css MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/show-invisibles/prism-show-invisibles.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/show-invisibles/prism-show-invisibles.min.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.css MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.min.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/wpd/prism-wpd.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/plugins/wpd/prism-wpd.min.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/prism.js MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/themes/prism-coy.css MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/themes/prism-dark.css MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/themes/prism-funky.css MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/themes/prism-okaidia.css MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/themes/prism-tomorrow.css MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/themes/prism-twilight.css MediaBrowser.WebDashboard/dashboard-ui/bower_components/prism/themes/prism.css
This commit is contained in:
parent
df4c86218e
commit
be5906a13e
54 changed files with 570 additions and 641 deletions
33
dashboard-ui/bower_components/prism/plugins/command-line/prism-command-line.css
vendored
Normal file
33
dashboard-ui/bower_components/prism/plugins/command-line/prism-command-line.css
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
.command-line-prompt {
|
||||
border-right: 1px solid #999;
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 100%;
|
||||
letter-spacing: -1px;
|
||||
margin-right: 1em;
|
||||
pointer-events: none;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.command-line-prompt > span:before {
|
||||
color: #999;
|
||||
content: ' ';
|
||||
display: block;
|
||||
padding-right: 0.8em;
|
||||
}
|
||||
|
||||
.command-line-prompt > span[data-user]:before {
|
||||
content: "[" attr(data-user) "@" attr(data-host) "] $";
|
||||
}
|
||||
|
||||
.command-line-prompt > span[data-user="root"]:before {
|
||||
content: "[" attr(data-user) "@" attr(data-host) "] #";
|
||||
}
|
||||
|
||||
.command-line-prompt > span[data-prompt]:before {
|
||||
content: attr(data-prompt);
|
||||
}
|
77
dashboard-ui/bower_components/prism/plugins/command-line/prism-command-line.js
vendored
Normal file
77
dashboard-ui/bower_components/prism/plugins/command-line/prism-command-line.js
vendored
Normal file
|
@ -0,0 +1,77 @@
|
|||
(function() {
|
||||
|
||||
if (typeof self === 'undefined' || !self.Prism || !self.document) {
|
||||
return;
|
||||
}
|
||||
|
||||
Prism.hooks.add('complete', function (env) {
|
||||
if (!env.code) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Works only for <code> wrapped inside <pre> (not inline).
|
||||
var pre = env.element.parentNode;
|
||||
var clsReg = /\s*\bcommand-line\b\s*/;
|
||||
if (
|
||||
!pre || !/pre/i.test(pre.nodeName) ||
|
||||
// Abort only if neither the <pre> nor the <code> have the class
|
||||
(!clsReg.test(pre.className) && !clsReg.test(env.element.className))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (env.element.querySelector('.command-line-prompt')) {
|
||||
// Abort if prompt already exists.
|
||||
return;
|
||||
}
|
||||
|
||||
if (clsReg.test(env.element.className)) {
|
||||
// Remove the class "command-line" from the <code>
|
||||
env.element.className = env.element.className.replace(clsReg, '');
|
||||
}
|
||||
if (!clsReg.test(pre.className)) {
|
||||
// Add the class "command-line" to the <pre>
|
||||
pre.className += ' command-line';
|
||||
}
|
||||
|
||||
// Create the "rows" that will become the command-line prompts. -- cwells
|
||||
var lines = new Array(1 + env.code.split('\n').length);
|
||||
var promptText = pre.getAttribute('data-prompt') || '';
|
||||
if (promptText !== '') {
|
||||
lines = lines.join('<span data-prompt="' + promptText + '"></span>');
|
||||
} else {
|
||||
var user = pre.getAttribute('data-user') || 'user';
|
||||
var host = pre.getAttribute('data-host') || 'localhost';
|
||||
lines = lines.join('<span data-user="' + user + '" data-host="' + host + '"></span>');
|
||||
}
|
||||
|
||||
// Create the wrapper element. -- cwells
|
||||
var prompt = document.createElement('span');
|
||||
prompt.className = 'command-line-prompt';
|
||||
prompt.innerHTML = lines;
|
||||
|
||||
// Mark the output lines so they can be styled differently (no prompt). -- cwells
|
||||
var outputSections = pre.getAttribute('data-output') || '';
|
||||
outputSections = outputSections.split(',');
|
||||
for (var i = 0; i < outputSections.length; i++) {
|
||||
var outputRange = outputSections[i].split('-');
|
||||
var outputStart = parseInt(outputRange[0]);
|
||||
var outputEnd = outputStart; // Default: end at the first line when it's not an actual range. -- cwells
|
||||
if (outputRange.length === 2) {
|
||||
outputEnd = parseInt(outputRange[1]);
|
||||
}
|
||||
|
||||
if (!isNaN(outputStart) && !isNaN(outputEnd)) {
|
||||
for (var j = outputStart; j <= outputEnd && j <= prompt.children.length; j++) {
|
||||
var node = prompt.children[j - 1];
|
||||
node.removeAttribute('data-user');
|
||||
node.removeAttribute('data-host');
|
||||
node.removeAttribute('data-prompt');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
env.element.innerHTML = prompt.outerHTML + env.element.innerHTML;
|
||||
});
|
||||
|
||||
}());
|
1
dashboard-ui/bower_components/prism/plugins/command-line/prism-command-line.min.js
vendored
Normal file
1
dashboard-ui/bower_components/prism/plugins/command-line/prism-command-line.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"undefined"!=typeof self&&self.Prism&&self.document&&Prism.hooks.add("complete",function(e){if(e.code){var t=e.element.parentNode,a=/\s*\bcommand-line\b\s*/;if(t&&/pre/i.test(t.nodeName)&&(a.test(t.className)||a.test(e.element.className))&&!e.element.querySelector(".command-line-prompt")){a.test(e.element.className)&&(e.element.className=e.element.className.replace(a,"")),a.test(t.className)||(t.className+=" command-line");var n=new Array(1+e.code.split("\n").length),s=t.getAttribute("data-prompt")||"";if(""!==s)n=n.join('<span data-prompt="'+s+'"></span>');else{var r=t.getAttribute("data-user")||"user",l=t.getAttribute("data-host")||"localhost";n=n.join('<span data-user="'+r+'" data-host="'+l+'"></span>')}var m=document.createElement("span");m.className="command-line-prompt",m.innerHTML=n;var o=t.getAttribute("data-output")||"";o=o.split(",");for(var i=0;i<o.length;i++){var d=o[i].split("-"),p=parseInt(d[0]),c=p;if(2===d.length&&(c=parseInt(d[1])),!isNaN(p)&&!isNaN(c))for(var u=p;c>=u&&u<=m.children.length;u++){var N=m.children[u-1];N.removeAttribute("data-user"),N.removeAttribute("data-host"),N.removeAttribute("data-prompt")}}e.element.innerHTML=m.outerHTML+e.element.innerHTML}}})}();
|
Loading…
Add table
Add a link
Reference in a new issue