Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XKit Preferences: Improve error UI #2177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Extensions/xkit_preferences.css
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,9 @@
.xkit-unable-to-load-extension-gallery,
.xkit-unable-to-load-extension-panel {
padding: 80px 30px 30px 30px;
/*
background: no-repeat 50% 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-.1 -.1 1.2 1.2'%3E%3Cpath d='m 0.14642415,0.14645295 a 0.50000422,0.50000422 0 0 0 2.88e-5,0.7070941 0.50000422,0.50000422 0 0 0 0.7070941,2.88e-5 0.50000422,0.50000422 0 0 0 0,-0.7071229 0.50000422,0.50000422 0 0 0 -0.7071229,0 z m 0.1100781,0.223464 0.1134147,-0.1134147 0.1300974,0.1300975 0.1300688,-0.1300687 0.1133858,0.1133859 -0.1300687,0.1300687 0.1300975,0.1300975 -0.1134146,0.1134146 -0.1300975,-0.1300974 -0.1300687,0.1300687 -0.1133859,-0.1133859 0.1300687,-0.1300688 z' fill='%23888'%3E%3C/path%3E%3C/svg%3E");
*/
font-size: 14px;
color: var(--xkit-on-secondary);
text-align: center;
Expand Down
15 changes: 7 additions & 8 deletions Extensions/xkit_preferences.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//* TITLE XKit Preferences **//
//* VERSION 7.7.1 **//
//* VERSION 7.7.2 **//
//* DESCRIPTION Lets you customize XKit **//
//* DEVELOPER new-xkit **//

Expand Down Expand Up @@ -1199,10 +1199,7 @@ XKit.extensions.xkit_preferences = new Object({
extension_icon = m_extension.icon;
}

var extension_title = m_extension.title;
if (extension_title === "") {
extension_title = m_extension.id;
}
var extension_title = m_extension.title || m_extension.id || installed[i];

if (listed_count === 0) {
m_first = m_extension.id;
Expand All @@ -1212,15 +1209,15 @@ XKit.extensions.xkit_preferences = new Object({
var m_html = '<div class="xkit-extension" data-extension-id="' + installed[i] + '">' +
'<img class="icon" src="' + extension_icon + '">' +
'<div class="icon-mask">&nbsp;</div>' +
'<div class="title">' + m_extension.title + '</div>' +
'<div class="title">' + extension_title + '</div>' +
'</div>';

if (iconic === true) {

m_html = '<div class="xkit-extension iconic" data-extension-id="' + installed[i] + '">' +
'<img class="icon" src="' + extension_icon + '">' +
'<div class="icon-mask">&nbsp;</div>' +
'<div class="title">' + m_extension.title + '</div>' +
'<div class="title">' + extension_title + '</div>' +
'</div>';

}
Expand Down Expand Up @@ -1276,9 +1273,11 @@ XKit.extensions.xkit_preferences = new Object({
// Something bad has happened. Let's check for this later.
$("#xkit-extensions-panel-right-inner").html('<div class="xkit-unable-to-load-extension-panel"><b>Unable to load extension panel.</b><br/>' +
"Please refresh the page and try again.<br><br>If this extension is causing trouble:<br>" +
'<div id="xkit-extension-delete-trouble" class="xkit-button">Delete this extension</div></div>');
'<div id="xkit-extension-update-trouble" class="xkit-button">Force update all extensions</div>' +
'<div id="xkit-extension-delete-trouble" class="xkit-button">Delete this extension</div></div>');

console.error("Can't load extension panel: Extension undefined.");
$("#xkit-extension-update-trouble").click(XKit.special.force_update);
$("#xkit-extension-delete-trouble").click(function() {

if (this_is_internal === true) { return; }
Expand Down
Loading