Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

update pdf view + cleanup stale assets

AmanRajSinghMouryabb890746d721
diff --git a/mobile/packages/legacy/assets/legacy_kit_sheet_ducky.png b/mobile/packages/legacy/assets/legacy_kit_sheet_ducky.png
deleted file mode 100644
index 4996cf1978..0000000000
Binary files a/mobile/packages/legacy/assets/legacy_kit_sheet_ducky.png and /dev/null differ
diff --git a/mobile/packages/legacy/assets/legacy_kit_sheet_ente_com_badge.svg b/mobile/packages/legacy/assets/legacy_kit_sheet_ente_com_badge.svg
index c7aba571d4..245ad1895c 100644
--- a/mobile/packages/legacy/assets/legacy_kit_sheet_ente_com_badge.svg
+++ b/mobile/packages/legacy/assets/legacy_kit_sheet_ente_com_badge.svg
@@ -1,12 +1,12 @@
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 36.6811 16.1389" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group">
-<path id="Vector" d="M28.6838 0.188966L7.61952 0.711123C3.41138 0.815438 0.0845636 4.31137 0.188878 8.51952C0.293193 12.7277 3.78914 16.0545 7.99728 15.9502L29.0616 15.428C33.2697 15.3237 36.5965 11.8277 36.4922 7.6196C36.3879 3.41146 32.8919 0.0846515 28.6838 0.188966Z" fill="#08C225"/>
+<path id="Vector" d="M28.6838 0.188966L7.61952 0.711123C3.41138 0.815438 0.0845636 4.31137 0.188878 8.51952C0.293193 12.7277 3.78914 16.0545 7.99728 15.9502L29.0616 15.428C33.2697 15.3237 36.5965 11.8277 36.4922 7.6196C36.3879 3.41146 32.8919 0.0846515 28.6838 0.188966Z" fill="#1A1A1A"/>
<g id="Group_2">
<path id="Vector_2" d="M6.07805 11.6029C7.26441 11.6029 8.22615 10.6411 8.22615 9.45477C8.22615 8.26841 7.26441 7.30668 6.07805 7.30668C4.89169 7.30668 3.92996 8.26841 3.92996 9.45477C3.92996 10.6411 4.89169 11.6029 6.07805 11.6029Z" fill="#FFFFFF"/>
<g id="Group_3">
-<path id="Vector_3" d="M12.1216 11.5201C11.1511 11.534 10.34 11.229 9.68973 10.6052C9.03875 9.97339 8.70664 9.18018 8.69275 8.2262C8.67886 7.27223 8.98847 6.47439 9.62092 5.83201C10.2527 5.18169 11.0545 4.84893 12.025 4.83504C12.6496 4.82577 13.2238 4.96801 13.7471 5.25976C13.7524 5.2624 13.7577 5.26571 13.763 5.26836C14.49 5.67919 14.4947 6.72644 13.7755 7.1505L13.6789 7.2074C13.3482 7.40256 12.9413 7.39793 12.6039 7.21335C12.4465 7.12669 12.2645 7.08501 12.0575 7.08832C11.7617 7.09229 11.5163 7.19946 11.3211 7.40917C11.126 7.61889 11.03 7.88021 11.0347 8.1918C11.0393 8.50406 11.1419 8.76207 11.3436 8.96583C11.5447 9.16959 11.7935 9.26948 12.0886 9.26552C12.3082 9.26221 12.4948 9.21458 12.6502 9.1213C12.9863 8.91952 13.4077 8.92481 13.7497 9.11601L13.8139 9.15173C14.5469 9.56057 14.5668 10.6131 13.8457 11.0425C13.8404 11.0458 13.8351 11.0484 13.8304 11.0517C13.3157 11.3547 12.7461 11.5109 12.121 11.5195L12.1216 11.5201Z" fill="#232323"/>
-<path id="Vector_4" d="M17.8514 11.4239C16.906 11.4378 16.0949 11.1282 15.4195 10.4964C14.752 9.86458 14.4113 9.076 14.3974 8.13063C14.3835 7.18526 14.7017 6.38741 15.3507 5.73643C15.9911 5.08546 16.7929 4.75335 17.7548 4.73946C18.7167 4.72557 19.5278 5.03518 20.1867 5.66697C20.8542 6.30736 21.1949 7.09594 21.2088 8.03271C21.2227 8.97809 20.9045 9.77659 20.2555 10.4269C19.6145 11.0779 18.8133 11.41 17.8514 11.4239ZM17.0423 8.90267C17.2481 9.10246 17.5067 9.19971 17.819 9.19508C18.1312 9.19045 18.3826 9.08592 18.5745 8.88018C18.7736 8.65789 18.8715 8.38665 18.8669 8.06579C18.8623 7.74493 18.7571 7.47237 18.5513 7.27258C18.3628 7.06419 18.1081 6.96231 17.7872 6.96694C17.475 6.97157 17.2189 7.08073 17.0191 7.29441C16.828 7.5081 16.7347 7.77537 16.7393 8.09623C16.7439 8.41708 16.8445 8.68568 17.0423 8.90201V8.90267Z" fill="#232323"/>
-<path id="Vector_5" d="M29.1622 4.57473C29.9051 4.56415 30.484 4.78577 30.9001 5.2396C31.3162 5.6941 31.5299 6.34706 31.5425 7.19981L31.5809 9.87781C31.5901 10.5248 31.0735 11.0567 30.4264 11.066C29.7794 11.0752 29.2475 10.5586 29.2383 9.91155L29.2045 7.55044C29.1979 7.06948 28.9789 6.83198 28.5483 6.83794C28.0501 6.84521 27.806 7.16078 27.8146 7.78529L27.8457 9.9314C27.855 10.5784 27.3383 11.1103 26.6913 11.1196C26.0443 11.1288 25.5124 10.6121 25.5031 9.96514L25.4694 7.60403C25.4627 7.12307 25.2438 6.88557 24.8131 6.89152C24.3149 6.8988 24.0708 7.21436 24.0794 7.83888L24.1105 9.98499C24.1198 10.632 23.6031 11.1639 22.9561 11.1732C22.3091 11.1824 21.7772 10.6657 21.7679 10.0187L21.711 6.08243C21.7011 5.40698 22.2409 4.85127 22.9164 4.842L23.4404 4.83473C23.7691 4.8301 24.0391 5.09274 24.0437 5.42153C24.4499 4.90088 25.0202 4.63494 25.7545 4.62435C26.4802 4.61377 27.0115 4.8678 27.3482 5.38647C27.7967 4.85656 28.4001 4.58598 29.1602 4.5754L29.1622 4.57473Z" fill="#232323"/>
+<path id="Vector_3" d="M12.1216 11.5201C11.1511 11.534 10.34 11.229 9.68973 10.6052C9.03875 9.97339 8.70664 9.18018 8.69275 8.2262C8.67886 7.27223 8.98847 6.47439 9.62092 5.83201C10.2527 5.18169 11.0545 4.84893 12.025 4.83504C12.6496 4.82577 13.2238 4.96801 13.7471 5.25976C13.7524 5.2624 13.7577 5.26571 13.763 5.26836C14.49 5.67919 14.4947 6.72644 13.7755 7.1505L13.6789 7.2074C13.3482 7.40256 12.9413 7.39793 12.6039 7.21335C12.4465 7.12669 12.2645 7.08501 12.0575 7.08832C11.7617 7.09229 11.5163 7.19946 11.3211 7.40917C11.126 7.61889 11.03 7.88021 11.0347 8.1918C11.0393 8.50406 11.1419 8.76207 11.3436 8.96583C11.5447 9.16959 11.7935 9.26948 12.0886 9.26552C12.3082 9.26221 12.4948 9.21458 12.6502 9.1213C12.9863 8.91952 13.4077 8.92481 13.7497 9.11601L13.8139 9.15173C14.5469 9.56057 14.5668 10.6131 13.8457 11.0425C13.8404 11.0458 13.8351 11.0484 13.8304 11.0517C13.3157 11.3547 12.7461 11.5109 12.121 11.5195L12.1216 11.5201Z" fill="#FFFFFF"/>
+<path id="Vector_4" d="M17.8514 11.4239C16.906 11.4378 16.0949 11.1282 15.4195 10.4964C14.752 9.86458 14.4113 9.076 14.3974 8.13063C14.3835 7.18526 14.7017 6.38741 15.3507 5.73643C15.9911 5.08546 16.7929 4.75335 17.7548 4.73946C18.7167 4.72557 19.5278 5.03518 20.1867 5.66697C20.8542 6.30736 21.1949 7.09594 21.2088 8.03271C21.2227 8.97809 20.9045 9.77659 20.2555 10.4269C19.6145 11.0779 18.8133 11.41 17.8514 11.4239ZM17.0423 8.90267C17.2481 9.10246 17.5067 9.19971 17.819 9.19508C18.1312 9.19045 18.3826 9.08592 18.5745 8.88018C18.7736 8.65789 18.8715 8.38665 18.8669 8.06579C18.8623 7.74493 18.7571 7.47237 18.5513 7.27258C18.3628 7.06419 18.1081 6.96231 17.7872 6.96694C17.475 6.97157 17.2189 7.08073 17.0191 7.29441C16.828 7.5081 16.7347 7.77537 16.7393 8.09623C16.7439 8.41708 16.8445 8.68568 17.0423 8.90201V8.90267Z" fill="#FFFFFF"/>
+<path id="Vector_5" d="M29.1622 4.57473C29.9051 4.56415 30.484 4.78577 30.9001 5.2396C31.3162 5.6941 31.5299 6.34706 31.5425 7.19981L31.5809 9.87781C31.5901 10.5248 31.0735 11.0567 30.4264 11.066C29.7794 11.0752 29.2475 10.5586 29.2383 9.91155L29.2045 7.55044C29.1979 7.06948 28.9789 6.83198 28.5483 6.83794C28.0501 6.84521 27.806 7.16078 27.8146 7.78529L27.8457 9.9314C27.855 10.5784 27.3383 11.1103 26.6913 11.1196C26.0443 11.1288 25.5124 10.6121 25.5031 9.96514L25.4694 7.60403C25.4627 7.12307 25.2438 6.88557 24.8131 6.89152C24.3149 6.8988 24.0708 7.21436 24.0794 7.83888L24.1105 9.98499C24.1198 10.632 23.6031 11.1639 22.9561 11.1732C22.3091 11.1824 21.7772 10.6657 21.7679 10.0187L21.711 6.08243C21.7011 5.40698 22.2409 4.85127 22.9164 4.842L23.4404 4.83473C23.7691 4.8301 24.0391 5.09274 24.0437 5.42153C24.4499 4.90088 25.0202 4.63494 25.7545 4.62435C26.4802 4.61377 27.0115 4.8678 27.3482 5.38647C27.7967 4.85656 28.4001 4.58598 29.1602 4.5754L29.1622 4.57473Z" fill="#FFFFFF"/>
</g>
</g>
</g>
diff --git a/mobile/packages/legacy/assets/legacy_kit_sheet_ente_wordmark.svg b/mobile/packages/legacy/assets/legacy_kit_sheet_ente_wordmark.svg
deleted file mode 100644
index b4c093b203..0000000000
--- a/mobile/packages/legacy/assets/legacy_kit_sheet_ente_wordmark.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 52 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g id="ente">
-<path d="M13.6522 10.6225H4.54194C4.98205 11.6998 5.9679 12.2384 7.49949 12.2384C8.43252 12.2384 9.23352 11.9294 9.90249 11.3113L13.0713 13.5364C11.7862 15.1788 9.89369 16 7.39386 16C5.1581 16 3.36245 15.3466 2.0069 14.0397C0.668968 12.7152 0 11.0464 0 9.03313C0 7.03755 0.660166 5.36869 1.9805 4.02653C3.30083 2.68437 4.98205 2.01329 7.02417 2.01329C8.99586 2.01329 10.6243 2.67554 11.9094 4.00004C13.1945 5.30688 13.8371 6.96692 13.8371 8.98015C13.8371 9.59825 13.7755 10.1457 13.6522 10.6225ZM4.48913 7.57618H9.5592C9.22472 6.33998 8.39731 5.72189 7.07698 5.72189C5.72144 5.72189 4.85882 6.33998 4.48913 7.57618Z" fill="#08C225"/>
-<path d="M22.8458 2.01329C24.307 2.01329 25.4777 2.5166 26.3579 3.52322C27.2557 4.51218 27.7046 5.90732 27.7046 7.70863V15.6291H23.3211V8.26492C23.3211 7.59384 23.1451 7.0817 22.793 6.7285C22.4409 6.35764 21.9568 6.17222 21.3406 6.17222C20.6541 6.17222 20.1171 6.38414 19.7298 6.80798C19.3601 7.21416 19.1753 7.80576 19.1753 8.5828V15.6291H14.7918V2.38415H19.1753V3.70865C19.9675 2.57841 21.191 2.01329 22.8458 2.01329Z" fill="#08C225"/>
-<path d="M37.1707 2.38415V6.59605H34.8169V10.4371C34.8169 11.0022 35.0105 11.3643 35.3978 11.5232C35.8027 11.6645 36.5245 11.7086 37.5632 11.6556V15.6291C34.9577 15.947 33.1092 15.7086 32.0178 14.9139C30.9615 14.0839 30.4334 12.6269 30.4334 10.5431V6.59605H28.4529V2.38415H30.4334V4.91285e-05L34.8169 0V2.38415H37.1707Z" fill="#08C225"/>
-<path d="M51.8152 10.6225H42.7049C43.145 11.6998 44.1308 12.2384 45.6624 12.2384C46.5954 12.2384 47.3964 11.9294 48.0654 11.3113L51.2342 13.5364C49.9491 15.1788 48.0566 16 45.5568 16C43.321 16 41.5254 15.3466 40.1698 14.0397C38.8319 12.7152 38.1629 11.0464 38.1629 9.03313C38.1629 7.03755 38.8231 5.36869 40.1434 4.02653C41.4638 2.68437 43.145 2.01329 45.1871 2.01329C47.1588 2.01329 48.7872 2.67554 50.0723 4.00004C51.3574 5.30688 52 6.96692 52 8.98015C52 9.59825 51.9384 10.1457 51.8152 10.6225ZM42.6521 7.57618H47.7221C47.3876 6.33998 46.5602 5.72189 45.2399 5.72189C43.8844 5.72189 43.0217 6.33998 42.6521 7.57618Z" fill="#08C225"/>
-</g>
-</svg>
diff --git a/mobile/packages/legacy/assets/legacy_kit_sheet_hero_bg_left.svg b/mobile/packages/legacy/assets/legacy_kit_sheet_hero_bg_left.svg
deleted file mode 100644
index 4391442194..0000000000
--- a/mobile/packages/legacy/assets/legacy_kit_sheet_hero_bg_left.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 391.313 261.08" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path id="Vector 603" d="M100.825 16.7423C89.3842 12.8992 65.9279 8.0388 53.7133 9.41943C53.4861 9.43762 53.2608 9.45711 53.0374 9.47791C50.2404 9.74205 47.4969 10.2119 44.8567 11.1654C41.6934 12.3923 38.5974 14.0579 38.171 18.187C37.6557 22.7229 40.7641 30.3149 47.4568 39.4135C47.5127 39.4902 47.569 39.5668 47.6257 39.6434C51.3295 44.521 56.1801 48.3756 61.7919 51.2921C128.887 74.7961 204.788 43.3967 275.461 28.1796C276.366 27.9537 277.281 27.7263 278.2 27.4989C296.195 23.1062 318.272 17.7759 333.689 17.8481C333.819 17.8493 333.949 17.8505 334.076 17.8519C343.512 18.0333 351.16 18.2434 358.52 20.2837C358.747 20.354 358.956 20.4218 359.183 20.4998C359.447 20.5903 359.703 20.6838 359.951 20.7811C360.466 20.9859 360.846 21.1511 361.41 21.4463C361.981 21.7521 362.463 22.0522 363.014 22.5077C363.66 23.0676 364.171 23.5697 364.697 24.6382C365.189 25.66 365.309 26.9224 365.079 27.9573C364.817 29.0863 364.479 29.6188 364.049 30.2641C363.294 31.3245 362.457 32.0198 361.773 32.5508C358.843 34.7 356.289 35.7224 353.79 36.7781C335.928 43.7273 317.663 46.9958 299.245 49.7488C279.586 52.7924 258.861 54.7062 241.335 62.1385C239.263 63.162 237.352 64.4088 236.414 65.7205C235.56 67.0072 235.635 67.7717 236.747 69.4667C239.087 72.6278 243.572 75.3031 247.747 77.5427C256.594 82.1555 265.745 85.5783 275.245 88.9203C280.778 90.8468 286.387 92.6727 292.318 94.5122C304.217 98.2032 315.979 102.305 327.527 106.942C343.362 113.369 358.887 120.51 373.196 130.171C377.447 133.057 381.345 136.016 384.817 139.509C387.973 143.01 392.411 147.159 391.066 154.009C389.618 158.743 385.371 160.444 382.608 161.435C379.515 162.46 376.623 162.885 373.747 163.175C368.265 163.697 362.902 163.539 358.512 163.279C345.551 162.467 331.87 160.054 319.226 157.372C310.347 155.48 301.941 153.501 294.603 151.697C291.7 150.983 288.976 150.3 286.442 149.657C272.346 146.219 258.323 142.523 244.335 138.771C243.409 138.486 242.478 138.197 241.533 137.903C229.712 134.259 215.129 130.113 192.015 124.157C181.944 121.596 170.265 118.702 156.432 115.849C147.508 114.029 142.931 113.116 139.187 112.367C138.085 112.15 137.082 111.956 136.015 111.764C132.37 111.112 128.61 110.713 124.042 110.347C118.212 109.902 111.115 109.456 101.858 109.198C72.2132 108.703 59.8698 115.296 51.4451 119.588C49.2243 120.809 47.25 122.022 45.2919 123.309C45.0373 123.476 44.7865 123.642 44.5391 123.807C37.343 128.249 27.953 137.376 33.6373 144.745C36.6536 150.711 49.4999 159.144 59.3421 164.601C63.0771 166.726 68.1391 169.611 74.1275 173.051C80.3224 176.624 87.5008 180.782 95.014 185.609C114.019 197.841 122.63 207.319 127.982 215.861C129.518 218.358 130.733 220.748 131.768 223.302C133.551 227.692 134.837 233.008 134.86 238.801C134.814 243.744 134.415 248.663 131.161 253.69C126.652 260.616 117.771 261.603 111.839 260.88C105.623 260.217 100.083 258.351 95.6989 256.73C72.6656 247.254 52.8058 233.099 33.4928 218.614C23.5395 211.027 14.6719 203.307 8.34432 196.943C2.30934 190.754 -1.07133 186.55 0.305568 185.298C0.412165 185.753 4.47953 188.326 11.2833 193.596C18.3084 198.952 27.5271 206.005 37.4317 213.391C57.2588 227.935 77.9667 242.318 100.57 250.792C107.187 253.086 114.444 254.878 120.162 253.283C125.742 251.915 127.874 245.663 127.767 238.801C127.897 224.439 118.126 211.921 106.704 202.363C90.9062 189.127 71.925 179.577 53.6283 168.587C51.8082 167.489 49.807 166.253 47.9974 165.092C40.4231 160.165 32.3969 155.403 27.3489 146.65C24.8327 142.306 24.7541 136.108 26.9396 131.982C29.0563 127.68 31.9001 125.033 34.3823 122.85C37.1506 120.513 39.1012 119.2 41.6776 117.566C47.2804 114.074 52.2131 111.901 56.6721 110.233C61.0249 108.622 64.9412 107.506 68.9401 106.515C71.0615 105.991 74.0642 105.32 77.6026 104.73C92.2411 101.937 117.362 102.423 139.482 106.37C149.333 108.004 160.634 110.444 171.303 113.055C186.597 116.789 200.665 120.77 207.801 122.593C220.353 125.813 234.636 129.872 247.253 133.397C259.282 136.765 269.838 139.629 275.876 141.039C283.107 142.729 289.216 144.343 298.337 146.614C304.122 148.046 311.118 149.746 320.404 151.728C321.31 151.921 322.227 152.113 323.154 152.304C335.34 154.802 344.123 156.219 351.585 157.125C361.934 158.155 370.291 159.368 380.993 156.397C383.776 155.475 386.084 153.741 386.048 151.9C386.186 149.882 384.519 147.159 382.58 144.925C378.627 140.41 373.64 136.798 369.24 133.767C365.108 130.953 360.455 128.19 355.192 125.37C348.399 121.73 341.03 118.269 334.126 115.207C328.571 112.743 323.874 110.703 319.668 108.94C318.315 108.375 317.138 107.887 315.922 107.396C311.298 105.681 306.705 104.068 301.985 102.493C301.21 102.261 300.39 102.019 299.572 101.781C297.078 101.055 294.199 100.236 290.844 99.2901C288.533 98.6365 286.11 97.9287 283.602 97.1591C273.367 93.9972 264.58 90.8408 255.441 86.887C248.378 83.5665 240.944 80.935 233.553 73.6728C232.36 72.2869 231.156 70.6878 230.76 68.244C230.336 65.8451 231.536 63.2217 232.949 61.7293C235.892 58.5971 239.373 57.1197 242.748 55.7011C252.882 51.7725 263.146 49.8975 270.203 48.5994C272.865 48.1341 275.159 47.8401 277.444 47.5582C277.454 47.5571 277.464 47.556 277.474 47.555C277.63 47.5358 277.786 47.5165 277.941 47.4974C284.776 46.3292 291.612 45.2795 298.44 44.2466C308.81 42.6725 319.04 40.7112 329.185 38.1875C330.586 37.819 332.123 37.4036 333.522 37.0084C340.579 35.0358 347.24 32.7198 351.303 30.7928C352.335 30.3031 353.904 29.5763 355.545 28.6154C356.358 28.136 357.208 27.5815 357.852 27.0127C358.156 26.7495 358.417 26.4397 358.448 26.361C358.464 26.3345 358.415 26.3644 358.361 26.6057C358.306 26.8311 358.329 27.2319 358.443 27.5015C358.561 27.7878 358.651 27.8527 358.644 27.8565C358.628 27.8459 358.544 27.7821 358.39 27.696C358.011 27.4887 357.634 27.3346 356.984 27.1232C356.474 26.9609 355.809 26.7867 355.116 26.6384C354.496 26.506 353.792 26.3766 352.999 26.2542C350.148 25.819 346.91 25.5799 343.619 25.444C340.394 25.3136 337.108 25.2818 333.689 25.311C328.801 25.3598 323.392 26.0556 319.135 26.7417C314.798 27.4419 310.975 28.0315 306.725 28.7614C302.986 29.4003 298.852 30.1812 294.639 31.1603C292.478 31.6618 290.09 32.259 287.681 32.8766C285.534 33.4262 283.167 34.0398 280.753 34.6567C278.61 35.2041 273.406 36.4299 267.092 37.9567C263.081 38.9266 258.61 40.0182 253.841 41.1972C241.359 44.462 228.839 47.7378 216.267 50.848C213.669 51.5718 211.415 52.2324 209.641 52.8089C208.367 53.2227 207.292 53.6094 206.189 54.0038C204.688 54.5407 203.132 55.0945 200.959 55.7452C199.26 56.2539 197.236 56.7591 195.855 57.0182C195.213 57.139 194.714 57.2066 194.261 57.2679C193.742 57.3382 193.279 57.4006 192.724 57.5239C192.324 57.6129 191.914 57.7348 191.41 57.8836C190.604 58.121 189.556 58.429 187.937 58.7788C181.895 60.0849 175.04 61.4536 168.233 62.6847C160.725 64.0473 153.337 65.2177 147.362 66.084C140.778 67.0479 131.221 68.1091 121.609 68.6067C114.873 68.9662 108.14 69.0432 102.331 68.8756C96.6369 68.7169 90.731 68.3825 84.8974 67.6269C78.0225 66.7537 71.249 65.203 65.8446 63.1319C64.7761 62.7253 63.3637 62.0579 61.7358 61.1814C60.5707 60.5546 59.2814 59.8181 57.8175 58.9248C51.1807 55.4835 45.1428 50.6946 40.5819 44.5475C40.5467 44.5002 40.5116 44.453 40.4765 44.4058C40.3002 44.1973 40.1204 43.983 39.942 43.7695C39.9391 43.7662 39.9362 43.7629 39.9332 43.7596C36.486 38.9806 29.6747 33.2942 28.6567 19.21C28.7325 15.549 29.7667 13.0959 30.8962 11.2307C32.0571 9.38206 33.3358 7.95169 35.4128 6.30887C37.7142 4.49832 40.8071 2.96739 43.9482 1.98139C48.485 0.542377 53.5584 -0.0812159 58.5484 0.00842428C58.8809 0.0147338 59.2398 0.0237565 59.6151 0.0353589C63.2489 0.132268 68.4347 0.594842 73.5485 1.5682C88.7271 3.80287 103.462 7.74909 117.42 14.7448C121.219 16.815 125.044 18.8385 128.357 22.8592C141.201 35.2336 164.716 37.8286 184.262 37.3715C196.015 36.8781 207.129 34.4787 214.063 30.3306C221.055 26.2606 222.833 21.4353 223.683 21.7878C224.369 21.8117 224.033 27.9899 216.561 33.9435C209.205 39.8524 197.055 43.2 184.607 43.9048C164.381 44.4388 143.552 43.3647 125.178 30.2207C124.29 29.457 123.319 28.4873 122.529 27.5002C122.51 27.4761 122.491 27.452 122.471 27.4278C118.781 23.3913 111.569 20.4578 105.345 18.2292C103.833 17.6988 102.35 17.2142 100.825 16.7423Z" fill="#43E45B" fill-opacity="0.18"/>
-</svg>
diff --git a/mobile/packages/legacy/assets/legacy_kit_sheet_hero_bg_right.svg b/mobile/packages/legacy/assets/legacy_kit_sheet_hero_bg_right.svg
deleted file mode 100644
index b5045a18e8..0000000000
--- a/mobile/packages/legacy/assets/legacy_kit_sheet_hero_bg_right.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 160.786 145.471" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path id="Vector 604" d="M129.175 16.997C126.035 19.3227 119.556 21.6049 116.065 22.6377C116.002 22.6568 115.94 22.676 115.877 22.6952C115.066 22.941 114.286 23.1861 113.346 23.4725C111.184 24.1211 108.189 25.0352 101.946 26.3581C100.153 26.8172 98.3467 27.2549 96.5402 27.6696C87.3954 29.7645 78.1756 31.373 68.8846 32.6197C58.547 34.0056 48.2204 35.353 38.0322 37.0914C37.7895 37.14 37.5434 37.1896 37.2955 37.2399C32.5022 38.1989 26.6719 39.5603 23.0292 40.4205C18.3914 41.4952 15.3111 42.4217 12.9791 43.2591C-6.55073 48.7104 18.0653 59.9827 30.1235 65.0501C34.4764 66.848 38.9955 68.5421 43.7697 70.2081C47.7587 71.6015 52.3787 73.1167 56.46 74.3893C58.2681 74.9009 60.0676 75.3917 61.8254 75.8622C62.4915 76.0401 63.1422 76.2147 63.7766 76.3861C66.9818 77.2524 69.7485 78.0305 72.0297 78.748C77.6526 80.5127 83.7876 82.8453 88.305 84.6586C89.0429 84.9538 89.7038 85.2214 90.3813 85.4947C94.142 86.8722 97.5878 88.1794 101.324 89.6685C101.553 89.7986 101.783 89.9308 102.016 90.0654C104.863 91.7277 108.709 93.3469 114.478 96.0324C117.102 97.2604 119.861 98.5838 123.363 100.416C125.566 101.574 126.482 102.263 127.4 102.915C127.656 103.099 127.894 103.272 128.138 103.44C128.972 104.016 129.944 104.423 131.067 104.905C132.466 105.497 134.374 106.354 136.409 107.823C143.033 112.631 145.982 114.48 148.404 115.981C149.105 116.425 149.721 116.827 150.308 117.266C152.273 118.724 154.803 121.326 156.336 123.557C157.574 125.42 160.626 128.795 160.779 133.439C160.874 135.071 160.007 137.742 158.184 139.439C156.229 141.333 153.915 142.355 151.301 143.233C144.899 145.134 141.739 145.045 139.109 145.298C138.347 145.346 137.602 145.381 136.869 145.409C134.876 145.501 131.85 145.487 129.265 145.396C126.062 145.29 122.622 145.046 120.194 144.879C113.572 144.057 107.336 142.972 100.953 141.711C97.4803 141.025 94.7568 140.119 92.4845 139.044C90.2789 137.98 89.0876 136.915 89.2588 136.11C89.4245 135.303 90.9383 134.812 93.3596 134.676C95.8478 134.553 98.6658 134.724 102.1 135.27C108.637 136.297 114.942 137.127 121.623 137.727C129.506 138.398 137.529 138.801 144.936 137.849C150.026 137.311 155.19 134.99 154.421 132.877C154.401 132.604 154.344 132.279 154.233 131.901C153.076 128.891 149.55 125.612 147.315 123.673C145.369 121.989 143.895 120.708 142.658 119.651C141.822 118.939 141.036 118.298 140.17 117.697C139.697 117.369 139.064 116.943 138.334 116.467C135.232 114.416 129.767 111.187 124.717 108.25C122.465 106.93 119.939 105.425 117.362 103.965C113.882 101.973 110.315 100.088 108.592 99.3846C105.423 98.0783 101.87 96.4326 98.6938 95.0215C95.5754 93.637 93.033 92.5548 91.4184 92.0714C89.5295 91.5108 87.904 90.8156 85.665 89.8737C84.0834 89.2109 82.1248 88.3987 79.3578 87.3789C76.2664 86.2401 74.0769 85.3727 72.1818 84.6307C69.467 83.5741 67.5879 82.8485 64.4847 82.0586C63.0872 81.7043 61.6556 81.3326 60.254 80.9548C58.1385 80.3815 56.1829 79.799 54.5575 79.2391C53.2966 78.8052 51.9287 78.3722 50.426 77.8883C48.3305 77.2132 46.2104 76.5142 44.3728 75.8047C42.8818 75.2282 41.634 74.6232 40.479 74.0643C40.1257 73.8924 39.7895 73.7281 39.4652 73.5729C38.1996 73.1227 36.9692 72.6782 35.773 72.2401C35.5707 72.1926 35.3583 72.1441 35.1379 72.0933C34.0012 71.827 32.4484 71.4342 30.7586 70.87C28.1681 70.0101 25.6939 68.8989 23.3749 67.7861C21.7065 66.9814 19.4373 65.8692 17.3692 64.8805C15.8759 64.1697 13.9693 63.2529 12.405 62.4367C11.0436 61.7206 9.77752 60.9996 8.72896 60.3384C7.53444 59.5831 6.50037 58.8287 5.77755 58.2093C5.20345 57.7215 4.67443 57.1297 4.2702 56.6108C4.26846 56.6083 4.26674 56.6059 4.26501 56.6034C4.23666 56.5674 4.20829 56.5314 4.18035 56.4954C2.38066 54.752 0.234355 52.5828 0.00243258 48.9268C-0.0907941 45.1444 2.51467 42.6233 4.51301 41.0905C4.87727 40.7903 5.29605 40.4772 5.62856 40.2361C7.43365 38.9442 9.21614 38.0058 10.4407 37.2954C11.6154 36.574 15.0153 35.1642 18.5106 34.0363C20.8694 33.2636 23.1918 32.5868 25.1697 32.0038C26.285 31.673 27.4035 31.5198 28.5718 31.3679C29.6478 31.2295 30.7098 31.1043 31.8923 30.8314C32.477 30.6963 33.1351 30.5175 33.7884 30.3392C34.3691 30.181 34.9877 30.0147 35.6442 29.8601C36.2443 29.7183 37.6723 29.4995 39.4073 29.2537C40.4918 29.0993 41.745 28.9249 43.0511 28.7383C46.4363 28.0808 49.8583 27.4578 53.2725 26.8625C53.9689 26.6611 54.5689 26.4485 55.0355 26.2232C55.3703 26.0616 55.65 25.8872 55.9377 25.7089C56.3291 25.4661 56.7347 25.2153 57.3108 24.9771C57.7603 24.791 58.3019 24.662 58.6784 24.6538C58.8536 24.65 58.992 24.6719 59.1175 24.6917C59.2613 24.7144 59.3897 24.7345 59.5391 24.7108C59.6468 24.6937 59.7545 24.6461 59.887 24.5881C60.0985 24.4955 60.3739 24.3757 60.8098 24.3077C62.4316 24.0545 64.2845 23.8054 66.0918 23.5648C66.5764 23.5003 67.0579 23.4363 67.5311 23.3729C69.0161 23.174 70.4122 22.9712 71.5695 22.771C73.2841 22.4752 75.7592 22.1863 78.2323 21.8658C79.9785 21.6392 81.6502 21.4117 83.1557 21.1572C84.6178 20.9103 86.0462 20.5627 87.509 20.1992C89.248 19.7663 90.842 19.3505 92.3062 19.1297C92.5972 19.0862 92.9793 19.1293 93.4562 19.1822C93.7941 19.2197 94.1818 19.2617 94.6148 19.2823C96.4121 18.8696 98.1969 18.4471 99.9828 18.008C100.042 17.9755 100.104 17.9422 100.165 17.9086C100.166 17.9079 100.167 17.9073 100.168 17.9066C101.544 17.1475 103.4 16.1104 106.231 15.6471C106.934 15.5334 107.458 15.5402 107.891 15.5563C108.324 15.57 108.709 15.582 109.221 15.4545C109.798 15.3109 110.451 15.0251 111.184 14.6998C112.208 14.2444 113.253 13.7555 114.487 13.4708C114.569 13.4522 114.656 13.4323 114.747 13.4113C115.596 13.217 116.876 12.9075 118.173 12.7062C121.639 11.4449 125.583 9.79926 127.496 8.12132C127.664 7.96773 127.758 7.85464 127.78 7.83559C127.788 7.83216 127.772 7.8662 127.75 7.9454C127.722 8.03801 127.688 8.19888 127.689 8.39509C127.673 8.79216 127.903 9.27148 128.003 9.3613C128.114 9.48325 128.076 9.40191 127.961 9.31793C127.679 9.10517 127.185 8.8518 126.503 8.60036C125.939 8.38673 125.181 8.16247 124.473 7.98472C121.531 7.25895 118.381 6.86575 115.152 6.55865C111.943 6.26157 108.922 5.81032 106.726 5.17131C104.519 4.53294 103.128 3.75888 103.135 2.94974C103.128 2.14324 104.522 1.3554 106.789 0.77898C109.044 0.205121 112.182 -0.100799 115.576 0.0299568C118.217 0.130671 121.071 0.3227 123.762 0.698828C125.275 0.919303 126.608 1.15417 128.137 1.57287C129.66 2.06501 131.24 2.34477 133.351 4.27179C133.813 4.73409 134.209 5.1797 134.63 6.03125C135.386 7.50663 135.308 9.45904 134.828 10.6789C134.429 11.8111 133.787 12.6855 133.335 13.2551C133.085 13.5654 132.813 13.8673 132.551 14.1379C132.329 14.3723 132.101 14.5994 131.864 14.8217C131.383 15.2713 130.888 15.6844 130.462 16.0294C130.058 16.3561 129.594 16.6984 129.175 16.997Z" fill="#43E45B" fill-opacity="0.18"/>
-</svg>
diff --git a/mobile/packages/legacy/assets/legacy_kit_sheet_person_icon.svg b/mobile/packages/legacy/assets/legacy_kit_sheet_person_icon.svg
deleted file mode 100644
index 5b1e33bbbe..0000000000
--- a/mobile/packages/legacy/assets/legacy_kit_sheet_person_icon.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 9 11" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path id="Vector" d="M1.7595 2.67964C1.7595 1.96888 2.04832 1.28722 2.56215 0.784807C3.0765 0.282411 3.77315 0 4.50006 0C5.22696 0 5.92358 0.282397 6.43796 0.784807C6.95178 1.2872 7.24061 1.96889 7.24061 2.67964C7.24061 3.38988 6.95179 4.07152 6.43796 4.57393C5.92361 5.07686 5.22696 5.35874 4.50006 5.35874C3.77315 5.35874 3.07653 5.07687 2.56215 4.57393C2.04833 4.07154 1.7595 3.38985 1.7595 2.67964ZM4.89815 5.64116H4.10199C3.01431 5.64222 1.97204 6.0653 1.20288 6.81731C0.434312 7.56933 0.00162 8.58841 0 9.65198C0.000540831 10.0745 0.295851 10.4421 0.715569 10.5431C1.95307 10.8472 3.22408 11.0005 4.5 11C5.7759 11.0005 7.047 10.8472 8.28443 10.5431C8.70414 10.4421 8.99946 10.0745 9 9.65198C8.99838 8.58847 8.56569 7.56937 7.79712 6.81731C7.028 6.0653 5.9859 5.64222 4.89815 5.64116Z" fill="#FFFFFF"/>
-</svg>
diff --git a/mobile/packages/legacy/lib/services/legacy_kit_pdf_service.dart b/mobile/packages/legacy/lib/services/legacy_kit_pdf_service.dart
index 3819ad42d7..344f92cc4a 100644
--- a/mobile/packages/legacy/lib/services/legacy_kit_pdf_service.dart
+++ b/mobile/packages/legacy/lib/services/legacy_kit_pdf_service.dart
@@ -1,6 +1,7 @@
import "dart:convert";
import "package:ente_legacy/models/legacy_kit_models.dart";
+import "package:flutter/foundation.dart";
import "package:flutter/services.dart";
import "package:pdf/pdf.dart";
import "package:pdf/widgets.dart" as pw;
@@ -10,18 +11,11 @@ class LegacyKitPdfService {
static const String _shareMetadataPrefix = "ente-legacy-kit-share-v1:";
static const String _assetRoot = "packages/ente_legacy/assets";
- static const String _duckyAsset = "$_assetRoot/legacy_kit_sheet_ducky.png";
- static const String _heroBgLeftAsset =
- "$_assetRoot/legacy_kit_sheet_hero_bg_left.svg";
- static const String _heroBgRightAsset =
- "$_assetRoot/legacy_kit_sheet_hero_bg_right.svg";
static const String _logoAsset = "$_assetRoot/legacy_kit_sheet_logo.svg";
static const String _enteLogoBlackAsset =
"$_assetRoot/legacy_kit_sheet_ente_logo_black.svg";
static const String _enteComBadgeAsset =
"$_assetRoot/legacy_kit_sheet_ente_com_badge.svg";
- static const String _personIconAsset =
- "$_assetRoot/legacy_kit_sheet_person_icon.svg";
static const String _nunitoExtraBoldAsset =
"$_assetRoot/fonts/Nunito-ExtraBold.ttf";
static const String _nunitoBlackAsset = "$_assetRoot/fonts/Nunito-Black.ttf";
@@ -30,20 +24,20 @@ class LegacyKitPdfService {
static const String _interBoldAsset = "assets/fonts/Inter-Bold.ttf";
static const PdfPageFormat _sheetPageFormat = PdfPageFormat(676, 900);
- static const PdfColor _background = PdfColor.fromInt(0xFFFAFAFA);
static const PdfColor _green = PdfColor.fromInt(0xFF08C225);
- static const PdfColor _blue = PdfColor.fromInt(0xFF1071FF);
- static const PdfColor _heroBadge = PdfColor.fromInt(0xFF0A48A3);
static const PdfColor _dark = PdfColor.fromInt(0xFF212121);
static const PdfColor _black = PdfColor.fromInt(0xFF000000);
static const PdfColor _white = PdfColor.fromInt(0xFFFFFFFF);
- static const PdfColor _muted = PdfColor.fromInt(0xFF969696);
- static const PdfColor _textLight = PdfColor.fromInt(0xFF999999);
+ static const PdfColor _card = PdfColor.fromInt(0xFFEAEAEA);
+ static const PdfColor _divider = PdfColor.fromInt(0xFFD9D9D9);
+ static const PdfColor _stepNumber = PdfColor.fromInt(0xFF5B5B5B);
+ static const PdfColor _bodyText = PdfColor(0, 0, 0, 0.86);
+ static const PdfColor _chipBackground = PdfColor.fromInt(0xFF484848);
+ static const PdfColor _chipLabel = PdfColor.fromInt(0xFFF4F4F4);
static const PdfColor _copyCodeBackground = PdfColor.fromInt(0xFF666666);
- static const PdfColor _chipBackground = PdfColor.fromInt(0xFF0A0A0A);
static const List<PdfColor> _holderChipColors = [
- PdfColor.fromInt(0xFFFFA939),
- PdfColor.fromInt(0xFFF24822),
+ PdfColor.fromInt(0xFFFF6060),
+ PdfColor.fromInt(0xFF1EA8FE),
];
Future<Uint8List> buildRecoverySheet({
@@ -78,15 +72,10 @@ class LegacyKitPdfService {
final baseFont = interMedium ?? interRegular;
return _SheetAssets(
- duckyImage: await _loadImage(_duckyAsset),
- heroBgLeftSvg: await _loadSvg(_heroBgLeftAsset),
- heroBgRightSvg: await _loadSvg(_heroBgRightAsset),
logoSvg: await _loadSvg(_logoAsset),
enteLogoBlackSvg: await _loadSvg(_enteLogoBlackAsset),
enteComBadgeSvg: await _loadSvg(_enteComBadgeAsset),
- personIconSvg: await _loadSvg(_personIconAsset),
nunitoExtraBold: nunitoExtraBold ?? nunitoBlack,
- nunitoBlack: nunitoBlack,
theme: baseFont == null && interBold == null
? null
: pw.ThemeData.withFont(base: baseFont, bold: interBold ?? baseFont),
@@ -101,15 +90,6 @@ class LegacyKitPdfService {
}
}
- Future<Uint8List?> _loadImage(String asset) async {
- try {
- final bytes = await rootBundle.load(asset);
- return bytes.buffer.asUint8List(bytes.offsetInBytes, bytes.lengthInBytes);
- } catch (_) {
- return null;
- }
- }
-
Future<pw.Font?> _loadFont(String asset) async {
try {
return pw.Font.ttf(await rootBundle.load(asset));
@@ -176,59 +156,237 @@ class LegacyKitPdfService {
width: _sheetPageFormat.width,
height: _sheetPageFormat.height,
child: pw.Container(
- color: _background,
+ color: _white,
child: pw.Stack(
fit: pw.StackFit.expand,
children: [
- pw.Positioned(left: 42, top: 66, child: _header(assets)),
- pw.Positioned(left: 550, top: 52, child: _enteLockup(assets)),
pw.Positioned(
- left: 456,
- top: 97,
+ left: 11,
+ top: 135,
+ child: pw.Container(
+ width: 654,
+ height: 752,
+ decoration: const pw.BoxDecoration(
+ color: _card,
+ borderRadius: pw.BorderRadius.all(pw.Radius.circular(24)),
+ ),
+ ),
+ ),
+ pw.Positioned(left: 269, top: 52, child: _header(assets)),
+ pw.Positioned(
+ left: 84,
+ top: 178,
+ child: _accountEmailPill(accountEmail, assets),
+ ),
+ pw.Positioned(
+ left: 84,
+ top: 223,
+ child: pw.SizedBox(
+ width: 506,
+ // Holder names are unbounded, so the greeting can wrap. The
+ // description follows it in flow instead of at a fixed offset.
+ child: pw.Column(
+ crossAxisAlignment: pw.CrossAxisAlignment.start,
+ children: [
+ pw.SizedBox(
+ width: 451,
+ child: pw.Text(
+ "Hi ${share.partName}, store this somewhere safe",
+ maxLines: 2,
+ style: pw.TextStyle(
+ color: _black,
+ fontSize: 21,
+ font: assets.nunitoExtraBold,
+ fontWeight: pw.FontWeight.bold,
+ lineSpacing: 5,
+ ),
+ ),
+ ),
+ pw.SizedBox(height: 22),
+ pw.Text(
+ "You can use this with any other part to get access to my "
+ "Ente account that contains important information.",
+ style: const pw.TextStyle(
+ color: _bodyText,
+ fontSize: 14.4,
+ lineSpacing: 6.5,
+ ),
+ ),
+ pw.SizedBox(height: 24),
+ pw.Container(
+ width: 504,
+ height: 2,
+ // A pill radius is clamped by Flutter but not by the PDF
+ // renderer, which would balloon this 2pt rule into a blob.
+ decoration: const pw.BoxDecoration(
+ color: _divider,
+ borderRadius: pw.BorderRadius.all(
+ pw.Radius.circular(1),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ pw.Positioned(
+ left: 90,
+ top: 386,
child: pw.Text(
- "Protect your digital life",
+ "How to recover the account?",
style: pw.TextStyle(
color: _black,
- fontSize: 15.7,
+ fontSize: 27,
font: assets.nunitoExtraBold,
fontWeight: pw.FontWeight.bold,
),
),
),
pw.Positioned(
- left: 42,
- top: 162,
- child: _hero(accountEmail, share, assets),
+ left: 87,
+ top: 451,
+ child: _step(
+ "1",
+ pw.Text(
+ "Get another part from",
+ style: const pw.TextStyle(color: _black, fontSize: 14),
+ ),
+ trailing: _holderChips(otherShares),
+ ),
),
pw.Positioned(
- left: 66,
- top: 418,
+ left: 87,
+ top: 512,
+ child: _step("2", _visitLabel(recoveryUrl)),
+ ),
+ pw.Positioned(left: 217, top: 573, child: _qrCard(qrPayload)),
+ if (kDebugMode)
+ pw.Positioned(
+ left: 217,
+ top: 831,
+ child: _copyCodeBlock(copyCode),
+ ),
+ pw.Positioned(left: 573, top: 812, child: _enteLockup(assets)),
+ pw.Positioned(
+ left: 504,
+ top: 845,
child: pw.Text(
- "How to recover the account?",
+ "Protect your digital life",
style: pw.TextStyle(
color: _black,
- fontSize: 20,
+ fontSize: 12.6,
font: assets.nunitoExtraBold,
fontWeight: pw.FontWeight.bold,
),
),
),
- pw.Positioned(
- left: 42,
- top: 453,
- child: _recoveryBlock(
- qrPayload,
- copyCode,
- otherShares,
- recoveryUrl,
- ),
- ),
],
),
),
);
}
+ pw.Widget _accountEmailPill(String accountEmail, _SheetAssets assets) {
+ return pw.Container(
+ width: 200,
+ height: 29,
+ alignment: pw.Alignment.center,
+ padding: const pw.EdgeInsets.symmetric(horizontal: 12),
+ decoration: const pw.BoxDecoration(
+ color: _white,
+ borderRadius: pw.BorderRadius.all(pw.Radius.circular(11)),
+ ),
+ child: pw.FittedBox(
+ fit: pw.BoxFit.scaleDown,
+ child: pw.Text(
+ accountEmail,
+ maxLines: 1,
+ style: pw.TextStyle(
+ color: _black,
+ fontSize: 16.4,
+ font: assets.nunitoExtraBold,
+ fontWeight: pw.FontWeight.bold,
+ ),
+ ),
+ ),
+ );
+ }
+
+ pw.Widget _qrCard(String qrPayload) {
+ return pw.Container(
+ width: 242,
+ height: 242,
+ padding: const pw.EdgeInsets.all(28),
+ decoration: const pw.BoxDecoration(
+ color: _white,
+ borderRadius: pw.BorderRadius.all(pw.Radius.circular(24)),
+ ),
+ child: pw.BarcodeWidget(barcode: pw.Barcode.qrCode(), data: qrPayload),
+ );
+ }
+
+ pw.Widget _step(String number, pw.Widget label, {pw.Widget? trailing}) {
+ return pw.Row(
+ mainAxisSize: pw.MainAxisSize.min,
+ crossAxisAlignment: pw.CrossAxisAlignment.center,
+ children: [
+ pw.Container(
+ width: 24,
+ height: 24,
+ decoration: const pw.BoxDecoration(
+ color: _divider,
+ shape: pw.BoxShape.circle,
+ ),
+ child: pw.Center(
+ child: pw.Text(
+ number,
+ style: const pw.TextStyle(color: _stepNumber, fontSize: 14),
+ ),
+ ),
+ ),
+ pw.SizedBox(width: 16),
+ label,
+ if (trailing != null) ...[pw.SizedBox(width: 24), trailing],
+ ],
+ );
+ }
+
+ pw.Widget _visitLabel(String recoveryUrl) {
+ return pw.RichText(
+ text: pw.TextSpan(
+ style: const pw.TextStyle(color: _black, fontSize: 14),
+ children: [
+ const pw.TextSpan(text: "Visit "),
+ pw.TextSpan(
+ text: displayRecoveryUrl(recoveryUrl),
+ style: const pw.TextStyle(
+ color: _black,
+ decoration: pw.TextDecoration.underline,
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ pw.Widget _copyCodeBlock(String copyCode) {
+ return pw.Container(
+ width: 242,
+ height: 56,
+ padding: const pw.EdgeInsets.all(6),
+ decoration: pw.BoxDecoration(
+ color: _copyCodeBackground,
+ border: pw.Border.all(
+ color: _white,
+ width: 1,
+ style: pw.BorderStyle.dashed,
+ ),
+ borderRadius: const pw.BorderRadius.all(pw.Radius.circular(12)),
+ ),
+ child: pw.Center(child: _copyCodeText(copyCode)),
+ );
+ }
+
pw.Widget _enteLockup(_SheetAssets assets) {
final enteLogoSvg = assets.enteLogoBlackSvg;
final enteComBadgeSvg = assets.enteComBadgeSvg;
@@ -292,26 +450,51 @@ class LegacyKitPdfService {
pw.Widget _header(_SheetAssets assets) {
final logoSvg = assets.logoSvg;
+ final enteLogoSvg = assets.enteLogoBlackSvg;
return pw.Row(
mainAxisSize: pw.MainAxisSize.min,
- crossAxisAlignment: pw.CrossAxisAlignment.center,
+ crossAxisAlignment: pw.CrossAxisAlignment.start,
children: [
- logoSvg == null
- ? _fallbackHeaderLogo()
- : pw.SizedBox(
- width: 29.4,
- height: 30.4,
- child: pw.SvgImage(svg: logoSvg),
+ pw.Padding(
+ padding: const pw.EdgeInsets.only(top: 2),
+ child: logoSvg == null
+ ? _fallbackHeaderLogo()
+ : pw.SizedBox(
+ width: 29.4,
+ height: 30.4,
+ child: pw.SvgImage(svg: logoSvg),
+ ),
+ ),
+ pw.SizedBox(width: 10.6),
+ pw.Column(
+ mainAxisSize: pw.MainAxisSize.min,
+ crossAxisAlignment: pw.CrossAxisAlignment.start,
+ children: [
+ enteLogoSvg == null
+ ? pw.Text(
+ "ente",
+ style: pw.TextStyle(
+ color: _dark,
+ fontSize: 14,
+ fontWeight: pw.FontWeight.bold,
+ ),
+ )
+ : pw.SizedBox(
+ width: 44,
+ height: 13.1,
+ child: pw.SvgImage(svg: enteLogoSvg),
+ ),
+ pw.SizedBox(height: 4),
+ pw.Text(
+ "Legacy Kit",
+ style: pw.TextStyle(
+ color: const PdfColor.fromInt(0xFF1C1C1C),
+ fontSize: 20,
+ font: assets.nunitoExtraBold,
+ fontWeight: pw.FontWeight.bold,
),
- pw.SizedBox(width: 10),
- pw.Text(
- "Legacy Kit",
- style: pw.TextStyle(
- color: const PdfColor.fromInt(0xFF1C1C1C),
- fontSize: 20,
- font: assets.nunitoExtraBold,
- fontWeight: pw.FontWeight.bold,
- ),
+ ),
+ ],
),
],
);
@@ -338,306 +521,15 @@ class LegacyKitPdfService {
);
}
- pw.Widget _hero(
- String accountEmail,
- LegacyKitShare share,
- _SheetAssets assets,
- ) {
- return pw.ClipRRect(
- horizontalRadius: 24,
- verticalRadius: 24,
- child: pw.Container(
- width: 592,
- height: 218,
- color: _blue,
- child: pw.Stack(
- fit: pw.StackFit.expand,
- children: [
- if (assets.heroBgLeftSvg != null)
- pw.Positioned(
- left: 13,
- top: -24,
- child: pw.SizedBox(
- width: 388,
- height: 253,
- child: pw.SvgImage(svg: assets.heroBgLeftSvg!),
- ),
- ),
- if (assets.heroBgRightSvg != null)
- pw.Positioned(
- left: 400.5,
- top: -6.5,
- child: pw.SizedBox(
- width: 155,
- height: 139,
- child: pw.SvgImage(svg: assets.heroBgRightSvg!),
- ),
- ),
- pw.Positioned(
- left: 24,
- top: 24,
- child: _heroCopy(accountEmail, share, assets),
- ),
- if (assets.duckyImage != null)
- pw.Positioned(
- left: 398,
- top: 37,
- child: pw.Image(
- pw.MemoryImage(assets.duckyImage!),
- width: 158,
- height: 152,
- fit: pw.BoxFit.contain,
- ),
- ),
- ],
- ),
- ),
- );
- }
-
- pw.Widget _heroCopy(
- String accountEmail,
- LegacyKitShare share,
- _SheetAssets assets,
- ) {
- return pw.SizedBox(
- width: 344,
- child: pw.Column(
- crossAxisAlignment: pw.CrossAxisAlignment.start,
- children: [
- pw.Text(
- "HELD BY",
- style: const pw.TextStyle(
- color: _white,
- fontSize: 14,
- letterSpacing: 2.24,
- ),
- ),
- pw.SizedBox(height: 9),
- pw.Text(
- share.partName,
- style: pw.TextStyle(
- color: _white,
- fontSize: 32,
- font: assets.nunitoExtraBold,
- fontWeight: pw.FontWeight.bold,
- lineSpacing: 0,
- ),
- ),
- pw.SizedBox(height: 12),
- _legacyKitBadge(accountEmail, assets),
- pw.SizedBox(height: 12),
- pw.Text(
- "Store this somewhere safe",
- style: pw.TextStyle(
- color: _white,
- fontSize: 16,
- font: assets.nunitoBlack,
- fontWeight: pw.FontWeight.bold,
- lineSpacing: 3,
- ),
- ),
- pw.SizedBox(height: 6),
- pw.Text(
- "This is part of a legacy kit and can be used with any other part to\nget access to $accountEmail's Ente account",
- style: const pw.TextStyle(
- color: PdfColor(1, 1, 1, 0.86),
- fontSize: 11,
- lineSpacing: 2,
- ),
- ),
- ],
- ),
- );
- }
-
- pw.Widget _legacyKitBadge(String accountEmail, _SheetAssets assets) {
- return pw.SizedBox(
- width: 278,
- height: 32,
- child: pw.Stack(
- children: [
- pw.Positioned.fill(
- child: pw.Container(
- decoration: const pw.BoxDecoration(
- color: _heroBadge,
- borderRadius: pw.BorderRadius.all(pw.Radius.circular(12)),
- ),
- ),
- ),
- pw.Positioned(left: 15, top: 10, child: _legacyKitBadgeIcon(assets)),
- pw.Positioned(
- left: 31,
- top: 8,
- child: pw.SizedBox(
- width: 237,
- height: 16,
- child: pw.Center(
- child: pw.FittedBox(
- fit: pw.BoxFit.scaleDown,
- child: pw.Text(
- "Legacy Kit for $accountEmail",
- maxLines: 1,
- style: const pw.TextStyle(color: _white, fontSize: 14),
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- );
- }
-
- pw.Widget _legacyKitBadgeIcon(_SheetAssets assets) {
- final personIconSvg = assets.personIconSvg;
- if (personIconSvg != null) {
- return pw.SizedBox(
- width: 9,
- height: 11,
- child: pw.SvgImage(svg: personIconSvg),
- );
- }
- return pw.SizedBox(
- width: 9,
- height: 11,
- child: pw.Stack(
- children: [
- pw.Positioned(
- left: 2.2,
- top: 0,
- child: pw.Container(
- width: 4.6,
- height: 5.4,
- decoration: const pw.BoxDecoration(
- color: _white,
- shape: pw.BoxShape.circle,
- ),
- ),
- ),
- pw.Positioned(
- left: 0,
- top: 5.6,
- child: pw.Container(
- width: 9,
- height: 5.4,
- decoration: const pw.BoxDecoration(
- color: _white,
- borderRadius: pw.BorderRadius.all(pw.Radius.circular(4)),
- ),
- ),
- ),
- ],
- ),
- );
- }
-
- pw.Widget _recoveryBlock(
- String qrPayload,
- String copyCode,
- List<LegacyKitShare> otherShares,
- String recoveryUrl,
- ) {
- return pw.Container(
- width: 592,
- height: 406,
- padding: const pw.EdgeInsets.all(24),
- decoration: const pw.BoxDecoration(
- color: _dark,
- borderRadius: pw.BorderRadius.all(pw.Radius.circular(24)),
- ),
- child: pw.Row(
- crossAxisAlignment: pw.CrossAxisAlignment.center,
- children: [
- pw.SizedBox(
- width: 242,
- child: pw.Column(
- crossAxisAlignment: pw.CrossAxisAlignment.center,
- children: [
- pw.Container(
- width: 200,
- height: 200,
- padding: const pw.EdgeInsets.all(25),
- decoration: const pw.BoxDecoration(
- color: _white,
- borderRadius: pw.BorderRadius.all(pw.Radius.circular(20)),
- ),
- child: pw.BarcodeWidget(
- barcode: pw.Barcode.qrCode(),
- data: qrPayload,
- ),
- ),
- pw.SizedBox(height: 32),
- pw.Container(
- width: 242,
- height: 126,
- padding: const pw.EdgeInsets.all(12),
- decoration: pw.BoxDecoration(
- color: _copyCodeBackground,
- border: pw.Border.all(
- color: _white,
- width: 1,
- style: pw.BorderStyle.dashed,
- ),
- borderRadius: const pw.BorderRadius.all(
- pw.Radius.circular(12),
- ),
- ),
- child: pw.Center(child: _copyCodeText(copyCode)),
- ),
- ],
- ),
- ),
- pw.Spacer(),
- pw.SizedBox(
- width: 266,
- height: 358,
- child: pw.Column(
- mainAxisAlignment: pw.MainAxisAlignment.center,
- crossAxisAlignment: pw.CrossAxisAlignment.start,
- children: [
- _instruction(
- "1.",
- "Get another part of the kit from",
- extra: _holderChips(otherShares),
- ),
- pw.SizedBox(height: 31),
- _visitInstruction(recoveryUrl),
- pw.SizedBox(height: 31),
- _instruction("3.", "Upload both parts"),
- pw.SizedBox(height: 31),
- _instruction(
- "4.",
- "Change the password to gain\naccount access",
- ),
- ],
- ),
- ),
- ],
- ),
- );
- }
-
- pw.Widget _instruction(String number, String text, {pw.Widget? extra}) {
- return _instructionContent(
- number,
- pw.Text(
- text,
- style: const pw.TextStyle(color: _white, fontSize: 14, lineSpacing: 3),
- ),
- extra: extra,
- );
- }
-
pw.Widget _copyCodeText(String copyCode) {
return pw.SizedBox(
- width: 218,
+ width: 226,
child: pw.Column(
mainAxisSize: pw.MainAxisSize.min,
children: _displayCopyCodeLines(copyCode)
.map(
(line) => pw.SizedBox(
- height: 17,
+ height: 11,
child: pw.FittedBox(
fit: pw.BoxFit.scaleDown,
child: pw.Text(
@@ -646,8 +538,8 @@ class LegacyKitPdfService {
softWrap: false,
maxLines: 1,
style: pw.TextStyle(
- color: _background,
- fontSize: 10,
+ color: _white,
+ fontSize: 7,
fontWeight: pw.FontWeight.bold,
),
),
@@ -673,63 +565,6 @@ class LegacyKitPdfService {
return chunks;
}
- pw.Widget _visitInstruction(String recoveryUrl) {
- const textStyle = pw.TextStyle(color: _white, fontSize: 14, lineSpacing: 3);
- return _instructionContent(
- "2.",
- pw.RichText(
- text: pw.TextSpan(
- style: textStyle,
- children: [
- const pw.TextSpan(text: "Visit "),
- pw.TextSpan(
- text: displayRecoveryUrl(recoveryUrl),
- style: const pw.TextStyle(
- color: _white,
- decoration: pw.TextDecoration.underline,
- ),
- ),
- ],
- ),
- ),
- );
- }
-
- pw.Widget _instructionContent(
- String number,
- pw.Widget content, {
- pw.Widget? extra,
- }) {
- return pw.Row(
- crossAxisAlignment: pw.CrossAxisAlignment.start,
- children: [
- pw.SizedBox(
- width: 14,
- child: pw.Text(
- number,
- style: const pw.TextStyle(color: _muted, fontSize: 14),
- ),
- ),
- pw.SizedBox(width: 10),
- pw.Expanded(
- child: pw.Column(
- crossAxisAlignment: pw.CrossAxisAlignment.start,
- children: [
- content,
- if (extra != null) ...[
- pw.SizedBox(height: 8),
- pw.Padding(
- padding: const pw.EdgeInsets.only(left: 8),
- child: extra,
- ),
- ],
- ],
- ),
- ),
- ],
- );
- }
-
pw.Widget _holderChips(List<LegacyKitShare> shares) {
return pw.Wrap(
spacing: 6,
@@ -774,7 +609,7 @@ class LegacyKitPdfService {
pw.SizedBox(width: 6),
pw.Text(
share.partName,
- style: const pw.TextStyle(color: _textLight, fontSize: 12),
+ style: const pw.TextStyle(color: _chipLabel, fontSize: 12),
),
],
),
@@ -788,27 +623,17 @@ class LegacyKitPdfService {
}
class _SheetAssets {
- final Uint8List? duckyImage;
- final String? heroBgLeftSvg;
- final String? heroBgRightSvg;
final String? logoSvg;
final String? enteLogoBlackSvg;
final String? enteComBadgeSvg;
- final String? personIconSvg;
final pw.Font? nunitoExtraBold;
- final pw.Font? nunitoBlack;
final pw.ThemeData? theme;
const _SheetAssets({
- required this.duckyImage,
- required this.heroBgLeftSvg,
- required this.heroBgRightSvg,
required this.logoSvg,
required this.enteLogoBlackSvg,
required this.enteComBadgeSvg,
- required this.personIconSvg,
required this.nunitoExtraBold,
- required this.nunitoBlack,
required this.theme,
});
}