mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-19 06:33:32 +00:00
link profiles to #/npub..., change menu logo link style
This commit is contained in:
parent
4942ce626e
commit
9f78225662
@ -1097,6 +1097,14 @@ header.footer .header-content {
|
||||
}
|
||||
}
|
||||
|
||||
.application-list a.logo:hover,
|
||||
.application-list a.logo:focus,
|
||||
.application-list a.logo:active {
|
||||
background: none !important;
|
||||
opacity: 1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.application-list a:hover,
|
||||
.application-list a:focus,
|
||||
.application-list a:active,
|
||||
|
@ -80,7 +80,7 @@ export default {
|
||||
);
|
||||
});
|
||||
replacedText = reactStringReplace(replacedText, pubKeyRegex, (match, i) => {
|
||||
const link = `#/profile/${match}`;
|
||||
const link = `#/${match}`;
|
||||
return (
|
||||
<a href={link}>
|
||||
@<Name key={match + i} pub={match} hideBadge={true} userNameOnly={true} />
|
||||
@ -359,7 +359,7 @@ export default {
|
||||
},
|
||||
|
||||
getProfileLink(pub: string): string {
|
||||
return `${window.location.origin}/#/profile/${encodeURIComponent(pub)}`;
|
||||
return `${window.location.origin}/#/${encodeURIComponent(pub)}`;
|
||||
},
|
||||
|
||||
isElectron,
|
||||
|
@ -79,7 +79,7 @@ class Footer extends Component<Props, State> {
|
||||
{Icons.global}
|
||||
</a>
|
||||
<a
|
||||
href={`#/profile/${key}`}
|
||||
href={`#/${key}`}
|
||||
class={`${activeRoute === `/profile/${key}` ? 'active' : ''} my-profile`}
|
||||
>
|
||||
<Identicon str={key} width={34} />
|
||||
|
@ -287,7 +287,7 @@ class Header extends Component {
|
||||
|
||||
<${Link}
|
||||
activeClassName="active"
|
||||
href="#/profile/${npub}"
|
||||
href="#/${npub}"
|
||||
onClick=${() => iris.local().get('scrollUp').put(true)}
|
||||
class="hidden-xs my-profile"
|
||||
>
|
||||
|
@ -156,7 +156,7 @@ class Message extends Component {
|
||||
duration: ANIMATE_DURATION,
|
||||
complete: () => $('#attachment-gallery').remove(),
|
||||
});
|
||||
const activeChat = window.location.hash.replace('#/profile/', '').replace('#/chat/', '');
|
||||
const activeChat = window.location.hash.replace('#/', '').replace('#/chat/', '');
|
||||
if (activeChat) {
|
||||
iris.private(activeChat).attachments = null;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ export default class OnboardingNotification extends Component {
|
||||
${Nostr.SUGGESTED_FOLLOWS.map(
|
||||
(pub) => html`
|
||||
<div class="profile-link-container">
|
||||
<a href="#/profile/${pub}" className="profile-link">
|
||||
<a href="#/${pub}" className="profile-link">
|
||||
<${Identicon} str=${pub} width="40" />
|
||||
<${Name} pub=${pub} placeholder="Suggested follow" />
|
||||
</a>
|
||||
@ -39,7 +39,7 @@ export default class OnboardingNotification extends Component {
|
||||
<p>
|
||||
${t('alternatively')}<i> </i>
|
||||
<a
|
||||
href="#/profile/${Nostr.toNostrBech32Address(
|
||||
href="#/${Nostr.toNostrBech32Address(
|
||||
iris.session.getKey()?.secp256k1?.rpub,
|
||||
'npub',
|
||||
)}"
|
||||
|
@ -98,7 +98,7 @@ class ProfilePicture extends Component<Props> {
|
||||
duration: ANIMATE_DURATION,
|
||||
complete: () => $('#attachment-gallery').remove(),
|
||||
});
|
||||
const activeChat = window.location.hash.replace('#/profile/', '').replace('#/chat/', '');
|
||||
const activeChat = window.location.hash.replace('#/', '').replace('#/chat/', '');
|
||||
iris.private(activeChat).attachments = null;
|
||||
}
|
||||
|
||||
|
@ -331,7 +331,7 @@ class PublicMessage extends Message {
|
||||
<div class="msg-content">
|
||||
<div style="display: flex; align-items: center">
|
||||
<i class="boost-btn boosted" style="margin-right: 15px;"> ${Icons.newFollower} </i>
|
||||
<a href="#/profile/${Nostr.toNostrBech32Address(this.state.msg.event.pubkey, 'npub')}">
|
||||
<a href="#/${Nostr.toNostrBech32Address(this.state.msg.event.pubkey, 'npub')}">
|
||||
<${Name} pub=${this.state.msg?.event?.pubkey} />${' '}
|
||||
</a>
|
||||
<span> started following you</span>
|
||||
@ -355,7 +355,7 @@ class PublicMessage extends Message {
|
||||
>
|
||||
<i class="like-btn liked" style="margin-right: 15px;"> ${Icons.heartFull} </i>
|
||||
<a
|
||||
href="#/profile/${Nostr.toNostrBech32Address(this.state.msg.event.pubkey, 'npub')}"
|
||||
href="#/${Nostr.toNostrBech32Address(this.state.msg.event.pubkey, 'npub')}"
|
||||
style="margin-right: 5px;"
|
||||
>
|
||||
<${Name} pub=${this.state.msg?.event?.pubkey} userNameOnly=${true} />
|
||||
@ -442,7 +442,7 @@ class PublicMessage extends Message {
|
||||
<div class="msg-content" style="padding: 12px 0 0 0;">
|
||||
<div style="display: flex; align-items: center; flex-basis: 100%; margin-left: 15px">
|
||||
<i style="margin-right: 15px;"> ${Icons.boost} </i>
|
||||
<a href="#/profile/${Nostr.toNostrBech32Address(this.state.msg.event.pubkey, 'npub')}">
|
||||
<a href="#/${Nostr.toNostrBech32Address(this.state.msg.event.pubkey, 'npub')}">
|
||||
<${Name}
|
||||
pub=${this.state.msg?.event?.pubkey}
|
||||
hideBadge=${true}
|
||||
@ -606,7 +606,7 @@ class PublicMessage extends Message {
|
||||
<div class="msg-identicon">
|
||||
${s.msg.info.from
|
||||
? html`
|
||||
<a href=${`#/profile/${s.msg.info.from}`}>
|
||||
<a href=${`#/${s.msg.info.from}`}>
|
||||
<${Identicon} str=${s.msg.info.from} width="40" />
|
||||
</a>
|
||||
`
|
||||
@ -618,7 +618,7 @@ class PublicMessage extends Message {
|
||||
<div class="msg-sender-link" onclick=${(e) => this.onClickName(e)}>
|
||||
${this.props.showName &&
|
||||
html`
|
||||
<a href=${`#/profile/${s.msg.info.from}`} class="msgSenderName">
|
||||
<a href=${`#/${s.msg.info.from}`} class="msgSenderName">
|
||||
<${Name} pub=${s.msg.info.from} />
|
||||
</a>
|
||||
`}
|
||||
@ -643,7 +643,7 @@ class PublicMessage extends Message {
|
||||
.slice(0, 3)
|
||||
.map(
|
||||
(u) => html`
|
||||
<a href=${`#/profile/${Nostr.toNostrBech32Address(u, 'npub')}`}>
|
||||
<a href=${`#/${Nostr.toNostrBech32Address(u, 'npub')}`}>
|
||||
@<${Name} pub=${u} hideBadge=${true} userNameOnly=${true} />${' '}
|
||||
</a>
|
||||
`,
|
||||
|
@ -75,7 +75,7 @@ class About extends Component {
|
||||
|
||||
<h3>Maintainer</h3>
|
||||
<div class="profile-link-container">
|
||||
<a href={`#/profile/${DEVELOPER}`} class="profile-link">
|
||||
<a href={`#/${DEVELOPER}`} class="profile-link">
|
||||
<Identicon str={DEVELOPER} width={40} />
|
||||
<Name pub={DEVELOPER} placeholder="Iris developer's account" />
|
||||
</a>
|
||||
@ -84,7 +84,7 @@ class About extends Component {
|
||||
|
||||
<h3>Contact</h3>
|
||||
<div class="profile-link-container">
|
||||
<a href={`#/profile/${IRIS_INFO_ACCOUNT}`} className="profile-link">
|
||||
<a href={`#/${IRIS_INFO_ACCOUNT}`} className="profile-link">
|
||||
<Identicon str={IRIS_INFO_ACCOUNT} width={40} />
|
||||
<Name pub={IRIS_INFO_ACCOUNT} placeholder="Iris" />
|
||||
</a>
|
||||
|
@ -57,7 +57,7 @@ class Explorer extends View {
|
||||
<a href="#/explorer/${encodeURIComponent(split.slice(0, i + 1).join('/'))}">
|
||||
${isPubKey ? html`<${Name} key=${substr} pub=${substr} placeholder="profile name" />` : k}
|
||||
</a>
|
||||
${isPubKey ? html`<small> (<a href="#/profile/${substr}">${t('profile')}</a>)</small>` : ''}
|
||||
${isPubKey ? html`<small> (<a href="#/${substr}">${t('profile')}</a>)</small>` : ''}
|
||||
`;
|
||||
});
|
||||
const s = this.state;
|
||||
|
@ -69,14 +69,16 @@ class Follows extends View {
|
||||
return html`
|
||||
<div class="centered-container">
|
||||
<h3>
|
||||
<a href="#/profile/${this.props.id}"> <${Name} pub=${this.props.id} /> </a>:<i
|
||||
> </i> ${this.props.followers ? t('followers') : t('following')}
|
||||
<a href="#/${this.props.id}"> <${Name} pub=${this.props.id} /> </a>:<i> </i> ${this.props
|
||||
.followers
|
||||
? t('followers')
|
||||
: t('following')}
|
||||
</h3>
|
||||
<div id="follows-list">
|
||||
${this.state.follows.map((hexKey) => {
|
||||
const npub = Nostr.toNostrBech32Address(hexKey, 'npub');
|
||||
return html` <div key=${npub} class="profile-link-container">
|
||||
<a href="#/profile/${npub}" class="profile-link">
|
||||
<a href="#/${npub}" class="profile-link">
|
||||
<${Identicon} str=${npub} width="49" />
|
||||
<div>
|
||||
<${Name} pub=${npub} /><br />
|
||||
|
Loading…
Reference in New Issue
Block a user