Skip to content

Commit

Permalink
fix for long relay urls
Browse files Browse the repository at this point in the history
fixes #7
  • Loading branch information
pjv committed Jun 23, 2023
1 parent ed3843b commit c115064
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
12 changes: 9 additions & 3 deletions js/nostrtium-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
tbody.html("");
$.each(nostrtium.relays, function (i, relay) {
var tr = $("<tr>");
$("<td>")
$('<td class="collapsing">')
.html('<i class="broadcast tower icon violet"></i>')
.appendTo(tr);
$("<td>").html(relay).appendTo(tr);
$("<td>")
$(
'<td style="overflow: hidden;text-overflow: ellipsis;width: 100%;max-width: 0;">'
)
.html(relay)
.appendTo(tr);
$('<td class="collapsing">')
.html(
'<i class="delete-relay minus circle icon red" index="' +
i +
Expand Down Expand Up @@ -109,6 +113,8 @@
(url.substring(0, 6) == "wss://" || url.substring(0, 5) == "ws://")
) {
$("#add-relay").removeClass("disabled");
} else {
$("#add-relay").addClass("disabled");
}
});

Expand Down
4 changes: 2 additions & 2 deletions nostrtium.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Author URI: https://github.com/pjv
* Text Domain: nostrtium
* Domain Path: /languages
* Version: 0.7.3
* Version: 0.7.4
* Requires at least 6.0
* Requires PHP 8.1
* License Unlicense
Expand All @@ -21,7 +21,7 @@
exit;
}

define('PJV_NOSTRTIUM_VERSION', '0.7.3');
define('PJV_NOSTRTIUM_VERSION', '0.7.4');
define('PJV_NOSTRTIUM_DIR', plugin_dir_path(__FILE__));
define('PJV_NOSTRTIUM_DEFAULT_USER_ROLE', 'edit_posts');
define('PJV_NOSTRTIUM_STORAGE', wp_upload_dir()['basedir'] . '/nostrtium_' . md5(LOGGED_IN_SALT) . '/');
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: social media, nostr
Requires at least: 6.0
Requires PHP: 8.1
Tested up to: 6.2.2
Stable tag: 0.7.3
Stable tag: 0.7.4
License: Unlicense
License URI: https://unlicense.org

Expand Down Expand Up @@ -66,6 +66,9 @@ The manual installation method involves downloading the plugin and then uploadin

== Changelog ==

= 0.7.4 =
* Fix for very long relay URLs messing up table width on settings page

= 0.7.3 =
* Allow unenecrypted (ws://) relay URLs

Expand Down
2 changes: 1 addition & 1 deletion views/settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<div class="row">
<div class="six wide column">
<table class="ui collapsing celled striped table">
<table class="ui striped table">
<thead>
<tr>
<th colspan="3">
Expand Down

0 comments on commit c115064

Please sign in to comment.