This commit is contained in:
Martti Malmi 2023-06-12 18:01:23 +03:00
parent b3f4edfef5
commit 69724567c4
4 changed files with 10 additions and 14 deletions

View File

@ -1,7 +1,6 @@
import { HeartIcon } from '@heroicons/react/24/outline';
import { HeartIcon as HeartIconFull } from '@heroicons/react/24/solid';
import { route } from 'preact-router';
import { Link } from 'preact-router/match';
import Component from '../BaseComponent';
import Icons from '../Icons';
@ -11,7 +10,6 @@ import Relays from '../nostr/Relays';
import { translate as t } from '../translations/Translation.mjs';
import { Button, PrimaryButton } from './buttons/Button';
import Identicon from './Identicon';
import Name from './Name';
import SearchBox from './SearchBox';
@ -188,7 +186,7 @@ export default class Header extends Component {
const loggedIn = !!Key.getPubKey();
return (
<div className="sticky top-0 z-10 cursor-pointer">
<div className="w-full bg-black md:bg-opacity-50 md:shadow-lg md:backdrop-blur-lg px-2">
<div className="w-full bg-black md:bg-opacity-50 md:shadow-lg md:backdrop-blur-lg px-2 py-2">
<div className="flex items-center justify-between">
{loggedIn && this.state.showConnectedRelays && this.renderConnectedRelays()}
{this.renderHeaderText()}

View File

@ -23,6 +23,8 @@ const ProfilePicture = ({ picture, onError }: Props) => {
return (
<>
<SafeImg
width={192}
square={true}
className="rounded-full w-48"
src={picture}
onError={onError}
@ -30,7 +32,7 @@ const ProfilePicture = ({ picture, onError }: Props) => {
/>
{showModal && (
<Modal centerVertically={true} onClose={handleClose}>
<SafeImg square={true} src={picture} onError={onError} />
<SafeImg width={192} square={true} src={picture} onError={onError} />
</Modal>
)}
</>

View File

@ -252,7 +252,7 @@ class SearchBox extends Component<Props, State> {
placeholder={t('search')}
tabIndex={1}
onInput={() => this.onInput()}
className="input-bordered input input-sm"
className="input-bordered border-neutral-500 input input-sm"
/>
</label>
</form>

View File

@ -1,5 +1,4 @@
import { Helmet } from 'react-helmet';
import { PaperAirplaneIcon } from '@heroicons/react/24/outline';
import { html } from 'htm/preact';
import { route } from 'preact-router';
import { Link } from 'preact-router/match';
@ -138,10 +137,10 @@ class Profile extends View {
// TODO: on Follow / Message btn click open login modal if not logged in
return html`
<div class="profile-top" key="${this.state.hexPub}details">
<div class="profile-header">
<div class="profile-header-top">
<div class="flex flex-col gap-2">
<div class="flex flex-row">
<div>${profilePicture}</div>
<div class="profile-header-info">
<div class="flex-1 justify-end flex">
<div onClick=${() => !loggedIn && localState.get('showLoginModal').put(true)}>
${this.state.isMyProfile
? html`<button
@ -158,10 +157,7 @@ class Profile extends View {
className="btn btn-sm"
onClick=${() => loggedIn && route(`/chat/${this.state.npub}`)}
>
<span class="hidden-xs"> ${t('send_message')} </span>
<span class="visible-xs-inline-block msg-btn-icon">
<${PaperAirplaneIcon} width="24" />
</span>
${t('send_message')}
<//>`
: ''}
`}
@ -219,7 +215,7 @@ class Profile extends View {
: ''}
</div>
<div class="profile-about">
<p class="profile-about-content">${this.state.about}</p>
<p class="text-sm">${this.state.about}</p>
${this.renderLinks()}
</div>
<div class="profile-actions">