diff --git a/static/components/direct-messages.js b/static/components/direct-messages.js index b9dee13..3bb1aa0 100644 --- a/static/components/direct-messages.js +++ b/static/components/direct-messages.js @@ -50,13 +50,16 @@ window.app.component('direct-messages', { methods: { sendMessage: async function () {}, buildCustomerLabel: function (c) { - let label = `${c.profile.name || 'unknown'} ${c.profile.about || ''}` - if (c.unread_messages) { - label += `[new: ${c.unread_messages}]` + if (!c) return '' + let label = c.profile.name || 'unknown' + if (c.profile.about) { + label += ` - ${c.profile.about.substring(0, 30)}` + if (c.profile.about.length > 30) label += '...' } - label += ` (${c.public_key.slice(0, 16)}...${c.public_key.slice( - c.public_key.length - 16 - )}` + if (c.unread_messages) { + label = `[${c.unread_messages} new] ${label}` + } + label += ` (${c.public_key.slice(0, 8)}...${c.public_key.slice(-8)})` return label }, getDirectMessages: async function (pubkey) { diff --git a/templates/nostrmarket/components/direct-messages.html b/templates/nostrmarket/components/direct-messages.html index 8950923..9f68511 100644 --- a/templates/nostrmarket/components/direct-messages.html +++ b/templates/nostrmarket/components/direct-messages.html @@ -1,22 +1,22 @@
-
-
+
+
Messages
-
+
  new
-
+
Client Orders
@@ -26,22 +26,40 @@ -
-
+
+
+
-
+
Add a public key to chat with diff --git a/templates/nostrmarket/components/key-pair.html b/templates/nostrmarket/components/key-pair.html index 2b65737..911e057 100644 --- a/templates/nostrmarket/components/key-pair.html +++ b/templates/nostrmarket/components/key-pair.html @@ -1,40 +1,93 @@
-
-
Public Key
-
- - Show Private Key - -
+ + +
+
Keys
+
-
-
-
- - - -
Click to copy
-
+ +
+ +
+ + +
Public Key
+
+ + + +
+
+ ... +
+ +
+
-
-
-
- +
+ + +
+ + Private Key (Keep Secret!) +
+
- - -
Click to copy
-
-
+ + + +
+
+ ... +
+ + +
diff --git a/templates/nostrmarket/components/stall-list.html b/templates/nostrmarket/components/stall-list.html index 632eeaa..673e8a7 100644 --- a/templates/nostrmarket/components/stall-list.html +++ b/templates/nostrmarket/components/stall-list.html @@ -62,7 +62,6 @@ /> - diff --git a/templates/nostrmarket/index.html b/templates/nostrmarket/index.html index 9b1cafc..d95d965 100644 --- a/templates/nostrmarket/index.html +++ b/templates/nostrmarket/index.html @@ -5,8 +5,8 @@
-
-
+
+
-
- - +
+
+ + +
-
+