diff --git a/output/js/constants.js b/output/js/constants.js index 23bc0d1..79e88b4 100644 --- a/output/js/constants.js +++ b/output/js/constants.js @@ -56,7 +56,7 @@ export function columnIsSortable(column) { const TRANSFORMATION = { numeric: (el) => parseInt(el.innerText), casefold: (el) => el.innerText.toLowerCase().trim(), - tokenData: (el) => el.getAttribute("data-token") + getPubkey: (el) => el.getAttribute("data-pubkey") } /** @@ -67,7 +67,7 @@ export const COLUMN_TRANSFORMATION = { [COLUMN.IDENTIFIER]: TRANSFORMATION.casefold, [COLUMN.NAME]: TRANSFORMATION.casefold, [COLUMN.DESCRIPTION]: TRANSFORMATION.casefold, - [COLUMN.SERVER_ICON]: TRANSFORMATION.tokenData + [COLUMN.SERVER_ICON]: TRANSFORMATION.getPubkey } /** diff --git a/sites/+components/tbl_communities.php b/sites/+components/tbl_communities.php index cc589d1..df8b3c1 100644 --- a/sites/+components/tbl_communities.php +++ b/sites/+components/tbl_communities.php @@ -21,7 +21,7 @@ ['id' => "description", 'name' => "Description"], ['id' => "users", 'name' => "Users"], ['id' => "preview", 'name' => "Preview"], - ['id' => "qr", 'name' => "QR"], + ['id' => "qr_code", 'name' => "QR"], ['id' => "server_icon", 'name' => "Server"], ['id' => "join_url", 'name' => "Join URL"], ]; @@ -45,8 +45,8 @@ // However, the fetching code hides component data // and this is a low risk use case. - $token = explode("=", $room->join_link)[1]; - $icon_hue = hexdec($token[2] . $token[2]); + $pubkey = explode("=", $room->join_link)[1]; + $icon_hue = hexdec($pubkey[2] . $pubkey[2]); $icon_color = "hsl($icon_hue, 80%, 50%)"; $hostname = explode("//", $room->join_link)[1]; @@ -79,11 +79,11 @@ >
- +