mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-01 17:31:13 +00:00
Fix QR and zapping
This commit is contained in:
parent
3336684556
commit
8de95a5d60
@ -6,7 +6,7 @@
|
||||
.frame {
|
||||
width: 280px;
|
||||
height: 280px;
|
||||
border-radius: 24px;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
@ -31,18 +31,18 @@ const QrCode: Component<{ data: string }> = (props) => {
|
||||
imageOptions: {
|
||||
hideBackgroundDots: true,
|
||||
imageSize:0.2,
|
||||
margin:0,
|
||||
margin: 4,
|
||||
},
|
||||
dotsOptions:{
|
||||
type: "square",
|
||||
type: "rounded",
|
||||
color: 'black',
|
||||
},
|
||||
cornersSquareOptions: {
|
||||
type: "square",
|
||||
type: 'extra-rounded' ,
|
||||
color: 'black',
|
||||
},
|
||||
cornersDotOptions: {
|
||||
type: "square",
|
||||
type: 'square',
|
||||
color: 'black',
|
||||
},
|
||||
backgroundOptions: {
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
} from 'solid-js';
|
||||
import Avatar from '../components/Avatar/Avatar';
|
||||
import { hexToNpub } from '../lib/keys';
|
||||
import { nip05Verification, truncateNpub, userName } from '../stores/profile';
|
||||
import { authorName, nip05Verification, truncateNpub, userName } from '../stores/profile';
|
||||
import { useToastContext } from '../components/Toaster/Toaster';
|
||||
import { useSettingsContext } from '../contexts/SettingsContext';
|
||||
import { useProfileContext } from '../contexts/ProfileContext';
|
||||
@ -25,26 +25,23 @@ import { shortDate } from '../lib/dates';
|
||||
import styles from './Profile.module.scss';
|
||||
import StickySidebar from '../components/StickySidebar/StickySidebar';
|
||||
import ProfileSidebar from '../components/ProfileSidebar/ProfileSidebar';
|
||||
import { MenuItem, PrimalUser, VanityProfiles, ZapOption } from '../types/primal';
|
||||
import { MenuItem, VanityProfiles, ZapOption } from '../types/primal';
|
||||
import PageTitle from '../components/PageTitle/PageTitle';
|
||||
import FollowButton from '../components/FollowButton/FollowButton';
|
||||
import Search from '../components/Search/Search';
|
||||
import { useMediaContext } from '../contexts/MediaContext';
|
||||
import { profile as t, actions as tActions, toast as tToast, feedProfile } from '../translations';
|
||||
import { profile as t, actions as tActions, toast as tToast, feedProfile, toastZapProfile } from '../translations';
|
||||
import PrimalMenu from '../components/PrimalMenu/PrimalMenu';
|
||||
import ConfirmModal from '../components/ConfirmModal/ConfirmModal';
|
||||
import { isAccountVerified, reportUser } from '../lib/profile';
|
||||
import { APP_ID } from '../App';
|
||||
import ProfileTabs from '../components/ProfileTabs/ProfileTabs';
|
||||
import ButtonCopy from '../components/Buttons/ButtonCopy';
|
||||
import ButtonSecondary from '../components/Buttons/ButtonSecondary';
|
||||
import VerificationCheck from '../components/VerificationCheck/VerificationCheck';
|
||||
|
||||
import PhotoSwipeLightbox from 'photoswipe/lightbox';
|
||||
import NoteImage from '../components/NoteImage/NoteImage';
|
||||
import { createStore } from 'solid-js/store';
|
||||
import CustomZap from '../components/CustomZap/CustomZap';
|
||||
import Modal from '../components/Modal/Modal';
|
||||
import ProfileQrCodeModal from '../components/ProfileQrCodeModal/ProfileQrCodeModal';
|
||||
|
||||
const Profile: Component = () => {
|
||||
@ -507,7 +504,6 @@ const Profile: Component = () => {
|
||||
<Search />
|
||||
</Wormhole>
|
||||
|
||||
|
||||
<div id="central_header" class={styles.fullHeader}>
|
||||
<div id="profile_banner" class={`${styles.banner} ${flagBannerForWarning()}`}>
|
||||
<Show
|
||||
@ -571,15 +567,15 @@ const Profile: Component = () => {
|
||||
}}
|
||||
onSuccess={(zapOption: ZapOption) => {
|
||||
setIsCustomZap(false);
|
||||
toaster?.sendSuccess("Profile successfully zapped")
|
||||
toaster?.sendSuccess(intl.formatMessage(toastZapProfile, {
|
||||
name: authorName(profile?.userProfile)
|
||||
}))
|
||||
}}
|
||||
onFail={(zapOption: ZapOption) => {
|
||||
setIsCustomZap(false);
|
||||
toaster?.sendWarning("Zaping failed")
|
||||
}}
|
||||
onCancel={(zapOption: ZapOption) => {
|
||||
setIsCustomZap(false);
|
||||
toaster?.sendWarning("Zaping canceled")
|
||||
}}
|
||||
/>
|
||||
</Show>
|
||||
@ -643,13 +639,6 @@ const Profile: Component = () => {
|
||||
<div class={styles.nip05}>{nip05Verification(profile?.userProfile)}</div>
|
||||
</div>
|
||||
</Show>
|
||||
<div class={styles.publicKey}>
|
||||
<ButtonCopy
|
||||
copyValue={profile?.userProfile?.npub || profileNpub()}
|
||||
labelBeforeIcon={true}
|
||||
label={truncateNpub(profile?.userProfile?.npub || profileNpub())}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</Show>
|
||||
|
@ -1748,6 +1748,13 @@ export const toastZapFail = {
|
||||
description: 'Toast message indicating failed zap',
|
||||
};
|
||||
|
||||
|
||||
export const toastZapProfile = {
|
||||
id: 'toast.zapProfile',
|
||||
defaultMessage: '{name} zapped successfully',
|
||||
description: 'Toast message indicating successful zap',
|
||||
};
|
||||
|
||||
export const thread = {
|
||||
sidebar: {
|
||||
id: 'thread.sidebar.title',
|
||||
|
Loading…
Reference in New Issue
Block a user