mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
whitelabeling: change welcomePage to take into account ui customization
GitLab: #1097 Change-Id: I8967146c3ca04daee96b4a4fb10bcb6811c1c7a4
This commit is contained in:
parent
8c1b214619
commit
2f7acbd31b
20 changed files with 1267 additions and 426 deletions
9
resources/icons/Trash_Black_24dp.svg
Normal file
9
resources/icons/Trash_Black_24dp.svg
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<path d="M20.9,4.6H15V4.2C15,3,14,2,12.8,2h-1.6C10,2,9,3,9,4.2v0.3H3.1c-0.4,0-0.7,0.3-0.7,0.7s0.3,0.7,0.7,0.7h1.4l0.7,13.8
|
||||
C5.2,21,6.3,22,7.6,22h8.9c1.3,0,2.4-1,2.4-2.3l0.7-13.8h1.4c0.4,0,0.7-0.3,0.7-0.7S21.3,4.6,20.9,4.6z M10.3,4.6V4.2
|
||||
c0-0.5,0.4-0.8,0.8-0.8h1.6c0.5,0,0.8,0.4,0.8,0.8v0.3H10.3z M18.1,5.9l-0.7,13.7c0,0.6-0.5,1-1,1H7.6c-0.6,0-1-0.4-1-1L5.8,5.9
|
||||
H18.1z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 726 B |
15
resources/icons/backup.svg
Normal file
15
resources/icons/backup.svg
Normal file
|
@ -0,0 +1,15 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="26.503" height="26.5" viewBox="0 0 26.503 26.5">
|
||||
<g id="noun-backup-2912773" transform="translate(-51.27 -51.32)">
|
||||
<path id="Path_259" data-name="Path 259" d="M76.04,60.533H53a1.483,1.483,0,0,1-1.482-1.482v-6A1.483,1.483,0,0,1,53,51.57H76.04a1.483,1.483,0,0,1,1.482,1.482v6A1.483,1.483,0,0,1,76.04,60.533ZM53,52.014a1.038,1.038,0,0,0-1.037,1.037v6A1.038,1.038,0,0,0,53,60.089H76.04a1.038,1.038,0,0,0,1.037-1.037v-6a1.038,1.038,0,0,0-1.037-1.037Z" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_260" data-name="Path 260" d="M72.468,779.243H53.042a1.483,1.483,0,0,1-1.482-1.482v-6a1.483,1.483,0,0,1,1.482-1.482h16.2a.222.222,0,1,1,0,.444h-16.2A1.038,1.038,0,0,0,52,771.762v6a1.038,1.038,0,0,0,1.037,1.037H72.468a.222.222,0,1,1,0,.444Z" transform="translate(-0.039 -701.673)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_261" data-name="Path 261" d="M723.843,728.9a5.093,5.093,0,1,1,5.093-5.093,5.1,5.1,0,0,1-5.093,5.093Zm0-9.741a4.649,4.649,0,1,0,3.079,1.166A4.642,4.642,0,0,0,723.843,719.156Z" transform="translate(-651.414 -651.328)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_262" data-name="Path 262" d="M77.382,423.416a.222.222,0,0,1-.222-.222V412.138a.76.76,0,0,0-.759-.759H52.807a.76.76,0,0,0-.759.759v6.556a.76.76,0,0,0,.759.759H69.285a.222.222,0,1,1,0,.444H52.807a1.205,1.205,0,0,1-1.2-1.2v-6.556a1.205,1.205,0,0,1,1.2-1.2H76.4a1.205,1.205,0,0,1,1.2,1.2v11.056A.222.222,0,0,1,77.382,423.416Z" transform="translate(-0.081 -350.845)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_263" data-name="Path 263" d="M168.967,149.643a.222.222,0,0,1-.222-.222v-3.889a.222.222,0,1,1,.444,0v3.889A.222.222,0,0,1,168.967,149.643Z" transform="translate(-114.446 -91.518)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_264" data-name="Path 264" d="M168.967,524.643a.222.222,0,0,1-.222-.222v-3.889a.222.222,0,1,1,.444,0v3.889A.222.222,0,0,1,168.967,524.643Z" transform="translate(-114.446 -457.629)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_265" data-name="Path 265" d="M168.967,899.623a.222.222,0,0,1-.222-.222v-3.889a.222.222,0,1,1,.444,0V899.4A.222.222,0,0,1,168.967,899.623Z" transform="translate(-114.446 -823.72)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_266" data-name="Path 266" d="M498.2,171.417a1.333,1.333,0,1,1,1.333-1.333A1.335,1.335,0,0,1,498.2,171.417Zm0-2.222a.889.889,0,1,0,.889.889A.89.89,0,0,0,498.2,169.194Z" transform="translate(-434.793 -114.402)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_267" data-name="Path 267" d="M709.143,171.417a1.333,1.333,0,1,1,1.333-1.333A1.335,1.335,0,0,1,709.143,171.417Zm0-2.222a.889.889,0,1,0,.889.889A.89.89,0,0,0,709.143,169.194Z" transform="translate(-640.733 -114.402)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_268" data-name="Path 268" d="M920.083,171.417a1.333,1.333,0,1,1,1.333-1.333A1.335,1.335,0,0,1,920.083,171.417Zm0-2.222a.889.889,0,1,0,.889.889A.89.89,0,0,0,920.083,169.194Z" transform="translate(-846.673 -114.402)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
<path id="Path_269" data-name="Path 269" d="M826.331,853.344h-.015a.222.222,0,0,1-.17-.1l-1.111-1.667a.222.222,0,1,1,.37-.247l.95,1.425,3.7-4.226a.222.222,0,0,1,.335.293l-3.889,4.445a.223.223,0,0,1-.167.076Z" transform="translate(-755.142 -777.995)" fill="#005699" stroke="#005699" stroke-width="0.5"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.5 KiB |
358
resources/icons/jami-logo-icon.svg
Normal file
358
resources/icons/jami-logo-icon.svg
Normal file
|
@ -0,0 +1,358 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 116.3 116.3" style="enable-background:new 0 0 116.3 116.3;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#SVGID_1_);}
|
||||
.st1{fill:url(#SVGID_2_);}
|
||||
.st2{fill:url(#SVGID_3_);}
|
||||
.st3{fill:url(#SVGID_4_);}
|
||||
.st4{fill:url(#SVGID_5_);}
|
||||
.st5{fill:url(#SVGID_6_);}
|
||||
.st6{opacity:0.4;fill:url(#SVGID_7_);enable-background:new ;}
|
||||
.st7{fill:url(#SVGID_8_);}
|
||||
.st8{fill:url(#SVGID_9_);}
|
||||
.st9{fill:url(#SVGID_10_);}
|
||||
.st10{fill:url(#SVGID_11_);}
|
||||
.st11{fill:url(#SVGID_12_);}
|
||||
.st12{fill:url(#SVGID_13_);}
|
||||
.st13{fill:url(#SVGID_14_);}
|
||||
.st14{fill:url(#SVGID_15_);}
|
||||
.st15{fill:url(#SVGID_16_);}
|
||||
.st16{opacity:0.2;fill:url(#SVGID_17_);enable-background:new ;}
|
||||
.st17{fill:url(#SVGID_18_);}
|
||||
.st18{fill:url(#SVGID_19_);}
|
||||
.st19{opacity:0.25;fill:url(#SVGID_20_);enable-background:new ;}
|
||||
.st20{fill:url(#SVGID_21_);}
|
||||
.st21{fill:url(#SVGID_22_);}
|
||||
.st22{opacity:0.2;fill:url(#SVGID_23_);enable-background:new ;}
|
||||
.st23{fill:url(#SVGID_24_);}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="69.0328" y1="454.9245" x2="64.4435" y2="449.5703" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2B3B6A"/>
|
||||
<stop offset="1" style="stop-color:#2B3B6A"/>
|
||||
</linearGradient>
|
||||
<polygon class="st0" points="54.9,55.8 62,55.6 58.4,62.2 "/>
|
||||
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="108.534" y1="457.2333" x2="108.534" y2="494.0327" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2B3B6A"/>
|
||||
<stop offset="7.040000e-02" style="stop-color:#2D4576"/>
|
||||
<stop offset="0.2165" style="stop-color:#2E5589"/>
|
||||
<stop offset="0.3608" style="stop-color:#2B5E97"/>
|
||||
<stop offset="0.5" style="stop-color:#29629C"/>
|
||||
<stop offset="0.6392" style="stop-color:#2B5E97"/>
|
||||
<stop offset="0.7835" style="stop-color:#2E5589"/>
|
||||
<stop offset="0.9296" style="stop-color:#2D4576"/>
|
||||
<stop offset="1" style="stop-color:#2B3B6A"/>
|
||||
</linearGradient>
|
||||
<path class="st1" d="M85.5,57.5c26.1,4.2,29.8,10.7,29.8,10.7c0,0.4,0,0.8,0,1.2c0,0.2-0.1,0.4-0.2,0.7c-0.1,0.3-2.7,5.7-19.6,9.3
|
||||
L85.5,57.5z"/>
|
||||
|
||||
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="26.7686" y1="496.8278" x2="38.7091" y2="475.5678" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#252B59"/>
|
||||
<stop offset="8.590000e-02" style="stop-color:#2B3A69"/>
|
||||
<stop offset="0.2267" style="stop-color:#2E4A7C"/>
|
||||
<stop offset="0.3658" style="stop-color:#2E5487"/>
|
||||
<stop offset="0.5" style="stop-color:#2D578C"/>
|
||||
<stop offset="0.6342" style="stop-color:#2E5487"/>
|
||||
<stop offset="0.7733" style="stop-color:#2E4A7C"/>
|
||||
<stop offset="0.9141" style="stop-color:#2B3A69"/>
|
||||
<stop offset="1" style="stop-color:#252B59"/>
|
||||
</linearGradient>
|
||||
<path class="st2" d="M19.8,78.5c-5.9,15.7-2.9,20.6-2.7,21c0.1,0.2,0.2,0.4,0.4,0.5c0.4,0,0.8-0.1,1.2-0.2c0,0,10.7-0.5,23.2-18.3
|
||||
L19.8,78.5z"/>
|
||||
|
||||
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="60.8512" y1="424.6486" x2="41.0872" y2="401.5905" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#181844"/>
|
||||
<stop offset="2.840000e-02" style="stop-color:#1E1E4C"/>
|
||||
<stop offset="0.1353" style="stop-color:#283261"/>
|
||||
<stop offset="0.2468" style="stop-color:#2D4172"/>
|
||||
<stop offset="0.3647" style="stop-color:#2E4A7C"/>
|
||||
<stop offset="0.5" style="stop-color:#2E4D7F"/>
|
||||
<stop offset="0.6177" style="stop-color:#2D4576"/>
|
||||
<stop offset="0.8125" style="stop-color:#273160"/>
|
||||
<stop offset="1" style="stop-color:#181844"/>
|
||||
</linearGradient>
|
||||
<path class="st3" d="M58.8,18.6C44.5,2.9,37.5,3.8,37.1,3.9c-0.2,0-0.5,0.1-0.7,0.2c-0.5,0.2-1,1.8-1,1.8s-3,8.7,9.1,31.9
|
||||
L58.8,18.6z"/>
|
||||
|
||||
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="99.9721" y1="499.3526" x2="84.7036" y2="450.1664" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#181844"/>
|
||||
<stop offset="2.840000e-02" style="stop-color:#1E1E4C"/>
|
||||
<stop offset="0.1353" style="stop-color:#283261"/>
|
||||
<stop offset="0.2468" style="stop-color:#2D4172"/>
|
||||
<stop offset="0.3647" style="stop-color:#2E4A7C"/>
|
||||
<stop offset="0.5" style="stop-color:#2E4D7F"/>
|
||||
<stop offset="0.6177" style="stop-color:#2D4576"/>
|
||||
<stop offset="0.8125" style="stop-color:#273160"/>
|
||||
<stop offset="1" style="stop-color:#181844"/>
|
||||
</linearGradient>
|
||||
<path class="st4" d="M71.2,78.8C90.6,101,97.4,99.8,97.4,99.8c0.4,0.1,0.9,0.2,1.3,0.2c0.2-0.1,0.3-0.3,0.4-0.5
|
||||
c0.3-0.4,5.8-9.4-12.8-41.8L71.2,78.8z"/>
|
||||
|
||||
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="31.6447" y1="457.2331" x2="31.6447" y2="494.0317" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2B3B6A"/>
|
||||
<stop offset="7.040000e-02" style="stop-color:#2D4576"/>
|
||||
<stop offset="0.2165" style="stop-color:#2E5589"/>
|
||||
<stop offset="0.3608" style="stop-color:#2B5E97"/>
|
||||
<stop offset="0.5" style="stop-color:#29629C"/>
|
||||
<stop offset="0.6392" style="stop-color:#2B5E97"/>
|
||||
<stop offset="0.7835" style="stop-color:#2E5589"/>
|
||||
<stop offset="0.9296" style="stop-color:#2D4576"/>
|
||||
<stop offset="1" style="stop-color:#2B3B6A"/>
|
||||
</linearGradient>
|
||||
<path class="st5" d="M46.1,82.2c-40-1.7-44.8-11.6-45-12.1C1.1,69.9,1,69.7,1,69.5c0.1-0.7,1.5-2,1.5-2s10.6-6.5,28.3-10
|
||||
L46.1,82.2z"/>
|
||||
|
||||
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="51.8906" y1="421.1236" x2="66.337" y2="421.1236" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2B3B6A"/>
|
||||
<stop offset="1" style="stop-color:#2B3B6A"/>
|
||||
</linearGradient>
|
||||
<path class="st6" d="M57.6,17.4c-5,5.4-9.6,11.2-13.8,17.2h1c3.1-3.9,10.8-13.7,13.4-16.5L57.6,17.4z"/>
|
||||
|
||||
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="70.9709" y1="436.4003" x2="70.9709" y2="401.6908" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#252B59"/>
|
||||
<stop offset="0.5" style="stop-color:#2D578C"/>
|
||||
<stop offset="0.6934" style="stop-color:#2D5588"/>
|
||||
<stop offset="0.8038" style="stop-color:#2E4F80"/>
|
||||
<stop offset="0.8932" style="stop-color:#2D4474"/>
|
||||
<stop offset="0.971" style="stop-color:#283463"/>
|
||||
<stop offset="1" style="stop-color:#252B59"/>
|
||||
</linearGradient>
|
||||
<path class="st7" d="M73.8,35.4C84.2,10.7,80.2,5,80.2,5c-0.1-0.3-0.2-0.7-0.3-1c-0.2-0.1-0.4-0.1-0.7-0.2
|
||||
c-0.5-0.1-11.4-1.5-34.4,30.7L73.8,35.4z"/>
|
||||
|
||||
<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="39.2669" y1="503.7654" x2="102.6764" y2="407.9172" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2867A2"/>
|
||||
<stop offset="8.239999e-02" style="stop-color:#177EBC"/>
|
||||
<stop offset="0.1675" style="stop-color:#0E91D1"/>
|
||||
<stop offset="0.2527" style="stop-color:#10A2E1"/>
|
||||
<stop offset="0.337" style="stop-color:#18ACEA"/>
|
||||
<stop offset="0.42" style="stop-color:#24B1ED"/>
|
||||
<stop offset="0.5" style="stop-color:#28B1ED"/>
|
||||
<stop offset="0.58" style="stop-color:#24B1ED"/>
|
||||
<stop offset="0.663" style="stop-color:#18ACEA"/>
|
||||
<stop offset="0.7473" style="stop-color:#10A2E1"/>
|
||||
<stop offset="0.8325" style="stop-color:#0E91D1"/>
|
||||
<stop offset="0.9176" style="stop-color:#177EBC"/>
|
||||
<stop offset="1" style="stop-color:#2867A2"/>
|
||||
</linearGradient>
|
||||
<path class="st8" d="M58,97.4c-14.2,15.4-21,14.5-21.4,14.5c-0.6-0.2-1.2-0.5-1.7-0.8l-17.3-11c7.3-1.6,16.3-10.2,25.7-21.3
|
||||
L58,97.4z"/>
|
||||
|
||||
<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="33.568" y1="505.6873" x2="58.683" y2="483.2007" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2C5D95"/>
|
||||
<stop offset="8.220001e-02" style="stop-color:#246EAB"/>
|
||||
<stop offset="0.1808" style="stop-color:#1B79B9"/>
|
||||
<stop offset="0.3007" style="stop-color:#1080C2"/>
|
||||
<stop offset="0.5" style="stop-color:#0E81C5"/>
|
||||
<stop offset="0.6993" style="stop-color:#1080C2"/>
|
||||
<stop offset="0.8192" style="stop-color:#1B79B9"/>
|
||||
<stop offset="0.9178" style="stop-color:#246EAB"/>
|
||||
<stop offset="1" style="stop-color:#2C5D95"/>
|
||||
</linearGradient>
|
||||
<path class="st9" d="M58.6,98c-14.2,15.4-21,14.5-21.4,14.5c-0.6-0.2-1.2-0.5-1.7-0.8L17.6,100c7.3-1.6,16.9-9.6,26.3-20.7
|
||||
L58.6,98z"/>
|
||||
|
||||
<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="31.3212" y1="407.2591" x2="89.6399" y2="504.4568" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2C5D95"/>
|
||||
<stop offset="1.760000e-02" style="stop-color:#2A6199"/>
|
||||
<stop offset="0.1407" style="stop-color:#1C79B7"/>
|
||||
<stop offset="0.2631" style="stop-color:#0A8CCA"/>
|
||||
<stop offset="0.3837" style="stop-color:#0B97D4"/>
|
||||
<stop offset="0.5" style="stop-color:#0E9AD8"/>
|
||||
<stop offset="0.6163" style="stop-color:#0B97D4"/>
|
||||
<stop offset="0.7369" style="stop-color:#0A8CCA"/>
|
||||
<stop offset="0.8593" style="stop-color:#1C79B7"/>
|
||||
<stop offset="0.9824" style="stop-color:#2A6199"/>
|
||||
<stop offset="1" style="stop-color:#2C5D95"/>
|
||||
</linearGradient>
|
||||
<path class="st10" d="M20.7,38c-6.3-16.2-3.2-21.3-3-21.6c0.4-0.5,0.9-0.9,1.4-1.2l17.3-11c-1.5,7.1,2.3,18,8.2,30.7L20.7,38z"/>
|
||||
|
||||
<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="94.4028" y1="503.8655" x2="56.9038" y2="456.6339" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2C5D95"/>
|
||||
<stop offset="2.570000e-02" style="stop-color:#2A6199"/>
|
||||
<stop offset="0.2053" style="stop-color:#1C79B7"/>
|
||||
<stop offset="0.384" style="stop-color:#0A8CCA"/>
|
||||
<stop offset="0.5599" style="stop-color:#0B97D4"/>
|
||||
<stop offset="0.7296" style="stop-color:#0E9AD8"/>
|
||||
<stop offset="0.7925" style="stop-color:#0B97D4"/>
|
||||
<stop offset="0.8577" style="stop-color:#0A8CCA"/>
|
||||
<stop offset="0.9239" style="stop-color:#1C79B7"/>
|
||||
<stop offset="0.9905" style="stop-color:#2A6199"/>
|
||||
<stop offset="1" style="stop-color:#2C5D95"/>
|
||||
</linearGradient>
|
||||
<path class="st11" d="M57.2,57.2c-8.7,0-17.4,0.7-26,1.9c0.3,0.5,4.3,7.2,7.2,11.7c27.8,42.8,40.8,41.1,41.4,41
|
||||
c0.6-0.2,1.2-0.5,1.7-0.8l17.3-11C87,97.5,70.6,78.2,57.2,57.2z"/>
|
||||
|
||||
<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="40.2175" y1="431.0724" x2="32.9164" y2="404.7886" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2C5D95"/>
|
||||
<stop offset="8.220001e-02" style="stop-color:#246EAB"/>
|
||||
<stop offset="0.1808" style="stop-color:#1B79B9"/>
|
||||
<stop offset="0.3007" style="stop-color:#1080C2"/>
|
||||
<stop offset="0.5" style="stop-color:#0E81C5"/>
|
||||
<stop offset="0.6993" style="stop-color:#1080C2"/>
|
||||
<stop offset="0.8192" style="stop-color:#1B79B9"/>
|
||||
<stop offset="0.9178" style="stop-color:#246EAB"/>
|
||||
<stop offset="1" style="stop-color:#2C5D95"/>
|
||||
</linearGradient>
|
||||
<path class="st12" d="M20.1,38.5c-6.3-16.2-3.2-21.3-3-21.6c0.4-0.5,0.9-0.9,1.4-1.2L36.5,4.1c-1.5,7.1,1.7,18.6,7.6,31.2
|
||||
L20.1,38.5z"/>
|
||||
|
||||
<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="122.9025" y1="448.7971" x2="9.1479" y2="448.7971" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2867A2"/>
|
||||
<stop offset="1.280000e-02" style="stop-color:#256BA7"/>
|
||||
<stop offset="0.1121" style="stop-color:#0B83C3"/>
|
||||
<stop offset="0.2115" style="stop-color:#1797D8"/>
|
||||
<stop offset="0.3099" style="stop-color:#25A3E2"/>
|
||||
<stop offset="0.4066" style="stop-color:#27ABE7"/>
|
||||
<stop offset="0.5" style="stop-color:#2AAEEA"/>
|
||||
<stop offset="0.5934" style="stop-color:#27ABE7"/>
|
||||
<stop offset="0.6901" style="stop-color:#25A3E2"/>
|
||||
<stop offset="0.7885" style="stop-color:#1797D8"/>
|
||||
<stop offset="0.8879" style="stop-color:#0B83C3"/>
|
||||
<stop offset="0.9872" style="stop-color:#256BA7"/>
|
||||
<stop offset="1" style="stop-color:#2867A2"/>
|
||||
</linearGradient>
|
||||
<path class="st13" d="M85.5,59.6c13.5,1.9,24.7,4.7,29.8,9.8V48.9c0-0.6-0.1-1.3-0.2-1.9c-0.1-0.3-2.7-5.6-19-9.1L85.5,59.6z"/>
|
||||
|
||||
<linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="90.2941" y1="447.1362" x2="122.8074" y2="448.8884" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2E5284"/>
|
||||
<stop offset="6.100000e-03" style="stop-color:#2E5486"/>
|
||||
<stop offset="9.120000e-02" style="stop-color:#29649D"/>
|
||||
<stop offset="0.1876" style="stop-color:#236FAD"/>
|
||||
<stop offset="0.3049" style="stop-color:#1D77B6"/>
|
||||
<stop offset="0.5" style="stop-color:#1C78B9"/>
|
||||
<stop offset="0.6951" style="stop-color:#1D77B6"/>
|
||||
<stop offset="0.8124" style="stop-color:#236FAD"/>
|
||||
<stop offset="0.9088" style="stop-color:#29649D"/>
|
||||
<stop offset="0.9939" style="stop-color:#2E5486"/>
|
||||
<stop offset="1" style="stop-color:#2E5284"/>
|
||||
</linearGradient>
|
||||
<path class="st14" d="M85.5,58.8c13.5,1.9,24.7,5.5,29.8,10.6V48.1c0-0.6-0.1-1.3-0.2-1.9c-0.1-0.3-2.7-5.6-19-9.1L85.5,58.8z"/>
|
||||
|
||||
<linearGradient id="SVGID_16_" gradientUnits="userSpaceOnUse" x1="9.0577" y1="447.1912" x2="67.7186" y2="447.1912" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2867A2"/>
|
||||
<stop offset="2.250000e-02" style="stop-color:#256BA7"/>
|
||||
<stop offset="0.1971" style="stop-color:#0B83C3"/>
|
||||
<stop offset="0.3718" style="stop-color:#1797D8"/>
|
||||
<stop offset="0.5447" style="stop-color:#25A3E2"/>
|
||||
<stop offset="0.7147" style="stop-color:#27ABE7"/>
|
||||
<stop offset="0.8788" style="stop-color:#2AAEEA"/>
|
||||
<stop offset="0.9015" style="stop-color:#27ABE7"/>
|
||||
<stop offset="0.9249" style="stop-color:#25A3E2"/>
|
||||
<stop offset="0.9487" style="stop-color:#1797D8"/>
|
||||
<stop offset="0.9728" style="stop-color:#0B83C3"/>
|
||||
<stop offset="0.9969" style="stop-color:#256BA7"/>
|
||||
<stop offset="1" style="stop-color:#2867A2"/>
|
||||
</linearGradient>
|
||||
<path class="st15" d="M73.2,35.1c-3-0.1-9.5-0.4-15.1-0.4C7.1,34.7,1.4,46.5,1.2,47C1,47.6,1,48.3,1,48.9v20.6
|
||||
c5-5,15.9-7.7,29.2-9.7c8.6-1.2,17.2-1.9,25.9-2c1.6,0,3.2,0,4.8,0C60.8,57.8,76.3,35.2,73.2,35.1z"/>
|
||||
|
||||
<linearGradient id="SVGID_17_" gradientUnits="userSpaceOnUse" x1="50.3126" y1="432.0108" x2="28.2664" y2="428.9106" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2B3B6A"/>
|
||||
<stop offset="1" style="stop-color:#2B3B6A"/>
|
||||
</linearGradient>
|
||||
<path class="st16" d="M44.1,33.5c-10.7,0.5-18.4,1.3-24.8,3.1l0.3,0.8c0.6-0.1,1.3-0.3,1.9-0.4c7.7-1.2,15.4-2,23.1-2.3L44.1,33.5
|
||||
z"/>
|
||||
|
||||
<linearGradient id="SVGID_18_" gradientUnits="userSpaceOnUse" x1="72.7451" y1="450.8669" x2="10.4435" y2="442.1056" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2867A2"/>
|
||||
<stop offset="3.820000e-02" style="stop-color:#2174B1"/>
|
||||
<stop offset="0.1177" style="stop-color:#0B86C4"/>
|
||||
<stop offset="0.2081" style="stop-color:#0A94D2"/>
|
||||
<stop offset="0.3177" style="stop-color:#0C9BDB"/>
|
||||
<stop offset="0.5" style="stop-color:#109EDE"/>
|
||||
<stop offset="0.6823" style="stop-color:#0C9BDB"/>
|
||||
<stop offset="0.7919" style="stop-color:#0A94D2"/>
|
||||
<stop offset="0.8823" style="stop-color:#0B86C4"/>
|
||||
<stop offset="0.9618" style="stop-color:#2174B1"/>
|
||||
<stop offset="1" style="stop-color:#2867A2"/>
|
||||
</linearGradient>
|
||||
<path class="st17" d="M73.2,34.3c-3-0.1-9.5-0.4-15.1-0.4c-51.1,0-56.7,11.8-57,12.4C1,46.8,1,47.5,1,48.1v21.4
|
||||
c5-5,15.9-8.5,29.2-10.5c8.6-1.2,17.2-1.9,25.9-2c1.6,0,3.2,0,4.8,0C63.2,57.1,76.3,34.4,73.2,34.3z"/>
|
||||
|
||||
<linearGradient id="SVGID_19_" gradientUnits="userSpaceOnUse" x1="101.6202" y1="407.733" x2="71.9933" y2="458.7571" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2867A2"/>
|
||||
<stop offset="0.1238" style="stop-color:#177EBC"/>
|
||||
<stop offset="0.2516" style="stop-color:#0E91D1"/>
|
||||
<stop offset="0.3797" style="stop-color:#10A2E1"/>
|
||||
<stop offset="0.5064" style="stop-color:#18ACEA"/>
|
||||
<stop offset="0.631" style="stop-color:#24B1ED"/>
|
||||
<stop offset="0.7513" style="stop-color:#28B1ED"/>
|
||||
<stop offset="0.7911" style="stop-color:#24B1ED"/>
|
||||
<stop offset="0.8324" style="stop-color:#18ACEA"/>
|
||||
<stop offset="0.8743" style="stop-color:#10A2E1"/>
|
||||
<stop offset="0.9167" style="stop-color:#0E91D1"/>
|
||||
<stop offset="0.959" style="stop-color:#177EBC"/>
|
||||
<stop offset="1" style="stop-color:#2867A2"/>
|
||||
</linearGradient>
|
||||
<path class="st18" d="M58.2,58.8C72.1,37.9,82.4,16,79.8,4.1l17.3,11c0.5,0.3,1,0.7,1.4,1.2c0.3,0.5,7.1,11.7-20.7,54.5
|
||||
c-2,3.2-3.9,6.9-4.6,7.2c-4.1-4-12.6-15.6-14.7-18.5C58.3,59.1,58.2,58.8,58.2,58.8z"/>
|
||||
|
||||
<linearGradient id="SVGID_20_" gradientUnits="userSpaceOnUse" x1="105.3445" y1="433.3988" x2="94.5575" y2="453.6416" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2B3B6A"/>
|
||||
<stop offset="1" style="stop-color:#2B3B6A"/>
|
||||
</linearGradient>
|
||||
<path class="st19" d="M96.6,37.2c-3.1,7.8-6.8,15.3-11.1,22.4l1.3,0.2c5.5-9.5,8.7-16.5,10.9-22.4L96.6,37.2z"/>
|
||||
|
||||
<linearGradient id="SVGID_21_" gradientUnits="userSpaceOnUse" x1="100.6479" y1="408.8533" x2="70.927" y2="464.6275" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2867A2"/>
|
||||
<stop offset="3.820000e-02" style="stop-color:#2174B1"/>
|
||||
<stop offset="0.1177" style="stop-color:#0B86C4"/>
|
||||
<stop offset="0.2081" style="stop-color:#0A94D2"/>
|
||||
<stop offset="0.3177" style="stop-color:#0C9BDB"/>
|
||||
<stop offset="0.5" style="stop-color:#109EDE"/>
|
||||
<stop offset="0.6823" style="stop-color:#0C9BDB"/>
|
||||
<stop offset="0.7919" style="stop-color:#0A94D2"/>
|
||||
<stop offset="0.8823" style="stop-color:#0B86C4"/>
|
||||
<stop offset="0.9618" style="stop-color:#2174B1"/>
|
||||
<stop offset="1" style="stop-color:#2867A2"/>
|
||||
</linearGradient>
|
||||
<path class="st20" d="M78.5,71.4c27.8-42.8,21-54,20.7-54.5c-0.4-0.5-0.9-0.9-1.4-1.2L79.8,4.1c2.5,11.8-7.4,34.6-21.2,55.5
|
||||
c4.6,7.1,9.4,14,14.5,19.9C74.1,78.3,76.7,74.3,78.5,71.4z"/>
|
||||
|
||||
<linearGradient id="SVGID_22_" gradientUnits="userSpaceOnUse" x1="102.9539" y1="410.1097" x2="72.9714" y2="466.375" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2867A2"/>
|
||||
<stop offset="3.820000e-02" style="stop-color:#2174B1"/>
|
||||
<stop offset="0.1177" style="stop-color:#0B86C4"/>
|
||||
<stop offset="0.2081" style="stop-color:#0A94D2"/>
|
||||
<stop offset="0.3177" style="stop-color:#0C9BDB"/>
|
||||
<stop offset="0.5" style="stop-color:#109EDE"/>
|
||||
<stop offset="0.6823" style="stop-color:#0C9BDB"/>
|
||||
<stop offset="0.7919" style="stop-color:#0A94D2"/>
|
||||
<stop offset="0.8823" style="stop-color:#0B86C4"/>
|
||||
<stop offset="0.9618" style="stop-color:#2174B1"/>
|
||||
<stop offset="1" style="stop-color:#2867A2"/>
|
||||
</linearGradient>
|
||||
<path class="st21" d="M72.6,80.2c0.1-0.1,0.2-0.1,0.2-0.2c-5.3-6.2-10.2-12.8-14.7-19.7c-0.1,0.1-0.2,0.2-0.2,0.4
|
||||
C57.9,60.6,67.6,75.9,72.6,80.2z"/>
|
||||
|
||||
<linearGradient id="SVGID_23_" gradientUnits="userSpaceOnUse" x1="54.5637" y1="474.0854" x2="62.254" y2="494.9197" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2B3B6A"/>
|
||||
<stop offset="1" style="stop-color:#2B3B6A"/>
|
||||
</linearGradient>
|
||||
<path class="st22" d="M58.2,98.4C57.9,98.1,47.7,86.1,43.1,79l-0.8,0.9C46.9,86.6,52,93,57.6,99L58.2,98.4z"/>
|
||||
|
||||
<linearGradient id="SVGID_24_" gradientUnits="userSpaceOnUse" x1="69.1674" y1="452.6575" x2="78.2209" y2="509.0225" gradientTransform="matrix(1 0 0 1 -8.0854 -395.1333)">
|
||||
<stop offset="0" style="stop-color:#2E5284"/>
|
||||
<stop offset="2.440000e-02" style="stop-color:#2C5C92"/>
|
||||
<stop offset="8.880000e-02" style="stop-color:#2075B1"/>
|
||||
<stop offset="0.1599" style="stop-color:#0B86C4"/>
|
||||
<stop offset="0.2403" style="stop-color:#0A94D2"/>
|
||||
<stop offset="0.3378" style="stop-color:#0E9CDA"/>
|
||||
<stop offset="0.5" style="stop-color:#109EDE"/>
|
||||
<stop offset="0.6718" style="stop-color:#0C9BDB"/>
|
||||
<stop offset="0.7751" style="stop-color:#0A94D2"/>
|
||||
<stop offset="0.8603" style="stop-color:#0B86C4"/>
|
||||
<stop offset="0.9351" style="stop-color:#2174B1"/>
|
||||
<stop offset="1" style="stop-color:#2C5D95"/>
|
||||
</linearGradient>
|
||||
<path class="st23" d="M72.9,79.9c-5.3-6.2-10.2-12.8-14.7-19.7c-0.5-0.8-1.1-1.6-1.6-2.4c-8.7,0-17.4,0.7-26,1.9
|
||||
c0.3,0.5,4.3,7.2,7.2,11.7c27.8,42.8,40.8,41.1,41.4,41c0.6-0.2,1.2-0.5,1.7-0.8L98.8,100C91.4,98.4,82.1,90.6,72.9,79.9z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 20 KiB |
1
resources/icons/jami_id_logo.svg
Normal file
1
resources/icons/jami_id_logo.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="24" viewBox="0 0 30 24"><defs><style>.a{fill:#005699;}.b,.d{fill:none;}.b{stroke:#005699;stroke-width:1.5px;}.c{stroke:none;}</style></defs><g transform="translate(7.328 6.159)"><g transform="translate(0 0)"><path class="a" d="M-2124.191-3452.351h.007a1.335,1.335,0,0,0,.972-.341,1.106,1.106,0,0,0,.351-.847.958.958,0,0,0-.34-.76,1.407,1.407,0,0,0-.983-.337h-.012a1.365,1.365,0,0,0-.977.342,1.1,1.1,0,0,0-.053,1.549l.055.056a1.364,1.364,0,0,0,.973.341Z" transform="translate(2125.521 3454.638)"/></g><g transform="translate(0.358 0.062)"><path class="a" d="M-2123.846-3442.183h9.042a8,8,0,0,0,3.567-.767,5.651,5.651,0,0,0,2.353-2.118,6.555,6.555,0,0,0,0-6.4,5.651,5.651,0,0,0-2.351-2.114,7.975,7.975,0,0,0-3.562-.766h-3.427v8.653h2.057v-7.142h1.216a4.586,4.586,0,0,1,4.953,4.187,4.586,4.586,0,0,1-4.187,4.954,4.585,4.585,0,0,1-.772,0h-6.942v-6.035h-1.946v6.035h0Z" transform="translate(2123.846 3454.35)"/></g></g><g class="b"><path class="c" d="M5,0H25a5,5,0,0,1,5,5V24a0,0,0,0,1,0,0H5a5,5,0,0,1-5-5V5A5,5,0,0,1,5,0Z"/><path class="d" d="M5,.75H25A4.25,4.25,0,0,1,29.25,5V22.5a.75.75,0,0,1-.75.75H5A4.25,4.25,0,0,1,.75,19V5A4.25,4.25,0,0,1,5,.75Z"/></g></svg>
|
After Width: | Height: | Size: 1.2 KiB |
BIN
resources/images/BG-DarkMode-ID_Jami.png
Normal file
BIN
resources/images/BG-DarkMode-ID_Jami.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 514 KiB |
BIN
resources/images/BG-LightMode-ID_Jami.png
Normal file
BIN
resources/images/BG-LightMode-ID_Jami.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 622 KiB |
|
@ -23,12 +23,14 @@ import net.jami.Adapters 1.1
|
|||
import net.jami.Constants 1.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
id: jamiId
|
||||
property bool slimDisplay: true
|
||||
property color backgroundColor: JamiTheme.welcomeBlockColor
|
||||
height: getHeight()
|
||||
|
||||
property alias backgroundColor: outerRect.color
|
||||
|
||||
width: childrenRect.width
|
||||
height: controlsLayout.height + usernameTextEdit.height + 2 * JamiTheme.preferredMarginSize
|
||||
function getHeight() {
|
||||
return outerRow.height;
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: CurrentAccount
|
||||
|
@ -39,144 +41,167 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
// Background rounded rectangle.
|
||||
Rectangle {
|
||||
id: outerRect
|
||||
anchors.fill: columnLayout
|
||||
radius: 20
|
||||
color: JamiTheme.secondaryBackgroundColor
|
||||
}
|
||||
|
||||
// Logo masked by outerRect.
|
||||
Item {
|
||||
anchors.fill: outerRect
|
||||
layer.enabled: true
|
||||
layer.effect: OpacityMask {
|
||||
maskSource: outerRect
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: logoRect
|
||||
width: 97 + radius
|
||||
height: 40
|
||||
color: JamiTheme.mainColor
|
||||
radius: 20
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: -radius
|
||||
|
||||
ResponsiveImage {
|
||||
id: jamiIdLogo
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
// Adjust offset for parent masking margin.
|
||||
anchors.horizontalCenterOffset: parent.radius / 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: JamiTheme.jamiIdLogoWidth
|
||||
height: JamiTheme.jamiIdLogoHeight
|
||||
source: JamiResources.jamiid_svg
|
||||
}
|
||||
id: mask
|
||||
anchors.fill: outerRow
|
||||
radius: 5
|
||||
visible: false
|
||||
Scaffold {
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: columnLayout
|
||||
RowLayout {
|
||||
id: outerRow
|
||||
width: parent.width
|
||||
|
||||
spacing: JamiTheme.preferredMarginSize
|
||||
|
||||
RowLayout {
|
||||
id: controlsLayout
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
Layout.topMargin: JamiTheme.pushButtonMargin / 2
|
||||
Layout.rightMargin: JamiTheme.pushButtonMargin
|
||||
RoundedBorderRectangle {
|
||||
id: leftRect
|
||||
fillColor: jamiId.backgroundColor
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: childrenRect.height
|
||||
radius: {
|
||||
"tl": 5,
|
||||
"tr": 0,
|
||||
"br": 0,
|
||||
"bl": 5
|
||||
}
|
||||
|
||||
JamiIdControlButton {
|
||||
id: btnEdit
|
||||
visible: CurrentAccount.registeredName === ""
|
||||
border.color: enabled ? JamiTheme.buttonTintedBlue : JamiTheme.buttonTintedBlack
|
||||
imageColor: enabled ? JamiTheme.buttonTintedBlue : JamiTheme.buttonTintedBlack
|
||||
enabled: {
|
||||
if (!usernameTextEdit.editMode)
|
||||
return true;
|
||||
switch (usernameTextEdit.nameRegistrationState) {
|
||||
case UsernameTextEdit.NameRegistrationState.BLANK:
|
||||
case UsernameTextEdit.NameRegistrationState.FREE:
|
||||
return true;
|
||||
case UsernameTextEdit.NameRegistrationState.SEARCHING:
|
||||
case UsernameTextEdit.NameRegistrationState.INVALID:
|
||||
case UsernameTextEdit.NameRegistrationState.TAKEN:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
source: usernameTextEdit.editMode ? JamiResources.check_black_24dp_svg : JamiResources.round_edit_24dp_svg
|
||||
toolTipText: JamiStrings.chooseUsername
|
||||
onClicked: {
|
||||
if (usernameTextEdit.readOnly) {
|
||||
usernameTextEdit.startEditing();
|
||||
usernameTextEdit.readOnly = false;
|
||||
} else {
|
||||
usernameTextEdit.accepted();
|
||||
}
|
||||
layer {
|
||||
enabled: true
|
||||
effect: OpacityMask {
|
||||
maskSource: mask
|
||||
}
|
||||
}
|
||||
|
||||
JamiIdControlButton {
|
||||
id: btnCopy
|
||||
source: JamiResources.content_copy_24dp_svg
|
||||
toolTipText: JamiStrings.copy
|
||||
onClicked: UtilsAdapter.setClipboardText(usernameTextEdit.staticText)
|
||||
}
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
JamiIdControlButton {
|
||||
id: btnShare
|
||||
source: JamiResources.share_24dp_svg
|
||||
toolTipText: JamiStrings.share
|
||||
onClicked: viewCoordinator.presentDialog(appWindow, "mainview/components/WelcomePageQrDialog.qml")
|
||||
}
|
||||
ResponsiveImage {
|
||||
id: jamiIdLogoImage
|
||||
Layout.preferredHeight: 40
|
||||
containerHeight: 40
|
||||
containerWidth: 40
|
||||
Layout.leftMargin: JamiTheme.pushButtonMargins
|
||||
source: JamiResources.jami_id_logo_svg
|
||||
color: JamiTheme.tintedBlue
|
||||
}
|
||||
|
||||
JamiIdControlButton {
|
||||
id: btnId
|
||||
source: JamiResources.key_black_24dp_svg
|
||||
visible: CurrentAccount.registeredName !== ""
|
||||
toolTipText: JamiStrings.identifierURI
|
||||
onClicked: {
|
||||
if (clicked) {
|
||||
usernameTextEdit.staticText = CurrentAccount.uri;
|
||||
btnId.toolTipText = JamiStrings.identifierRegisterName;
|
||||
} else {
|
||||
usernameTextEdit.staticText = CurrentAccount.registeredName;
|
||||
btnId.toolTipText = JamiStrings.identifierURI;
|
||||
UsernameTextEdit {
|
||||
id: usernameTextEdit
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
textColor: JamiTheme.tintedBlue
|
||||
fontPixelSize: staticText.length > 16 ? JamiTheme.jamiIdSmallFontSize : JamiTheme.jamiIdFontSize
|
||||
editMode: false
|
||||
isPersistent: false
|
||||
readOnly: true
|
||||
|
||||
onAccepted: {
|
||||
usernameTextEdit.readOnly = true;
|
||||
if (dynamicText === '') {
|
||||
return;
|
||||
}
|
||||
var dlg = viewCoordinator.presentDialog(appWindow, "settingsview/components/NameRegistrationDialog.qml", {
|
||||
"registeredName": dynamicText
|
||||
});
|
||||
dlg.accepted.connect(function () {
|
||||
usernameTextEdit.nameRegistrationState = UsernameTextEdit.NameRegistrationState.BLANK;
|
||||
});
|
||||
}
|
||||
clicked = !clicked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UsernameTextEdit {
|
||||
id: usernameTextEdit
|
||||
RoundedBorderRectangle {
|
||||
id: rightRect
|
||||
fillColor: jamiId.backgroundColor
|
||||
Layout.preferredWidth: childrenRect.width + 2 * JamiTheme.pushButtonMargins
|
||||
|
||||
Layout.preferredWidth: 330
|
||||
Layout.preferredHeight: implicitHeight + JamiTheme.preferredMarginSize
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||
fontPixelSize: JamiTheme.jamiIdFontSize
|
||||
editMode: false
|
||||
isPersistent: false
|
||||
readOnly: true
|
||||
Layout.preferredHeight: leftRect.height
|
||||
radius: {
|
||||
"tl": 0,
|
||||
"tr": 5,
|
||||
"br": 5,
|
||||
"bl": 0
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
usernameTextEdit.readOnly = true;
|
||||
if (dynamicText === '') {
|
||||
return;
|
||||
RowLayout {
|
||||
id: controlsLayout
|
||||
|
||||
height: childrenRect.height
|
||||
width: childrenRect.width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.rightMargin: JamiTheme.pushButtonMargins
|
||||
anchors.leftMargin: JamiTheme.pushButtonMargins
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
JamiIdControlButton {
|
||||
id: btnEdit
|
||||
anchors.leftMargin: JamiTheme.pushButtonMargins
|
||||
visible: CurrentAccount.registeredName === ""
|
||||
border.color: enabled ? JamiTheme.buttonTintedBlue : JamiTheme.buttonTintedBlack
|
||||
imageColor: enabled ? JamiTheme.buttonTintedBlue : JamiTheme.buttonTintedBlack
|
||||
enabled: {
|
||||
if (!usernameTextEdit.editMode)
|
||||
return true;
|
||||
switch (usernameTextEdit.nameRegistrationState) {
|
||||
case UsernameTextEdit.NameRegistrationState.BLANK:
|
||||
case UsernameTextEdit.NameRegistrationState.FREE:
|
||||
return true;
|
||||
case UsernameTextEdit.NameRegistrationState.SEARCHING:
|
||||
case UsernameTextEdit.NameRegistrationState.INVALID:
|
||||
case UsernameTextEdit.NameRegistrationState.TAKEN:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
source: usernameTextEdit.editMode ? JamiResources.check_black_24dp_svg : JamiResources.round_edit_24dp_svg
|
||||
toolTipText: JamiStrings.chooseUsername
|
||||
onClicked: {
|
||||
if (usernameTextEdit.readOnly) {
|
||||
usernameTextEdit.startEditing();
|
||||
usernameTextEdit.readOnly = false;
|
||||
} else {
|
||||
usernameTextEdit.accepted();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JamiIdControlButton {
|
||||
id: btnCopy
|
||||
anchors.leftMargin: JamiTheme.pushButtonMargins
|
||||
source: JamiResources.content_copy_24dp_svg
|
||||
border.color: "transparent"
|
||||
toolTipText: JamiStrings.copy
|
||||
onClicked: UtilsAdapter.setClipboardText(usernameTextEdit.staticText)
|
||||
}
|
||||
|
||||
JamiIdControlButton {
|
||||
id: btnShare
|
||||
source: JamiResources.share_24dp_svg
|
||||
border.color: "transparent"
|
||||
toolTipText: JamiStrings.share
|
||||
onClicked: viewCoordinator.presentDialog(appWindow, "mainview/components/WelcomePageQrDialog.qml")
|
||||
}
|
||||
|
||||
JamiIdControlButton {
|
||||
id: btnId
|
||||
source: JamiResources.key_black_24dp_svg
|
||||
visible: CurrentAccount.registeredName !== ""
|
||||
border.color: "transparent"
|
||||
toolTipText: JamiStrings.identifierURI
|
||||
onClicked: {
|
||||
if (clicked) {
|
||||
usernameTextEdit.staticText = CurrentAccount.uri;
|
||||
btnId.toolTipText = JamiStrings.identifierRegisterName;
|
||||
} else {
|
||||
usernameTextEdit.staticText = CurrentAccount.registeredName;
|
||||
btnId.toolTipText = JamiStrings.identifierURI;
|
||||
}
|
||||
clicked = !clicked;
|
||||
}
|
||||
}
|
||||
var dlg = viewCoordinator.presentDialog(appWindow, "settingsview/components/NameRegistrationDialog.qml", {
|
||||
"registeredName": dynamicText
|
||||
});
|
||||
dlg.accepted.connect(function () {
|
||||
usernameTextEdit.nameRegistrationState = UsernameTextEdit.NameRegistrationState.BLANK;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,11 +209,13 @@ Item {
|
|||
component JamiIdControlButton: PushButton {
|
||||
property bool clicked: true
|
||||
preferredSize: 30
|
||||
radius: 5
|
||||
normalColor: JamiTheme.transparentColor
|
||||
hoveredColor: JamiTheme.hoveredButtonColorWizard
|
||||
//hoveredColor: JamiTheme.hoveredButtonColorWizard
|
||||
imageContainerWidth: JamiTheme.pushButtonSize
|
||||
imageContainerHeight: JamiTheme.pushButtonSize
|
||||
border.color: JamiTheme.tintedBlue
|
||||
imageColor: JamiTheme.buttonTintedBlue
|
||||
duration: 0
|
||||
}
|
||||
}
|
||||
|
|
77
src/app/commoncomponents/RoundedBorderRectangle.qml
Normal file
77
src/app/commoncomponents/RoundedBorderRectangle.qml
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Copyright (C) 2023 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import net.jami.Models 1.1
|
||||
import net.jami.Adapters 1.1
|
||||
import net.jami.Constants 1.1
|
||||
|
||||
Canvas {
|
||||
|
||||
property var radius
|
||||
property string fillColor: Style.colorBGPrimary
|
||||
|
||||
onRadiusChanged: requestPaint()
|
||||
onFillColorChanged: requestPaint()
|
||||
|
||||
//Draw rounded rectangle.
|
||||
onPaint: {
|
||||
var ctx = getContext("2d");
|
||||
var r = {};
|
||||
Object.assign(r, radius);
|
||||
if (typeof r === 'undefined')
|
||||
r = 0;
|
||||
if (typeof r === 'number')
|
||||
r = {
|
||||
"tl": r,
|
||||
"tr": r,
|
||||
"br": r,
|
||||
"bl": r
|
||||
};
|
||||
else {
|
||||
var defaultRadius = {
|
||||
"tl": 0,
|
||||
"tr": 0,
|
||||
"br": 0,
|
||||
"bl": 0
|
||||
};
|
||||
for (var side in defaultRadius)
|
||||
r[side] = r[side] || defaultRadius[side];
|
||||
}
|
||||
var x0 = 0;
|
||||
var y0 = x0;
|
||||
var x1 = width;
|
||||
var y1 = height;
|
||||
ctx.reset();
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x0 + r.tl, y0);
|
||||
ctx.lineTo(x1 - r.tr, y0);
|
||||
ctx.quadraticCurveTo(x1, y0, x1, y0 + r.tr);
|
||||
ctx.lineTo(x1, y1 - r.br);
|
||||
ctx.quadraticCurveTo(x1, y1, x1 - r.br, y1);
|
||||
ctx.lineTo(x0 + r.bl, y1);
|
||||
ctx.quadraticCurveTo(x0, y1, x0, y1 - r.bl);
|
||||
ctx.lineTo(x0, y0 + r.tl);
|
||||
ctx.quadraticCurveTo(x0, y0, x0 + r.tl, y0);
|
||||
ctx.closePath();
|
||||
ctx.fillStyle = fillColor;
|
||||
ctx.fill();
|
||||
}
|
||||
}
|
|
@ -203,7 +203,7 @@ Item {
|
|||
|
||||
// BackupKeyPage
|
||||
property string whyBackupAccount: qsTr("Why should I back-up this account?")
|
||||
property string backupAccountInfos: qsTr("Your account only exists on this device. " + "If you lose your device or uninstall the application, " + "your account will be deleted and CANNOT be recovered. " + "You can back up your account now or later (in the Account Settings).")
|
||||
property string backupAccountInfos: qsTr("Your account only exists on this device. " + "If you lose your device or uninstall the application, " + "your account will be deleted and CANNOT be recovered. " + "You can <a href='blank'> back up your account </a> now or later (in the Account Settings).")
|
||||
property string backupAccountHere: qsTr("Back up account here")
|
||||
property string backupAccountBtn: qsTr("Back up account")
|
||||
property string skip: qsTr("Skip")
|
||||
|
@ -877,7 +877,7 @@ Item {
|
|||
|
||||
// Jami identifier
|
||||
property string identifierDescription: qsTr("Share this Jami identifier to be contacted on this account!")
|
||||
property string hereIsIdentifier: qsTr("Here is your Jami identifier, don't hesitate to share it in order to be contacted more easily!")
|
||||
property string hereIsIdentifier: qsTr("Share your Jami identifier in order to be contacted more easily!")
|
||||
property string jamiIdentity: qsTr("Jami identity")
|
||||
property string identifierURI: qsTr("Show fingerprint")
|
||||
property string identifierRegisterName: qsTr("Show registered name")
|
||||
|
|
|
@ -422,7 +422,7 @@ Item {
|
|||
// Jami Identifier
|
||||
property color mainColor: "#005699"
|
||||
property real pushButtonSize: 22
|
||||
property real pushButtonMargin: 10
|
||||
property real pushButtonMargins: 10
|
||||
|
||||
// Modal Popup
|
||||
property real modalPopupRadius: 20
|
||||
|
@ -487,13 +487,11 @@ Item {
|
|||
property real jamiIdMargins: 36
|
||||
property real jamiIdLogoWidth: 70
|
||||
property real jamiIdLogoHeight: 24
|
||||
property real jamiIdFontSize: calcSize(13)
|
||||
property real jamiIdFontSize: calcSize(19)
|
||||
property real jamiIdSmallFontSize: calcSize(11)
|
||||
property color jamiIdColor: darkTheme ? blackColor : sysColor
|
||||
|
||||
// MainView
|
||||
property color welcomeViewBackgroundColor: darkTheme ? lightGrey_ : secondaryBackgroundColor
|
||||
property real welcomeRectSideMargins: 45
|
||||
property real welcomeRectTopMargin: 90
|
||||
property color rectColor: darkTheme ? blackColor : "#e5eef5"
|
||||
property color welcomeText: darkTheme ? "#0071c9" : "#002B4A"
|
||||
property real illustrationWidth: 212
|
||||
|
@ -521,6 +519,15 @@ Item {
|
|||
property real welcomeLogoHeight: 100
|
||||
property real wizardButtonWidth: 400
|
||||
property real wizardButtonHeightMargin: 31
|
||||
property color welcomeViewBackgroundColor: darkTheme ? lightGrey_ : secondaryBackgroundColor
|
||||
property real welcomeRectSideMargins: 45
|
||||
property real welcomeRectTopMargin: 90
|
||||
property real welcomePageSpacing: 13
|
||||
property real welcomeGridWidth: 3 * JamiTheme.tipBoxWidth + 2 * JamiTheme.welcomePageSpacing
|
||||
property real welcomeHalfGridWidth: (welcomeGridWidth - JamiTheme.welcomePageSpacing) / 2
|
||||
property real welcomeShortGridWidth: 2 * JamiTheme.tipBoxWidth + JamiTheme.welcomePageSpacing
|
||||
readonly property string welcomeBg: darkTheme ? JamiResources.bg_darkmode_id_jami_png : JamiResources.bg_lightmode_id_jami_png
|
||||
property color welcomeBlockColor: darkTheme ? "#4D000000" : "#4DFFFFFF"
|
||||
|
||||
// WizardView Advanced Account Settings
|
||||
property color lightBlue_: darkTheme ? "#03B9E9" : "#e5eef5"
|
||||
|
@ -542,6 +549,7 @@ Item {
|
|||
property real infoBoxDescFontSize: calcSize(12)
|
||||
|
||||
// Tipbox
|
||||
property real tipBoxWidth: 200
|
||||
property real tipBoxTitleFontSize: calcSize(13)
|
||||
property real tipBoxContentFontSize: calcSize(12)
|
||||
property color tipBoxBackgroundColor: darkTheme ? blackColor : whiteColor
|
||||
|
@ -594,7 +602,7 @@ Item {
|
|||
property real mainViewPreferredWidth: 730
|
||||
property real mainViewPreferredHeight: 600
|
||||
|
||||
property real mainViewMargin: 30
|
||||
property real mainViewMargin: 25
|
||||
|
||||
// Extras panel
|
||||
property real extrasPanelMinWidth: 300
|
||||
|
|
|
@ -32,6 +32,8 @@ Item {
|
|||
property var margin: 5
|
||||
property var prefWidth: 170
|
||||
|
||||
property real maxHeight: 250
|
||||
|
||||
signal ignore
|
||||
|
||||
ColumnLayout {
|
||||
|
@ -41,6 +43,7 @@ Item {
|
|||
width: parent.width
|
||||
|
||||
RowLayout {
|
||||
id: rowlayout
|
||||
|
||||
Layout.leftMargin: 15
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
|
@ -58,16 +61,16 @@ Item {
|
|||
containerHeight: Layout.preferredHeight
|
||||
containerWidth: Layout.preferredWidth
|
||||
|
||||
source: JamiResources.noun_paint_svg
|
||||
source: JamiResources.backup_svg
|
||||
color: JamiTheme.buttonTintedBlue
|
||||
}
|
||||
|
||||
Text {
|
||||
id: title
|
||||
text: JamiStrings.backupAccountBtn
|
||||
color: JamiTheme.textColor
|
||||
font.weight: Font.Medium
|
||||
Layout.topMargin: root.margin
|
||||
visible: !opened
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.leftMargin: root.margin
|
||||
Layout.preferredWidth: root.prefWidth - 2 * root.margin - root.iconSize
|
||||
|
@ -81,7 +84,7 @@ Item {
|
|||
Layout.preferredWidth: root.prefWidth
|
||||
Layout.leftMargin: 20
|
||||
Layout.topMargin: 8
|
||||
Layout.bottomMargin: 15
|
||||
Layout.bottomMargin: 8
|
||||
font.pixelSize: JamiTheme.tipBoxContentFontSize
|
||||
visible: !opened
|
||||
wrapMode: Text.WordWrap
|
||||
|
@ -91,59 +94,50 @@ Item {
|
|||
horizontalAlignment: Text.AlignLeft
|
||||
}
|
||||
|
||||
Text {
|
||||
JamiFlickable {
|
||||
Layout.preferredWidth: root.width - 32
|
||||
Layout.leftMargin: 20
|
||||
Layout.topMargin: 20
|
||||
font.pixelSize: JamiTheme.tipBoxContentFontSize
|
||||
visible: opened
|
||||
wrapMode: Text.WordWrap
|
||||
text: JamiStrings.backupAccountInfos
|
||||
color: JamiTheme.textColor
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
}
|
||||
property real maxDescriptionHeight: maxHeight - rowlayout.Layout.preferredHeight - title.Layout.preferredHeight - 3 * JamiTheme.preferredMarginSize
|
||||
Layout.preferredHeight: opened ? Math.min(contentHeight, maxDescriptionHeight) : 0
|
||||
contentHeight: description.height
|
||||
Text {
|
||||
id: description
|
||||
width: parent.width
|
||||
font.pixelSize: JamiTheme.tipBoxContentFontSize
|
||||
visible: opened
|
||||
wrapMode: Text.WordWrap
|
||||
text: JamiStrings.backupAccountInfos
|
||||
color: JamiTheme.textColor
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
linkColor: JamiTheme.buttonTintedBlue
|
||||
|
||||
MaterialButton {
|
||||
id: backupBtn
|
||||
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
preferredWidth: parent.width - 32
|
||||
height: 32
|
||||
visible: opened
|
||||
|
||||
text: JamiStrings.backupAccountBtn
|
||||
autoAccelerator: true
|
||||
color: JamiTheme.buttonTintedGrey
|
||||
hoveredColor: JamiTheme.buttonTintedGreyHovered
|
||||
pressedColor: JamiTheme.buttonTintedGreyPressed
|
||||
|
||||
onClicked: {
|
||||
var dlg = viewCoordinator.presentDialog(appWindow, "commoncomponents/JamiFileDialog.qml", {
|
||||
"title": JamiStrings.backupAccountHere,
|
||||
"fileMode": JamiFileDialog.SaveFile,
|
||||
"folder": StandardPaths.writableLocation(StandardPaths.HomeLocation) + "/Desktop",
|
||||
"nameFilters": [JamiStrings.jamiArchiveFiles, JamiStrings.allFiles]
|
||||
});
|
||||
dlg.fileAccepted.connect(function (file) {
|
||||
// Is there password? If so, go to password dialog, else, go to following directly
|
||||
if (CurrentAccount.hasArchivePassword) {
|
||||
var pwdDlg = viewCoordinator.presentDialog(appWindow, "commoncomponents/PasswordDialog.qml", {
|
||||
"path": UtilsAdapter.getAbsPath(file),
|
||||
"purpose": PasswordDialog.ExportAccount
|
||||
});
|
||||
pwdDlg.done.connect(function () {
|
||||
onLinkActivated: {
|
||||
var dlg = viewCoordinator.presentDialog(appWindow, "commoncomponents/JamiFileDialog.qml", {
|
||||
"title": JamiStrings.backupAccountHere,
|
||||
"fileMode": JamiFileDialog.SaveFile,
|
||||
"folder": StandardPaths.writableLocation(StandardPaths.HomeLocation) + "/Desktop",
|
||||
"nameFilters": [JamiStrings.jamiArchiveFiles, JamiStrings.allFiles]
|
||||
});
|
||||
dlg.fileAccepted.connect(function (file) {
|
||||
// Is there password? If so, go to password dialog, else, go to following directly
|
||||
if (CurrentAccount.hasArchivePassword) {
|
||||
var pwdDlg = viewCoordinator.presentDialog(appWindow, "commoncomponents/PasswordDialog.qml", {
|
||||
"path": UtilsAdapter.getAbsPath(file),
|
||||
"purpose": PasswordDialog.ExportAccount
|
||||
});
|
||||
pwdDlg.done.connect(function () {
|
||||
root.ignore();
|
||||
});
|
||||
} else {
|
||||
if (file.toString().length > 0) {
|
||||
root.ignore();
|
||||
});
|
||||
} else {
|
||||
if (file.toString().length > 0) {
|
||||
root.ignore();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
dlg.rejected.connect(function () {
|
||||
backupBtn.forceActiveFocus();
|
||||
});
|
||||
});
|
||||
dlg.rejected.connect(function () {
|
||||
backupBtn.forceActiveFocus();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,14 +33,14 @@ Item {
|
|||
property string localPath: ""
|
||||
property int imageFillMode: 0
|
||||
|
||||
Image {
|
||||
AnimatedImage {
|
||||
id: image
|
||||
objectName: "image"
|
||||
anchors.fill: parent
|
||||
fillMode: imageFillMode
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
property bool isSvg: getIsSvg(this)
|
||||
property bool isGif: getIsGif(this)
|
||||
|
||||
Image {
|
||||
id: default_img
|
||||
|
@ -50,31 +50,19 @@ Item {
|
|||
visible: image.status != Image.Ready
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
property bool isSvg: getIsSvg(this)
|
||||
|
||||
Component.onCompleted: setSourceSize(default_img)
|
||||
}
|
||||
|
||||
Component.onCompleted: setSourceSize(image)
|
||||
}
|
||||
|
||||
function setSourceSize(img) {
|
||||
img.sourceSize = undefined;
|
||||
if (img.isSvg) {
|
||||
img.sourceSize = Qt.size(cachedImage.width, cachedImage.height);
|
||||
property bool isGif: getIsGif(this)
|
||||
}
|
||||
}
|
||||
|
||||
function getIsSvg(img) {
|
||||
if (img.source && img.source!=""){
|
||||
var localPath = img.source.toString()
|
||||
function getIsGif(img) {
|
||||
if (img.source && img.source != "") {
|
||||
var localPath = img.source.toString();
|
||||
if (localPath.startsWith("file://")) {
|
||||
localPath = localPath.substring(7);
|
||||
}
|
||||
return UtilsAdapter.getMimeName(localPath).startsWith("image/svg+xml");
|
||||
return UtilsAdapter.getMimeName(localPath).startsWith("image/gif");
|
||||
}
|
||||
return false
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
@ -82,11 +70,12 @@ Item {
|
|||
function onDownloadImageSuccessful(localPath) {
|
||||
if (localPath === cachedImage.localPath) {
|
||||
image.source = "file://" + localPath;
|
||||
print("onDownloadImageSuccessful", localPath);
|
||||
}
|
||||
}
|
||||
function onDownloadImageFailed(localPath) {
|
||||
print("Failed to download image: " + downloadUrl);
|
||||
if (localPath === cachedImage.localPath) {
|
||||
print("Failed to download image: " + downloadUrl);
|
||||
image.source = defaultImage;
|
||||
}
|
||||
}
|
||||
|
@ -96,24 +85,11 @@ Item {
|
|||
target: cachedImage
|
||||
function onDownloadUrlChanged() {
|
||||
updateImageSource(downloadUrl, localPath, defaultImage);
|
||||
setSourceSize(image);
|
||||
setSourceSize(default_img);
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
updateImageSource(downloadUrl, localPath, defaultImage);
|
||||
setSourceSize(image);
|
||||
setSourceSize(default_img);
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: CurrentScreenInfo
|
||||
|
||||
function onDevicePixelRatioChanged() {
|
||||
setSourceSize(image);
|
||||
setSourceSize(default_img);
|
||||
}
|
||||
}
|
||||
|
||||
function updateImageSource(downloadUrl, localPath, defaultImage) {
|
||||
|
@ -121,11 +97,15 @@ Item {
|
|||
image.source = defaultImage;
|
||||
return;
|
||||
}
|
||||
if (downloadUrl !== "" && localPath !== "") {
|
||||
if (downloadUrl && downloadUrl !== "" && localPath !== "") {
|
||||
if (!UtilsAdapter.fileExists(localPath)) {
|
||||
print("ImageDownloader.downloadImage", downloadUrl, localPath);
|
||||
ImageDownloader.downloadImage(downloadUrl, localPath);
|
||||
} else {
|
||||
image.source = "file://" + localPath;
|
||||
if (image.isGif) {
|
||||
image.playing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,13 @@ ColumnLayout {
|
|||
property var iconSize: 26
|
||||
property var margin: 5
|
||||
property var prefWidth: 170
|
||||
property bool opened: root.opened
|
||||
focus: true
|
||||
|
||||
onOpenedChanged: {
|
||||
if (opened)
|
||||
displayNameLineEdit.forceActiveFocus();
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
||||
|
@ -50,6 +57,7 @@ ColumnLayout {
|
|||
|
||||
source: JamiResources.noun_paint_svg
|
||||
color: JamiTheme.buttonTintedBlue
|
||||
focus: activeFocus
|
||||
}
|
||||
|
||||
Label {
|
||||
|
@ -58,7 +66,6 @@ ColumnLayout {
|
|||
font.weight: Font.Medium
|
||||
Layout.topMargin: column.margin
|
||||
Layout.preferredWidth: column.prefWidth - 2 * column.margin - column.iconSize
|
||||
visible: !opened
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.leftMargin: column.margin
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
|
@ -106,13 +113,14 @@ ColumnLayout {
|
|||
placeholderText: JamiStrings.enterNickname
|
||||
|
||||
onAccepted: AccountAdapter.setCurrAccDisplayName(dynamicText)
|
||||
focus: activeFocus
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
Layout.preferredWidth: root.width - 32
|
||||
Layout.leftMargin: 20
|
||||
Layout.topMargin: 6
|
||||
Layout.topMargin: 15
|
||||
font.pixelSize: JamiTheme.tipBoxContentFontSize
|
||||
visible: opened
|
||||
wrapMode: Text.WordWrap
|
||||
|
|
|
@ -26,12 +26,15 @@ ColumnLayout {
|
|||
id: column
|
||||
width: parent.width
|
||||
|
||||
property real maxHeight: 250
|
||||
|
||||
property var iconSize: 26
|
||||
property var margin: 5
|
||||
property var prefWidth: 170
|
||||
|
||||
RowLayout {
|
||||
|
||||
id: rowlayout
|
||||
Layout.preferredHeight: opened ? 0 : childrenRect.height
|
||||
Layout.leftMargin: 15
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
|
||||
|
@ -68,10 +71,12 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
Text {
|
||||
id: title
|
||||
Layout.preferredHeight: contentHeight
|
||||
Layout.preferredWidth: opened ? 140 : 150
|
||||
Layout.leftMargin: 20
|
||||
Layout.topMargin: opened ? 0 : 8
|
||||
Layout.bottomMargin: 15
|
||||
Layout.bottomMargin: 8
|
||||
font.pixelSize: JamiTheme.tipBoxContentFontSize
|
||||
wrapMode: Text.WordWrap
|
||||
font.weight: opened ? Font.Medium : Font.Normal
|
||||
|
@ -80,14 +85,21 @@ ColumnLayout {
|
|||
color: JamiTheme.textColor
|
||||
}
|
||||
|
||||
Text {
|
||||
JamiFlickable {
|
||||
Layout.preferredWidth: root.width - 32
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||
font.pixelSize: JamiTheme.tipBoxContentFontSize
|
||||
visible: opened
|
||||
wrapMode: Text.WordWrap
|
||||
text: root.description
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
color: JamiTheme.textColor
|
||||
property real maxDescriptionHeight: maxHeight - rowlayout.Layout.preferredHeight - title.Layout.preferredHeight - 2 * JamiTheme.preferredMarginSize
|
||||
Layout.preferredHeight: opened ? Math.min(contentHeight, maxDescriptionHeight) : 0
|
||||
contentHeight: description.height
|
||||
Text {
|
||||
id: description
|
||||
width: parent.width
|
||||
font.pixelSize: JamiTheme.tipBoxContentFontSize
|
||||
visible: opened
|
||||
wrapMode: Text.WordWrap
|
||||
text: root.description
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
color: JamiTheme.textColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.jami.Constants 1.1
|
|||
import Qt5Compat.GraphicalEffects
|
||||
import "../../commoncomponents"
|
||||
|
||||
Item {
|
||||
FocusScope {
|
||||
id: root
|
||||
property string title: ""
|
||||
property string description: ""
|
||||
|
@ -32,7 +32,8 @@ Item {
|
|||
property string type: ""
|
||||
property bool hovered: false
|
||||
property bool clicked: false
|
||||
property bool opened: false
|
||||
property bool opened: activeFocus
|
||||
property color backgroundColor: JamiTheme.welcomeBlockColor
|
||||
|
||||
property string customizeTip: "CustomizeTipBox {}"
|
||||
|
||||
|
@ -40,18 +41,27 @@ Item {
|
|||
|
||||
property string infoTip: "InformativeTipBox {}"
|
||||
|
||||
width: 200
|
||||
height: tipColumnLayout.implicitHeight + 2 * JamiTheme.preferredMarginSize
|
||||
width: JamiTheme.tipBoxWidth
|
||||
|
||||
property real minimumHeight: 150
|
||||
property real maximumHeight: 250
|
||||
|
||||
height: Math.max(minimumHeight, Math.min(maximumHeight, tipColumnLayout.implicitHeight + 2 * JamiTheme.preferredMarginSize))
|
||||
|
||||
signal ignoreClicked
|
||||
|
||||
focus: true
|
||||
activeFocusOnTab: true
|
||||
|
||||
Rectangle {
|
||||
id: rect
|
||||
anchors.fill: parent
|
||||
|
||||
color: opened || hovered ? JamiTheme.tipBoxBackgroundColor : "transparent"
|
||||
border.color: JamiTheme.tipBoxBorderColor
|
||||
radius: 20
|
||||
color: root.backgroundColor
|
||||
|
||||
radius: 5
|
||||
|
||||
focus: true
|
||||
|
||||
Column {
|
||||
id: tipColumnLayout
|
||||
|
@ -59,14 +69,32 @@ Item {
|
|||
width: parent.width
|
||||
anchors.topMargin: 10
|
||||
|
||||
Component.onCompleted: {
|
||||
if (type === "customize") {
|
||||
Qt.createQmlObject(customizeTip, this, 'tip');
|
||||
} else if (type === "backup") {
|
||||
Qt.createQmlObject(backupTip, this, 'tip');
|
||||
} else {
|
||||
Qt.createQmlObject(infoTip, this, 'tip');
|
||||
Loader {
|
||||
id: loader_backupTip
|
||||
active: type === "backup"
|
||||
sourceComponent: BackupTipBox {
|
||||
onIgnore: {
|
||||
root.ignoreClicked();
|
||||
}
|
||||
maxHeight: root.maximumHeight
|
||||
}
|
||||
width: parent.width
|
||||
}
|
||||
Loader {
|
||||
id: loader_customizeTip
|
||||
active: type === "customize"
|
||||
sourceComponent: CustomizeTipBox {
|
||||
}
|
||||
width: parent.width
|
||||
focus: true
|
||||
}
|
||||
Loader {
|
||||
id: loader_infoTip
|
||||
active: type === "tip"
|
||||
sourceComponent: InformativeTipBox {
|
||||
maxHeight: root.maximumHeight
|
||||
}
|
||||
width: parent.width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +107,9 @@ Item {
|
|||
|
||||
TapHandler {
|
||||
target: rect
|
||||
onTapped: opened = !opened
|
||||
onTapped: {
|
||||
return opened ? focus = false : root.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
|
@ -96,25 +126,35 @@ Item {
|
|||
samples: radius + 1
|
||||
}
|
||||
|
||||
PushButton {
|
||||
id: btnClose
|
||||
Loader {
|
||||
id: loader_btnClose
|
||||
active: type === "tip"
|
||||
sourceComponent: component_btnClose
|
||||
anchors.margins: 8
|
||||
anchors.bottom: root.top
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
}
|
||||
|
||||
width: 20
|
||||
height: 20
|
||||
imageContainerWidth: 20
|
||||
imageContainerHeight: 20
|
||||
anchors.margins: 14
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
visible: opened
|
||||
circled: true
|
||||
Component {
|
||||
id: component_btnClose
|
||||
PushButton {
|
||||
id: btnClose
|
||||
|
||||
imageColor: Qt.rgba(0, 86 / 255, 153 / 255, 1)
|
||||
normalColor: "transparent"
|
||||
toolTipText: JamiStrings.dismiss
|
||||
width: 20
|
||||
height: 20
|
||||
imageContainerWidth: 20
|
||||
imageContainerHeight: 20
|
||||
|
||||
source: JamiResources.round_close_24dp_svg
|
||||
visible: opened
|
||||
circled: true
|
||||
|
||||
onClicked: root.ignoreClicked()
|
||||
imageColor: JamiTheme.tintedBlue
|
||||
normalColor: "transparent"
|
||||
toolTipText: JamiStrings.dismiss
|
||||
|
||||
source: JamiResources.trash_black_24dp_svg
|
||||
|
||||
onClicked: root.ignoreClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
98
src/app/mainview/components/TipsRow.qml
Normal file
98
src/app/mainview/components/TipsRow.qml
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import net.jami.Adapters 1.1
|
||||
import net.jami.Constants 1.1
|
||||
import net.jami.Enums 1.1
|
||||
import net.jami.Models 1.1
|
||||
import "../../commoncomponents"
|
||||
import "../js/keyboardshortcuttablecreation.js" as KeyboardShortcutTableCreation
|
||||
|
||||
JamiFlickable {
|
||||
id: tipsRow
|
||||
clip: false
|
||||
|
||||
property color tipsColor: JamiTheme.welcomeBlockColor
|
||||
width: JamiTheme.welcomeGridWidth
|
||||
height: getHeight()
|
||||
function getHeight() {
|
||||
return row.height;
|
||||
}
|
||||
|
||||
Row {
|
||||
id: row
|
||||
clip: false
|
||||
spacing: JamiTheme.welcomePageSpacing
|
||||
height: 150
|
||||
|
||||
width: JamiTheme.welcomeGridWidth
|
||||
property real openedTipCount: 0
|
||||
|
||||
Repeater {
|
||||
id: tipsRepeater
|
||||
model: TipsModel
|
||||
anchors.bottom: row.bottom
|
||||
delegate: TipBox {
|
||||
backgroundColor: tipsRow.tipsColor
|
||||
tipId: TipId
|
||||
title: Title
|
||||
description: Description
|
||||
type: Type
|
||||
property bool hideTipBox: false
|
||||
anchors.bottom: row.bottom
|
||||
|
||||
visible: {
|
||||
if (hideTipBox)
|
||||
return false;
|
||||
if (type === "backup") {
|
||||
return LRCInstance.currentAccountType !== Profile.Type.SIP && CurrentAccount.managerUri.length === 0;
|
||||
} else if (type === "customize") {
|
||||
return CurrentAccount.alias.length === 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
enabled: {
|
||||
if (x >= tipsRow.width)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
opacity: {
|
||||
if (x >= tipsRow.width)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
onIgnoreClicked: {
|
||||
hideTipBox = true;
|
||||
}
|
||||
|
||||
onOpenedChanged: {
|
||||
if (opened)
|
||||
row.openedTipCount++;
|
||||
else
|
||||
row.openedTipCount--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
159
src/app/mainview/components/WelcomeInfo.qml
Normal file
159
src/app/mainview/components/WelcomeInfo.qml
Normal file
|
@ -0,0 +1,159 @@
|
|||
/*
|
||||
* Copyright (C) 2023 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import net.jami.Adapters 1.1
|
||||
import net.jami.Constants 1.1
|
||||
import net.jami.Enums 1.1
|
||||
import net.jami.Models 1.1
|
||||
import "../../commoncomponents"
|
||||
import "../js/keyboardshortcuttablecreation.js" as KeyboardShortcutTableCreation
|
||||
|
||||
Item {
|
||||
id: welcomeInfo
|
||||
|
||||
property color backgroundColor: "transparent"
|
||||
property color idColor: JamiTheme.welcomeBlockColor
|
||||
property bool hasTitle: true
|
||||
property bool hasDescription: true
|
||||
|
||||
property string title: JamiStrings.welcomeToJami
|
||||
property string description: JamiStrings.hereIsIdentifier
|
||||
|
||||
property real contentWidth: welcomeInfo.width - 2 * JamiTheme.mainViewMargin
|
||||
|
||||
function getHeight() {
|
||||
return bgRect.height;
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: bgRect
|
||||
radius: 5
|
||||
color: welcomeInfo.backgroundColor
|
||||
height: childrenRect.height + JamiTheme.mainViewMargin / 2
|
||||
width: welcomeInfo.width
|
||||
|
||||
ColumnLayout {
|
||||
id: columnLayoutInfo
|
||||
anchors.horizontalCenter: bgRect.horizontalCenter
|
||||
|
||||
spacing: 0
|
||||
|
||||
Loader {
|
||||
id: loader_welcomeTitle
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredHeight: item ? item.contentHeight : 0
|
||||
Layout.topMargin: JamiTheme.mainViewMargin / 2
|
||||
Layout.bottomMargin: loader_identifierDescription.item ? JamiTheme.mainViewMargin - 15 : 0
|
||||
sourceComponent: welcomeInfo.hasTitle ? component_welcomeTitle : undefined
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: loader_identifierDescription
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredWidth: contentWidth
|
||||
Layout.preferredHeight: item ? item.contentHeight : 0
|
||||
Layout.bottomMargin: loader_bottomIdentifier.item ? JamiTheme.mainViewMargin - 10 : 0
|
||||
sourceComponent: {
|
||||
if (welcomeInfo.hasDescription) {
|
||||
if (CurrentAccount.type !== Profile.Type.SIP) {
|
||||
return component_identifierDescription;
|
||||
} else {
|
||||
return component_identifierDescriptionSIP;
|
||||
}
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: loader_bottomIdentifier
|
||||
active: CurrentAccount.type !== Profile.Type.SIP
|
||||
objectName: "loader_bottomIdentifier"
|
||||
sourceComponent: JamiIdentifier {
|
||||
backgroundColor: welcomeInfo.idColor
|
||||
}
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredHeight: active ? item.getHeight() : 0
|
||||
Layout.preferredWidth: active ? contentWidth : 0
|
||||
}
|
||||
|
||||
Binding {
|
||||
target: loader_bottomIdentifier.item
|
||||
property: "slimDisplay"
|
||||
value: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: component_welcomeTitle
|
||||
Label {
|
||||
id: welcomeTitle
|
||||
|
||||
width: welcomeInfo.contentWidth
|
||||
height: contentHeight
|
||||
|
||||
font.pixelSize: JamiTheme.bigFontSize
|
||||
wrapMode: Text.WordWrap
|
||||
text: welcomeInfo.title
|
||||
color: JamiTheme.textColor
|
||||
textFormat: TextEdit.PlainText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: component_identifierDescription
|
||||
Label {
|
||||
id: identifierDescription
|
||||
visible: CurrentAccount.type !== Profile.Type.SIP
|
||||
|
||||
width: welcomeInfo.contentWidth
|
||||
height: contentHeight
|
||||
font.pixelSize: JamiTheme.headerFontSize
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
text: welcomeInfo.description
|
||||
lineHeight: 1.25
|
||||
color: JamiTheme.textColor
|
||||
textFormat: TextEdit.PlainText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: component_identifierDescriptionSIP
|
||||
Label {
|
||||
id: identifierDescriptionSIP
|
||||
|
||||
width: welcomeInfo.contentWidth
|
||||
height: contentHeight
|
||||
font.pixelSize: JamiTheme.headerFontSize
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
text: JamiStrings.description
|
||||
color: JamiTheme.textColor
|
||||
textFormat: TextEdit.PlainText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
}
|
67
src/app/mainview/components/WelcomeLogo.qml
Normal file
67
src/app/mainview/components/WelcomeLogo.qml
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright (C) 2023 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import net.jami.Adapters 1.1
|
||||
import net.jami.Constants 1.1
|
||||
import net.jami.Enums 1.1
|
||||
import net.jami.Models 1.1
|
||||
import "../../commoncomponents"
|
||||
import "../js/keyboardshortcuttablecreation.js" as KeyboardShortcutTableCreation
|
||||
|
||||
Item {
|
||||
id: welcomeLogo
|
||||
|
||||
property bool hasCustomLogo: viewNode.hasCustomLogo
|
||||
property string logoUrl: viewNode.customLogoUrl
|
||||
//logoSize has to be between 0 and 1
|
||||
property real logoSize: 1
|
||||
|
||||
height: getHeight()
|
||||
width: getWidth()
|
||||
|
||||
function getWidth() {
|
||||
return JamiTheme.welcomeHalfGridWidth;
|
||||
}
|
||||
|
||||
function getHeight() {
|
||||
return 120;
|
||||
}
|
||||
|
||||
CachedImage {
|
||||
id: cachedImgLogo
|
||||
objectName: "cachedImgLogo"
|
||||
downloadUrl: logoUrl
|
||||
defaultImage: JamiResources.jami_logo_icon_svg
|
||||
visible: welcomeLogo.visible
|
||||
height: parent.height * logoSize
|
||||
width: parent.width * logoSize
|
||||
anchors.centerIn: parent
|
||||
opacity: visible ? 1 : 0
|
||||
customLogo: hasCustomLogo
|
||||
localPath: UtilsAdapter.getCachePath() + "/" + CurrentAccount.id + "/welcomeview/" + UtilsAdapter.base64Encode(downloadUrl) + fileExtension
|
||||
|
||||
imageFillMode: Image.PreserveAspectFit
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: JamiTheme.shortFadeDuration
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,6 +26,7 @@ import "../js/keyboardshortcuttablecreation.js" as KeyboardShortcutTableCreation
|
|||
|
||||
ListSelectionView {
|
||||
id: viewNode
|
||||
|
||||
objectName: "WelcomePage"
|
||||
|
||||
splitViewStateKey: "Main"
|
||||
|
@ -35,8 +36,78 @@ ListSelectionView {
|
|||
|
||||
onPresented: LRCInstance.deselectConversation()
|
||||
leftPaneItem: viewCoordinator.getView("SidePanel")
|
||||
|
||||
property variant uiCustomization: CurrentAccount.uiCustomization
|
||||
|
||||
onUiCustomizationChanged: {
|
||||
updateUiFlags();
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
updateUiFlags();
|
||||
}
|
||||
|
||||
property bool hasCustomUi: false
|
||||
|
||||
property bool hasTitle: true
|
||||
property bool hasDescription: true
|
||||
|
||||
property bool hasCustomTitle: false
|
||||
property string title: JamiStrings.welcomeToJami
|
||||
|
||||
property bool hasCustomDescription: false
|
||||
property string description: JamiStrings.hereIsIdentifier
|
||||
|
||||
property bool hasLogo: true
|
||||
property bool hasTips: true
|
||||
|
||||
//logoSize has to be between 0 and 1
|
||||
property real logoSize: 1
|
||||
|
||||
property bool hasCustomBgImage: false
|
||||
property string customBgUrl: ""
|
||||
|
||||
property bool hasCustomBgColor: false
|
||||
property string customBgColor: ""
|
||||
|
||||
property bool hasCustomLogo: false
|
||||
property string customLogoUrl: ""
|
||||
|
||||
property bool hasWelcomeInfo: true
|
||||
property bool hasBottomId: false
|
||||
property bool hasTopId: false
|
||||
|
||||
property color tipBoxAndIdColor: JamiTheme.welcomeBlockColor
|
||||
|
||||
property color mainBoxColor: "transparent"
|
||||
|
||||
function updateUiFlags() {
|
||||
hasCustomUi = Object.keys(uiCustomization).length > 0;
|
||||
hasTitle = hasCustomUi ? uiCustomization.title !== "" : true;
|
||||
hasDescription = hasCustomUi ? uiCustomization.description !== "" : true;
|
||||
title = hasCustomUi && uiCustomization.title !== undefined ? uiCustomization.title : JamiStrings.welcomeToJami;
|
||||
description = hasCustomUi && uiCustomization.description !== undefined ? uiCustomization.description : JamiStrings.hereIsIdentifier;
|
||||
hasLogo = hasCustomUi ? uiCustomization.logoUrl !== "" : true;
|
||||
hasTips = hasCustomUi ? uiCustomization.areTipsEnabled : true;
|
||||
hasCustomBgImage = (hasCustomUi && uiCustomization.backgroundType === "image");
|
||||
customBgUrl = hasCustomBgImage ? (CurrentAccount.managerUri + uiCustomization.backgroundColorOrUrl) : "";
|
||||
hasCustomBgColor = (hasCustomUi && uiCustomization.backgroundType === "color");
|
||||
customBgColor = hasCustomBgColor ? uiCustomization.backgroundColorOrUrl : "";
|
||||
hasCustomLogo = (hasCustomUi && hasLogo && uiCustomization.logoUrl);
|
||||
customLogoUrl = hasCustomLogo ? CurrentAccount.managerUri + uiCustomization.logoUrl : "";
|
||||
hasWelcomeInfo = hasTitle || hasDescription;
|
||||
hasBottomId = !hasWelcomeInfo && !hasTips && hasLogo;
|
||||
hasTopId = !hasWelcomeInfo && (!hasLogo || hasTips);
|
||||
logoSize = (hasCustomUi && uiCustomization.logoSize !== undefined) ? uiCustomization.logoSize / 100 : 1;
|
||||
tipBoxAndIdColor = (hasCustomUi && uiCustomization.tipBoxAndIdColor !== undefined) ? uiCustomization.tipBoxAndIdColor : JamiTheme.welcomeBlockColor;
|
||||
mainBoxColor = (hasCustomUi && uiCustomization.mainBoxColor !== undefined) ? uiCustomization.mainBoxColor : "transparent";
|
||||
}
|
||||
|
||||
rightPaneItem: JamiFlickable {
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
property int thresholdSize: 700
|
||||
property int thresholdHeight: 570
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
@ -44,179 +115,105 @@ ListSelectionView {
|
|||
onClicked: root.forceActiveFocus()
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
contentHeight: Math.max(root.height, welcomePageLayout.implicitHeight)
|
||||
contentWidth: Math.max(300, root.width)
|
||||
|
||||
Item {
|
||||
Rectangle {
|
||||
id: bgRect
|
||||
anchors.fill: parent
|
||||
color: hasCustomBgColor ? customBgColor : "transparent"
|
||||
}
|
||||
|
||||
CachedImage {
|
||||
id: cachedImgLogo
|
||||
downloadUrl: hasCustomBgImage ? customBgUrl : JamiTheme.welcomeBg
|
||||
anchors.fill: parent
|
||||
opacity: visible ? 1 : 0
|
||||
localPath: UtilsAdapter.getCachePath() + "/" + CurrentAccount.id + "/welcomeview/" + UtilsAdapter.base64Encode(downloadUrl) + fileExtension
|
||||
imageFillMode: Image.PreserveAspectCrop
|
||||
|
||||
Connections {
|
||||
target: JamiTheme
|
||||
function onDarkThemeChanged() {
|
||||
cachedImgLogo.downloadUrl = hasCustomBgImage ? customBgUrl : JamiTheme.welcomeBg;
|
||||
tipBoxAndIdColor = (hasCustomUi && uiCustomization.tipBoxAndIdColor !== undefined) ? uiCustomization.tipBoxAndIdColor : JamiTheme.welcomeBlockColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: welcomePageLayout
|
||||
width: Math.max(300, root.width)
|
||||
height: parent.height
|
||||
|
||||
Item {
|
||||
anchors.centerIn: parent
|
||||
height: childrenRect.height
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
Rectangle {
|
||||
id: welcomeInfo
|
||||
ColumnLayout {
|
||||
anchors.centerIn: parent
|
||||
|
||||
radius: 30
|
||||
color: JamiTheme.rectColor
|
||||
anchors.topMargin: 25
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: identifier.width + 2 * JamiTheme.mainViewMargin + (welcomeLogo.visible ? welcomeLogo.width : 0)
|
||||
height: childrenRect.height + 10
|
||||
opacity: 1
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: JamiTheme.shortFadeDuration
|
||||
Loader {
|
||||
id: loader_welcomeLogo
|
||||
objectName: "loader_welcomeLogo"
|
||||
active: viewNode.hasLogo
|
||||
sourceComponent: WelcomeLogo {
|
||||
logoSize: viewNode.logoSize
|
||||
}
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredWidth: active ? item.getWidth() : 0
|
||||
Layout.preferredHeight: active ? item.getHeight() : 0
|
||||
Layout.topMargin: 20
|
||||
}
|
||||
|
||||
Label {
|
||||
id: welcome
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: JamiTheme.mainViewMargin
|
||||
anchors.leftMargin: JamiTheme.mainViewMargin
|
||||
width: 300
|
||||
|
||||
font.pixelSize: JamiTheme.bigFontSize
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
text: JamiStrings.welcomeToJami
|
||||
color: JamiTheme.textColor
|
||||
}
|
||||
|
||||
Label {
|
||||
id: descriptionLabel
|
||||
visible: CurrentAccount.type === Profile.Type.SIP
|
||||
|
||||
anchors.top: welcome.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: JamiTheme.preferredMarginSize * 2
|
||||
anchors.leftMargin: JamiTheme.mainViewMargin
|
||||
width: 300
|
||||
|
||||
font.pixelSize: JamiTheme.headerFontSize
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
text: JamiStrings.description
|
||||
color: JamiTheme.textColor
|
||||
}
|
||||
|
||||
Label {
|
||||
id: identifierDescription
|
||||
visible: CurrentAccount.type !== Profile.Type.SIP
|
||||
|
||||
anchors.top: welcome.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: JamiTheme.preferredMarginSize
|
||||
anchors.leftMargin: JamiTheme.mainViewMargin
|
||||
width: 330
|
||||
|
||||
font.pixelSize: JamiTheme.headerFontSize
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
text: JamiStrings.hereIsIdentifier
|
||||
lineHeight: 1.25
|
||||
color: JamiTheme.textColor
|
||||
}
|
||||
|
||||
JamiIdentifier {
|
||||
id: identifier
|
||||
|
||||
visible: CurrentAccount.type !== Profile.Type.SIP
|
||||
anchors.top: identifierDescription.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: JamiTheme.preferredMarginSize
|
||||
anchors.rightMargin: JamiTheme.preferredMarginSize
|
||||
anchors.leftMargin: JamiTheme.mainViewMargin
|
||||
}
|
||||
|
||||
Image {
|
||||
id: welcomeLogo
|
||||
|
||||
visible: root.width > 630
|
||||
width: 212
|
||||
height: 244
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.margins: JamiTheme.preferredMarginSize
|
||||
anchors.topMargin: -20
|
||||
opacity: visible
|
||||
|
||||
source: JamiResources.welcome_illustration_2_svg
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: JamiTheme.shortFadeDuration
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JamiFlickable {
|
||||
id: tipsFlow
|
||||
|
||||
anchors.top: welcomeInfo.bottom
|
||||
anchors.topMargin: JamiTheme.preferredMarginSize * 2
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: welcomeInfo.width
|
||||
height: flow.height + JamiTheme.preferredMarginSize * 2
|
||||
|
||||
clip: true
|
||||
|
||||
Flow {
|
||||
id: flow
|
||||
spacing: 13
|
||||
layoutDirection: UtilsAdapter.isRTL ? Qt.RightToLeft : Qt.LeftToRight
|
||||
|
||||
Repeater {
|
||||
id: tipsRepeater
|
||||
model: TipsModel
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
delegate: TipBox {
|
||||
tipId: TipId
|
||||
title: Title
|
||||
description: Description
|
||||
type: Type
|
||||
property bool hideTipBox: false
|
||||
|
||||
visible: {
|
||||
if (hideTipBox)
|
||||
return false;
|
||||
if (type === "backup") {
|
||||
return LRCInstance.currentAccountType !== Profile.Type.SIP && CurrentAccount.managerUri.length === 0;
|
||||
} else if (type === "customize") {
|
||||
return CurrentAccount.alias.length === 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
onIgnoreClicked: {
|
||||
hideTipBox = true;
|
||||
}
|
||||
}
|
||||
Loader {
|
||||
id: loader_welcomeInfo
|
||||
objectName: "loader_welcomeInfo"
|
||||
sourceComponent: WelcomeInfo {
|
||||
backgroundColor: viewNode.mainBoxColor
|
||||
hasTitle: viewNode.hasTitle
|
||||
hasDescription: viewNode.hasDescription
|
||||
title: viewNode.title
|
||||
description: viewNode.description
|
||||
idColor: viewNode.tipBoxAndIdColor
|
||||
}
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredHeight: item.getHeight()
|
||||
Layout.preferredWidth: 500
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: loader_tipsRow
|
||||
objectName: "loader_tipsRow"
|
||||
active: viewNode.hasTips && root.height > root.thresholdHeight
|
||||
sourceComponent: TipsRow {
|
||||
tipsColor: viewNode.tipBoxAndIdColor
|
||||
}
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredHeight: active ? item.getHeight() : 0
|
||||
Layout.preferredWidth: {
|
||||
if (!active) {
|
||||
return 0;
|
||||
} else {
|
||||
if (root.width > root.thresholdSize) {
|
||||
return JamiTheme.welcomeGridWidth;
|
||||
} else {
|
||||
return JamiTheme.welcomeShortGridWidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
focus: true
|
||||
}
|
||||
|
||||
Item {
|
||||
id: bottomRow
|
||||
width: Math.max(300, root.width)
|
||||
height: aboutJami.height + JamiTheme.preferredMarginSize
|
||||
anchors.bottom: parent.bottom
|
||||
Layout.preferredWidth: Math.max(300, root.width)
|
||||
Layout.preferredHeight: aboutJami.height
|
||||
Layout.margins: JamiTheme.welcomePageSpacing / 2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
MaterialButton {
|
||||
id: aboutJami
|
||||
|
@ -224,15 +221,16 @@ ListSelectionView {
|
|||
TextMetrics {
|
||||
id: textSize
|
||||
font.weight: Font.Bold
|
||||
font.pixelSize: JamiTheme.wizardViewButtonFontPixelSize
|
||||
font.pixelSize: 20
|
||||
font.capitalization: Font.AllUppercase
|
||||
text: aboutJami.text
|
||||
}
|
||||
|
||||
tertiary: true
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
preferredWidth: textSize.width + 2 * JamiTheme.buttontextWizzardPadding
|
||||
preferredWidth: textSize.width
|
||||
text: JamiStrings.aboutJami
|
||||
fontSize: 12
|
||||
|
||||
onClicked: viewCoordinator.presentDialog(appWindow, "mainview/components/AboutPopUp.qml")
|
||||
}
|
||||
|
@ -262,13 +260,4 @@ ListSelectionView {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomBorder {
|
||||
commonBorder: false
|
||||
lBorderwidth: 1
|
||||
rBorderwidth: 0
|
||||
tBorderwidth: 0
|
||||
bBorderwidth: 0
|
||||
borderColor: JamiTheme.tabbarBorderColor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,8 +139,7 @@ SettingsPageBase {
|
|||
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.topMargin: 10
|
||||
Layout.preferredWidth: Math.min(360, manageAccountColumnLayout.width - JamiTheme.preferredSettingsMarginSize)
|
||||
|
||||
Layout.preferredWidth: Math.min(500, manageAccountColumnLayout.width - JamiTheme.preferredSettingsMarginSize)
|
||||
backgroundColor: JamiTheme.jamiIdColor
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue