@@ -50,6 +50,7 @@ const domProfileOptions = document.getElementById('profile-option-list');
5050const domProfileOptionMute = document . getElementById ( 'profile-option-mute' ) ;
5151const domProfileOptionMessage = document . getElementById ( 'profile-option-message' ) ;
5252const domProfileOptionNickname = document . getElementById ( 'profile-option-nickname' ) ;
53+ const domProfileOptionShare = document . getElementById ( 'profile-option-share' ) ;
5354const domProfileId = document . getElementById ( 'profile-id' ) ;
5455
5556const domGroupOverview = document . getElementById ( 'group-overview' ) ;
@@ -426,6 +427,13 @@ function showToast(message) {
426427 left: 50%;
427428 transform: translateX(-50%);
428429 background: rgba(0, 0, 0, 0.8);
430+ backdrop-filter: blur(20px);
431+ -webkit-backdrop-filter: blur(10px);
432+ border: 1px solid var(--toast-border-color);
433+ box-shadow:
434+ 0 0 4px rgba(0, 0, 0, 0.8),
435+ 0 0 12px rgba(0, 0, 0, 0.6),
436+ 0 0 30px rgba(0, 0, 0, 0.4);
429437 color: white;
430438 padding: 12px 24px;
431439 border-radius: 8px;
@@ -6556,9 +6564,9 @@ function renderProfileTab(cProfile) {
65566564 const npub = document . getElementById ( 'profile-npub' ) ?. textContent ;
65576565 if ( npub ) {
65586566 // Copy the full profile URL for easy sharing
6559- const profileUrl = `https://vectorapp.io/profile/ ${ npub } ` ;
6560- navigator . clipboard . writeText ( profileUrl ) . then ( ( ) => {
6561- const copyBtn = e . target . closest ( '. profile-npub-copy' ) ;
6567+ navigator . clipboard . writeText ( npub ) . then ( ( ) => {
6568+ showToast ( 'Copied' ) ;
6569+ const copyBtn = e . target . closest ( '# profile-npub-copy' ) ;
65626570 if ( copyBtn ) {
65636571 copyBtn . innerHTML = '<span class="icon icon-check"></span>' ;
65646572 setTimeout ( ( ) => {
@@ -6625,6 +6633,21 @@ function renderProfileTab(cProfile) {
66256633 await invoke ( 'set_nickname' , { npub : cProfile . id , nickname : nick } ) ;
66266634 }
66276635
6636+ // Setup Share option
6637+ domProfileOptionShare . onclick = ( ) => {
6638+ const npub = document . getElementById ( 'profile-npub' ) ?. textContent ;
6639+ if ( npub ) {
6640+ const profileUrl = `https://vectorapp.io/profile/${ npub } ` ;
6641+ navigator . clipboard . writeText ( profileUrl ) . then ( ( ) => {
6642+ // Brief visual feedback
6643+ const icon = domProfileOptionShare . querySelector ( 'span' ) ;
6644+ showToast ( 'Profile Link Copied!' ) ;
6645+ icon . classList . replace ( 'icon-share' , 'icon-check' ) ;
6646+ setTimeout ( ( ) => icon . classList . replace ( 'icon-check' , 'icon-share' ) , 2000 ) ;
6647+ } ) ;
6648+ }
6649+ } ;
6650+
66286651 // Hide edit buttons
66296652 document . querySelector ( '.profile-avatar-edit' ) . style . display = 'none' ;
66306653 document . querySelector ( '.profile-banner-edit' ) . style . display = 'none' ;
0 commit comments