Compare commits
761 Commits
v1.3.0
...
date-forma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48eeb40940 | ||
|
|
8d0e815b0f | ||
|
|
65cc26fd02 | ||
|
|
9b9b8a85e7 | ||
|
|
51938293f1 | ||
|
|
34527c1842 | ||
|
|
e3b589516b | ||
|
|
1dd3a398d8 | ||
|
|
587433fcd5 | ||
|
|
c2d7954467 | ||
|
|
1c3cdf3165 | ||
|
|
d2a6cbd681 | ||
|
|
dc3d85f1a2 | ||
|
|
b4f4f4fc72 | ||
|
|
24440c5cc4 | ||
|
|
c20397206a | ||
|
|
d686dcfa90 | ||
|
|
dcee4eff58 | ||
|
|
48d7afe9f4 | ||
|
|
3009088b0e | ||
|
|
db01b1afdd | ||
|
|
53a323ccf8 | ||
|
|
76c8dfa907 | ||
|
|
16af21ba25 | ||
|
|
57ad16cc10 | ||
|
|
edfc67c050 | ||
|
|
1f953457db | ||
|
|
b5ec13eba1 | ||
|
|
bf87800fbf | ||
|
|
f078dd2f6c | ||
|
|
1e4f1ad4ae | ||
|
|
8ba5b8ac83 | ||
|
|
5bae42cf0f | ||
|
|
ee003e45b4 | ||
|
|
2f718edf9b | ||
|
|
09b956825f | ||
|
|
b576d6cede | ||
|
|
dbff10e3de | ||
|
|
34e707b925 | ||
|
|
dba4c31ce3 | ||
|
|
9f5ee0d9ac | ||
|
|
64d6923e05 | ||
|
|
3c6196f49c | ||
|
|
7ee9cb3f93 | ||
|
|
f05cc2e652 | ||
|
|
a047e230b9 | ||
|
|
c98a860140 | ||
|
|
f7a64eb97b | ||
|
|
dc5a1819f1 | ||
|
|
b75e50065e | ||
|
|
ef8fcd4ea9 | ||
|
|
bf3747cd7b | ||
|
|
3ff8a99250 | ||
|
|
fb64496c7d | ||
|
|
407fa0047c | ||
|
|
a2902ee7c0 | ||
|
|
7599b84833 | ||
|
|
769f543be1 | ||
|
|
d6447ffa82 | ||
|
|
f29ac73085 | ||
|
|
cb61898764 | ||
|
|
d9161985ad | ||
|
|
fd8f6da2c6 | ||
|
|
0b50176178 | ||
|
|
c02640e104 | ||
|
|
091960f269 | ||
|
|
594f3ec16a | ||
|
|
a89da06842 | ||
|
|
db1d11309f | ||
|
|
616cf1c287 | ||
|
|
ba665edb1e | ||
|
|
1c34eddd10 | ||
|
|
1fbf6ed4ba | ||
|
|
1d6f7f9e37 | ||
|
|
e3c3ec7825 | ||
|
|
08d176c803 | ||
|
|
b952ed9035 | ||
|
|
43062dda12 | ||
|
|
1b53ff9c2d | ||
|
|
acd3e6d613 | ||
|
|
e33b02df56 | ||
|
|
2c6849ca76 | ||
|
|
7afe8cfa18 | ||
|
|
9434f9e2e4 | ||
|
|
f6daef7333 | ||
|
|
c3df8d4c2a | ||
|
|
4b09693862 | ||
|
|
8d2e50d1fe | ||
|
|
bfc749f30b | ||
|
|
e0d4255700 | ||
|
|
6ba4ff1c17 | ||
|
|
652af26754 | ||
|
|
093488a67c | ||
|
|
0d026f3476 | ||
|
|
3e89ec1afc | ||
|
|
df0d18fc81 | ||
|
|
dd25c355ff | ||
|
|
6f851833b2 | ||
|
|
442b089d7f | ||
|
|
1c58b21383 | ||
|
|
a6e13faf7b | ||
|
|
ede9eb052d | ||
|
|
fab006078c | ||
|
|
4d5275f915 | ||
|
|
901e83af58 | ||
|
|
e1bee1591f | ||
|
|
a354c23231 | ||
|
|
f728dd13c5 | ||
|
|
7927b87259 | ||
|
|
55301a9d53 | ||
|
|
c0dd57a4d2 | ||
|
|
cc80773402 | ||
|
|
c803d2c4ba | ||
|
|
eb5f5f7a90 | ||
|
|
2ea5ff2c94 | ||
|
|
bc9a6fa50a | ||
|
|
e02ab7d256 | ||
|
|
01e6367b72 | ||
|
|
565602f8e1 | ||
|
|
9e0d281883 | ||
|
|
67629dd735 | ||
|
|
2a89278c7b | ||
|
|
8f4ba6eb8a | ||
|
|
8dfcfb99e0 | ||
|
|
1299aa51ee | ||
|
|
e0271cace3 | ||
|
|
a11440a7f3 | ||
|
|
cc8c4b8297 | ||
|
|
a287aab4f4 | ||
|
|
4c518df60d | ||
|
|
d4ae733e9e | ||
|
|
b5ed703553 | ||
|
|
f49880125a | ||
|
|
8380c357d9 | ||
|
|
4e010c5624 | ||
|
|
f53cdbace9 | ||
|
|
b4d04e2ce9 | ||
|
|
2470aeee1f | ||
|
|
fd07b47325 | ||
|
|
9257a05831 | ||
|
|
1faa6f2944 | ||
|
|
5584bbe9ca | ||
|
|
cc65537ea3 | ||
|
|
5f14f87406 | ||
|
|
04a80b7c03 | ||
|
|
2b44e54d99 | ||
|
|
c71a89d1b7 | ||
|
|
e2abfd2312 | ||
|
|
49d55227e8 | ||
|
|
0dadec3b8d | ||
|
|
e2d8591d66 | ||
|
|
aecc703317 | ||
|
|
2422c3e7be | ||
|
|
4e1994a0c8 | ||
|
|
a3dce67117 | ||
|
|
64dcd451e9 | ||
|
|
a85523ecfc | ||
|
|
85b32bb15b | ||
|
|
742ad86b10 | ||
|
|
39ff11a59d | ||
|
|
4f5976479a | ||
|
|
eac7aa84b0 | ||
|
|
bd941202c8 | ||
|
|
b854f0eedc | ||
|
|
1814bd4167 | ||
|
|
b6f9d70fec | ||
|
|
7c54913bf5 | ||
|
|
e8d5044ac5 | ||
|
|
ddf097ede3 | ||
|
|
1bad85e1d6 | ||
|
|
68458b50d2 | ||
|
|
e00f28cf87 | ||
|
|
4cc34ec50a | ||
|
|
693249916d | ||
|
|
381a248543 | ||
|
|
f637381198 | ||
|
|
9139f3a3b4 | ||
|
|
071335cc66 | ||
|
|
4d4b011146 | ||
|
|
d10713b477 | ||
|
|
2efaabd2c3 | ||
|
|
7bc1e9dcc8 | ||
|
|
8848df701c | ||
|
|
2e800d0eed | ||
|
|
70ecc9a4a8 | ||
|
|
97dfacd133 | ||
|
|
87a5bab734 | ||
|
|
b5fc6e1aaf | ||
|
|
87f70fa290 | ||
|
|
fa61bb660e | ||
|
|
83dd079e03 | ||
|
|
f7933d8a4d | ||
|
|
4bd0cfd283 | ||
|
|
86f39f3824 | ||
|
|
94216f5219 | ||
|
|
a2e6187dae | ||
|
|
c2cda0f06e | ||
|
|
f1bc772985 | ||
|
|
15e3926ce4 | ||
|
|
69738d7ed3 | ||
|
|
649620c1c9 | ||
|
|
99df006019 | ||
|
|
be40e28f47 | ||
|
|
8899d82e1b | ||
|
|
0527641a4f | ||
|
|
54e32af1d4 | ||
|
|
b1645ec09a | ||
|
|
5b9ce55a6d | ||
|
|
833584bd4f | ||
|
|
ca52a22bcd | ||
|
|
ba611b9adb | ||
|
|
e8643850a0 | ||
|
|
bec7376fe8 | ||
|
|
7363bbc8f7 | ||
|
|
d0f679e177 | ||
|
|
e9769904ab | ||
|
|
a2746742a7 | ||
|
|
459e3dc45b | ||
|
|
21fedab707 | ||
|
|
323f1974ab | ||
|
|
5bc9d625c2 | ||
|
|
4885cf5154 | ||
|
|
2f66eca925 | ||
|
|
af042a62cd | ||
|
|
2bfc2b0c1f | ||
|
|
df8bdda718 | ||
|
|
873f99ae86 | ||
|
|
17fe135027 | ||
|
|
2eed0ae063 | ||
|
|
f4ae0389d8 | ||
|
|
9bdff9a61f | ||
|
|
f003a2864e | ||
|
|
ab26af19b8 | ||
|
|
dc512600dc | ||
|
|
cdb71c3a62 | ||
|
|
39d7b3ca58 | ||
|
|
748c3636d5 | ||
|
|
6e2d1fb148 | ||
|
|
7bd847c0d3 | ||
|
|
81f9b2f776 | ||
|
|
334671ef85 | ||
|
|
a20b1e2f6a | ||
|
|
572f9d5ad6 | ||
|
|
e49c102e8c | ||
|
|
2348221b03 | ||
|
|
a0c327cfcf | ||
|
|
ddbeb9e3db | ||
|
|
e8205c1390 | ||
|
|
fbb53fc8c3 | ||
|
|
d7fed5a5dc | ||
|
|
3285881586 | ||
|
|
3ff61607a2 | ||
|
|
2a124b03e9 | ||
|
|
e1aa23bc55 | ||
|
|
818c5c7ba4 | ||
|
|
668011d1c7 | ||
|
|
562fd043a9 | ||
|
|
b4781c011c | ||
|
|
5c7d3d5503 | ||
|
|
0f2b6c0ebf | ||
|
|
ab5bdfeae4 | ||
|
|
e5fa2f4490 | ||
|
|
2d2615447e | ||
|
|
46465acd73 | ||
|
|
2dea9ec3e7 | ||
|
|
584d5bd8ea | ||
|
|
e4b6d42672 | ||
|
|
109ad190cf | ||
|
|
78498793fa | ||
|
|
b2e916378d | ||
|
|
d950634aab | ||
|
|
a52c19355a | ||
|
|
e67e96333b | ||
|
|
7aa75b0c64 | ||
|
|
9b1069f208 | ||
|
|
abe20b8dcf | ||
|
|
58509c54a9 | ||
|
|
fd545cee0c | ||
|
|
1f92bffe7d | ||
|
|
5615627001 | ||
|
|
78c55875ef | ||
|
|
a3674947b8 | ||
|
|
63cc57b035 | ||
|
|
d4bc1eb0d1 | ||
|
|
c9f5496acb | ||
|
|
99481b6144 | ||
|
|
cee147bc9a | ||
|
|
3a825391b9 | ||
|
|
bb347e4614 | ||
|
|
d0fad4775a | ||
|
|
68d624ac78 | ||
|
|
8012d665ae | ||
|
|
0732aa317d | ||
|
|
fde53e355f | ||
|
|
8e0a10298e | ||
|
|
eef63c9adc | ||
|
|
1e5ecd79c2 | ||
|
|
58f10268e2 | ||
|
|
43ce76d928 | ||
|
|
c3d52c68e7 | ||
|
|
201ba65e1c | ||
|
|
0d130b17c8 | ||
|
|
2c90f767fd | ||
|
|
946b2fe129 | ||
|
|
2a2dbb65c6 | ||
|
|
ef2300a600 | ||
|
|
eea99ac871 | ||
|
|
f4c7799537 | ||
|
|
764c6b88c5 | ||
|
|
989d7a351f | ||
|
|
78325d9b39 | ||
|
|
679fb80f9a | ||
|
|
dc49277bf9 | ||
|
|
07bf780c3e | ||
|
|
190ae18edc | ||
|
|
82ffbeeb21 | ||
|
|
9affd7b7fa | ||
|
|
897ba629df | ||
|
|
b3f26055d9 | ||
|
|
775de16d0a | ||
|
|
1b276a0469 | ||
|
|
17fbf2673c | ||
|
|
cdc50ec876 | ||
|
|
181af24b78 | ||
|
|
4b13a42731 | ||
|
|
e330e90688 | ||
|
|
f2d3c51651 | ||
|
|
c9c111cdf2 | ||
|
|
c247295131 | ||
|
|
d417255910 | ||
|
|
677a15327b | ||
|
|
d5238939ad | ||
|
|
6860726e83 | ||
|
|
a55197fb2d | ||
|
|
7eed5c7c96 | ||
|
|
1c629af651 | ||
|
|
4b8aa3298b | ||
|
|
bcb163693a | ||
|
|
e6e8de62c8 | ||
|
|
71c7a6ee8c | ||
|
|
ecc8e59c8c | ||
|
|
d0f027c4ea | ||
|
|
2c667f785c | ||
|
|
1adf7e183e | ||
|
|
7771d7acbe | ||
|
|
58580c7fac | ||
|
|
4cd56fa98c | ||
|
|
68020006b4 | ||
|
|
70cb65d266 | ||
|
|
cef8cad14c | ||
|
|
def8f45f8b | ||
|
|
ca325cc90b | ||
|
|
a1ce6f696a | ||
|
|
4d485940ea | ||
|
|
cbe118b74f | ||
|
|
de9116e9b2 | ||
|
|
09c7f9dde8 | ||
|
|
0060b9da8c | ||
|
|
bad88a2a83 | ||
|
|
96a79b8879 | ||
|
|
60ef9df721 | ||
|
|
2d8ca8fea0 | ||
|
|
b411db40da | ||
|
|
1be0b9e01f | ||
|
|
d41ca8e0e6 | ||
|
|
eaa3e0a303 | ||
|
|
a283c88d7f | ||
|
|
d4659eee07 | ||
|
|
b93e3c0b52 | ||
|
|
079963cde8 | ||
|
|
45f447c796 | ||
|
|
2327b15e0d | ||
|
|
166cbc150f | ||
|
|
f561ef3cda | ||
|
|
027a588604 | ||
|
|
773566f193 | ||
|
|
29bd4cb9c3 | ||
|
|
1237944b71 | ||
|
|
b331e3c780 | ||
|
|
7f641e3e73 | ||
|
|
b84f0548d2 | ||
|
|
0f92534f00 | ||
|
|
7a489f241a | ||
|
|
f88e529111 | ||
|
|
47d55a5eab | ||
|
|
9dcab76cd5 | ||
|
|
c2a9647c90 | ||
|
|
02424596db | ||
|
|
776324c875 | ||
|
|
6f4c280583 | ||
|
|
dfebdfccda | ||
|
|
5809109c05 | ||
|
|
a6400eb6c9 | ||
|
|
39958ed22c | ||
|
|
c3d9cac43f | ||
|
|
74355244a4 | ||
|
|
7c4ba1b1ea | ||
|
|
f588897531 | ||
|
|
5629e08f83 | ||
|
|
37394c054c | ||
|
|
8be52e2fa3 | ||
|
|
0d702e9189 | ||
|
|
425db8fc1f | ||
|
|
2356f58e7b | ||
|
|
6c12ed4afc | ||
|
|
d76ee7f33c | ||
|
|
f8534b2c3d | ||
|
|
9014f01276 | ||
|
|
71818c0f1f | ||
|
|
974dc74073 | ||
|
|
b255eb21e5 | ||
|
|
9a58178ea5 | ||
|
|
3c36eedfba | ||
|
|
46dfaa70a3 | ||
|
|
61da354a48 | ||
|
|
fbb332fb35 | ||
|
|
7e1cce9155 | ||
|
|
ed4cbe9fa6 | ||
|
|
599e857a1e | ||
|
|
581f08c59b | ||
|
|
24a2e9e6d4 | ||
|
|
e8796a7d86 | ||
|
|
db3f75c42f | ||
|
|
b7c0df67b1 | ||
|
|
e8b5b3b24a | ||
|
|
00574325b9 | ||
|
|
99706e0ed6 | ||
|
|
326743d8a1 | ||
|
|
3f67b0f27e | ||
|
|
24036b0f24 | ||
|
|
fbf32404a6 | ||
|
|
975d52a07e | ||
|
|
f8a193c0f8 | ||
|
|
9186cb4d7b | ||
|
|
898f5a629c | ||
|
|
933076fa3f | ||
|
|
27edcebef6 | ||
|
|
abc91f7eac | ||
|
|
5862af3034 | ||
|
|
35acf05997 | ||
|
|
2bad1b9f55 | ||
|
|
73b0dc315e | ||
|
|
5969f148c8 | ||
|
|
660f5894a6 | ||
|
|
77058220a8 | ||
|
|
6cdba45396 | ||
|
|
67571158e8 | ||
|
|
171a5ba4ee | ||
|
|
525ff21563 | ||
|
|
863e53a2d5 | ||
|
|
da2033692c | ||
|
|
dbbe17a0a8 | ||
|
|
a2ef9468ae | ||
|
|
0c145fab0b | ||
|
|
f6e49e3f21 | ||
|
|
1f027d75d3 | ||
|
|
1ba7767f8e | ||
|
|
8220b2f086 | ||
|
|
a74374e39f | ||
|
|
ff957a2f82 | ||
|
|
6640f0496a | ||
|
|
e47ab838c5 | ||
|
|
551918ab9b | ||
|
|
739f3763dd | ||
|
|
0cdd980a4b | ||
|
|
b43ddcbea2 | ||
|
|
75feaefbf2 | ||
|
|
de3ebe16ee | ||
|
|
84a2d3baf6 | ||
|
|
74180defd1 | ||
|
|
aeeaaf0d8d | ||
|
|
2b84293c4e | ||
|
|
b38ef6c0a7 | ||
|
|
d524ea77ab | ||
|
|
17af4d25bd | ||
|
|
6e095921e6 | ||
|
|
150c42b246 | ||
|
|
aecf2f32b9 | ||
|
|
b23967d777 | ||
|
|
2524458b0c | ||
|
|
12c45fb882 | ||
|
|
118483b6cc | ||
|
|
fd6350b397 | ||
|
|
b3291c65bc | ||
|
|
4b849e286c | ||
|
|
7bcc26a987 | ||
|
|
692722d32e | ||
|
|
e4f06d8e30 | ||
|
|
c799380787 | ||
|
|
5540fcf0d2 | ||
|
|
d9da09c1e7 | ||
|
|
fe90aa3b7b | ||
|
|
0c680e0111 | ||
|
|
7bcf5fbd86 | ||
|
|
7218b950fe | ||
|
|
8d4df7d3dd | ||
|
|
f1f6e2e40a | ||
|
|
901013fdc6 | ||
|
|
5c9017f3cd | ||
|
|
34e962cc48 | ||
|
|
bf9254597a | ||
|
|
b5efa0d3ea | ||
|
|
a2bdb46076 | ||
|
|
ed150d9574 | ||
|
|
e756a21fda | ||
|
|
13084049da | ||
|
|
055e723777 | ||
|
|
419318c151 | ||
|
|
7722e63e1b | ||
|
|
40274021ba | ||
|
|
8529ac3ffe | ||
|
|
7ec8e762b0 | ||
|
|
2acada6dc7 | ||
|
|
d4d76dce03 | ||
|
|
3832ce2c80 | ||
|
|
fd36e39a38 | ||
|
|
14fd0eb906 | ||
|
|
af6c62d0bf | ||
|
|
8d7d6a19e7 | ||
|
|
463dc48ea6 | ||
|
|
d8f6a25059 | ||
|
|
93962625ed | ||
|
|
249211bd4f | ||
|
|
bfe0d50661 | ||
|
|
5d4a07bcc5 | ||
|
|
d28bb5de99 | ||
|
|
83a83164d4 | ||
|
|
d71e43c5d6 | ||
|
|
ed6fa4dc2a | ||
|
|
4f3970c361 | ||
|
|
40767430d9 | ||
|
|
1edfe9548d | ||
|
|
fead48c2f0 | ||
|
|
0abd3da7fd | ||
|
|
2f78922421 | ||
|
|
3df0f61947 | ||
|
|
8e42dcb7ee | ||
|
|
1888ee97e6 | ||
|
|
068aef665d | ||
|
|
2772fc1678 | ||
|
|
66dfdc5ad0 | ||
|
|
b45978374b | ||
|
|
81c3e701e2 | ||
|
|
874d919a6a | ||
|
|
e8559cecd5 | ||
|
|
8c4120f0a2 | ||
|
|
9f93af6134 | ||
|
|
3cbc722b94 | ||
|
|
3440c47c3c | ||
|
|
68a5a9da1e | ||
|
|
1f8d5e45e1 | ||
|
|
8fd9730e2b | ||
|
|
04f6df6839 | ||
|
|
ca40e983e3 | ||
|
|
9257454a96 | ||
|
|
ba054ae915 | ||
|
|
1d1c6e5a55 | ||
|
|
8844143ff5 | ||
|
|
c161a8109b | ||
|
|
e340c4ed6f | ||
|
|
b5f96ee2fc | ||
|
|
3c1790ba83 | ||
|
|
f41c78e8e3 | ||
|
|
b8b8b4dbad | ||
|
|
d195dc1a46 | ||
|
|
3ac29d8da3 | ||
|
|
2418612507 | ||
|
|
e8336ae9b4 | ||
|
|
aad52a3e2e | ||
|
|
829122c486 | ||
|
|
090752c539 | ||
|
|
fad6414995 | ||
|
|
c817c67a1c | ||
|
|
c7001e62f3 | ||
|
|
bf71d2a14e | ||
|
|
163911255e | ||
|
|
24e38a3bbc | ||
|
|
dfd714f16a | ||
|
|
722081f89e | ||
|
|
f0e1df22b8 | ||
|
|
615cb263fb | ||
|
|
18faaf49d9 | ||
|
|
650b69ae56 | ||
|
|
eb4be963e3 | ||
|
|
27c27743e3 | ||
|
|
92930a2f63 | ||
|
|
7ad3365b0e | ||
|
|
7de7624477 | ||
|
|
7c6b5ac59d | ||
|
|
9c45ce61b8 | ||
|
|
f8bf4fea36 | ||
|
|
10cd8144eb | ||
|
|
66973a3745 | ||
|
|
85677bb792 | ||
|
|
7ae99d2038 | ||
|
|
70a5105783 | ||
|
|
420372ac9e | ||
|
|
6b00282a87 | ||
|
|
dae1001cbb | ||
|
|
af81d99b2a | ||
|
|
2751adc463 | ||
|
|
396ce9f3f3 | ||
|
|
3f4f66d878 | ||
|
|
d6751d7a26 | ||
|
|
0e32baff0b | ||
|
|
f76bf4c2c7 | ||
|
|
0d8532ab6d | ||
|
|
490d3d51e1 | ||
|
|
2ab796910e | ||
|
|
07102588be | ||
|
|
04f9422f24 | ||
|
|
05a7f5e178 | ||
|
|
7bae814f96 | ||
|
|
ea45e38fa0 | ||
|
|
6d9a85112f | ||
|
|
346efd19db | ||
|
|
617143a47f | ||
|
|
66f067276e | ||
|
|
fc10d0449f | ||
|
|
083f3e7108 | ||
|
|
af307a2a49 | ||
|
|
b063758ee5 | ||
|
|
4964b252e3 | ||
|
|
e468f5bbc9 | ||
|
|
c5b7b8a18a | ||
|
|
a8a1fbb829 | ||
|
|
3c2a4892e7 | ||
|
|
6d9e84d327 | ||
|
|
73b4e30c97 | ||
|
|
bd01545a70 | ||
|
|
6d360e581d | ||
|
|
ba95818da4 | ||
|
|
d0720f4c70 | ||
|
|
f60cb22f11 | ||
|
|
e0cb4314fb | ||
|
|
0571137a60 | ||
|
|
30aabf50eb | ||
|
|
8441a5eb98 | ||
|
|
259ab49bc1 | ||
|
|
2f2d5dfc0b | ||
|
|
0f27f4261b | ||
|
|
9b92cad2db | ||
|
|
ad1ff6159c | ||
|
|
f633b17f17 | ||
|
|
8fa16001e6 | ||
|
|
e111234460 | ||
|
|
034072f50e | ||
|
|
a7664d79fd | ||
|
|
8ed2393300 | ||
|
|
94cf150ffd | ||
|
|
c571a3d0d9 | ||
|
|
1c7431b859 | ||
|
|
2f7d6548ef | ||
|
|
a16525be5e | ||
|
|
21e377d3ff | ||
|
|
45d0d3f7e8 | ||
|
|
6e62eb8d81 | ||
|
|
e098449af4 | ||
|
|
47d0030cf0 | ||
|
|
b564e5e72f | ||
|
|
e46607c1cb | ||
|
|
77c5db169a | ||
|
|
0157bf9576 | ||
|
|
454c2f45bd | ||
|
|
badb897c06 | ||
|
|
9bb5768598 | ||
|
|
951de8baf5 | ||
|
|
48ceb1e5c7 | ||
|
|
96e8962956 | ||
|
|
f3259aedea | ||
|
|
9fdc9dcbf7 | ||
|
|
0a30403719 | ||
|
|
0e1fcd86e6 | ||
|
|
8038f3ad00 | ||
|
|
44369ee7f6 | ||
|
|
7e46cb0d8e | ||
|
|
10e39246ce | ||
|
|
5e45767e44 | ||
|
|
61d7f7cbcd | ||
|
|
8f3c47d659 | ||
|
|
3b9c57fe5c | ||
|
|
6017d35cfd | ||
|
|
90e28cd3a4 | ||
|
|
e743e56787 | ||
|
|
ba25ea1370 | ||
|
|
b7543298e1 | ||
|
|
29b4cb7793 | ||
|
|
f7c3190346 | ||
|
|
5130dc5f31 | ||
|
|
d3cdd2c317 | ||
|
|
96f7ca4e36 | ||
|
|
e2471a8eb4 | ||
|
|
5f33b1da1e | ||
|
|
bca048c026 | ||
|
|
f999ca48f6 | ||
|
|
f0c607d87a | ||
|
|
6f394138f5 | ||
|
|
b710693009 | ||
|
|
fb4b96a838 | ||
|
|
af2dae8822 | ||
|
|
e400dbe2ea | ||
|
|
b718bdeb15 | ||
|
|
9ca84f5ede | ||
|
|
1a31cc321c | ||
|
|
2ec3cebcc9 | ||
|
|
659af87592 | ||
|
|
beb1a4c214 | ||
|
|
16a7030922 | ||
|
|
c036858d45 | ||
|
|
84d295e324 | ||
|
|
90eb54f768 | ||
|
|
547ed337a6 | ||
|
|
3f5937717f | ||
|
|
3cdfde5e0f | ||
|
|
6b1fcb8193 | ||
|
|
9431e7f0ad | ||
|
|
817569a333 | ||
|
|
0bbaa64080 | ||
|
|
c403812389 | ||
|
|
25d7390b27 | ||
|
|
918018c7ca | ||
|
|
58baf5ddf4 | ||
|
|
32dcd4aa0e | ||
|
|
cacfc2c535 | ||
|
|
8115ea3bf2 | ||
|
|
c64ff8ec95 | ||
|
|
38323b5ea5 | ||
|
|
34d10bd313 | ||
|
|
d743f8411a | ||
|
|
d8a6aa2686 | ||
|
|
dfcfe1d8d2 | ||
|
|
6038c3cc78 | ||
|
|
97efcf3d62 | ||
|
|
889ad1c49f | ||
|
|
b3fa837967 | ||
|
|
a5334ca6e6 | ||
|
|
0ad0524157 | ||
|
|
b50f64d4ad | ||
|
|
88d15376e3 | ||
|
|
aa884310eb | ||
|
|
dbcf7771b9 | ||
|
|
60b150cc58 | ||
|
|
bd0db0f8fd | ||
|
|
2e8e39c5a9 | ||
|
|
f22baca569 | ||
|
|
d8a094a324 | ||
|
|
4b063b68ab | ||
|
|
3c02331cb9 | ||
|
|
eea09dcfac | ||
|
|
3aea62e898 | ||
|
|
76674523c5 | ||
|
|
e0e2f3e440 | ||
|
|
d1bc948f3c | ||
|
|
2b84636993 | ||
|
|
05238f096b | ||
|
|
dd83d4607c | ||
|
|
07d13c74f5 | ||
|
|
64d1d6df37 | ||
|
|
877a579533 | ||
|
|
b0e364acf4 | ||
|
|
803ebccee3 |
10
.env.example
@@ -29,15 +29,15 @@ E2E_TEST_AUTHENTICATE_USER_PASSWORD="test_password"
|
|||||||
# OPTIONAL: Defines the storage transport to use. Available options: database (default) | s3
|
# OPTIONAL: Defines the storage transport to use. Available options: database (default) | s3
|
||||||
NEXT_PUBLIC_UPLOAD_TRANSPORT="database"
|
NEXT_PUBLIC_UPLOAD_TRANSPORT="database"
|
||||||
# OPTIONAL: Defines the endpoint to use for the S3 storage transport. Relevant when using third-party S3-compatible providers.
|
# OPTIONAL: Defines the endpoint to use for the S3 storage transport. Relevant when using third-party S3-compatible providers.
|
||||||
NEXT_PRIVATE_UPLOAD_ENDPOINT="http://127.0.0.1:9002"
|
NEXT_PRIVATE_UPLOAD_ENDPOINT=
|
||||||
# OPTIONAL: Defines the region to use for the S3 storage transport. Defaults to us-east-1.
|
# OPTIONAL: Defines the region to use for the S3 storage transport. Defaults to us-east-1.
|
||||||
NEXT_PRIVATE_UPLOAD_REGION="unknown"
|
NEXT_PRIVATE_UPLOAD_REGION=
|
||||||
# REQUIRED: Defines the bucket to use for the S3 storage transport.
|
# REQUIRED: Defines the bucket to use for the S3 storage transport.
|
||||||
NEXT_PRIVATE_UPLOAD_BUCKET="documenso"
|
NEXT_PRIVATE_UPLOAD_BUCKET=
|
||||||
# OPTIONAL: Defines the access key ID to use for the S3 storage transport.
|
# OPTIONAL: Defines the access key ID to use for the S3 storage transport.
|
||||||
NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID="documenso"
|
NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID=
|
||||||
# OPTIONAL: Defines the secret access key to use for the S3 storage transport.
|
# OPTIONAL: Defines the secret access key to use for the S3 storage transport.
|
||||||
NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY="password"
|
NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY=
|
||||||
|
|
||||||
# [[SMTP]]
|
# [[SMTP]]
|
||||||
# OPTIONAL: Defines the transport to use for sending emails. Available options: smtp-auth (default) | smtp-api | mailchannels
|
# OPTIONAL: Defines the transport to use for sending emails. Available options: smtp-auth (default) | smtp-api | mailchannels
|
||||||
|
|||||||
7
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -1,10 +1,11 @@
|
|||||||
name: 'Bug Report'
|
name: "Bug Report"
|
||||||
labels: ['bug']
|
labels: "bug"
|
||||||
description: Create a bug report to help us improve
|
description: Create a bug report to help us improve
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: Thank you for reporting an issue.
|
value:
|
||||||
|
Thank you for reporting an issue.
|
||||||
Please fill in as much of the form below as you're able to.
|
Please fill in as much of the form below as you're able to.
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: 'Feature Request'
|
name: "Feature Request"
|
||||||
description: Suggest a new idea or enhancement for this project
|
description: Suggest a new idea or enhancement for this project
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/improvement.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: 'General Improvement'
|
name: "General Improvement"
|
||||||
description: Suggest a minor enhancement or improvement for this project
|
description: Suggest a minor enhancement or improvement for this project
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
|
|||||||
32
.github/dependabot.yml
vendored
@@ -4,29 +4,29 @@ updates:
|
|||||||
- package-ecosystem: 'github-actions'
|
- package-ecosystem: 'github-actions'
|
||||||
directory: '/'
|
directory: '/'
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: "weekly"
|
||||||
target-branch: 'main'
|
target-branch: "feat/refresh"
|
||||||
labels:
|
labels:
|
||||||
- 'ci dependencies'
|
- "ci dependencies"
|
||||||
- 'ci'
|
- "ci"
|
||||||
open-pull-requests-limit: 0
|
open-pull-requests-limit: 0
|
||||||
|
|
||||||
- package-ecosystem: 'npm'
|
- package-ecosystem: "npm"
|
||||||
directory: '/apps/marketing'
|
directory: "/apps/marketing"
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: "weekly"
|
||||||
target-branch: 'main'
|
target-branch: "feat/refresh"
|
||||||
labels:
|
labels:
|
||||||
- 'npm dependencies'
|
- "npm dependencies"
|
||||||
- 'frontend'
|
- "frontend"
|
||||||
open-pull-requests-limit: 0
|
open-pull-requests-limit: 0
|
||||||
|
|
||||||
- package-ecosystem: 'npm'
|
- package-ecosystem: "npm"
|
||||||
directory: '/apps/web'
|
directory: "/apps/web"
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: "weekly"
|
||||||
target-branch: 'main'
|
target-branch: "feat/refresh"
|
||||||
labels:
|
labels:
|
||||||
- 'npm dependencies'
|
- "npm dependencies"
|
||||||
- 'frontend'
|
- "frontend"
|
||||||
open-pull-requests-limit: 0
|
open-pull-requests-limit: 0
|
||||||
|
|||||||
21
.github/labeler.yml
vendored
@@ -1,21 +0,0 @@
|
|||||||
'apps: marketing':
|
|
||||||
- apps/marketing/**
|
|
||||||
|
|
||||||
'apps: web':
|
|
||||||
- apps/web/**
|
|
||||||
|
|
||||||
'version bump 👀':
|
|
||||||
- '**/package.json'
|
|
||||||
- '**/package-lock.json'
|
|
||||||
|
|
||||||
'🚨 migrations 🚨':
|
|
||||||
- packages/prisma/migrations/**/migration.sql
|
|
||||||
|
|
||||||
'🚨 e2e changes 🚨':
|
|
||||||
- packages/app-tests/e2e/**
|
|
||||||
|
|
||||||
'🚨 .env changes 🚨':
|
|
||||||
- .env.example
|
|
||||||
|
|
||||||
'pkg: ee changes':
|
|
||||||
- packages/ee/**
|
|
||||||
26
.github/workflows/ci.yml
vendored
@@ -1,10 +1,10 @@
|
|||||||
name: 'Continuous Integration'
|
name: "Continuous Integration"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches: [ "feat/refresh" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ['main']
|
branches: [ "feat/refresh" ]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
@@ -14,17 +14,17 @@ env:
|
|||||||
HUSKY: 0
|
HUSKY: 0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_app:
|
build:
|
||||||
name: Build App
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -37,15 +37,3 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
build_docker:
|
|
||||||
name: Build Docker Image
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- name: Build Docker Image
|
|
||||||
run: ./docker/build.sh
|
|
||||||
|
|||||||
12
.github/workflows/codeql-analysis.yml
vendored
@@ -1,11 +1,11 @@
|
|||||||
name: 'CodeQL'
|
name: "CodeQL"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches: [ feat/refresh ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ['main']
|
branches: [ feat/refresh ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
@@ -19,13 +19,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
language: ['javascript']
|
language: [ 'javascript' ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
24
.github/workflows/deploy.yml
vendored
@@ -1,24 +0,0 @@
|
|||||||
name: Deploy to Production
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: main
|
|
||||||
fetch-depth: 0
|
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
|
||||||
|
|
||||||
- name: Push to release branch
|
|
||||||
run: |
|
|
||||||
git checkout release || git checkout -b release
|
|
||||||
git merge --ff-only main
|
|
||||||
git push origin release
|
|
||||||
41
.github/workflows/e2e-tests.yml
vendored
@@ -1,50 +1,51 @@
|
|||||||
name: Playwright Tests
|
name: Playwright Tests
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches: [feat/refresh]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ['main']
|
branches: [feat/refresh]
|
||||||
jobs:
|
jobs:
|
||||||
e2e_tests:
|
e2e_tests:
|
||||||
name: "E2E Tests"
|
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: npm
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Copy env
|
- name: Copy env
|
||||||
run: cp .env.example .env
|
run: cp .env.example .env
|
||||||
|
|
||||||
- name: Start Services
|
|
||||||
run: npm run dx:up
|
|
||||||
|
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
run: npx playwright install --with-deps
|
run: npx playwright install --with-deps
|
||||||
|
|
||||||
- name: Generate Prisma Client
|
- name: Generate Prisma Client
|
||||||
run: npm run prisma:generate -w @documenso/prisma
|
run: npm run prisma:generate -w @documenso/prisma
|
||||||
|
|
||||||
- name: Create the database
|
- name: Create the database
|
||||||
run: npm run prisma:migrate-dev
|
run: npm run prisma:migrate-dev
|
||||||
|
|
||||||
- name: Seed the database
|
|
||||||
run: npm run prisma:seed
|
|
||||||
|
|
||||||
- name: Run Playwright tests
|
- name: Run Playwright tests
|
||||||
run: npm run ci
|
run: npm run ci
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: test-results
|
name: playwright-report
|
||||||
path: "packages/app-tests/**/test-results/*"
|
path: playwright-report/
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
env:
|
env:
|
||||||
|
NEXT_PRIVATE_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/documenso
|
||||||
|
NEXT_PRIVATE_DIRECT_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/documenso
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
||||||
|
|||||||
29
.github/workflows/first-interaction.yml
vendored
@@ -1,29 +0,0 @@
|
|||||||
name: 'Welcome New Contributors'
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: ['opened']
|
|
||||||
issues:
|
|
||||||
types: ['opened']
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
issues: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
welcome-message:
|
|
||||||
name: Welcome Contributors
|
|
||||||
if: github.event.action == 'opened'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 10
|
|
||||||
steps:
|
|
||||||
- uses: actions/first-interaction@v1
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
pr-message: |
|
|
||||||
Thank you for creating your first Pull Request and for being a part of the open signing revolution! 💚🚀
|
|
||||||
<br /> Feel free to hop into our community in [Discord](https://documen.so/discord)
|
|
||||||
issue-message: |
|
|
||||||
Thank you for opening your first issue and for being a part of the open signing revolution!
|
|
||||||
<br /> One of our team members will review it and get back to you as soon as it possible 💚
|
|
||||||
<br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)
|
|
||||||
59
.github/workflows/issue-assignee-check.yml
vendored
@@ -1,59 +0,0 @@
|
|||||||
name: 'Issue Assignee Check'
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: ['assigned']
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
countIssues:
|
|
||||||
if: ${{ github.event.issue.assignee }} && github.event.action == 'assigned' && github.event.sender.type == 'User'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install Octokit
|
|
||||||
run: npm install @octokit/rest@18
|
|
||||||
|
|
||||||
- name: Check Assigned User's Issue Count
|
|
||||||
id: parse-comment
|
|
||||||
uses: actions/github-script@v5
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
const { Octokit } = require("@octokit/rest");
|
|
||||||
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
|
|
||||||
|
|
||||||
const username = context.payload.issue.assignee.login;
|
|
||||||
console.log(`Username Extracted: ${username}`);
|
|
||||||
|
|
||||||
const { data: issues } = await octokit.issues.listForRepo({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
assignee: username,
|
|
||||||
state: 'open'
|
|
||||||
});
|
|
||||||
|
|
||||||
const issueCount = issues.length;
|
|
||||||
console.log(`Issue Count For ${username}: ${issueCount}`);
|
|
||||||
|
|
||||||
if (issueCount > 3) {
|
|
||||||
let issueCountMessage = `### 🚨 Documenso Police 🚨`;
|
|
||||||
issueCountMessage += `\n@${username} has ${issueCount} open issues assigned already. Consider whether this issue should be assigned to them or left open for another contributor.`;
|
|
||||||
|
|
||||||
await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
body: issueCountMessage,
|
|
||||||
headers: {
|
|
||||||
'Authorization': `token ${{ secrets.GITHUB_TOKEN }}`,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
21
.github/workflows/issue-opened.yml
vendored
@@ -1,21 +0,0 @@
|
|||||||
name: 'Label Issues'
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: ['opened', 'reopened']
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
label_issues:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/github-script@v6
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
github.rest.issues.addLabels({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
labels: ["needs triage"]
|
|
||||||
})
|
|
||||||
20
.github/workflows/pr-labeler.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: 'PR Labeler'
|
|
||||||
|
|
||||||
on:
|
|
||||||
- pull_request_target
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
labeler:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/labeler@v4
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
sync-labels: ''
|
|
||||||
60
.github/workflows/pr-review-reminder.yml
vendored
@@ -1,60 +0,0 @@
|
|||||||
name: 'PR Review Reminder'
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: ['opened', 'reopened', 'ready_for_review', 'review_requested']
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
checkPRs:
|
|
||||||
if: ${{ github.event.pull_request.user.login }} && github.event.action == ('opened' || 'reopened' || 'ready_for_review' || 'review_requested')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install Octokit
|
|
||||||
run: npm install @octokit/rest@18
|
|
||||||
|
|
||||||
- name: Check user's PRs awaiting review
|
|
||||||
id: parse-prs
|
|
||||||
uses: actions/github-script@v5
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
const { Octokit } = require("@octokit/rest");
|
|
||||||
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
|
|
||||||
|
|
||||||
const username = context.payload.pull_request.user.login;
|
|
||||||
console.log(`Username Extracted: ${username}`);
|
|
||||||
|
|
||||||
const { data: pullRequests } = await octokit.pulls.list({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
state: 'open',
|
|
||||||
sort: 'created',
|
|
||||||
direction: 'asc',
|
|
||||||
});
|
|
||||||
|
|
||||||
const userPullRequests = pullRequests.filter(pr => pr.user.login === username && (pr.state === 'open' || pr.state === 'ready_for_review'));
|
|
||||||
const prCount = userPullRequests.length;
|
|
||||||
console.log(`PR Count for ${username}: ${prCount}`);
|
|
||||||
|
|
||||||
if (prCount > 3) {
|
|
||||||
let prReminderMessage = `🚨 @${username} has ${prCount} pull requests awaiting review. Please consider reviewing them when possible. 🚨`;
|
|
||||||
|
|
||||||
await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.payload.pull_request.number,
|
|
||||||
body: prReminderMessage,
|
|
||||||
headers: {
|
|
||||||
'Authorization': `token ${{ secrets.GITHUB_TOKEN }}`,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
27
.github/workflows/semantic-pull-requests.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: 'Validate PR Name'
|
name: "Validate PR Name"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
@@ -9,7 +9,7 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-pr:
|
validate-pr:
|
||||||
@@ -17,28 +17,5 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: amannn/action-semantic-pull-request@v5
|
- uses: amannn/action-semantic-pull-request@v5
|
||||||
id: lint_pr_title
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- uses: marocchino/sticky-pull-request-comment@v2
|
|
||||||
if: always() && (steps.lint_pr_title.outputs.error_message != null)
|
|
||||||
with:
|
|
||||||
header: pr-title-lint-error
|
|
||||||
message: |
|
|
||||||
Hey There! and thank you for opening this pull request! 📝👋🏼
|
|
||||||
|
|
||||||
We require pull request titles to follow the [Conventional Commits Spec](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
|
|
||||||
|
|
||||||
Details:
|
|
||||||
|
|
||||||
```
|
|
||||||
${{ steps.lint_pr_title.outputs.error_message }}
|
|
||||||
```
|
|
||||||
|
|
||||||
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
|
|
||||||
uses: marocchino/sticky-pull-request-comment@v2
|
|
||||||
with:
|
|
||||||
header: pr-title-lint-error
|
|
||||||
message: |
|
|
||||||
Thank you for following the naming conventions for pull request titles! 💚🚀
|
|
||||||
|
|||||||
25
.github/workflows/stale.yml
vendored
@@ -1,25 +0,0 @@
|
|||||||
name: 'Mark Stale Issues and PRs'
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 */8 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
stale:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/stale@v4
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
days-before-pr-stale: 30
|
|
||||||
days-before-issue-stale: 30
|
|
||||||
stale-issue-message: 'This issue has not seen activity for a while. It will be closed in 30 days unless further activity is detected'
|
|
||||||
stale-pr-message: 'This PR has not seen activitiy for a while. It will be closed in 30 days unless further activity is detected.'
|
|
||||||
close-issue-message: 'This issue has been closed because of inactivity.'
|
|
||||||
close-pr-message: 'This PR has been closed because of inactivity.'
|
|
||||||
exempt-pr-labels: 'WIP,on-hold,needs review'
|
|
||||||
exempt-issue-labels: 'WIP,on-hold,needs review,roadmap,assigned'
|
|
||||||
5
.vscode/settings.json
vendored
@@ -6,8 +6,5 @@
|
|||||||
"eslint.validate": ["typescript", "typescriptreact", "javascript", "javascriptreact"],
|
"eslint.validate": ["typescript", "typescriptreact", "javascript", "javascriptreact"],
|
||||||
"javascript.preferences.importModuleSpecifier": "non-relative",
|
"javascript.preferences.importModuleSpecifier": "non-relative",
|
||||||
"javascript.preferences.useAliasesForRenames": false,
|
"javascript.preferences.useAliasesForRenames": false,
|
||||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
"typescript.enablePromptUseWorkspaceTsdk": true
|
||||||
"files.eol": "\n",
|
|
||||||
"editor.tabSize": 2,
|
|
||||||
"editor.insertSpaces": true
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ The development branch is <code>main</code>. All pull requests should be made ag
|
|||||||
- Create a new branch (include the issue id and something readable):
|
- Create a new branch (include the issue id and something readable):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git checkout -b feat/doc-999-somefeature-that-rocks
|
git checkout -b doc-999-my-feature-or-fix
|
||||||
```
|
```
|
||||||
|
|
||||||
3. See the [Developer Setup](https://github.com/documenso/documenso/blob/main/README.md#developer-setup) for more setup details.
|
3. See the [Developer Setup](https://github.com/documenso/documenso/blob/main/README.md#developer-setup) for more setup details.
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# The Documenso Manifest
|
|
||||||
Signing documents is a fundamental building block of private, economic, and government interactions. Access to easy and secure signing to participate in society should therefore be a fundamental right for everyone. The technology to enable this should be accessible and widespread.
|
|
||||||
|
|
||||||
We know that open source is the key to solving this need once and for all to benefit all humankind. Using open source kickstarts innovation by putting the open sharing of ideas and solutions first. With Documenso, we will create an open and globally accessible signing platform to empower users, customers, and developers to fulfill their needs. Documenso is built by and for the global community, listening and implementing what is needed. Being transparent with the code and the processes that use it brings trust and security to the platform.
|
|
||||||
|
|
||||||
We build Documenso for longevity and scale by embracing the capital efficiency and inclusiveness of the Commercial Open Source (COSS) movement. We are building a global commodity for the world.
|
|
||||||
14
README.md
@@ -1,3 +1,5 @@
|
|||||||
|
🚨 We are live on Product Hunt with Single Player Mode and the new free tier: [https://www.producthunt.com/products/documenso](https://www.producthunt.com/posts/documenso-singleplayer-mode)
|
||||||
|
|
||||||
<img src="https://github.com/documenso/documenso/assets/13398220/a643571f-0239-46a6-a73e-6bef38d1228b" alt="Documenso Logo">
|
<img src="https://github.com/documenso/documenso/assets/13398220/a643571f-0239-46a6-a73e-6bef38d1228b" alt="Documenso Logo">
|
||||||
|
|
||||||
<p align="center" style="margin-top: 20px">
|
<p align="center" style="margin-top: 20px">
|
||||||
@@ -139,13 +141,11 @@ npm run d
|
|||||||
|
|
||||||
1. **App** - http://localhost:3000
|
1. **App** - http://localhost:3000
|
||||||
2. **Incoming Mail Access** - http://localhost:9000
|
2. **Incoming Mail Access** - http://localhost:9000
|
||||||
3. **Database Connection Details**
|
|
||||||
|
|
||||||
|
3. **Database Connection Details**
|
||||||
- **Port**: 54320
|
- **Port**: 54320
|
||||||
- **Connection**: Use your favorite database client to connect using the provided port.
|
- **Connection**: Use your favorite database client to connect using the provided port.
|
||||||
|
|
||||||
4. **S3 Storage Dashboard** - http://localhost:9001
|
|
||||||
|
|
||||||
## Developer Setup
|
## Developer Setup
|
||||||
|
|
||||||
### Manual Setup
|
### Manual Setup
|
||||||
@@ -195,12 +195,6 @@ git clone https://github.com/documenso/documenso
|
|||||||
|
|
||||||
We support DevContainers for VSCode. [Click here to get started.](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/documenso/documenso)
|
We support DevContainers for VSCode. [Click here to get started.](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/documenso/documenso)
|
||||||
|
|
||||||
### Video walkthrough
|
|
||||||
|
|
||||||
If you're a visual learner and prefer to watch a video walkthrough of setting up Documenso locally, check out this video:
|
|
||||||
|
|
||||||
[](https://youtu.be/Y0ppIQrEnZs)
|
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
🚧 Docker containers and images are current in progress. We are actively working on bringing a simple Docker build and publish pipeline for Documenso.
|
🚧 Docker containers and images are current in progress. We are actively working on bringing a simple Docker build and publish pipeline for Documenso.
|
||||||
@@ -242,7 +236,7 @@ Now you can install the dependencies and build it:
|
|||||||
|
|
||||||
```
|
```
|
||||||
npm i
|
npm i
|
||||||
npm run build:web
|
npm run:build:web
|
||||||
npm run prisma:migrate-deploy
|
npm run prisma:migrate-deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -14,11 +14,9 @@ tags:
|
|||||||
Today I'm happy to announce that we closed a \$1.25M Pre-Seed round for Documenso, bringing our total funding to \$1.54M. The round actually closed last month, we just were sneaky about it.
|
Today I'm happy to announce that we closed a \$1.25M Pre-Seed round for Documenso, bringing our total funding to \$1.54M. The round actually closed last month, we just were sneaky about it.
|
||||||
|
|
||||||
## Two more for the road (to open signing)
|
## Two more for the road (to open signing)
|
||||||
|
|
||||||
We're ecstatic to welcome [OSS Capital](https://twitter.com/osscapital) and especially [Joseph Jacks](https://twitter.com/JosephJacks_) to the inner circle of the open signing revolution. We're also fortunate to be joined by Orrick's very own [John Harrison](https://www.linkedin.com/in/john-harrison-a1213b9/) and his legal experience. For those who are wondering, yes, the round was, of course, signed using Documenso.
|
We're ecstatic to welcome [OSS Capital](https://twitter.com/osscapital) and especially [Joseph Jacks](https://twitter.com/JosephJacks_) to the inner circle of the open signing revolution. We're also fortunate to be joined by Orrick's very own [John Harrison](https://www.linkedin.com/in/john-harrison-a1213b9/) and his legal experience. For those who are wondering, yes, the round was, of course, signed using Documenso.
|
||||||
|
|
||||||
## Open Source, Open Metrics
|
## Open Source, Open Metrics
|
||||||
|
|
||||||
If you follow us, you know we're firmly committed to the open source values of openness and transparency. For us, this includes not only the code side of things but also the business. As we aim to build trust among our investors, customers, and partners, we want to be open about what's going on. We also want to allow everyone to learn from our data and choices, just as we did from so many other COSS (Commercial Open Source) startups. The term "Open Startup" isn't precisely defined (and probably will never be, just like startup). There is however a [great write-up](https://cal.com/blog/open-startup) about the basics by the founder of our favorite open source scheduling tool Cal.com.
|
If you follow us, you know we're firmly committed to the open source values of openness and transparency. For us, this includes not only the code side of things but also the business. As we aim to build trust among our investors, customers, and partners, we want to be open about what's going on. We also want to allow everyone to learn from our data and choices, just as we did from so many other COSS (Commercial Open Source) startups. The term "Open Startup" isn't precisely defined (and probably will never be, just like startup). There is however a [great write-up](https://cal.com/blog/open-startup) about the basics by the founder of our favorite open source scheduling tool Cal.com.
|
||||||
|
|
||||||
The two main takeaways are:
|
The two main takeaways are:
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ We’re an open-source project and focus on building a great developer experienc
|
|||||||
|
|
||||||
So, we’re switching all conversations, team and community-wide, to Discord.
|
So, we’re switching all conversations, team and community-wide, to Discord.
|
||||||
|
|
||||||
In this post, we won’t debate _why_ we’re switching — Slack vs. Discord is a long-lasting debate with pros and cons, and fans on both sides. There are great [stories](https://blog.meilisearch.com/from-slack-to-discord-our-migration/) and [threads](https://twitter.com/McPizza0/status/1655519558600470528) on the topic. We just don’t want to write yet another story here.
|
In this post, we won’t debate *why* we’re switching — Slack vs. Discord is a long-lasting debate with pros and cons, and fans on both sides. There are great [stories](https://blog.meilisearch.com/from-slack-to-discord-our-migration/) and [threads](https://twitter.com/McPizza0/status/1655519558600470528) on the topic. We just don’t want to write yet another story here.
|
||||||
|
|
||||||
Instead, we’ll focus on _how_ we plan to make the switch.
|
Instead, we’ll focus on *how* we plan to make the switch.
|
||||||
|
|
||||||
## Who is this story for?
|
## Who is this story for?
|
||||||
|
|
||||||
@@ -47,13 +47,14 @@ The detailed plan goes like this:
|
|||||||
- 2023-08-02 `t+8`: We announce to the community the upcoming changes in the different channels — GitHub, Twitter, and Slack.
|
- 2023-08-02 `t+8`: We announce to the community the upcoming changes in the different channels — GitHub, Twitter, and Slack.
|
||||||
|
|
||||||
- **GitHub**
|
- **GitHub**
|
||||||
|
|
||||||
- Create new Pull Request
|
- Create new Pull Request
|
||||||
- Add story to the blog
|
- Add story to the blog
|
||||||
- Update link to the community
|
- Update link to the community
|
||||||
|
|
||||||
```
|
```
|
||||||
https://documen.so/discord
|
https://documen.so/discord
|
||||||
```
|
```
|
||||||
|
|
||||||
- Start a new Discussion
|
- Start a new Discussion
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
@@ -72,7 +73,6 @@ The detailed plan goes like this:
|
|||||||
```
|
```
|
||||||
|
|
||||||
- **Twitter**
|
- **Twitter**
|
||||||
|
|
||||||
- [Tweet the announcement](https://twitter.com/documenso/status/1686719482096766977)
|
- [Tweet the announcement](https://twitter.com/documenso/status/1686719482096766977)
|
||||||
- Pin Tweet
|
- Pin Tweet
|
||||||
- Update link in bio
|
- Update link in bio
|
||||||
@@ -87,7 +87,6 @@ The detailed plan goes like this:
|
|||||||
```
|
```
|
||||||
|
|
||||||
- **Slack**
|
- **Slack**
|
||||||
|
|
||||||
- Post message in `#general`
|
- Post message in `#general`
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
@@ -107,15 +106,15 @@ The detailed plan goes like this:
|
|||||||
|
|
||||||
- Pin post
|
- Pin post
|
||||||
- Set topic and description
|
- Set topic and description
|
||||||
|
|
||||||
```
|
```
|
||||||
We're switching to Discord. Join the fun: https://documen.so/discord
|
We're switching to Discord. Join the fun: https://documen.so/discord
|
||||||
```
|
```
|
||||||
|
|
||||||
- Archive channels: `#code-review` `#how-to` `#meet-and-greet` `#random-memes` `#self-hosting` `#support`
|
- Archive channels: `#code-review` `#how-to` `#meet-and-greet` `#random-memes` `#self-hosting` `#support`
|
||||||
|
|
||||||
- 2023-08-09 `t+15`: 7 days later, we send a reminder on Slack.
|
- 2023-08-09 `t+15`: 7 days later, we send a reminder on Slack.
|
||||||
|
|
||||||
- **Slack**
|
- **Slack**
|
||||||
|
|
||||||
- Schedule reminder in `#general`
|
- Schedule reminder in `#general`
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -132,5 +131,5 @@ The detailed plan goes like this:
|
|||||||
## Final thoughts
|
## Final thoughts
|
||||||
|
|
||||||
- We’re at the very, early stage on our journey to building a beautiful, open-source DocuSign alternative. We want to build a great developer experience with the open-source community and, switching to Discord, we want to set up the foundations of an open, safe place for community members to get in touch, brainstorm ideas, and have fun.
|
- We’re at the very, early stage on our journey to building a beautiful, open-source DocuSign alternative. We want to build a great developer experience with the open-source community and, switching to Discord, we want to set up the foundations of an open, safe place for community members to get in touch, brainstorm ideas, and have fun.
|
||||||
- It doesn’t mean we won’t ever switch back to Slack. The tools of today aren’t the ones of tomorrow. We don’t delete the Slack workspace, we archive it, and keep the `documenso` handle. May it be just an _au revoir?_
|
- It doesn’t mean we won’t ever switch back to Slack. The tools of today aren’t the ones of tomorrow. We don’t delete the Slack workspace, we archive it, and keep the `documenso` handle. May it be just an *au revoir?*
|
||||||
- For now, we’re pushing forward and are eager to welcome you on Discord. Make sure to [join the server](https://documen.so/discord) in order to keep up to date on all things Documenso. See you there!
|
- For now, we’re pushing forward and are eager to welcome you on Discord. Make sure to [join the server](https://documen.so/discord) in order to keep up to date on all things Documenso. See you there!
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
title: Careers at Documenso
|
|
||||||
---
|
|
||||||
|
|
||||||
# Careers at Documenso
|
|
||||||
|
|
||||||
So you love Documenso and all the things that we do and now you want to work with us to unlock the future of open signing?
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Open Positions
|
|
||||||
|
|
||||||
Unfortunately we have no open positions available at the moment. Our team has grown and so we must grow with it, please check back from time to time as now is not forever and we may be hiring again in the future.
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { withContentlayer } = require('next-contentlayer');
|
const { withContentlayer } = require('next-contentlayer');
|
||||||
|
|
||||||
@@ -11,31 +10,15 @@ ENV_FILES.forEach((file) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// !: This is a temp hack to get caveat working without placing it back in the public directory.
|
|
||||||
// !: By inlining this at build time we should be able to sign faster.
|
|
||||||
const FONT_CAVEAT_BYTES = fs.readFileSync(
|
|
||||||
path.join(__dirname, '../../packages/assets/fonts/caveat.ttf'),
|
|
||||||
);
|
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const config = {
|
const config = {
|
||||||
experimental: {
|
experimental: {
|
||||||
outputFileTracingRoot: path.join(__dirname, '../../'),
|
serverActionsBodySizeLimit: '10mb',
|
||||||
serverActions: {
|
|
||||||
bodySizeLimit: '50mb',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
transpilePackages: [
|
transpilePackages: ['@documenso/lib', '@documenso/prisma', '@documenso/trpc', '@documenso/ui'],
|
||||||
'@documenso/assets',
|
|
||||||
'@documenso/lib',
|
|
||||||
'@documenso/tailwind-config',
|
|
||||||
'@documenso/trpc',
|
|
||||||
'@documenso/ui',
|
|
||||||
],
|
|
||||||
env: {
|
env: {
|
||||||
NEXT_PUBLIC_PROJECT: 'marketing',
|
NEXT_PUBLIC_PROJECT: 'marketing',
|
||||||
FONT_CAVEAT_URI: `data:font/ttf;base64,${FONT_CAVEAT_BYTES.toString('base64')}`,
|
|
||||||
},
|
},
|
||||||
modularizeImports: {
|
modularizeImports: {
|
||||||
'lucide-react': {
|
'lucide-react': {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@documenso/marketing",
|
"name": "@documenso/marketing",
|
||||||
"version": "1.2.3",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -13,7 +13,6 @@
|
|||||||
"copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs"
|
"copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@documenso/assets": "*",
|
|
||||||
"@documenso/lib": "*",
|
"@documenso/lib": "*",
|
||||||
"@documenso/tailwind-config": "*",
|
"@documenso/tailwind-config": "*",
|
||||||
"@documenso/trpc": "*",
|
"@documenso/trpc": "*",
|
||||||
@@ -24,8 +23,8 @@
|
|||||||
"lucide-react": "^0.279.0",
|
"lucide-react": "^0.279.0",
|
||||||
"luxon": "^3.4.0",
|
"luxon": "^3.4.0",
|
||||||
"micro": "^10.0.1",
|
"micro": "^10.0.1",
|
||||||
"next": "14.0.3",
|
"next": "14.0.0",
|
||||||
"next-auth": "4.24.5",
|
"next-auth": "4.24.3",
|
||||||
"next-contentlayer": "^0.3.4",
|
"next-contentlayer": "^0.3.4",
|
||||||
"next-plausible": "^3.10.1",
|
"next-plausible": "^3.10.1",
|
||||||
"perfect-freehand": "^1.2.0",
|
"perfect-freehand": "^1.2.0",
|
||||||
@@ -44,13 +43,5 @@
|
|||||||
"@types/node": "20.1.0",
|
"@types/node": "20.1.0",
|
||||||
"@types/react": "18.2.18",
|
"@types/react": "18.2.18",
|
||||||
"@types/react-dom": "18.2.7"
|
"@types/react-dom": "18.2.7"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"next-auth": {
|
|
||||||
"next": "$next"
|
|
||||||
},
|
|
||||||
"next-contentlayer": {
|
|
||||||
"next": "$next"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 629 B |
@@ -4,13 +4,13 @@ import { allBlogPosts } from 'contentlayer/generated';
|
|||||||
|
|
||||||
export const runtime = 'edge';
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export const contentType = 'image/png';
|
export const size = {
|
||||||
|
|
||||||
export const IMAGE_SIZE = {
|
|
||||||
width: 1200,
|
width: 1200,
|
||||||
height: 630,
|
height: 630,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const contentType = 'image/png';
|
||||||
|
|
||||||
type BlogPostOpenGraphImageProps = {
|
type BlogPostOpenGraphImageProps = {
|
||||||
params: { post: string };
|
params: { post: string };
|
||||||
};
|
};
|
||||||
@@ -25,16 +25,16 @@ export default async function BlogPostOpenGraphImage({ params }: BlogPostOpenGra
|
|||||||
// The long urls are needed for a compiler optimisation on the Next.js side, lifting this up
|
// The long urls are needed for a compiler optimisation on the Next.js side, lifting this up
|
||||||
// to a constant will break og image generation.
|
// to a constant will break og image generation.
|
||||||
const [interBold, interRegular, backgroundImage, logoImage] = await Promise.all([
|
const [interBold, interRegular, backgroundImage, logoImage] = await Promise.all([
|
||||||
fetch(new URL('@documenso/assets/fonts/inter-bold.ttf', import.meta.url)).then(async (res) =>
|
fetch(new URL('./../../../../assets/inter-bold.ttf', import.meta.url)).then(async (res) =>
|
||||||
res.arrayBuffer(),
|
res.arrayBuffer(),
|
||||||
),
|
),
|
||||||
fetch(new URL('@documenso/assets/fonts/inter-regular.ttf', import.meta.url)).then(async (res) =>
|
fetch(new URL('./../../../../assets/inter-regular.ttf', import.meta.url)).then(async (res) =>
|
||||||
res.arrayBuffer(),
|
res.arrayBuffer(),
|
||||||
),
|
),
|
||||||
fetch(new URL('@documenso/assets/images/background-blog-og.png', import.meta.url)).then(
|
fetch(new URL('./../../../../assets/background-blog-og.png', import.meta.url)).then(
|
||||||
async (res) => res.arrayBuffer(),
|
async (res) => res.arrayBuffer(),
|
||||||
),
|
),
|
||||||
fetch(new URL('@documenso/assets/logo.png', import.meta.url)).then(async (res) =>
|
fetch(new URL('./../../../../../public/logo.png', import.meta.url)).then(async (res) =>
|
||||||
res.arrayBuffer(),
|
res.arrayBuffer(),
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
@@ -56,7 +56,7 @@ export default async function BlogPostOpenGraphImage({ params }: BlogPostOpenGra
|
|||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
...IMAGE_SIZE,
|
...size,
|
||||||
fonts: [
|
fonts: [
|
||||||
{
|
{
|
||||||
name: 'Inter',
|
name: 'Inter',
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export default function MarketingLayout({ children }: MarketingLayoutProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn('relative flex min-h-[100vh] max-w-[100vw] flex-col pt-20 md:pt-28', {
|
className={cn('relative max-w-[100vw] pt-20 md:pt-28', {
|
||||||
'overflow-y-auto overflow-x-hidden': pathname !== '/singleplayer',
|
'overflow-y-auto overflow-x-hidden': pathname !== '/singleplayer',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
@@ -41,7 +41,7 @@ export default function MarketingLayout({ children }: MarketingLayoutProps) {
|
|||||||
<Header className="mx-auto h-16 max-w-screen-xl px-4 md:h-20 lg:px-8" />
|
<Header className="mx-auto h-16 max-w-screen-xl px-4 md:h-20 lg:px-8" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="relative mx-auto max-w-screen-xl flex-1 px-4 lg:px-8">{children}</div>
|
<div className="relative mx-auto max-w-screen-xl px-4 lg:px-8">{children}</div>
|
||||||
|
|
||||||
<Footer className="bg-background border-muted mt-24 border-t" />
|
<Footer className="bg-background border-muted mt-24 border-t" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import Image from 'next/image';
|
|||||||
|
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
|
||||||
import { OSSFriendsContainer } from './container';
|
import { OSSFriendsContainer } from './container';
|
||||||
import { TOSSFriendsSchema, ZOSSFriendsSchema } from './schema';
|
import { TOSSFriendsSchema, ZOSSFriendsSchema } from './schema';
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
'use client';
|
|
||||||
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -8,23 +8,24 @@ import { useRouter } from 'next/navigation';
|
|||||||
import { useAnalytics } from '@documenso/lib/client-only/hooks/use-analytics';
|
import { useAnalytics } from '@documenso/lib/client-only/hooks/use-analytics';
|
||||||
import { base64 } from '@documenso/lib/universal/base64';
|
import { base64 } from '@documenso/lib/universal/base64';
|
||||||
import { putFile } from '@documenso/lib/universal/upload/put-file';
|
import { putFile } from '@documenso/lib/universal/upload/put-file';
|
||||||
import type { Field, Recipient } from '@documenso/prisma/client';
|
import { DocumentDataType, Field, Prisma, Recipient } from '@documenso/prisma/client';
|
||||||
import { DocumentDataType, Prisma } from '@documenso/prisma/client';
|
|
||||||
import { trpc } from '@documenso/trpc/react';
|
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
import { DocumentDropzone } from '@documenso/ui/primitives/document-dropzone';
|
import { DocumentDropzone } from '@documenso/ui/primitives/document-dropzone';
|
||||||
import { AddFieldsFormPartial } from '@documenso/ui/primitives/document-flow/add-fields';
|
import { AddFieldsFormPartial } from '@documenso/ui/primitives/document-flow/add-fields';
|
||||||
import type { TAddFieldsFormSchema } from '@documenso/ui/primitives/document-flow/add-fields.types';
|
import { TAddFieldsFormSchema } from '@documenso/ui/primitives/document-flow/add-fields.types';
|
||||||
import { AddSignatureFormPartial } from '@documenso/ui/primitives/document-flow/add-signature';
|
import { AddSignatureFormPartial } from '@documenso/ui/primitives/document-flow/add-signature';
|
||||||
import type { TAddSignatureFormSchema } from '@documenso/ui/primitives/document-flow/add-signature.types';
|
import { TAddSignatureFormSchema } from '@documenso/ui/primitives/document-flow/add-signature.types';
|
||||||
import { DocumentFlowFormContainer } from '@documenso/ui/primitives/document-flow/document-flow-root';
|
import {
|
||||||
import type { DocumentFlowStep } from '@documenso/ui/primitives/document-flow/types';
|
DocumentFlowFormContainer,
|
||||||
|
DocumentFlowFormContainerHeader,
|
||||||
|
} from '@documenso/ui/primitives/document-flow/document-flow-root';
|
||||||
|
import { DocumentFlowStep } from '@documenso/ui/primitives/document-flow/types';
|
||||||
import { LazyPDFViewer } from '@documenso/ui/primitives/lazy-pdf-viewer';
|
import { LazyPDFViewer } from '@documenso/ui/primitives/lazy-pdf-viewer';
|
||||||
import { Stepper } from '@documenso/ui/primitives/stepper';
|
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
const SinglePlayerModeSteps = ['fields', 'sign'] as const;
|
import { createSinglePlayerDocument } from '~/components/(marketing)/single-player-mode/create-single-player-document.action';
|
||||||
type SinglePlayerModeStep = (typeof SinglePlayerModeSteps)[number];
|
|
||||||
|
type SinglePlayerModeStep = 'fields' | 'sign';
|
||||||
|
|
||||||
// !: This entire file is a hack to get around failed prerendering of
|
// !: This entire file is a hack to get around failed prerendering of
|
||||||
// !: the Single Player Mode page. This regression was introduced during
|
// !: the Single Player Mode page. This regression was introduced during
|
||||||
@@ -40,9 +41,6 @@ export const SinglePlayerClient = () => {
|
|||||||
const [step, setStep] = useState<SinglePlayerModeStep>('fields');
|
const [step, setStep] = useState<SinglePlayerModeStep>('fields');
|
||||||
const [fields, setFields] = useState<Field[]>([]);
|
const [fields, setFields] = useState<Field[]>([]);
|
||||||
|
|
||||||
const { mutateAsync: createSinglePlayerDocument } =
|
|
||||||
trpc.singleplayer.createSinglePlayerDocument.useMutation();
|
|
||||||
|
|
||||||
const documentFlow: Record<SinglePlayerModeStep, DocumentFlowStep> = {
|
const documentFlow: Record<SinglePlayerModeStep, DocumentFlowStep> = {
|
||||||
fields: {
|
fields: {
|
||||||
title: 'Add document',
|
title: 'Add document',
|
||||||
@@ -225,35 +223,37 @@ export const SinglePlayerClient = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-span-12 lg:col-span-6 xl:col-span-5">
|
<div className="col-span-12 lg:col-span-6 xl:col-span-5">
|
||||||
<DocumentFlowFormContainer
|
<DocumentFlowFormContainer className="top-24" onSubmit={(e) => e.preventDefault()}>
|
||||||
className="top-24 lg:h-[calc(100vh-7rem)]"
|
<DocumentFlowFormContainerHeader
|
||||||
onSubmit={(e) => e.preventDefault()}
|
title={currentDocumentFlow.title}
|
||||||
>
|
description={currentDocumentFlow.description}
|
||||||
<Stepper
|
/>
|
||||||
currentStep={currentDocumentFlow.stepIndex}
|
|
||||||
setCurrentStep={(step) => setStep(SinglePlayerModeSteps[step - 1])}
|
|
||||||
>
|
|
||||||
{/* Add fields to PDF page. */}
|
{/* Add fields to PDF page. */}
|
||||||
|
{step === 'fields' && (
|
||||||
<fieldset disabled={!uploadedFile} className="flex h-full flex-col">
|
<fieldset disabled={!uploadedFile} className="flex h-full flex-col">
|
||||||
<AddFieldsFormPartial
|
<AddFieldsFormPartial
|
||||||
documentFlow={documentFlow.fields}
|
documentFlow={documentFlow.fields}
|
||||||
hideRecipients={true}
|
hideRecipients={true}
|
||||||
recipients={uploadedFile ? [placeholderRecipient] : []}
|
recipients={uploadedFile ? [placeholderRecipient] : []}
|
||||||
|
numberOfSteps={Object.keys(documentFlow).length}
|
||||||
fields={fields}
|
fields={fields}
|
||||||
onSubmit={onFieldsSubmit}
|
onSubmit={onFieldsSubmit}
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Enter user details and signature. */}
|
{/* Enter user details and signature. */}
|
||||||
|
{step === 'sign' && (
|
||||||
<AddSignatureFormPartial
|
<AddSignatureFormPartial
|
||||||
documentFlow={documentFlow.sign}
|
documentFlow={documentFlow.sign}
|
||||||
|
numberOfSteps={Object.keys(documentFlow).length}
|
||||||
fields={fields}
|
fields={fields}
|
||||||
onSubmit={onSignSubmit}
|
onSubmit={onSignSubmit}
|
||||||
requireName={Boolean(fields.find((field) => field.type === 'NAME'))}
|
requireName={Boolean(fields.find((field) => field.type === 'NAME'))}
|
||||||
requireSignature={Boolean(fields.find((field) => field.type === 'SIGNATURE'))}
|
requireSignature={Boolean(fields.find((field) => field.type === 'SIGNATURE'))}
|
||||||
/>
|
/>
|
||||||
</Stepper>
|
)}
|
||||||
</DocumentFlowFormContainer>
|
</DocumentFlowFormContainer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,10 +7,11 @@ import { useRouter } from 'next/navigation';
|
|||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { ChevronLeft } from 'lucide-react';
|
import { ChevronLeft } from 'lucide-react';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
|
||||||
export default function NotFound() {
|
export default function NotFound() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 896 KiB After Width: | Height: | Size: 896 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 337 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 394 KiB After Width: | Height: | Size: 394 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 20 MiB After Width: | Height: | Size: 20 MiB |
@@ -2,13 +2,14 @@ import { HTMLAttributes } from 'react';
|
|||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import cardBeautifulFigure from '@documenso/assets/images/card-beautiful-figure.png';
|
|
||||||
import cardFastFigure from '@documenso/assets/images/card-fast-figure.png';
|
|
||||||
import cardSmartFigure from '@documenso/assets/images/card-smart-figure.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
import cardBeautifulFigure from '~/assets/card-beautiful-figure.png';
|
||||||
|
import cardFastFigure from '~/assets/card-fast-figure.png';
|
||||||
|
import cardSmartFigure from '~/assets/card-smart-figure.png';
|
||||||
|
|
||||||
export type FasterSmarterBeautifulBentoProps = HTMLAttributes<HTMLDivElement>;
|
export type FasterSmarterBeautifulBentoProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const FasterSmarterBeautifulBento = ({
|
export const FasterSmarterBeautifulBento = ({
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
@@ -9,7 +9,6 @@ import { FaXTwitter } from 'react-icons/fa6';
|
|||||||
import { LiaDiscord } from 'react-icons/lia';
|
import { LiaDiscord } from 'react-icons/lia';
|
||||||
import { LuGithub } from 'react-icons/lu';
|
import { LuGithub } from 'react-icons/lu';
|
||||||
|
|
||||||
import LogoImage from '@documenso/assets/logo.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { ThemeSwitcher } from '@documenso/ui/primitives/theme-switcher';
|
import { ThemeSwitcher } from '@documenso/ui/primitives/theme-switcher';
|
||||||
|
|
||||||
@@ -26,12 +25,10 @@ const FOOTER_LINKS = [
|
|||||||
{ href: '/singleplayer', text: 'Singleplayer' },
|
{ href: '/singleplayer', text: 'Singleplayer' },
|
||||||
{ href: '/blog', text: 'Blog' },
|
{ href: '/blog', text: 'Blog' },
|
||||||
{ href: '/design-system', text: 'Design' },
|
{ href: '/design-system', text: 'Design' },
|
||||||
{ href: '/open', text: 'Open Startup' },
|
{ href: '/open', text: 'Open' },
|
||||||
{ href: 'https://shop.documenso.com', text: 'Shop', target: '_blank' },
|
{ href: 'https://shop.documenso.com', text: 'Shop', target: '_blank' },
|
||||||
{ href: 'https://status.documenso.com', text: 'Status', target: '_blank' },
|
{ href: 'https://status.documenso.com', text: 'Status', target: '_blank' },
|
||||||
{ href: 'mailto:support@documenso.com', text: 'Support', target: '_blank' },
|
{ href: 'mailto:support@documenso.com', text: 'Support', target: '_blank' },
|
||||||
{ href: '/oss-friends', text: 'OSS Friends' },
|
|
||||||
{ href: '/careers', text: 'Careers' },
|
|
||||||
{ href: '/privacy', text: 'Privacy' },
|
{ href: '/privacy', text: 'Privacy' },
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -42,7 +39,7 @@ export const Footer = ({ className, ...props }: FooterProps) => {
|
|||||||
<div>
|
<div>
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<Image
|
<Image
|
||||||
src={LogoImage}
|
src="/logo.png"
|
||||||
alt="Documenso Logo"
|
alt="Documenso Logo"
|
||||||
className="dark:invert"
|
className="dark:invert"
|
||||||
width={170}
|
width={170}
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'react';
|
import { HTMLAttributes, useState } from 'react';
|
||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import LogoImage from '@documenso/assets/logo.png';
|
|
||||||
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
|
|
||||||
@@ -27,7 +25,7 @@ export const Header = ({ className, ...props }: HeaderProps) => {
|
|||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-4">
|
||||||
<Link href="/" className="z-10" onClick={() => setIsHamburgerMenuOpen(false)}>
|
<Link href="/" className="z-10" onClick={() => setIsHamburgerMenuOpen(false)}>
|
||||||
<Image
|
<Image
|
||||||
src={LogoImage}
|
src="/logo.png"
|
||||||
alt="Documenso Logo"
|
alt="Documenso Logo"
|
||||||
className="dark:invert"
|
className="dark:invert"
|
||||||
width={170}
|
width={170}
|
||||||
@@ -64,7 +62,7 @@ export const Header = ({ className, ...props }: HeaderProps) => {
|
|||||||
href="/open"
|
href="/open"
|
||||||
className="text-muted-foreground hover:text-muted-foreground/80 text-sm font-semibold"
|
className="text-muted-foreground hover:text-muted-foreground/80 text-sm font-semibold"
|
||||||
>
|
>
|
||||||
Open Startup
|
Open
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@@ -8,11 +8,12 @@ import { usePlausible } from 'next-plausible';
|
|||||||
import { LuGithub } from 'react-icons/lu';
|
import { LuGithub } from 'react-icons/lu';
|
||||||
import { match } from 'ts-pattern';
|
import { match } from 'ts-pattern';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
|
||||||
import { Widget } from './widget';
|
import { Widget } from './widget';
|
||||||
|
|
||||||
export type HeroProps = {
|
export type HeroProps = {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { FaXTwitter } from 'react-icons/fa6';
|
|||||||
import { LiaDiscord } from 'react-icons/lia';
|
import { LiaDiscord } from 'react-icons/lia';
|
||||||
import { LuGithub } from 'react-icons/lu';
|
import { LuGithub } from 'react-icons/lu';
|
||||||
|
|
||||||
import LogoImage from '@documenso/assets/logo.png';
|
|
||||||
import { Sheet, SheetContent } from '@documenso/ui/primitives/sheet';
|
import { Sheet, SheetContent } from '@documenso/ui/primitives/sheet';
|
||||||
|
|
||||||
export type MobileNavigationProps = {
|
export type MobileNavigationProps = {
|
||||||
@@ -31,7 +30,7 @@ export const MENU_NAVIGATION_LINKS = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: '/open',
|
href: '/open',
|
||||||
text: 'Open Startup',
|
text: 'Open',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: 'https://status.documenso.com',
|
href: 'https://status.documenso.com',
|
||||||
@@ -64,7 +63,7 @@ export const MobileNavigation = ({ isMenuOpen, onMenuOpenChange }: MobileNavigat
|
|||||||
<SheetContent className="w-full max-w-[400px]">
|
<SheetContent className="w-full max-w-[400px]">
|
||||||
<Link href="/" className="z-10" onClick={handleMenuItemClick}>
|
<Link href="/" className="z-10" onClick={handleMenuItemClick}>
|
||||||
<Image
|
<Image
|
||||||
src={LogoImage}
|
src="/logo.png"
|
||||||
alt="Documenso Logo"
|
alt="Documenso Logo"
|
||||||
className="dark:invert"
|
className="dark:invert"
|
||||||
width={170}
|
width={170}
|
||||||
|
|||||||
@@ -2,13 +2,14 @@ import { HTMLAttributes } from 'react';
|
|||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import cardBuildFigure from '@documenso/assets/images/card-build-figure.png';
|
|
||||||
import cardOpenFigure from '@documenso/assets/images/card-open-figure.png';
|
|
||||||
import cardTemplateFigure from '@documenso/assets/images/card-template-figure.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
import cardBuildFigure from '~/assets/card-build-figure.png';
|
||||||
|
import cardOpenFigure from '~/assets/card-open-figure.png';
|
||||||
|
import cardTemplateFigure from '~/assets/card-template-figure.png';
|
||||||
|
|
||||||
export type OpenBuildTemplateBentoProps = HTMLAttributes<HTMLDivElement>;
|
export type OpenBuildTemplateBentoProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const OpenBuildTemplateBento = ({ className, ...props }: OpenBuildTemplateBentoProps) => {
|
export const OpenBuildTemplateBento = ({ className, ...props }: OpenBuildTemplateBentoProps) => {
|
||||||
|
|||||||
@@ -2,14 +2,15 @@ import { HTMLAttributes } from 'react';
|
|||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
|
|
||||||
import backgroundPattern from '@documenso/assets/images/background-pattern.png';
|
|
||||||
import cardConnectionsFigure from '@documenso/assets/images/card-connections-figure.png';
|
|
||||||
import cardPaidFigure from '@documenso/assets/images/card-paid-figure.png';
|
|
||||||
import cardSharingFigure from '@documenso/assets/images/card-sharing-figure.png';
|
|
||||||
import cardWidgetFigure from '@documenso/assets/images/card-widget-figure.png';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
|
|
||||||
|
import backgroundPattern from '~/assets/background-pattern.png';
|
||||||
|
import cardConnectionsFigure from '~/assets/card-connections-figure.png';
|
||||||
|
import cardPaidFigure from '~/assets/card-paid-figure.png';
|
||||||
|
import cardSharingFigure from '~/assets/card-sharing-figure.png';
|
||||||
|
import cardWidgetFigure from '~/assets/card-widget-figure.png';
|
||||||
|
|
||||||
export type ShareConnectPaidWidgetBentoProps = HTMLAttributes<HTMLDivElement>;
|
export type ShareConnectPaidWidgetBentoProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const ShareConnectPaidWidgetBento = ({
|
export const ShareConnectPaidWidgetBento = ({
|
||||||
|
|||||||
@@ -0,0 +1,233 @@
|
|||||||
|
'use server';
|
||||||
|
|
||||||
|
import { createElement } from 'react';
|
||||||
|
|
||||||
|
import { DateTime } from 'luxon';
|
||||||
|
import { PDFDocument } from 'pdf-lib';
|
||||||
|
import { match } from 'ts-pattern';
|
||||||
|
import { z } from 'zod';
|
||||||
|
|
||||||
|
import { mailer } from '@documenso/email/mailer';
|
||||||
|
import { render } from '@documenso/email/render';
|
||||||
|
import { DocumentSelfSignedEmailTemplate } from '@documenso/email/templates/document-self-signed';
|
||||||
|
import { FROM_ADDRESS, FROM_NAME, SERVICE_USER_EMAIL } from '@documenso/lib/constants/email';
|
||||||
|
import { insertFieldInPDF } from '@documenso/lib/server-only/pdf/insert-field-in-pdf';
|
||||||
|
import { alphaid } from '@documenso/lib/universal/id';
|
||||||
|
import { getFile } from '@documenso/lib/universal/upload/get-file';
|
||||||
|
import { putFile } from '@documenso/lib/universal/upload/put-file';
|
||||||
|
import { prisma } from '@documenso/prisma';
|
||||||
|
import {
|
||||||
|
DocumentDataType,
|
||||||
|
DocumentStatus,
|
||||||
|
FieldType,
|
||||||
|
Prisma,
|
||||||
|
ReadStatus,
|
||||||
|
SendStatus,
|
||||||
|
SigningStatus,
|
||||||
|
} from '@documenso/prisma/client';
|
||||||
|
import { signPdf } from '@documenso/signing';
|
||||||
|
|
||||||
|
const ZCreateSinglePlayerDocumentSchema = z.object({
|
||||||
|
documentData: z.object({
|
||||||
|
data: z.string(),
|
||||||
|
type: z.nativeEnum(DocumentDataType),
|
||||||
|
}),
|
||||||
|
documentName: z.string(),
|
||||||
|
signer: z.object({
|
||||||
|
email: z.string().email().min(1),
|
||||||
|
name: z.string(),
|
||||||
|
signature: z.string(),
|
||||||
|
}),
|
||||||
|
fields: z.array(
|
||||||
|
z.object({
|
||||||
|
page: z.number(),
|
||||||
|
type: z.nativeEnum(FieldType),
|
||||||
|
positionX: z.number(),
|
||||||
|
positionY: z.number(),
|
||||||
|
width: z.number(),
|
||||||
|
height: z.number(),
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|
||||||
|
export type TCreateSinglePlayerDocumentSchema = z.infer<typeof ZCreateSinglePlayerDocumentSchema>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create and self signs a document.
|
||||||
|
*
|
||||||
|
* Returns the document token.
|
||||||
|
*/
|
||||||
|
export const createSinglePlayerDocument = async (
|
||||||
|
value: TCreateSinglePlayerDocumentSchema,
|
||||||
|
): Promise<string> => {
|
||||||
|
const { signer, fields, documentData, documentName } =
|
||||||
|
ZCreateSinglePlayerDocumentSchema.parse(value);
|
||||||
|
|
||||||
|
const document = await getFile({
|
||||||
|
data: documentData.data,
|
||||||
|
type: documentData.type,
|
||||||
|
});
|
||||||
|
|
||||||
|
const doc = await PDFDocument.load(document);
|
||||||
|
const createdAt = new Date();
|
||||||
|
|
||||||
|
const isBase64 = signer.signature.startsWith('data:image/png;base64,');
|
||||||
|
const signatureImageAsBase64 = isBase64 ? signer.signature : null;
|
||||||
|
const typedSignature = !isBase64 ? signer.signature : null;
|
||||||
|
|
||||||
|
// Update the document with the fields inserted.
|
||||||
|
for (const field of fields) {
|
||||||
|
const isSignatureField = field.type === FieldType.SIGNATURE;
|
||||||
|
|
||||||
|
await insertFieldInPDF(doc, {
|
||||||
|
...mapField(field, signer),
|
||||||
|
Signature: isSignatureField
|
||||||
|
? {
|
||||||
|
created: createdAt,
|
||||||
|
signatureImageAsBase64,
|
||||||
|
typedSignature,
|
||||||
|
// Dummy data.
|
||||||
|
id: -1,
|
||||||
|
recipientId: -1,
|
||||||
|
fieldId: -1,
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
// Dummy data.
|
||||||
|
id: -1,
|
||||||
|
documentId: -1,
|
||||||
|
recipientId: -1,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const unsignedPdfBytes = await doc.save();
|
||||||
|
|
||||||
|
const signedPdfBuffer = await signPdf({ pdf: Buffer.from(unsignedPdfBytes) });
|
||||||
|
|
||||||
|
const { token } = await prisma.$transaction(
|
||||||
|
async (tx) => {
|
||||||
|
const token = alphaid();
|
||||||
|
|
||||||
|
// Fetch service user who will be the owner of the document.
|
||||||
|
const serviceUser = await tx.user.findFirstOrThrow({
|
||||||
|
where: {
|
||||||
|
email: SERVICE_USER_EMAIL,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { id: documentDataId } = await putFile({
|
||||||
|
name: `${documentName}.pdf`,
|
||||||
|
type: 'application/pdf',
|
||||||
|
arrayBuffer: async () => Promise.resolve(signedPdfBuffer),
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create document.
|
||||||
|
const document = await tx.document.create({
|
||||||
|
data: {
|
||||||
|
title: documentName,
|
||||||
|
status: DocumentStatus.COMPLETED,
|
||||||
|
documentDataId,
|
||||||
|
userId: serviceUser.id,
|
||||||
|
createdAt,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create recipient.
|
||||||
|
const recipient = await tx.recipient.create({
|
||||||
|
data: {
|
||||||
|
documentId: document.id,
|
||||||
|
name: signer.name,
|
||||||
|
email: signer.email,
|
||||||
|
token,
|
||||||
|
signedAt: createdAt,
|
||||||
|
readStatus: ReadStatus.OPENED,
|
||||||
|
signingStatus: SigningStatus.SIGNED,
|
||||||
|
sendStatus: SendStatus.SENT,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create fields and signatures.
|
||||||
|
await Promise.all(
|
||||||
|
fields.map(async (field) => {
|
||||||
|
const insertedField = await tx.field.create({
|
||||||
|
data: {
|
||||||
|
documentId: document.id,
|
||||||
|
recipientId: recipient.id,
|
||||||
|
...mapField(field, signer),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (field.type === FieldType.SIGNATURE || field.type === FieldType.FREE_SIGNATURE) {
|
||||||
|
await tx.signature.create({
|
||||||
|
data: {
|
||||||
|
fieldId: insertedField.id,
|
||||||
|
signatureImageAsBase64,
|
||||||
|
typedSignature,
|
||||||
|
recipientId: recipient.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
return { document, token };
|
||||||
|
},
|
||||||
|
{
|
||||||
|
maxWait: 5000,
|
||||||
|
timeout: 30000,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const template = createElement(DocumentSelfSignedEmailTemplate, {
|
||||||
|
documentName: documentName,
|
||||||
|
assetBaseUrl: process.env.NEXT_PUBLIC_WEBAPP_URL || 'http://localhost:3000',
|
||||||
|
});
|
||||||
|
|
||||||
|
// Send email to signer.
|
||||||
|
await mailer.sendMail({
|
||||||
|
to: {
|
||||||
|
address: signer.email,
|
||||||
|
name: signer.name,
|
||||||
|
},
|
||||||
|
from: {
|
||||||
|
name: FROM_NAME,
|
||||||
|
address: FROM_ADDRESS,
|
||||||
|
},
|
||||||
|
subject: 'Document signed',
|
||||||
|
html: render(template),
|
||||||
|
text: render(template, { plainText: true }),
|
||||||
|
attachments: [{ content: signedPdfBuffer, filename: documentName }],
|
||||||
|
});
|
||||||
|
|
||||||
|
return token;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map the fields provided by the user to fields compatible with Prisma.
|
||||||
|
*
|
||||||
|
* Signature fields are handled separately.
|
||||||
|
*
|
||||||
|
* @param field The field passed in by the user.
|
||||||
|
* @param signer The details of the person who is signing this document.
|
||||||
|
* @returns A field compatible with Prisma.
|
||||||
|
*/
|
||||||
|
const mapField = (
|
||||||
|
field: TCreateSinglePlayerDocumentSchema['fields'][number],
|
||||||
|
signer: TCreateSinglePlayerDocumentSchema['signer'],
|
||||||
|
) => {
|
||||||
|
const customText = match(field.type)
|
||||||
|
.with(FieldType.DATE, () => DateTime.now().toFormat('yyyy-MM-dd hh:mm a'))
|
||||||
|
.with(FieldType.EMAIL, () => signer.email)
|
||||||
|
.with(FieldType.NAME, () => signer.name)
|
||||||
|
.otherwise(() => '');
|
||||||
|
|
||||||
|
return {
|
||||||
|
type: field.type,
|
||||||
|
page: field.page,
|
||||||
|
positionX: new Prisma.Decimal(field.positionX),
|
||||||
|
positionY: new Prisma.Decimal(field.positionY),
|
||||||
|
width: new Prisma.Decimal(field.width),
|
||||||
|
height: new Prisma.Decimal(field.height),
|
||||||
|
customText,
|
||||||
|
inserted: true,
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -4,7 +4,6 @@ import { useEffect, useState } from 'react';
|
|||||||
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import signingCelebration from '@documenso/assets/images/signing-celebration.png';
|
|
||||||
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
|
||||||
import { DocumentStatus, Signature } from '@documenso/prisma/client';
|
import { DocumentStatus, Signature } from '@documenso/prisma/client';
|
||||||
import { DocumentWithRecipient } from '@documenso/prisma/types/document-with-recipient';
|
import { DocumentWithRecipient } from '@documenso/prisma/types/document-with-recipient';
|
||||||
@@ -15,6 +14,7 @@ import { SigningCard3D } from '@documenso/ui/components/signing-card';
|
|||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
|
|
||||||
|
import signingCelebration from '~/assets/signing-celebration.png';
|
||||||
import { ConfettiScreen } from '~/components/(marketing)/confetti-screen';
|
import { ConfettiScreen } from '~/components/(marketing)/confetti-screen';
|
||||||
|
|
||||||
interface SinglePlayerModeSuccessProps {
|
interface SinglePlayerModeSuccessProps {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { NextApiRequest, NextApiResponse } from 'next';
|
import { NextApiRequest, NextApiResponse } from 'next';
|
||||||
|
|
||||||
import { randomBytes } from 'crypto';
|
import { randomBytes } from 'crypto';
|
||||||
|
import { readFileSync } from 'fs';
|
||||||
import { buffer } from 'micro';
|
import { buffer } from 'micro';
|
||||||
|
|
||||||
import { insertImageInPDF } from '@documenso/lib/server-only/pdf/insert-image-in-pdf';
|
import { insertImageInPDF } from '@documenso/lib/server-only/pdf/insert-image-in-pdf';
|
||||||
@@ -87,11 +88,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||||||
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|
||||||
const bytes64 = await fetch(
|
const bytes64 = readFileSync('./public/documenso-supporter-pledge.pdf').toString('base64');
|
||||||
new URL('@documenso/assets/documenso-supporter-pledge.pdf', import.meta.url),
|
|
||||||
)
|
|
||||||
.then(async (res) => res.arrayBuffer())
|
|
||||||
.then((buffer) => Buffer.from(buffer).toString('base64'));
|
|
||||||
|
|
||||||
const { id: documentDataId } = await prisma.documentData.create({
|
const { id: documentDataId } = await prisma.documentData.create({
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -2,15 +2,6 @@ import * as trpcNext from '@documenso/trpc/server/adapters/next';
|
|||||||
import { createTrpcContext } from '@documenso/trpc/server/context';
|
import { createTrpcContext } from '@documenso/trpc/server/context';
|
||||||
import { appRouter } from '@documenso/trpc/server/router';
|
import { appRouter } from '@documenso/trpc/server/router';
|
||||||
|
|
||||||
export const config = {
|
|
||||||
maxDuration: 60,
|
|
||||||
api: {
|
|
||||||
bodyParser: {
|
|
||||||
sizeLimit: '50mb',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default trpcNext.createNextApiHandler({
|
export default trpcNext.createNextApiHandler({
|
||||||
router: appRouter,
|
router: appRouter,
|
||||||
createContext: async ({ req, res }) => createTrpcContext({ req, res }),
|
createContext: async ({ req, res }) => createTrpcContext({ req, res }),
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { version } = require('./package.json');
|
const { version } = require('./package.json');
|
||||||
|
|
||||||
@@ -11,35 +10,23 @@ ENV_FILES.forEach((file) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// !: This is a temp hack to get caveat working without placing it back in the public directory.
|
|
||||||
// !: By inlining this at build time we should be able to sign faster.
|
|
||||||
const FONT_CAVEAT_BYTES = fs.readFileSync(
|
|
||||||
path.join(__dirname, '../../packages/assets/fonts/caveat.ttf'),
|
|
||||||
);
|
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const config = {
|
const config = {
|
||||||
output: process.env.DOCKER_OUTPUT ? 'standalone' : undefined,
|
output: process.env.DOCKER_OUTPUT ? 'standalone' : undefined,
|
||||||
experimental: {
|
experimental: {
|
||||||
outputFileTracingRoot: path.join(__dirname, '../../'),
|
serverActionsBodySizeLimit: '50mb',
|
||||||
serverActions: {
|
|
||||||
bodySizeLimit: '50mb',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
transpilePackages: [
|
transpilePackages: [
|
||||||
'@documenso/assets',
|
|
||||||
'@documenso/ee',
|
|
||||||
'@documenso/lib',
|
'@documenso/lib',
|
||||||
'@documenso/prisma',
|
'@documenso/prisma',
|
||||||
'@documenso/tailwind-config',
|
|
||||||
'@documenso/trpc',
|
'@documenso/trpc',
|
||||||
'@documenso/ui',
|
'@documenso/ui',
|
||||||
|
'@documenso/email',
|
||||||
],
|
],
|
||||||
env: {
|
env: {
|
||||||
APP_VERSION: version,
|
APP_VERSION: version,
|
||||||
NEXT_PUBLIC_PROJECT: 'web',
|
NEXT_PUBLIC_PROJECT: 'web',
|
||||||
FONT_CAVEAT_URI: `data:font/ttf;base64,${FONT_CAVEAT_BYTES.toString('base64')}`,
|
|
||||||
},
|
},
|
||||||
modularizeImports: {
|
modularizeImports: {
|
||||||
'lucide-react': {
|
'lucide-react': {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@documenso/web",
|
"name": "@documenso/web",
|
||||||
"version": "1.2.3",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -8,13 +8,11 @@
|
|||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"e2e:prepare": "next build && next start",
|
|
||||||
"lint:fix": "next lint --fix",
|
"lint:fix": "next lint --fix",
|
||||||
"clean": "rimraf .next && rimraf node_modules",
|
"clean": "rimraf .next && rimraf node_modules",
|
||||||
"copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs"
|
"copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@documenso/assets": "*",
|
|
||||||
"@documenso/ee": "*",
|
"@documenso/ee": "*",
|
||||||
"@documenso/lib": "*",
|
"@documenso/lib": "*",
|
||||||
"@documenso/prisma": "*",
|
"@documenso/prisma": "*",
|
||||||
@@ -28,8 +26,8 @@
|
|||||||
"lucide-react": "^0.279.0",
|
"lucide-react": "^0.279.0",
|
||||||
"luxon": "^3.4.0",
|
"luxon": "^3.4.0",
|
||||||
"micro": "^10.0.1",
|
"micro": "^10.0.1",
|
||||||
"next": "14.0.3",
|
"next": "14.0.0",
|
||||||
"next-auth": "4.24.5",
|
"next-auth": "4.24.3",
|
||||||
"next-plausible": "^3.10.1",
|
"next-plausible": "^3.10.1",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"perfect-freehand": "^1.2.0",
|
"perfect-freehand": "^1.2.0",
|
||||||
@@ -54,13 +52,5 @@
|
|||||||
"@types/node": "20.1.0",
|
"@types/node": "20.1.0",
|
||||||
"@types/react": "18.2.18",
|
"@types/react": "18.2.18",
|
||||||
"@types/react-dom": "18.2.7"
|
"@types/react-dom": "18.2.7"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"next-auth": {
|
|
||||||
"next": "$next"
|
|
||||||
},
|
|
||||||
"next-contentlayer": {
|
|
||||||
"next": "$next"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
apps/web/public/documenso-supporter-pledge.pdf
Normal file
BIN
apps/web/public/fonts/caveat.ttf
Normal file
BIN
apps/web/public/fonts/inter-bold.ttf
Normal file
BIN
apps/web/public/fonts/inter-regular.ttf
Normal file
BIN
apps/web/public/logo.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 743 KiB After Width: | Height: | Size: 743 KiB |
@@ -1,16 +1,8 @@
|
|||||||
'use server';
|
'use server';
|
||||||
|
|
||||||
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session';
|
|
||||||
import { isAdmin } from '@documenso/lib/next-auth/guards/is-admin';
|
|
||||||
import { findUsers } from '@documenso/lib/server-only/user/get-all-users';
|
import { findUsers } from '@documenso/lib/server-only/user/get-all-users';
|
||||||
|
|
||||||
export async function search(search: string, page: number, perPage: number) {
|
export async function search(search: string, page: number, perPage: number) {
|
||||||
const { user } = await getRequiredServerComponentSession();
|
|
||||||
|
|
||||||
if (!isAdmin(user)) {
|
|
||||||
throw new Error('Unauthorized');
|
|
||||||
}
|
|
||||||
|
|
||||||
const results = await findUsers({ username: search, email: search, page, perPage });
|
const results = await findUsers({ username: search, email: search, page, perPage });
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
|
|||||||
@@ -4,26 +4,28 @@ import { useState } from 'react';
|
|||||||
|
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
|
|
||||||
import { DocumentStatus } from '@documenso/prisma/client';
|
import { DocumentData, Field, Recipient, User } from '@documenso/prisma/client';
|
||||||
import type { DocumentData, Field, Recipient, User } from '@documenso/prisma/client';
|
import { DocumentWithData } from '@documenso/prisma/types/document-with-data';
|
||||||
import type { DocumentWithData } from '@documenso/prisma/types/document-with-data';
|
|
||||||
import { trpc } from '@documenso/trpc/react';
|
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
import { AddFieldsFormPartial } from '@documenso/ui/primitives/document-flow/add-fields';
|
import { AddFieldsFormPartial } from '@documenso/ui/primitives/document-flow/add-fields';
|
||||||
import type { TAddFieldsFormSchema } from '@documenso/ui/primitives/document-flow/add-fields.types';
|
import { TAddFieldsFormSchema } from '@documenso/ui/primitives/document-flow/add-fields.types';
|
||||||
import { AddSignersFormPartial } from '@documenso/ui/primitives/document-flow/add-signers';
|
import { AddSignersFormPartial } from '@documenso/ui/primitives/document-flow/add-signers';
|
||||||
import type { TAddSignersFormSchema } from '@documenso/ui/primitives/document-flow/add-signers.types';
|
import { TAddSignersFormSchema } from '@documenso/ui/primitives/document-flow/add-signers.types';
|
||||||
import { AddSubjectFormPartial } from '@documenso/ui/primitives/document-flow/add-subject';
|
import { AddSubjectFormPartial } from '@documenso/ui/primitives/document-flow/add-subject';
|
||||||
import type { TAddSubjectFormSchema } from '@documenso/ui/primitives/document-flow/add-subject.types';
|
import { TAddSubjectFormSchema } from '@documenso/ui/primitives/document-flow/add-subject.types';
|
||||||
import { AddTitleFormPartial } from '@documenso/ui/primitives/document-flow/add-title';
|
import {
|
||||||
import type { TAddTitleFormSchema } from '@documenso/ui/primitives/document-flow/add-title.types';
|
DocumentFlowFormContainer,
|
||||||
import { DocumentFlowFormContainer } from '@documenso/ui/primitives/document-flow/document-flow-root';
|
DocumentFlowFormContainerHeader,
|
||||||
import type { DocumentFlowStep } from '@documenso/ui/primitives/document-flow/types';
|
} from '@documenso/ui/primitives/document-flow/document-flow-root';
|
||||||
|
import { DocumentFlowStep } from '@documenso/ui/primitives/document-flow/types';
|
||||||
import { LazyPDFViewer } from '@documenso/ui/primitives/lazy-pdf-viewer';
|
import { LazyPDFViewer } from '@documenso/ui/primitives/lazy-pdf-viewer';
|
||||||
import { Stepper } from '@documenso/ui/primitives/stepper';
|
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
|
import { addFields } from '~/components/forms/edit-document/add-fields.action';
|
||||||
|
import { addSigners } from '~/components/forms/edit-document/add-signers.action';
|
||||||
|
import { completeDocument } from '~/components/forms/edit-document/add-subject.action';
|
||||||
|
|
||||||
export type EditDocumentFormProps = {
|
export type EditDocumentFormProps = {
|
||||||
className?: string;
|
className?: string;
|
||||||
user: User;
|
user: User;
|
||||||
@@ -33,8 +35,7 @@ export type EditDocumentFormProps = {
|
|||||||
documentData: DocumentData;
|
documentData: DocumentData;
|
||||||
};
|
};
|
||||||
|
|
||||||
type EditDocumentStep = 'title' | 'signers' | 'fields' | 'subject';
|
type EditDocumentStep = 'signers' | 'fields' | 'subject';
|
||||||
const EditDocumentSteps: EditDocumentStep[] = ['title', 'signers', 'fields', 'subject'];
|
|
||||||
|
|
||||||
export const EditDocumentForm = ({
|
export const EditDocumentForm = ({
|
||||||
className,
|
className,
|
||||||
@@ -47,60 +48,29 @@ export const EditDocumentForm = ({
|
|||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
// controlled stepper state
|
const [step, setStep] = useState<EditDocumentStep>('signers');
|
||||||
const [step, setStep] = useState<EditDocumentStep>(
|
|
||||||
document.status === DocumentStatus.DRAFT ? 'title' : 'signers',
|
|
||||||
);
|
|
||||||
|
|
||||||
const { mutateAsync: addTitle } = trpc.document.setTitleForDocument.useMutation();
|
|
||||||
const { mutateAsync: addFields } = trpc.field.addFields.useMutation();
|
|
||||||
const { mutateAsync: addSigners } = trpc.recipient.addSigners.useMutation();
|
|
||||||
const { mutateAsync: sendDocument } = trpc.document.sendDocument.useMutation();
|
|
||||||
|
|
||||||
const documentFlow: Record<EditDocumentStep, DocumentFlowStep> = {
|
const documentFlow: Record<EditDocumentStep, DocumentFlowStep> = {
|
||||||
title: {
|
|
||||||
title: 'Add Title',
|
|
||||||
description: 'Add the title to the document.',
|
|
||||||
stepIndex: 1,
|
|
||||||
},
|
|
||||||
signers: {
|
signers: {
|
||||||
title: 'Add Signers',
|
title: 'Add Signers',
|
||||||
description: 'Add the people who will sign the document.',
|
description: 'Add the people who will sign the document.',
|
||||||
stepIndex: 2,
|
stepIndex: 1,
|
||||||
},
|
},
|
||||||
fields: {
|
fields: {
|
||||||
title: 'Add Fields',
|
title: 'Add Fields',
|
||||||
description: 'Add all relevant fields for each recipient.',
|
description: 'Add all relevant fields for each recipient.',
|
||||||
stepIndex: 3,
|
stepIndex: 2,
|
||||||
|
onBackStep: () => setStep('signers'),
|
||||||
},
|
},
|
||||||
subject: {
|
subject: {
|
||||||
title: 'Add Subject',
|
title: 'Add Subject',
|
||||||
description: 'Add the subject and message you wish to send to signers.',
|
description: 'Add the subject and message you wish to send to signers.',
|
||||||
stepIndex: 4,
|
stepIndex: 3,
|
||||||
|
onBackStep: () => setStep('fields'),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const onAddTitleFormSubmit = async (data: TAddTitleFormSchema) => {
|
const currentDocumentFlow = documentFlow[step];
|
||||||
try {
|
|
||||||
// Custom invocation server action
|
|
||||||
await addTitle({
|
|
||||||
documentId: document.id,
|
|
||||||
title: data.title,
|
|
||||||
});
|
|
||||||
|
|
||||||
router.refresh();
|
|
||||||
|
|
||||||
setStep('signers');
|
|
||||||
} catch (err) {
|
|
||||||
console.error(err);
|
|
||||||
|
|
||||||
toast({
|
|
||||||
title: 'Error',
|
|
||||||
description: 'An error occurred while updating title.',
|
|
||||||
variant: 'destructive',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const onAddSignersFormSubmit = async (data: TAddSignersFormSchema) => {
|
const onAddSignersFormSubmit = async (data: TAddSignersFormSchema) => {
|
||||||
try {
|
try {
|
||||||
@@ -111,6 +81,7 @@ export const EditDocumentForm = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
router.refresh();
|
router.refresh();
|
||||||
|
|
||||||
setStep('fields');
|
setStep('fields');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
@@ -132,6 +103,7 @@ export const EditDocumentForm = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
router.refresh();
|
router.refresh();
|
||||||
|
|
||||||
setStep('subject');
|
setStep('subject');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
@@ -148,7 +120,7 @@ export const EditDocumentForm = ({
|
|||||||
const { subject, message } = data.email;
|
const { subject, message } = data.email;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await sendDocument({
|
await completeDocument({
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
email: {
|
email: {
|
||||||
subject,
|
subject,
|
||||||
@@ -174,8 +146,6 @@ export const EditDocumentForm = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const currentDocumentFlow = documentFlow[step];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('grid w-full grid-cols-12 gap-8', className)}>
|
<div className={cn('grid w-full grid-cols-12 gap-8', className)}>
|
||||||
<Card
|
<Card
|
||||||
@@ -188,47 +158,44 @@ export const EditDocumentForm = ({
|
|||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<div className="col-span-12 lg:col-span-6 xl:col-span-5">
|
<div className="col-span-12 lg:col-span-6 xl:col-span-5">
|
||||||
<DocumentFlowFormContainer
|
<DocumentFlowFormContainer onSubmit={(e) => e.preventDefault()}>
|
||||||
className="lg:h-[calc(100vh-6rem)]"
|
<DocumentFlowFormContainerHeader
|
||||||
onSubmit={(e) => e.preventDefault()}
|
title={currentDocumentFlow.title}
|
||||||
>
|
description={currentDocumentFlow.description}
|
||||||
<Stepper
|
|
||||||
currentStep={currentDocumentFlow.stepIndex}
|
|
||||||
setCurrentStep={(step) => setStep(EditDocumentSteps[step - 1])}
|
|
||||||
>
|
|
||||||
<AddTitleFormPartial
|
|
||||||
key={recipients.length}
|
|
||||||
documentFlow={documentFlow.title}
|
|
||||||
recipients={recipients}
|
|
||||||
fields={fields}
|
|
||||||
document={document}
|
|
||||||
onSubmit={onAddTitleFormSubmit}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{step === 'signers' && (
|
||||||
<AddSignersFormPartial
|
<AddSignersFormPartial
|
||||||
key={recipients.length}
|
key={recipients.length}
|
||||||
documentFlow={documentFlow.signers}
|
documentFlow={documentFlow.signers}
|
||||||
document={document}
|
|
||||||
recipients={recipients}
|
recipients={recipients}
|
||||||
fields={fields}
|
fields={fields}
|
||||||
|
numberOfSteps={Object.keys(documentFlow).length}
|
||||||
onSubmit={onAddSignersFormSubmit}
|
onSubmit={onAddSignersFormSubmit}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{step === 'fields' && (
|
||||||
<AddFieldsFormPartial
|
<AddFieldsFormPartial
|
||||||
key={fields.length}
|
key={fields.length}
|
||||||
documentFlow={documentFlow.fields}
|
documentFlow={documentFlow.fields}
|
||||||
recipients={recipients}
|
recipients={recipients}
|
||||||
fields={fields}
|
fields={fields}
|
||||||
|
numberOfSteps={Object.keys(documentFlow).length}
|
||||||
onSubmit={onAddFieldsFormSubmit}
|
onSubmit={onAddFieldsFormSubmit}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{step === 'subject' && (
|
||||||
<AddSubjectFormPartial
|
<AddSubjectFormPartial
|
||||||
key={recipients.length}
|
|
||||||
documentFlow={documentFlow.subject}
|
documentFlow={documentFlow.subject}
|
||||||
document={document}
|
document={document}
|
||||||
recipients={recipients}
|
recipients={recipients}
|
||||||
fields={fields}
|
fields={fields}
|
||||||
|
numberOfSteps={Object.keys(documentFlow).length}
|
||||||
onSubmit={onAddSubjectFormSubmit}
|
onSubmit={onAddSubjectFormSubmit}
|
||||||
/>
|
/>
|
||||||
</Stepper>
|
)}
|
||||||
</DocumentFlowFormContainer>
|
</DocumentFlowFormContainer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ export default async function DocumentPage({ params }: DocumentPageProps) {
|
|||||||
const { documentData } = document;
|
const { documentData } = document;
|
||||||
|
|
||||||
const [recipients, fields] = await Promise.all([
|
const [recipients, fields] = await Promise.all([
|
||||||
getRecipientsForDocument({
|
await getRecipientsForDocument({
|
||||||
documentId,
|
documentId,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
}),
|
}),
|
||||||
getFieldsForDocument({
|
await getFieldsForDocument({
|
||||||
documentId,
|
documentId,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { useState } from 'react';
|
|||||||
|
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { History } from 'lucide-react';
|
import { History } from 'lucide-react';
|
||||||
import { useSession } from 'next-auth/react';
|
|
||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
import * as z from 'zod';
|
import * as z from 'zod';
|
||||||
|
|
||||||
@@ -55,14 +54,11 @@ export const ResendDocumentActionItem = ({
|
|||||||
document,
|
document,
|
||||||
recipients,
|
recipients,
|
||||||
}: ResendDocumentActionItemProps) => {
|
}: ResendDocumentActionItemProps) => {
|
||||||
const { data: session } = useSession();
|
|
||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
|
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const isOwner = document.userId === session?.user?.id;
|
|
||||||
|
|
||||||
const isDisabled =
|
const isDisabled =
|
||||||
!isOwner ||
|
|
||||||
document.status !== 'PENDING' ||
|
document.status !== 'PENDING' ||
|
||||||
!recipients.some((r) => r.signingStatus === SigningStatus.NOT_SIGNED);
|
!recipients.some((r) => r.signingStatus === SigningStatus.NOT_SIGNED);
|
||||||
|
|
||||||
|
|||||||
@@ -2,17 +2,13 @@
|
|||||||
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import { Download, Edit, Pencil } from 'lucide-react';
|
import { Edit, Pencil, Share } from 'lucide-react';
|
||||||
import { useSession } from 'next-auth/react';
|
import { useSession } from 'next-auth/react';
|
||||||
import { match } from 'ts-pattern';
|
import { match } from 'ts-pattern';
|
||||||
|
|
||||||
import { getFile } from '@documenso/lib/universal/upload/get-file';
|
import { Document, DocumentStatus, Recipient, SigningStatus, User } from '@documenso/prisma/client';
|
||||||
import type { Document, Recipient, User } from '@documenso/prisma/client';
|
import { DocumentShareButton } from '@documenso/ui/components/document/document-share-button';
|
||||||
import { DocumentStatus, SigningStatus } from '@documenso/prisma/client';
|
|
||||||
import type { DocumentWithData } from '@documenso/prisma/types/document-with-data';
|
|
||||||
import { trpc as trpcClient } from '@documenso/trpc/client';
|
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
|
||||||
|
|
||||||
export type DataTableActionButtonProps = {
|
export type DataTableActionButtonProps = {
|
||||||
row: Document & {
|
row: Document & {
|
||||||
@@ -23,7 +19,6 @@ export type DataTableActionButtonProps = {
|
|||||||
|
|
||||||
export const DataTableActionButton = ({ row }: DataTableActionButtonProps) => {
|
export const DataTableActionButton = ({ row }: DataTableActionButtonProps) => {
|
||||||
const { data: session } = useSession();
|
const { data: session } = useSession();
|
||||||
const { toast } = useToast();
|
|
||||||
|
|
||||||
if (!session) {
|
if (!session) {
|
||||||
return null;
|
return null;
|
||||||
@@ -38,50 +33,6 @@ export const DataTableActionButton = ({ row }: DataTableActionButtonProps) => {
|
|||||||
const isComplete = row.status === DocumentStatus.COMPLETED;
|
const isComplete = row.status === DocumentStatus.COMPLETED;
|
||||||
const isSigned = recipient?.signingStatus === SigningStatus.SIGNED;
|
const isSigned = recipient?.signingStatus === SigningStatus.SIGNED;
|
||||||
|
|
||||||
const onDownloadClick = async () => {
|
|
||||||
try {
|
|
||||||
let document: DocumentWithData | null = null;
|
|
||||||
|
|
||||||
if (!recipient) {
|
|
||||||
document = await trpcClient.document.getDocumentById.query({
|
|
||||||
id: row.id,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
document = await trpcClient.document.getDocumentByToken.query({
|
|
||||||
token: recipient.token,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const documentData = document?.documentData;
|
|
||||||
|
|
||||||
if (!documentData) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const documentBytes = await getFile(documentData);
|
|
||||||
|
|
||||||
const blob = new Blob([documentBytes], {
|
|
||||||
type: 'application/pdf',
|
|
||||||
});
|
|
||||||
|
|
||||||
const link = window.document.createElement('a');
|
|
||||||
const baseTitle = row.title.includes('.pdf') ? row.title.split('.pdf')[0] : row.title;
|
|
||||||
|
|
||||||
link.href = window.URL.createObjectURL(blob);
|
|
||||||
link.download = baseTitle ? `${baseTitle}_signed.pdf` : 'document.pdf';
|
|
||||||
|
|
||||||
link.click();
|
|
||||||
|
|
||||||
window.URL.revokeObjectURL(link.href);
|
|
||||||
} catch (error) {
|
|
||||||
toast({
|
|
||||||
title: 'Something went wrong',
|
|
||||||
description: 'An error occurred while trying to download file.',
|
|
||||||
variant: 'destructive',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return match({
|
return match({
|
||||||
isOwner,
|
isOwner,
|
||||||
isRecipient,
|
isRecipient,
|
||||||
@@ -91,7 +42,7 @@ export const DataTableActionButton = ({ row }: DataTableActionButtonProps) => {
|
|||||||
isSigned,
|
isSigned,
|
||||||
})
|
})
|
||||||
.with({ isOwner: true, isDraft: true }, () => (
|
.with({ isOwner: true, isDraft: true }, () => (
|
||||||
<Button className="w-32" asChild>
|
<Button className="w-24" asChild>
|
||||||
<Link href={`/documents/${row.id}`}>
|
<Link href={`/documents/${row.id}`}>
|
||||||
<Edit className="-ml-1 mr-2 h-4 w-4" />
|
<Edit className="-ml-1 mr-2 h-4 w-4" />
|
||||||
Edit
|
Edit
|
||||||
@@ -99,24 +50,23 @@ export const DataTableActionButton = ({ row }: DataTableActionButtonProps) => {
|
|||||||
</Button>
|
</Button>
|
||||||
))
|
))
|
||||||
.with({ isRecipient: true, isPending: true, isSigned: false }, () => (
|
.with({ isRecipient: true, isPending: true, isSigned: false }, () => (
|
||||||
<Button className="w-32" asChild>
|
<Button className="w-24" asChild>
|
||||||
<Link href={`/sign/${recipient?.token}`}>
|
<Link href={`/sign/${recipient?.token}`}>
|
||||||
<Pencil className="-ml-1 mr-2 h-4 w-4" />
|
<Pencil className="-ml-1 mr-2 h-4 w-4" />
|
||||||
Sign
|
Sign
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
))
|
))
|
||||||
.with({ isPending: true, isSigned: true }, () => (
|
.otherwise(() => (
|
||||||
<Button className="w-32" disabled={true}>
|
<DocumentShareButton
|
||||||
<Pencil className="-ml-1 mr-2 inline h-4 w-4" />
|
documentId={row.id}
|
||||||
Sign
|
token={recipient?.token}
|
||||||
|
trigger={({ loading }) => (
|
||||||
|
<Button className="w-24" loading={loading}>
|
||||||
|
{!loading && <Share className="-ml-1 mr-2 h-4 w-4" />}
|
||||||
|
Share
|
||||||
</Button>
|
</Button>
|
||||||
))
|
)}
|
||||||
.with({ isComplete: true }, () => (
|
/>
|
||||||
<Button className="w-32" onClick={onDownloadClick}>
|
));
|
||||||
<Download className="-ml-1 mr-2 inline h-4 w-4" />
|
|
||||||
Download
|
|
||||||
</Button>
|
|
||||||
))
|
|
||||||
.otherwise(() => <div></div>);
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import {
|
|||||||
} from '@documenso/ui/primitives/dropdown-menu';
|
} from '@documenso/ui/primitives/dropdown-menu';
|
||||||
|
|
||||||
import { ResendDocumentActionItem } from './_action-items/resend-document';
|
import { ResendDocumentActionItem } from './_action-items/resend-document';
|
||||||
import { DeleteDocumentDialog } from './delete-document-dialog';
|
import { DeleteDraftDocumentDialog } from './delete-draft-document-dialog';
|
||||||
import { DuplicateDocumentDialog } from './duplicate-document-dialog';
|
import { DuplicateDocumentDialog } from './duplicate-document-dialog';
|
||||||
|
|
||||||
export type DataTableActionDropdownProps = {
|
export type DataTableActionDropdownProps = {
|
||||||
@@ -60,7 +60,7 @@ export const DataTableActionDropdown = ({ row }: DataTableActionDropdownProps) =
|
|||||||
// const isPending = row.status === DocumentStatus.PENDING;
|
// const isPending = row.status === DocumentStatus.PENDING;
|
||||||
const isComplete = row.status === DocumentStatus.COMPLETED;
|
const isComplete = row.status === DocumentStatus.COMPLETED;
|
||||||
// const isSigned = recipient?.signingStatus === SigningStatus.SIGNED;
|
// const isSigned = recipient?.signingStatus === SigningStatus.SIGNED;
|
||||||
const isDocumentDeletable = isOwner;
|
const isDocumentDeletable = isOwner && row.status === DocumentStatus.DRAFT;
|
||||||
|
|
||||||
const onDownloadClick = async () => {
|
const onDownloadClick = async () => {
|
||||||
let document: DocumentWithData | null = null;
|
let document: DocumentWithData | null = null;
|
||||||
@@ -88,10 +88,9 @@ export const DataTableActionDropdown = ({ row }: DataTableActionDropdownProps) =
|
|||||||
});
|
});
|
||||||
|
|
||||||
const link = window.document.createElement('a');
|
const link = window.document.createElement('a');
|
||||||
const baseTitle = row.title.includes('.pdf') ? row.title.split('.pdf')[0] : row.title;
|
|
||||||
|
|
||||||
link.href = window.URL.createObjectURL(blob);
|
link.href = window.URL.createObjectURL(blob);
|
||||||
link.download = baseTitle ? `${baseTitle}_signed.pdf` : 'document.pdf';
|
link.download = row.title || 'document.pdf';
|
||||||
|
|
||||||
link.click();
|
link.click();
|
||||||
|
|
||||||
@@ -148,12 +147,12 @@ export const DataTableActionDropdown = ({ row }: DataTableActionDropdownProps) =
|
|||||||
|
|
||||||
<DocumentShareButton
|
<DocumentShareButton
|
||||||
documentId={row.id}
|
documentId={row.id}
|
||||||
token={isOwner ? undefined : recipient?.token}
|
token={recipient?.token}
|
||||||
trigger={({ loading, disabled }) => (
|
trigger={({ loading, disabled }) => (
|
||||||
<DropdownMenuItem disabled={disabled || isDraft} onSelect={(e) => e.preventDefault()}>
|
<DropdownMenuItem disabled={disabled || isDraft} onSelect={(e) => e.preventDefault()}>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{loading ? <Loader className="mr-2 h-4 w-4" /> : <Share className="mr-2 h-4 w-4" />}
|
{loading ? <Loader className="mr-2 h-4 w-4" /> : <Share className="mr-2 h-4 w-4" />}
|
||||||
Share Signing Card
|
Share
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
)}
|
)}
|
||||||
@@ -161,9 +160,8 @@ export const DataTableActionDropdown = ({ row }: DataTableActionDropdownProps) =
|
|||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
|
|
||||||
{isDocumentDeletable && (
|
{isDocumentDeletable && (
|
||||||
<DeleteDocumentDialog
|
<DeleteDraftDocumentDialog
|
||||||
id={row.id}
|
id={row.id}
|
||||||
status={row.status}
|
|
||||||
open={isDeleteDialogOpen}
|
open={isDeleteDialogOpen}
|
||||||
onOpenChange={setDeleteDialogOpen}
|
onOpenChange={setDeleteDialogOpen}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -6,9 +6,8 @@ import { Loader } from 'lucide-react';
|
|||||||
import { useSession } from 'next-auth/react';
|
import { useSession } from 'next-auth/react';
|
||||||
|
|
||||||
import { useUpdateSearchParams } from '@documenso/lib/client-only/hooks/use-update-search-params';
|
import { useUpdateSearchParams } from '@documenso/lib/client-only/hooks/use-update-search-params';
|
||||||
import type { FindResultSet } from '@documenso/lib/types/find-result-set';
|
import { FindResultSet } from '@documenso/lib/types/find-result-set';
|
||||||
import type { Document, Recipient, User } from '@documenso/prisma/client';
|
import { Document, Recipient, User } from '@documenso/prisma/client';
|
||||||
import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status';
|
|
||||||
import { DataTable } from '@documenso/ui/primitives/data-table';
|
import { DataTable } from '@documenso/ui/primitives/data-table';
|
||||||
import { DataTablePagination } from '@documenso/ui/primitives/data-table-pagination';
|
import { DataTablePagination } from '@documenso/ui/primitives/data-table-pagination';
|
||||||
|
|
||||||
@@ -75,9 +74,7 @@ export const DocumentsDataTable = ({ results }: DocumentsDataTableProps) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: 'Actions',
|
header: 'Actions',
|
||||||
cell: ({ row }) =>
|
cell: ({ row }) => (
|
||||||
(!row.original.deletedAt ||
|
|
||||||
row.original.status === ExtendedDocumentStatus.COMPLETED) && (
|
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
<DataTableActionButton row={row.original} />
|
<DataTableActionButton row={row.original} />
|
||||||
<DataTableActionDropdown row={row.original} />
|
<DataTableActionDropdown row={row.original} />
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
|
|
||||||
import { DocumentStatus } from '@documenso/prisma/client';
|
|
||||||
import { trpc as trpcReact } from '@documenso/trpc/react';
|
import { trpc as trpcReact } from '@documenso/trpc/react';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
import {
|
import {
|
||||||
@@ -13,30 +10,25 @@ import {
|
|||||||
DialogHeader,
|
DialogHeader,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
} from '@documenso/ui/primitives/dialog';
|
} from '@documenso/ui/primitives/dialog';
|
||||||
import { Input } from '@documenso/ui/primitives/input';
|
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
type DeleteDraftDocumentDialogProps = {
|
type DeleteDraftDocumentDialogProps = {
|
||||||
id: number;
|
id: number;
|
||||||
open: boolean;
|
open: boolean;
|
||||||
onOpenChange: (_open: boolean) => void;
|
onOpenChange: (_open: boolean) => void;
|
||||||
status: DocumentStatus;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DeleteDocumentDialog = ({
|
export const DeleteDraftDocumentDialog = ({
|
||||||
id,
|
id,
|
||||||
open,
|
open,
|
||||||
onOpenChange,
|
onOpenChange,
|
||||||
status,
|
|
||||||
}: DeleteDraftDocumentDialogProps) => {
|
}: DeleteDraftDocumentDialogProps) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
|
|
||||||
const [inputValue, setInputValue] = useState('');
|
const { mutateAsync: deleteDocument, isLoading } =
|
||||||
const [isDeleteEnabled, setIsDeleteEnabled] = useState(status === DocumentStatus.DRAFT);
|
trpcReact.document.deleteDraftDocument.useMutation({
|
||||||
|
|
||||||
const { mutateAsync: deleteDocument, isLoading } = trpcReact.document.deleteDocument.useMutation({
|
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
router.refresh();
|
router.refresh();
|
||||||
|
|
||||||
@@ -50,9 +42,9 @@ export const DeleteDocumentDialog = ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = async () => {
|
const onDraftDelete = async () => {
|
||||||
try {
|
try {
|
||||||
await deleteDocument({ id, status });
|
await deleteDocument({ id });
|
||||||
} catch {
|
} catch {
|
||||||
toast({
|
toast({
|
||||||
title: 'Something went wrong',
|
title: 'Something went wrong',
|
||||||
@@ -63,11 +55,6 @@ export const DeleteDocumentDialog = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
||||||
setInputValue(event.target.value);
|
|
||||||
setIsDeleteEnabled(event.target.value === 'delete');
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={(value) => !isLoading && onOpenChange(value)}>
|
<Dialog open={open} onOpenChange={(value) => !isLoading && onOpenChange(value)}>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
@@ -80,17 +67,6 @@ export const DeleteDocumentDialog = ({
|
|||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
{status !== DocumentStatus.DRAFT && (
|
|
||||||
<div className="mt-8">
|
|
||||||
<Input
|
|
||||||
type="text"
|
|
||||||
value={inputValue}
|
|
||||||
onChange={onInputChange}
|
|
||||||
placeholder="Type 'delete' to confirm"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<div className="flex w-full flex-1 flex-nowrap gap-4">
|
<div className="flex w-full flex-1 flex-nowrap gap-4">
|
||||||
<Button
|
<Button
|
||||||
@@ -102,14 +78,7 @@ export const DeleteDocumentDialog = ({
|
|||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button type="button" loading={isLoading} onClick={onDraftDelete} className="flex-1">
|
||||||
type="button"
|
|
||||||
loading={isLoading}
|
|
||||||
onClick={onDelete}
|
|
||||||
disabled={!isDeleteEnabled}
|
|
||||||
variant="destructive"
|
|
||||||
className="flex-1"
|
|
||||||
>
|
|
||||||
Delete
|
Delete
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,12 +30,7 @@ export const DuplicateDocumentDialog = ({
|
|||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
|
|
||||||
const documentData = document?.documentData
|
const documentData = document?.documentData;
|
||||||
? {
|
|
||||||
...document.documentData,
|
|
||||||
data: document.documentData.initialData,
|
|
||||||
}
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
const { mutateAsync: duplicateDocument, isLoading: isDuplicateLoading } =
|
const { mutateAsync: duplicateDocument, isLoading: isDuplicateLoading } =
|
||||||
trpcReact.document.duplicateDocument.useMutation({
|
trpcReact.document.duplicateDocument.useMutation({
|
||||||
|
|||||||
@@ -78,12 +78,7 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage
|
|||||||
ExtendedDocumentStatus.DRAFT,
|
ExtendedDocumentStatus.DRAFT,
|
||||||
ExtendedDocumentStatus.ALL,
|
ExtendedDocumentStatus.ALL,
|
||||||
].map((value) => (
|
].map((value) => (
|
||||||
<TabsTrigger
|
<TabsTrigger key={value} className="min-w-[60px]" value={value} asChild>
|
||||||
key={value}
|
|
||||||
className="hover:text-foreground min-w-[60px]"
|
|
||||||
value={value}
|
|
||||||
asChild
|
|
||||||
>
|
|
||||||
<Link href={getTabHref(value)} scroll={false}>
|
<Link href={getTabHref(value)} scroll={false}>
|
||||||
<DocumentStatus status={value} />
|
<DocumentStatus status={value} />
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { Loader } from 'lucide-react';
|
|||||||
import { useSession } from 'next-auth/react';
|
import { useSession } from 'next-auth/react';
|
||||||
|
|
||||||
import { useLimits } from '@documenso/ee/server-only/limits/provider/client';
|
import { useLimits } from '@documenso/ee/server-only/limits/provider/client';
|
||||||
import { useAnalytics } from '@documenso/lib/client-only/hooks/use-analytics';
|
|
||||||
import { createDocumentData } from '@documenso/lib/server-only/document-data/create-document-data';
|
import { createDocumentData } from '@documenso/lib/server-only/document-data/create-document-data';
|
||||||
import { putFile } from '@documenso/lib/universal/upload/put-file';
|
import { putFile } from '@documenso/lib/universal/upload/put-file';
|
||||||
import { TRPCClientError } from '@documenso/trpc/client';
|
import { TRPCClientError } from '@documenso/trpc/client';
|
||||||
@@ -24,7 +23,6 @@ export type UploadDocumentProps = {
|
|||||||
|
|
||||||
export const UploadDocument = ({ className }: UploadDocumentProps) => {
|
export const UploadDocument = ({ className }: UploadDocumentProps) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const analytics = useAnalytics();
|
|
||||||
const { data: session } = useSession();
|
const { data: session } = useSession();
|
||||||
|
|
||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
@@ -57,12 +55,6 @@ export const UploadDocument = ({ className }: UploadDocumentProps) => {
|
|||||||
duration: 5000,
|
duration: 5000,
|
||||||
});
|
});
|
||||||
|
|
||||||
analytics.capture('App: Document Uploaded', {
|
|
||||||
userId: session?.user.id,
|
|
||||||
documentId: id,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
});
|
|
||||||
|
|
||||||
router.push(`/documents/${id}`);
|
router.push(`/documents/${id}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { LimitsProvider } from '@documenso/ee/server-only/limits/provider/server
|
|||||||
import { NEXT_AUTH_OPTIONS } from '@documenso/lib/next-auth/auth-options';
|
import { NEXT_AUTH_OPTIONS } from '@documenso/lib/next-auth/auth-options';
|
||||||
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session';
|
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session';
|
||||||
|
|
||||||
|
import { CommandMenu } from '~/components/(dashboard)/common/command-menu';
|
||||||
import { Header } from '~/components/(dashboard)/layout/header';
|
import { Header } from '~/components/(dashboard)/layout/header';
|
||||||
import { VerifyEmailBanner } from '~/components/(dashboard)/layout/verify-email-banner';
|
import { VerifyEmailBanner } from '~/components/(dashboard)/layout/verify-email-banner';
|
||||||
import { RefreshOnFocus } from '~/components/(dashboard)/refresh-on-focus/refresh-on-focus';
|
import { RefreshOnFocus } from '~/components/(dashboard)/refresh-on-focus/refresh-on-focus';
|
||||||
@@ -32,6 +33,7 @@ export default async function AuthenticatedDashboardLayout({
|
|||||||
<NextAuthProvider session={session}>
|
<NextAuthProvider session={session}>
|
||||||
<LimitsProvider>
|
<LimitsProvider>
|
||||||
{!user.emailVerified && <VerifyEmailBanner email={user.email} />}
|
{!user.emailVerified && <VerifyEmailBanner email={user.email} />}
|
||||||
|
<CommandMenu />
|
||||||
<Header user={user} />
|
<Header user={user} />
|
||||||
|
|
||||||
<main className="mt-8 pb-8 md:mt-12 md:pb-12">{children}</main>
|
<main className="mt-8 pb-8 md:mt-12 md:pb-12">{children}</main>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export const createCheckout = async ({ priceId }: CreateCheckoutOptions) => {
|
|||||||
let stripeCustomer: Stripe.Customer | null = null;
|
let stripeCustomer: Stripe.Customer | null = null;
|
||||||
|
|
||||||
// Find the Stripe customer for the current user subscription.
|
// Find the Stripe customer for the current user subscription.
|
||||||
if (existingSubscription?.periodEnd && existingSubscription.periodEnd >= new Date()) {
|
if (existingSubscription) {
|
||||||
stripeCustomer = await getStripeCustomerById(existingSubscription.customerId);
|
stripeCustomer = await getStripeCustomerById(existingSubscription.customerId);
|
||||||
|
|
||||||
if (!stripeCustomer) {
|
if (!stripeCustomer) {
|
||||||
|
|||||||
@@ -3,16 +3,17 @@ import { NextResponse } from 'next/server';
|
|||||||
|
|
||||||
import { P, match } from 'ts-pattern';
|
import { P, match } from 'ts-pattern';
|
||||||
|
|
||||||
import type { ShareHandlerAPIResponse } from '~/pages/api/share';
|
import { getRecipientOrSenderByShareLinkSlug } from '@documenso/lib/server-only/share/get-recipient-or-sender-by-share-link-slug';
|
||||||
|
|
||||||
export const runtime = 'edge';
|
import { Logo } from '~/components/branding/logo';
|
||||||
|
import { getAssetBuffer } from '~/helpers/get-asset-buffer';
|
||||||
|
|
||||||
const CARD_OFFSET_TOP = 173;
|
const CARD_OFFSET_TOP = 152;
|
||||||
const CARD_OFFSET_LEFT = 307;
|
const CARD_OFFSET_LEFT = 350;
|
||||||
const CARD_WIDTH = 590;
|
const CARD_WIDTH = 500;
|
||||||
const CARD_HEIGHT = 337;
|
const CARD_HEIGHT = 250;
|
||||||
|
|
||||||
const IMAGE_SIZE = {
|
const size = {
|
||||||
width: 1200,
|
width: 1200,
|
||||||
height: 630,
|
height: 630,
|
||||||
};
|
};
|
||||||
@@ -23,27 +24,15 @@ type SharePageOpenGraphImageProps = {
|
|||||||
|
|
||||||
export async function GET(_request: Request, { params: { slug } }: SharePageOpenGraphImageProps) {
|
export async function GET(_request: Request, { params: { slug } }: SharePageOpenGraphImageProps) {
|
||||||
const [interSemiBold, interRegular, caveatRegular, shareFrameImage] = await Promise.all([
|
const [interSemiBold, interRegular, caveatRegular, shareFrameImage] = await Promise.all([
|
||||||
fetch(new URL('@documenso/assets/fonts/inter-semibold.ttf', import.meta.url)).then(
|
getAssetBuffer('/fonts/inter-semibold.ttf'),
|
||||||
async (res) => res.arrayBuffer(),
|
getAssetBuffer('/fonts/inter-regular.ttf'),
|
||||||
),
|
getAssetBuffer('/fonts/caveat-regular.ttf'),
|
||||||
fetch(new URL('@documenso/assets/fonts/inter-regular.ttf', import.meta.url)).then(async (res) =>
|
getAssetBuffer('/static/og-share-frame.png'),
|
||||||
res.arrayBuffer(),
|
|
||||||
),
|
|
||||||
fetch(new URL('@documenso/assets/fonts/caveat-regular.ttf', import.meta.url)).then(
|
|
||||||
async (res) => res.arrayBuffer(),
|
|
||||||
),
|
|
||||||
fetch(new URL('@documenso/assets/static/og-share-frame2.png', import.meta.url)).then(
|
|
||||||
async (res) => res.arrayBuffer(),
|
|
||||||
),
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const baseUrl = process.env.NEXT_PUBLIC_WEBAPP_URL || 'http://localhost:3000';
|
const recipientOrSender = await getRecipientOrSenderByShareLinkSlug({ slug }).catch(() => null);
|
||||||
|
|
||||||
const recipientOrSender: ShareHandlerAPIResponse = await fetch(
|
if (!recipientOrSender) {
|
||||||
new URL(`/api/share?slug=${slug}`, baseUrl),
|
|
||||||
).then(async (res) => res.json());
|
|
||||||
|
|
||||||
if ('error' in recipientOrSender) {
|
|
||||||
return NextResponse.json({ error: 'Not found' }, { status: 404 });
|
return NextResponse.json({ error: 'Not found' }, { status: 404 });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +60,11 @@ export async function GET(_request: Request, { params: { slug } }: SharePageOpen
|
|||||||
{/* @ts-expect-error Lack of typing from ImageResponse */}
|
{/* @ts-expect-error Lack of typing from ImageResponse */}
|
||||||
<img src={shareFrameImage} alt="og-share-frame" tw="absolute inset-0 w-full h-full" />
|
<img src={shareFrameImage} alt="og-share-frame" tw="absolute inset-0 w-full h-full" />
|
||||||
|
|
||||||
|
<div tw="absolute top-20 flex w-full items-center justify-center">
|
||||||
|
{/* @ts-expect-error Lack of typing from ImageResponse */}
|
||||||
|
<Logo tw="h-8 w-60" />
|
||||||
|
</div>
|
||||||
|
|
||||||
{signatureImage ? (
|
{signatureImage ? (
|
||||||
<div
|
<div
|
||||||
tw="absolute py-6 px-12 flex items-center justify-center text-center"
|
tw="absolute py-6 px-12 flex items-center justify-center text-center"
|
||||||
@@ -102,28 +96,40 @@ export async function GET(_request: Request, { params: { slug } }: SharePageOpen
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
{/* <div
|
||||||
tw="absolute flex w-full"
|
tw="absolute flex items-center justify-center text-slate-500"
|
||||||
style={{
|
style={{
|
||||||
top: `${CARD_OFFSET_TOP - 78}px`,
|
top: `${CARD_OFFSET_TOP + CARD_HEIGHT - 45}px`,
|
||||||
left: `${CARD_OFFSET_LEFT}px`,
|
left: `${CARD_OFFSET_LEFT}`,
|
||||||
|
width: `${CARD_WIDTH}px`,
|
||||||
|
fontSize: '30px',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{signatureName}
|
||||||
|
</div> */}
|
||||||
|
|
||||||
|
<div
|
||||||
|
tw="absolute flex flex-col items-center justify-center pt-12 w-full"
|
||||||
|
style={{
|
||||||
|
top: `${CARD_OFFSET_TOP + CARD_HEIGHT}px`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
tw="text-xl"
|
tw="text-3xl text-slate-500"
|
||||||
style={{
|
style={{
|
||||||
color: '#828282',
|
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontWeight: 700,
|
fontWeight: 600,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isRecipient ? 'Document Signed!' : 'Document Sent!'}
|
{isRecipient
|
||||||
|
? 'I just signed with Documenso and you can too!'
|
||||||
|
: 'I just sent a document with Documenso and you can too!'}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
...IMAGE_SIZE,
|
...size,
|
||||||
fonts: [
|
fonts: [
|
||||||
{
|
{
|
||||||
name: 'Caveat',
|
name: 'Caveat',
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ type SharePageProps = {
|
|||||||
export function generateMetadata({ params: { slug } }: SharePageProps) {
|
export function generateMetadata({ params: { slug } }: SharePageProps) {
|
||||||
return {
|
return {
|
||||||
title: 'Documenso - Share',
|
title: 'Documenso - Share',
|
||||||
description: 'I just signed a document in style with Documenso!',
|
description: 'I just signed a document with Documenso!',
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: 'Documenso - Join the open source signing revolution',
|
title: 'Documenso - Join the open source signing revolution',
|
||||||
description: 'I just signed with Documenso!',
|
description: 'I just signed with Documenso!',
|
||||||
|
|||||||
@@ -2,10 +2,8 @@ import Link from 'next/link';
|
|||||||
import { notFound } from 'next/navigation';
|
import { notFound } from 'next/navigation';
|
||||||
|
|
||||||
import { CheckCircle2, Clock8 } from 'lucide-react';
|
import { CheckCircle2, Clock8 } from 'lucide-react';
|
||||||
import { getServerSession } from 'next-auth';
|
|
||||||
import { match } from 'ts-pattern';
|
import { match } from 'ts-pattern';
|
||||||
|
|
||||||
import signingCelebration from '@documenso/assets/images/signing-celebration.png';
|
|
||||||
import { getDocumentAndSenderByToken } from '@documenso/lib/server-only/document/get-document-by-token';
|
import { getDocumentAndSenderByToken } from '@documenso/lib/server-only/document/get-document-by-token';
|
||||||
import { getFieldsForToken } from '@documenso/lib/server-only/field/get-fields-for-token';
|
import { getFieldsForToken } from '@documenso/lib/server-only/field/get-fields-for-token';
|
||||||
import { getRecipientByToken } from '@documenso/lib/server-only/recipient/get-recipient-by-token';
|
import { getRecipientByToken } from '@documenso/lib/server-only/recipient/get-recipient-by-token';
|
||||||
@@ -15,6 +13,8 @@ import { DocumentDownloadButton } from '@documenso/ui/components/document/docume
|
|||||||
import { DocumentShareButton } from '@documenso/ui/components/document/document-share-button';
|
import { DocumentShareButton } from '@documenso/ui/components/document/document-share-button';
|
||||||
import { SigningCard3D } from '@documenso/ui/components/signing-card';
|
import { SigningCard3D } from '@documenso/ui/components/signing-card';
|
||||||
|
|
||||||
|
import signingCelebration from '~/assets/signing-celebration.png';
|
||||||
|
|
||||||
export type CompletedSigningPageProps = {
|
export type CompletedSigningPageProps = {
|
||||||
params: {
|
params: {
|
||||||
token?: string;
|
token?: string;
|
||||||
@@ -54,9 +54,6 @@ export default async function CompletedSigningPage({
|
|||||||
fields.find((field) => field.type === FieldType.NAME)?.customText ||
|
fields.find((field) => field.type === FieldType.NAME)?.customText ||
|
||||||
recipient.email;
|
recipient.email;
|
||||||
|
|
||||||
const sessionData = await getServerSession();
|
|
||||||
const isLoggedIn = !!sessionData?.user;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="-mx-4 flex max-w-[100vw] flex-col items-center overflow-x-hidden px-4 pt-24 md:-mx-8 md:px-8 lg:pt-36 xl:pt-44">
|
<div className="-mx-4 flex max-w-[100vw] flex-col items-center overflow-x-hidden px-4 pt-24 md:-mx-8 md:px-8 lg:pt-36 xl:pt-44">
|
||||||
{/* Card with recipient */}
|
{/* Card with recipient */}
|
||||||
@@ -67,24 +64,18 @@ export default async function CompletedSigningPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="relative mt-6 flex w-full flex-col items-center">
|
<div className="relative mt-6 flex w-full flex-col items-center">
|
||||||
{match({ status: document.status, deletedAt: document.deletedAt })
|
{match(document.status)
|
||||||
.with({ status: DocumentStatus.COMPLETED }, () => (
|
.with(DocumentStatus.COMPLETED, () => (
|
||||||
<div className="text-documenso-700 flex items-center text-center">
|
<div className="text-documenso-700 flex items-center text-center">
|
||||||
<CheckCircle2 className="mr-2 h-5 w-5" />
|
<CheckCircle2 className="mr-2 h-5 w-5" />
|
||||||
<span className="text-sm">Everyone has signed</span>
|
<span className="text-sm">Everyone has signed</span>
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
.with({ deletedAt: null }, () => (
|
.otherwise(() => (
|
||||||
<div className="flex items-center text-center text-blue-600">
|
<div className="flex items-center text-center text-blue-600">
|
||||||
<Clock8 className="mr-2 h-5 w-5" />
|
<Clock8 className="mr-2 h-5 w-5" />
|
||||||
<span className="text-sm">Waiting for others to sign</span>
|
<span className="text-sm">Waiting for others to sign</span>
|
||||||
</div>
|
</div>
|
||||||
))
|
|
||||||
.otherwise(() => (
|
|
||||||
<div className="flex items-center text-center text-red-600">
|
|
||||||
<Clock8 className="mr-2 h-5 w-5" />
|
|
||||||
<span className="text-sm">Document no longer available to sign</span>
|
|
||||||
</div>
|
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<h2 className="mt-6 max-w-[35ch] text-center text-2xl font-semibold leading-normal md:text-3xl lg:text-4xl">
|
<h2 className="mt-6 max-w-[35ch] text-center text-2xl font-semibold leading-normal md:text-3xl lg:text-4xl">
|
||||||
@@ -92,21 +83,15 @@ export default async function CompletedSigningPage({
|
|||||||
<span className="mt-1.5 block">"{document.title}"</span>
|
<span className="mt-1.5 block">"{document.title}"</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{match({ status: document.status, deletedAt: document.deletedAt })
|
{match(document.status)
|
||||||
.with({ status: DocumentStatus.COMPLETED }, () => (
|
.with(DocumentStatus.COMPLETED, () => (
|
||||||
<p className="text-muted-foreground/60 mt-2.5 max-w-[60ch] text-center text-sm font-medium md:text-base">
|
<p className="text-muted-foreground/60 mt-2.5 max-w-[60ch] text-center text-sm font-medium md:text-base">
|
||||||
Everyone has signed! You will receive an Email copy of the signed document.
|
Everyone has signed! You will receive an Email copy of the signed document.
|
||||||
</p>
|
</p>
|
||||||
))
|
))
|
||||||
.with({ deletedAt: null }, () => (
|
|
||||||
<p className="text-muted-foreground/60 mt-2.5 max-w-[60ch] text-center text-sm font-medium md:text-base">
|
|
||||||
You will receive an Email copy of the signed document once everyone has signed.
|
|
||||||
</p>
|
|
||||||
))
|
|
||||||
.otherwise(() => (
|
.otherwise(() => (
|
||||||
<p className="text-muted-foreground/60 mt-2.5 max-w-[60ch] text-center text-sm font-medium md:text-base">
|
<p className="text-muted-foreground/60 mt-2.5 max-w-[60ch] text-center text-sm font-medium md:text-base">
|
||||||
This document has been cancelled by the owner and is no longer available for others to
|
You will receive an Email copy of the signed document once everyone has signed.
|
||||||
sign.
|
|
||||||
</p>
|
</p>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
@@ -121,11 +106,6 @@ export default async function CompletedSigningPage({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{isLoggedIn ? (
|
|
||||||
<Link href="/documents" className="text-documenso-700 hover:text-documenso-600 mt-36">
|
|
||||||
Go Back Home
|
|
||||||
</Link>
|
|
||||||
) : (
|
|
||||||
<p className="text-muted-foreground/60 mt-36 text-sm">
|
<p className="text-muted-foreground/60 mt-36 text-sm">
|
||||||
Want to send slick signing links like this one?{' '}
|
Want to send slick signing links like this one?{' '}
|
||||||
<Link
|
<Link
|
||||||
@@ -135,7 +115,6 @@ export default async function CompletedSigningPage({
|
|||||||
Check out Documenso.
|
Check out Documenso.
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { FieldWithSignature } from '@documenso/prisma/types/field-with-signature
|
|||||||
import { trpc } from '@documenso/trpc/react';
|
import { trpc } from '@documenso/trpc/react';
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
|
import { useRequiredSigningContext } from './provider';
|
||||||
import { SigningFieldContainer } from './signing-field-container';
|
import { SigningFieldContainer } from './signing-field-container';
|
||||||
|
|
||||||
export type DateFieldProps = {
|
export type DateFieldProps = {
|
||||||
@@ -25,6 +26,8 @@ export const DateField = ({ field, recipient }: DateFieldProps) => {
|
|||||||
|
|
||||||
const [isPending, startTransition] = useTransition();
|
const [isPending, startTransition] = useTransition();
|
||||||
|
|
||||||
|
const { dateFormat } = useRequiredSigningContext();
|
||||||
|
|
||||||
const { mutateAsync: signFieldWithToken, isLoading: isSignFieldWithTokenLoading } =
|
const { mutateAsync: signFieldWithToken, isLoading: isSignFieldWithTokenLoading } =
|
||||||
trpc.field.signFieldWithToken.useMutation();
|
trpc.field.signFieldWithToken.useMutation();
|
||||||
|
|
||||||
@@ -40,7 +43,7 @@ export const DateField = ({ field, recipient }: DateFieldProps) => {
|
|||||||
await signFieldWithToken({
|
await signFieldWithToken({
|
||||||
token: recipient.token,
|
token: recipient.token,
|
||||||
fieldId: field.id,
|
fieldId: field.id,
|
||||||
value: '',
|
value: dateFormat,
|
||||||
});
|
});
|
||||||
|
|
||||||
startTransition(() => router.refresh());
|
startTransition(() => router.refresh());
|
||||||
|
|||||||
@@ -7,18 +7,26 @@ import { useRouter } from 'next/navigation';
|
|||||||
import { useSession } from 'next-auth/react';
|
import { useSession } from 'next-auth/react';
|
||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
|
|
||||||
import { useAnalytics } from '@documenso/lib/client-only/hooks/use-analytics';
|
import { completeDocumentWithToken } from '@documenso/lib/server-only/document/complete-document-with-token';
|
||||||
import { sortFieldsByPosition, validateFieldsInserted } from '@documenso/lib/utils/fields';
|
import { sortFieldsByPosition, validateFieldsInserted } from '@documenso/lib/utils/fields';
|
||||||
import type { Document, Field, Recipient } from '@documenso/prisma/client';
|
import { Document, Field, Recipient } from '@documenso/prisma/client';
|
||||||
import { trpc } from '@documenso/trpc/react';
|
|
||||||
import { FieldToolTip } from '@documenso/ui/components/field/field-tooltip';
|
import { FieldToolTip } from '@documenso/ui/components/field/field-tooltip';
|
||||||
import { cn } from '@documenso/ui/lib/utils';
|
import { cn } from '@documenso/ui/lib/utils';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
import { Input } from '@documenso/ui/primitives/input';
|
import { Input } from '@documenso/ui/primitives/input';
|
||||||
import { Label } from '@documenso/ui/primitives/label';
|
import { Label } from '@documenso/ui/primitives/label';
|
||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue,
|
||||||
|
} from '@documenso/ui/primitives/select';
|
||||||
import { SignaturePad } from '@documenso/ui/primitives/signature-pad';
|
import { SignaturePad } from '@documenso/ui/primitives/signature-pad';
|
||||||
|
|
||||||
|
import { DATE_FORMATS } from '~/helpers/constants';
|
||||||
|
|
||||||
import { useRequiredSigningContext } from './provider';
|
import { useRequiredSigningContext } from './provider';
|
||||||
import { SignDialog } from './sign-dialog';
|
import { SignDialog } from './sign-dialog';
|
||||||
|
|
||||||
@@ -30,14 +38,14 @@ export type SigningFormProps = {
|
|||||||
|
|
||||||
export const SigningForm = ({ document, recipient, fields }: SigningFormProps) => {
|
export const SigningForm = ({ document, recipient, fields }: SigningFormProps) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const analytics = useAnalytics();
|
|
||||||
const { data: session } = useSession();
|
const { data: session } = useSession();
|
||||||
|
|
||||||
const { fullName, signature, setFullName, setSignature } = useRequiredSigningContext();
|
const { fullName, signature, setFullName, setSignature, dateFormat, setDateFormat } =
|
||||||
|
useRequiredSigningContext();
|
||||||
|
|
||||||
const [validateUninsertedFields, setValidateUninsertedFields] = useState(false);
|
const [validateUninsertedFields, setValidateUninsertedFields] = useState(false);
|
||||||
|
|
||||||
const { mutateAsync: completeDocumentWithToken } =
|
const hasDateField = fields.find((field) => field.type === 'DATE');
|
||||||
trpc.recipient.completeDocumentWithToken.useMutation();
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
@@ -62,12 +70,6 @@ export const SigningForm = ({ document, recipient, fields }: SigningFormProps) =
|
|||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
analytics.capture('App: Recipient has completed signing', {
|
|
||||||
signerId: recipient.id,
|
|
||||||
documentId: document.id,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
});
|
|
||||||
|
|
||||||
router.push(`/sign/${recipient.token}/complete`);
|
router.push(`/sign/${recipient.token}/complete`);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -115,6 +117,30 @@ export const SigningForm = ({ document, recipient, fields }: SigningFormProps) =
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{hasDateField && (
|
||||||
|
<div>
|
||||||
|
<Label htmlFor="date-format">Date Format</Label>
|
||||||
|
|
||||||
|
<Select
|
||||||
|
onValueChange={(value) => {
|
||||||
|
setDateFormat(value);
|
||||||
|
}}
|
||||||
|
defaultValue={dateFormat}
|
||||||
|
>
|
||||||
|
<SelectTrigger className="bg-background mt-2">
|
||||||
|
<SelectValue />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
{DATE_FORMATS.map((format) => (
|
||||||
|
<SelectItem key={format.key} value={format.value}>
|
||||||
|
{format.label}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Label htmlFor="Signature">Signature</Label>
|
<Label htmlFor="Signature">Signature</Label>
|
||||||
|
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
'use client';
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
import Link from 'next/link';
|
|
||||||
|
|
||||||
import { Clock8 } from 'lucide-react';
|
|
||||||
import { useSession } from 'next-auth/react';
|
|
||||||
|
|
||||||
import signingCelebration from '@documenso/assets/images/signing-celebration.png';
|
|
||||||
import type { Document, Signature } from '@documenso/prisma/client';
|
|
||||||
import { SigningCard3D } from '@documenso/ui/components/signing-card';
|
|
||||||
|
|
||||||
type NoLongerAvailableProps = {
|
|
||||||
document: Document;
|
|
||||||
recipientName: string;
|
|
||||||
recipientSignature: Signature;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const NoLongerAvailable = ({
|
|
||||||
document,
|
|
||||||
recipientName,
|
|
||||||
recipientSignature,
|
|
||||||
}: NoLongerAvailableProps) => {
|
|
||||||
const { data: session } = useSession();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="-mx-4 flex max-w-[100vw] flex-col items-center overflow-x-hidden px-4 pt-16 md:-mx-8 md:px-8 lg:pt-16 xl:pt-24">
|
|
||||||
<SigningCard3D
|
|
||||||
name={recipientName}
|
|
||||||
signature={recipientSignature}
|
|
||||||
signingCelebrationImage={signingCelebration}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div className="relative mt-2 flex w-full flex-col items-center">
|
|
||||||
<div className="mt-8 flex items-center text-center text-red-600">
|
|
||||||
<Clock8 className="mr-2 h-5 w-5" />
|
|
||||||
<span className="text-sm">Document Cancelled</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2 className="mt-6 max-w-[35ch] text-center text-2xl font-semibold leading-normal md:text-3xl lg:text-4xl">
|
|
||||||
<span className="mt-1.5 block">"{document.title}"</span>
|
|
||||||
is no longer available to sign
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<p className="text-muted-foreground/60 mt-2.5 max-w-[60ch] text-center text-sm font-medium md:text-base">
|
|
||||||
This document has been cancelled by the owner.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{session?.user ? (
|
|
||||||
<Link href="/documents" className="text-documenso-700 hover:text-documenso-600 mt-36">
|
|
||||||
Go Back Home
|
|
||||||
</Link>
|
|
||||||
) : (
|
|
||||||
<p className="text-muted-foreground/60 mt-36 text-sm">
|
|
||||||
Want to send slick signing links like this one?{' '}
|
|
||||||
<Link
|
|
||||||
href="https://documenso.com"
|
|
||||||
className="text-documenso-700 hover:text-documenso-600"
|
|
||||||
>
|
|
||||||
Check out Documenso.
|
|
||||||
</Link>
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -8,7 +8,6 @@ import { getDocumentAndSenderByToken } from '@documenso/lib/server-only/document
|
|||||||
import { viewedDocument } from '@documenso/lib/server-only/document/viewed-document';
|
import { viewedDocument } from '@documenso/lib/server-only/document/viewed-document';
|
||||||
import { getFieldsForToken } from '@documenso/lib/server-only/field/get-fields-for-token';
|
import { getFieldsForToken } from '@documenso/lib/server-only/field/get-fields-for-token';
|
||||||
import { getRecipientByToken } from '@documenso/lib/server-only/recipient/get-recipient-by-token';
|
import { getRecipientByToken } from '@documenso/lib/server-only/recipient/get-recipient-by-token';
|
||||||
import { getRecipientSignatures } from '@documenso/lib/server-only/recipient/get-recipient-signatures';
|
|
||||||
import { DocumentStatus, FieldType, SigningStatus } from '@documenso/prisma/client';
|
import { DocumentStatus, FieldType, SigningStatus } from '@documenso/prisma/client';
|
||||||
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
import { Card, CardContent } from '@documenso/ui/primitives/card';
|
||||||
import { ElementVisible } from '@documenso/ui/primitives/element-visible';
|
import { ElementVisible } from '@documenso/ui/primitives/element-visible';
|
||||||
@@ -18,7 +17,6 @@ import { DateField } from './date-field';
|
|||||||
import { EmailField } from './email-field';
|
import { EmailField } from './email-field';
|
||||||
import { SigningForm } from './form';
|
import { SigningForm } from './form';
|
||||||
import { NameField } from './name-field';
|
import { NameField } from './name-field';
|
||||||
import { NoLongerAvailable } from './no-longer-available';
|
|
||||||
import { SigningProvider } from './provider';
|
import { SigningProvider } from './provider';
|
||||||
import { SignatureField } from './signature-field';
|
import { SignatureField } from './signature-field';
|
||||||
|
|
||||||
@@ -57,18 +55,6 @@ export default async function SigningPage({ params: { token } }: SigningPageProp
|
|||||||
redirect(`/sign/${token}/complete`);
|
redirect(`/sign/${token}/complete`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const [recipientSignature] = await getRecipientSignatures({ recipientId: recipient.id });
|
|
||||||
|
|
||||||
if (document.deletedAt) {
|
|
||||||
return (
|
|
||||||
<NoLongerAvailable
|
|
||||||
document={document}
|
|
||||||
recipientName={recipient.name}
|
|
||||||
recipientSignature={recipientSignature}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SigningProvider
|
<SigningProvider
|
||||||
email={recipient.email}
|
email={recipient.email}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ export type SigningContextValue = {
|
|||||||
setEmail: (_value: string) => void;
|
setEmail: (_value: string) => void;
|
||||||
signature: string | null;
|
signature: string | null;
|
||||||
setSignature: (_value: string | null) => void;
|
setSignature: (_value: string | null) => void;
|
||||||
|
dateFormat: string;
|
||||||
|
setDateFormat: (_value: string) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
const SigningContext = createContext<SigningContextValue | null>(null);
|
const SigningContext = createContext<SigningContextValue | null>(null);
|
||||||
@@ -31,6 +33,7 @@ export interface SigningProviderProps {
|
|||||||
fullName?: string | null;
|
fullName?: string | null;
|
||||||
email?: string | null;
|
email?: string | null;
|
||||||
signature?: string | null;
|
signature?: string | null;
|
||||||
|
dateFormat?: string | null;
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,11 +41,13 @@ export const SigningProvider = ({
|
|||||||
fullName: initialFullName,
|
fullName: initialFullName,
|
||||||
email: initialEmail,
|
email: initialEmail,
|
||||||
signature: initialSignature,
|
signature: initialSignature,
|
||||||
|
dateFormat: initialDateFormat,
|
||||||
children,
|
children,
|
||||||
}: SigningProviderProps) => {
|
}: SigningProviderProps) => {
|
||||||
const [fullName, setFullName] = useState(initialFullName || '');
|
const [fullName, setFullName] = useState(initialFullName || '');
|
||||||
const [email, setEmail] = useState(initialEmail || '');
|
const [email, setEmail] = useState(initialEmail || '');
|
||||||
const [signature, setSignature] = useState(initialSignature || null);
|
const [signature, setSignature] = useState(initialSignature || null);
|
||||||
|
const [dateFormat, setDateFormat] = useState(initialDateFormat || 'yyyy-MM-dd hh:mm a');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SigningContext.Provider
|
<SigningContext.Provider
|
||||||
@@ -53,6 +58,8 @@ export const SigningProvider = ({
|
|||||||
setEmail,
|
setEmail,
|
||||||
signature,
|
signature,
|
||||||
setSignature,
|
setSignature,
|
||||||
|
dateFormat,
|
||||||
|
setDateFormat,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import { useRouter } from 'next/navigation';
|
|||||||
|
|
||||||
import { Loader } from 'lucide-react';
|
import { Loader } from 'lucide-react';
|
||||||
|
|
||||||
import type { Recipient } from '@documenso/prisma/client';
|
import { Recipient } from '@documenso/prisma/client';
|
||||||
import type { FieldWithSignature } from '@documenso/prisma/types/field-with-signature';
|
import { FieldWithSignature } from '@documenso/prisma/types/field-with-signature';
|
||||||
import { trpc } from '@documenso/trpc/react';
|
import { trpc } from '@documenso/trpc/react';
|
||||||
import { Button } from '@documenso/ui/primitives/button';
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
import { Dialog, DialogContent, DialogFooter, DialogTitle } from '@documenso/ui/primitives/dialog';
|
import { Dialog, DialogContent, DialogFooter, DialogTitle } from '@documenso/ui/primitives/dialog';
|
||||||
@@ -76,16 +76,10 @@ export const SignatureField = ({ field, recipient }: SignatureFieldProps) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const value = source === 'local' && localSignature ? localSignature : providedSignature ?? '';
|
|
||||||
|
|
||||||
if (!value) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await signFieldWithToken({
|
await signFieldWithToken({
|
||||||
token: recipient.token,
|
token: recipient.token,
|
||||||
fieldId: field.id,
|
fieldId: field.id,
|
||||||
value,
|
value: source === 'local' && localSignature ? localSignature : providedSignature ?? '',
|
||||||
isBase64: true,
|
isBase64: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||