aboutsummaryrefslogtreecommitdiffstats
path: root/lib/notes.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-01-16 17:46:40 +0000
committerAdam Soltys <[email protected]>2024-01-16 17:46:40 +0000
commit3563e3ce82200abbdc06b3ffb832e2ba6cf7f659 (patch)
treef2f1d1d766145f9376805acb80e48202136e1441 /lib/notes.ts
parent5d6847e533210f713e181146f2e60aaa51b74150 (diff)
downloadcoinos-server-3563e3ce82200abbdc06b3ffb832e2ba6cf7f659.tar.gz
coinos-server-3563e3ce82200abbdc06b3ffb832e2ba6cf7f659.zip
log user errors
Diffstat (limited to 'lib/notes.ts')
0 files changed, 0 insertions, 0 deletions
blame/src/routes/[username]/+page.svelte?h=staging&id=8906099f391acf19f7b8eb91527b027cedd65b5e'>^
27cbd543 ^
0ebb60f9 ^
7b9bc9be ^
27cbd543 ^
81fc48aa ^

b3eefc07 ^
27cbd543 ^





d99a3524 ^
6335fdf5 ^
27cbd543 ^
















8acc59a8 ^

f8b14154 ^
a0db1de3 ^
f8b14154 ^
27cbd543 ^
f0d88333 ^
f8b14154 ^

27cbd543 ^
bf925a33 ^



f0d88333 ^
bf925a33 ^


d608c466 ^
bf925a33 ^
8d47e679 ^
bf925a33 ^

f8b14154 ^
8acc59a8 ^
a0db1de3 ^
f8b14154 ^


a0db1de3 ^
f8b14154 ^
27cbd543 ^
d608c466 ^


f8b14154 ^

8acc59a8 ^
59ccb2dd ^
2af4a989 ^




59ccb2dd ^

8acc59a8 ^
f4dead26 ^
d608c466 ^





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
        
                                                   
                                         
                                                   
                                          
                                              
                        
 

                               
                                                             





                                                                                         
                                               
                                                       
















                                                                     

         
                                           
                                
                                                                      
 
                                                    

                                                                                              
 



                                                                                   
 


                                                                 
 
                                                                 
                                                                

                            
              
 
                                                          


                                                               
                                                                                                                                                                         
                  
 


                                                                                                         

                                                                 
                      
                                       




                                                                     

                         
              
      





                                                                                                                             
<script>
	import { browser } from '$app/environment';
	import { onMount } from 'svelte';
	import { Icon, PageNotFound } from '$comp';
	import { copy } from '$lib/utils';
	import { t } from '$lib/translations';
	export let data;

	let { subject } = data;

	let lightningAddress = `${data?.username}@coinos.io`;

	onMount(async () => {
		if (browser) {
			let { default: QRCodeStyling } = await import('qr-code-styling');
			const qrCode = new QRCodeStyling({
				width: window.screen.width < 640 ? 250 : 300,
				type: 'canvas',
				data: lightningAddress,
				image: '/images/invoice.svg',
				backgroundOptions: {
					color: 'rgba(0, 0, 0, 0)'
				},
				dotsOptions: {
					type: 'rounded'
				},
				imageOptions: {
					hideBackgroundDots: false
				}
			});

			qrCode.append(document.getElementById('qr'));
		}
	});

	let followed = false;
</script>

<div class="container px-4 flex flex-wrap">
	<div class="p-10 pt-20">
		<h1 class="text-3xl font-bold">{subject.username}</h1>

		<p class="text-secondary w-64 mb-4">
			{subject.address && subject.address !== 'null' ? subject.address : ''}
		</p>

		<div class="menu">
			<button on:click={() => (followed = !followed)}>
				{$t('user.' + (followed ? 'following' : 'follow'))}
			</button>

			<a href={`/${subject.username}/receive`}>
				<button> Pay </button>
			</a>

			<a href={`/${subject.username}/request`}>
				<button>Request invoice</button>
			</a>
		</div>
	</div>

	<div class="space-y-5 md:mt-20 mx-auto w-[350px]">
		<div
			on:click={() => copy(lightningAddress)}
			id="qr"
			class="cursor-pointer w-[292px] md:w-[342px] h-[342px] border border-lightgrey rounded-3xl flex p-5 justify-center items-center relative mx-auto"
		/>

		<div class="bg-primary font-semibold rounded-xl text-sm p-3 flex">
			<div class="my-auto">{lightningAddress}</div>
			<button class="ml-auto hover:opacity-80" on:click={() => copy(lightningAddress)}>
				<Icon icon="copy" style="ml-2" />
			</button>
		</div>
		<p class="text-center">
			This is a <a
				href="https://lightningaddress.com/"
				class="underline"
				target="_blank"
				rel="noreferrer">lightning address</a
			>
		</p>
	</div>
</div>

<style>
	.menu button {
		@apply w-full mt-2 bg-primary text-black hover:bg-black hover:text-white font-semibold py-5 px-7 rounded-2xl;
	}
</style>