diff --git a/resources.qrc b/resources.qrc index cb74c2e42..3bd9144c1 100644 --- a/resources.qrc +++ b/resources.qrc @@ -401,5 +401,16 @@ <file>resources/images/check_circle_green_icon.svg</file> <file>resources/images/info_circle_icon.svg</file> <file>resources/images/light_mode/sidebar/settings_icon.svg</file> + <file>resources/images/mobile/arrow_left.svg</file> + <file>resources/images/mobile/folder.svg</file> + <file>resources/images/mobile/profile.svg</file> + <file>resources/images/mobile/brush.svg</file> + <file>resources/images/mobile/sign_out.svg</file> + <file>resources/images/mobile/library.svg</file> + <file>resources/images/mobile/server.svg</file> + <file>resources/images/mobile/explore.svg</file> + <file>resources/images/mobile/refresh.svg</file> + <file>resources/images/mobile/diamond.svg</file> + <file>resources/images/mobile/gear.svg</file> </qresource> </RCC> diff --git a/resources/images/mobile/arrow_left.svg b/resources/images/mobile/arrow_left.svg new file mode 100644 index 000000000..124f98587 --- /dev/null +++ b/resources/images/mobile/arrow_left.svg @@ -0,0 +1,4 @@ +<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M9.57 5.93005L3.5 12.0001L9.57 18.0701" stroke="#7A7A7A" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> +<path d="M20.5 12H3.67" stroke="#7A7A7A" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> +</svg> diff --git a/resources/images/mobile/brush.svg b/resources/images/mobile/brush.svg new file mode 100644 index 000000000..8bfb0ea2f --- /dev/null +++ b/resources/images/mobile/brush.svg @@ -0,0 +1,3 @@ +<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M21.75 3C21.75 2.80109 21.6709 2.61032 21.5303 2.46967C21.3896 2.32902 21.1989 2.25 21 2.25C16.8675 2.25 12.6271 6.91031 10.2721 9.99656C9.43109 9.73898 8.54134 9.68224 7.67437 9.83089C6.8074 9.97954 5.98738 10.3294 5.28017 10.8525C4.57295 11.3755 3.99826 12.0571 3.60225 12.8426C3.20624 13.628 2.99996 14.4954 2.99996 15.375C2.99996 18.27 1.16808 19.5684 1.0809 19.6284C0.947855 19.7183 0.847149 19.8484 0.793587 19.9998C0.740026 20.1511 0.736435 20.3156 0.783343 20.4692C0.830251 20.6227 0.925182 20.7571 1.05418 20.8527C1.18317 20.9482 1.33943 20.9999 1.49996 21H8.62496C9.50458 21 10.3719 20.7937 11.1574 20.3977C11.9428 20.0017 12.6244 19.427 13.1475 18.7198C13.6705 18.0126 14.0204 17.1926 14.1691 16.3256C14.3177 15.4586 14.261 14.5689 14.0034 13.7278C17.0906 11.3728 21.75 7.1325 21.75 3ZM11.6643 10.6453C11.9856 10.2291 12.3009 9.83688 12.6103 9.46875C13.3675 9.98035 14.0196 10.6324 14.5312 11.3897C14.1625 11.6984 13.7703 12.0138 13.3546 12.3356C12.9176 11.6586 12.3414 11.0824 11.6643 10.6453ZM15.6675 10.3941C15.1012 9.59512 14.4039 8.89778 13.605 8.33156C16.5843 5.09438 18.8315 4.11281 20.1581 3.84C19.8909 5.1675 18.9046 7.41469 15.6675 10.3941Z" fill="#7A7A7A"/> +</svg> diff --git a/resources/images/mobile/diamond.svg b/resources/images/mobile/diamond.svg new file mode 100644 index 000000000..61bfb021f --- /dev/null +++ b/resources/images/mobile/diamond.svg @@ -0,0 +1,3 @@ +<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M8.14694 6.92062C8.00132 6.77506 7.88581 6.60224 7.80699 6.41202C7.72818 6.2218 7.68762 6.01793 7.68762 5.81203C7.68762 5.60613 7.72818 5.40226 7.80699 5.21204C7.88581 5.02183 8.00132 4.849 8.14694 4.70344L10.891 1.95844C11.1854 1.66475 11.5842 1.49982 12.0001 1.49982C12.4159 1.49982 12.8147 1.66475 13.1091 1.95844L15.8532 4.70344C15.9988 4.849 16.1143 5.02183 16.1931 5.21204C16.2719 5.40226 16.3125 5.60613 16.3125 5.81203C16.3125 6.01793 16.2719 6.2218 16.1931 6.41202C16.1143 6.60224 15.9988 6.77506 15.8532 6.92062L13.1091 9.66562C12.8147 9.95931 12.4159 10.1242 12.0001 10.1242C11.5842 10.1242 11.1854 9.95931 10.891 9.66562L8.14694 6.92062ZM22.0416 10.8909L19.2966 8.14594C19.0024 7.85231 18.6037 7.6874 18.188 7.6874C17.7724 7.6874 17.3737 7.85231 17.0794 8.14594L14.3344 10.8909C14.0407 11.1853 13.8758 11.5842 13.8758 12C13.8758 12.4158 14.0407 12.8147 14.3344 13.1091L17.0794 15.8541C17.3737 16.1477 17.7724 16.3126 18.188 16.3126C18.6037 16.3126 19.0024 16.1477 19.2966 15.8541L22.0416 13.1091C22.3353 12.8147 22.5002 12.4158 22.5002 12C22.5002 11.5842 22.3353 11.1853 22.0416 10.8909ZM9.66662 10.8909L6.92069 8.14594C6.62646 7.85231 6.22777 7.6874 5.81209 7.6874C5.39642 7.6874 4.99772 7.85231 4.7035 8.14594L1.9585 10.8909C1.66481 11.1853 1.49988 11.5842 1.49988 12C1.49988 12.4158 1.66481 12.8147 1.9585 13.1091L4.7035 15.8541C4.99772 16.1477 5.39642 16.3126 5.81209 16.3126C6.22777 16.3126 6.62646 16.1477 6.92069 15.8541L9.66569 13.1091C9.95937 12.8147 10.1243 12.4158 10.1243 12C10.1243 11.5842 9.95937 11.1853 9.66569 10.8909H9.66662ZM13.1101 14.3344C12.8157 14.0407 12.4168 13.8758 12.001 13.8758C11.5852 13.8758 11.1863 14.0407 10.8919 14.3344L8.14694 17.0794C8.00132 17.2249 7.88581 17.3978 7.80699 17.588C7.72818 17.7782 7.68762 17.9821 7.68762 18.188C7.68762 18.3939 7.72818 18.5977 7.80699 18.788C7.88581 18.9782 8.00132 19.151 8.14694 19.2966L10.891 22.0416C11.1854 22.3352 11.5842 22.5002 12.0001 22.5002C12.4159 22.5002 12.8147 22.3352 13.1091 22.0416L15.8532 19.2966C15.9988 19.151 16.1143 18.9782 16.1931 18.788C16.2719 18.5977 16.3125 18.3939 16.3125 18.188C16.3125 17.9821 16.2719 17.7782 16.1931 17.588C16.1143 17.3978 15.9988 17.2249 15.8532 17.0794L13.1101 14.3344Z" fill="#7A7A7A"/> +</svg> diff --git a/resources/images/mobile/explore.svg b/resources/images/mobile/explore.svg new file mode 100644 index 000000000..db3de2935 --- /dev/null +++ b/resources/images/mobile/explore.svg @@ -0,0 +1,3 @@ +<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M7.70001 1.98822V6.48822C7.70001 6.88604 7.54198 7.26758 7.26067 7.54888C6.97937 7.83018 6.59784 7.98822 6.20001 7.98822H1.70001C1.30219 7.98822 0.920657 7.83018 0.639352 7.54888C0.358047 7.26758 0.200012 6.88604 0.200012 6.48822V1.98822C0.200012 1.5904 0.358047 1.20886 0.639352 0.92756C0.920657 0.646255 1.30219 0.48822 1.70001 0.48822H6.20001C6.59784 0.48822 6.97937 0.646255 7.26067 0.92756C7.54198 1.20886 7.70001 1.5904 7.70001 1.98822ZM15.2 0.48822H10.7C10.3022 0.48822 9.92066 0.646255 9.63935 0.92756C9.35805 1.20886 9.20001 1.5904 9.20001 1.98822V6.48822C9.20001 6.88604 9.35805 7.26758 9.63935 7.54888C9.92066 7.83018 10.3022 7.98822 10.7 7.98822H15.2C15.5978 7.98822 15.9794 7.83018 16.2607 7.54888C16.542 7.26758 16.7 6.88604 16.7 6.48822V1.98822C16.7 1.5904 16.542 1.20886 16.2607 0.92756C15.9794 0.646255 15.5978 0.48822 15.2 0.48822ZM6.20001 9.48822H1.70001C1.30219 9.48822 0.920657 9.64626 0.639352 9.92756C0.358047 10.2089 0.200012 10.5904 0.200012 10.9882V15.4882C0.200012 15.886 0.358047 16.2676 0.639352 16.5489C0.920657 16.8302 1.30219 16.9882 1.70001 16.9882H6.20001C6.59784 16.9882 6.97937 16.8302 7.26067 16.5489C7.54198 16.2676 7.70001 15.886 7.70001 15.4882V10.9882C7.70001 10.5904 7.54198 10.2089 7.26067 9.92756C6.97937 9.64626 6.59784 9.48822 6.20001 9.48822ZM15.2 9.48822H10.7C10.3022 9.48822 9.92066 9.64626 9.63935 9.92756C9.35805 10.2089 9.20001 10.5904 9.20001 10.9882V15.4882C9.20001 15.886 9.35805 16.2676 9.63935 16.5489C9.92066 16.8302 10.3022 16.9882 10.7 16.9882H15.2C15.5978 16.9882 15.9794 16.8302 16.2607 16.5489C16.542 16.2676 16.7 15.886 16.7 15.4882V10.9882C16.7 10.5904 16.542 10.2089 16.2607 9.92756C15.9794 9.64626 15.5978 9.48822 15.2 9.48822Z" fill="#7A7A7A"/> +</svg> diff --git a/resources/images/mobile/folder.svg b/resources/images/mobile/folder.svg new file mode 100644 index 000000000..c64b35e2e --- /dev/null +++ b/resources/images/mobile/folder.svg @@ -0,0 +1,3 @@ +<svg width="30" height="24" viewBox="0 0 30 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M27.4286 3.42857H15.2386L11.2743 0.457143C10.8794 0.160992 10.3993 0.000617494 9.90571 0H2.28571C1.67951 0 1.09812 0.240816 0.66947 0.66947C0.240816 1.09812 0 1.67951 0 2.28571V21.7143C0 22.3205 0.240816 22.9019 0.66947 23.3305C1.09812 23.7592 1.67951 24 2.28571 24H27.5557C28.128 23.9992 28.6766 23.7716 29.0812 23.3669C29.4859 22.9623 29.7135 22.4137 29.7143 21.8414V5.71429C29.7143 5.10808 29.4735 4.5267 29.0448 4.09804C28.6162 3.66939 28.0348 3.42857 27.4286 3.42857Z" fill="#7A7A7A"/> +</svg> diff --git a/resources/images/mobile/gear.svg b/resources/images/mobile/gear.svg new file mode 100644 index 000000000..ff15640f3 --- /dev/null +++ b/resources/images/mobile/gear.svg @@ -0,0 +1,3 @@ +<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M20.25 12.2025C20.2538 12.0675 20.2538 11.9325 20.25 11.7975L21.6488 10.05C21.7221 9.95823 21.7729 9.85053 21.797 9.73557C21.8211 9.62061 21.8179 9.50159 21.7875 9.38811C21.5578 8.52631 21.2148 7.69878 20.7675 6.92717C20.7089 6.82622 20.6276 6.74034 20.5299 6.67638C20.4322 6.61242 20.321 6.57213 20.205 6.55873L17.9813 6.31123C17.8888 6.21373 17.795 6.11998 17.7 6.02998L17.4375 3.80061C17.424 3.68456 17.3836 3.57326 17.3195 3.4756C17.2554 3.37794 17.1693 3.29662 17.0682 3.23811C16.2966 2.79115 15.469 2.44878 14.6072 2.21998C14.4937 2.18966 14.3747 2.18642 14.2598 2.21052C14.1448 2.23462 14.0371 2.28539 13.9454 2.35873L12.2025 3.74998C12.0675 3.74998 11.9325 3.74998 11.7975 3.74998L10.05 2.35404C9.95829 2.2807 9.8506 2.22994 9.73563 2.20584C9.62067 2.18174 9.50165 2.18498 9.38817 2.21529C8.52637 2.44501 7.69884 2.788 6.92723 3.23529C6.82628 3.29391 6.7404 3.37529 6.67644 3.47294C6.61248 3.57059 6.57219 3.68183 6.55879 3.79779L6.31129 6.02529C6.21379 6.11842 6.12004 6.21217 6.03004 6.30654L3.80067 6.56248C3.68462 6.57598 3.57333 6.61641 3.47567 6.68054C3.37801 6.74467 3.29668 6.83073 3.23817 6.93186C2.79131 7.70357 2.44864 8.53108 2.21911 9.3928C2.18891 9.50635 2.18583 9.62541 2.21009 9.74038C2.23435 9.85534 2.28529 9.963 2.35879 10.0547L3.75004 11.7975C3.75004 11.9325 3.75004 12.0675 3.75004 12.2025L2.35411 13.95C2.28076 14.0417 2.23 14.1494 2.2059 14.2644C2.1818 14.3794 2.18504 14.4984 2.21536 14.6119C2.44507 15.4737 2.78806 16.3012 3.23536 17.0728C3.29397 17.1737 3.37535 17.2596 3.473 17.3236C3.57065 17.3875 3.68189 17.4278 3.79786 17.4412L6.02161 17.6887C6.11473 17.7862 6.20848 17.88 6.30286 17.97L6.56254 20.1994C6.57604 20.3154 6.61647 20.4267 6.6806 20.5244C6.74473 20.622 6.83079 20.7033 6.93192 20.7619C7.70363 21.2087 8.53114 21.5514 9.39286 21.7809C9.50641 21.8111 9.62547 21.8142 9.74044 21.7899C9.8554 21.7657 9.96306 21.7147 10.0547 21.6412L11.7975 20.25C11.9325 20.2537 12.0675 20.2537 12.2025 20.25L13.95 21.6487C14.0418 21.7221 14.1495 21.7728 14.2645 21.7969C14.3794 21.821 14.4984 21.8178 14.6119 21.7875C15.4739 21.5582 16.3014 21.2152 17.0729 20.7675C17.1738 20.7089 17.2597 20.6275 17.3236 20.5298C17.3876 20.4322 17.4279 20.3209 17.4413 20.205L17.6888 17.9812C17.7863 17.8887 17.88 17.795 17.97 17.7L20.1994 17.4375C20.3155 17.424 20.4268 17.3836 20.5244 17.3194C20.6221 17.2553 20.7034 17.1692 20.7619 17.0681C21.2088 16.2964 21.5514 15.4689 21.781 14.6072C21.8112 14.4936 21.8143 14.3746 21.79 14.2596C21.7657 14.1446 21.7148 14.037 21.6413 13.9453L20.25 12.2025ZM12 15.75C11.2584 15.75 10.5333 15.53 9.91666 15.118C9.29997 14.7059 8.81932 14.1203 8.53549 13.435C8.25167 12.7498 8.1774 11.9958 8.3221 11.2684C8.46679 10.541 8.82395 9.87278 9.34839 9.34833C9.87284 8.82389 10.541 8.46673 11.2685 8.32204C11.9959 8.17734 12.7499 8.25161 13.4351 8.53543C14.1203 8.81926 14.706 9.29991 15.1181 9.91659C15.5301 10.5333 15.75 11.2583 15.75 12C15.75 12.9945 15.355 13.9484 14.6517 14.6516C13.9484 15.3549 12.9946 15.75 12 15.75Z" fill="#7A7A7A"/> +</svg> diff --git a/resources/images/mobile/library.svg b/resources/images/mobile/library.svg new file mode 100644 index 000000000..7162189ed --- /dev/null +++ b/resources/images/mobile/library.svg @@ -0,0 +1,3 @@ +<svg width="19" height="20" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M18.1672 16.9773L15.0556 2.18353C15.0154 1.99007 14.9373 1.80647 14.8259 1.64327C14.7145 1.48007 14.5719 1.34049 14.4064 1.23256C14.2409 1.12462 14.0557 1.05045 13.8614 1.01431C13.6671 0.978174 13.4676 0.980775 13.2744 1.02197L8.88595 1.96509C8.49778 2.05009 8.15886 2.2849 7.94292 2.61848C7.72697 2.95205 7.65147 3.35739 7.73282 3.74634L10.8444 18.5401C10.9137 18.8776 11.0972 19.181 11.3638 19.3992C11.6305 19.6174 11.9642 19.7371 12.3088 19.7382C12.4153 19.7381 12.5215 19.7268 12.6256 19.7045L17.0141 18.7613C17.4027 18.6761 17.742 18.4409 17.9579 18.1067C18.1739 17.7726 18.2491 17.3666 18.1672 16.9773ZM9.20001 3.43978C9.20001 3.43415 9.20001 3.43134 9.20001 3.43134L13.5875 2.49384L13.8997 3.98165L9.5122 4.92572L9.20001 3.43978ZM10.1375 7.88165L9.82345 6.39103L14.2128 5.4479L14.5259 6.93853L10.1375 7.88165ZM16.7 17.2951L12.3125 18.2326L12.0003 16.7448L16.3878 15.8007L16.7 17.2867C16.7 17.2923 16.7 17.2951 16.7 17.2951ZM6.20001 1.73822H1.70001C1.30219 1.73822 0.920657 1.89625 0.639352 2.17756C0.358047 2.45886 0.200012 2.84039 0.200012 3.23822V18.2382C0.200012 18.636 0.358047 19.0176 0.639352 19.2989C0.920657 19.5802 1.30219 19.7382 1.70001 19.7382H6.20001C6.59784 19.7382 6.97937 19.5802 7.26067 19.2989C7.54198 19.0176 7.70001 18.636 7.70001 18.2382V3.23822C7.70001 2.84039 7.54198 2.45886 7.26067 2.17756C6.97937 1.89625 6.59784 1.73822 6.20001 1.73822ZM1.70001 3.23822H6.20001V4.73822H1.70001V3.23822ZM6.20001 18.2382H1.70001V16.7382H6.20001V18.2382Z" fill="#7A7A7A"/> +</svg> diff --git a/resources/images/mobile/profile.svg b/resources/images/mobile/profile.svg new file mode 100644 index 000000000..6b9d8f8cf --- /dev/null +++ b/resources/images/mobile/profile.svg @@ -0,0 +1,3 @@ +<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M19.5997 19.3632C19.5339 19.4772 19.4392 19.5719 19.3251 19.6378C19.2111 19.7036 19.0817 19.7382 18.95 19.7382H0.950037C0.818449 19.7381 0.689214 19.7033 0.575306 19.6374C0.461399 19.5716 0.36683 19.4769 0.301094 19.3629C0.235359 19.2489 0.200772 19.1196 0.200806 18.988C0.200839 18.8564 0.235493 18.7272 0.301287 18.6132C1.7291 16.1448 3.92941 14.3748 6.49722 13.5357C5.22707 12.7796 4.24024 11.6274 3.68827 10.2561C3.13631 8.88487 3.04974 7.37033 3.44186 5.9451C3.83397 4.51987 4.68309 3.26276 5.85881 2.36682C7.03453 1.47088 8.47185 0.985657 9.95004 0.985657C11.4282 0.985657 12.8655 1.47088 14.0413 2.36682C15.217 3.26276 16.0661 4.51987 16.4582 5.9451C16.8503 7.37033 16.7638 8.88487 16.2118 10.2561C15.6598 11.6274 14.673 12.7796 13.4029 13.5357C15.9707 14.3748 18.171 16.1448 19.5988 18.6132C19.6648 18.7271 19.6996 18.8564 19.6997 18.9881C19.6999 19.1197 19.6654 19.2491 19.5997 19.3632Z" fill="#7A7A7A"/> +</svg> diff --git a/resources/images/mobile/refresh.svg b/resources/images/mobile/refresh.svg new file mode 100644 index 000000000..fc09007ce --- /dev/null +++ b/resources/images/mobile/refresh.svg @@ -0,0 +1,3 @@ +<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M22.5 5.25001V9.75001C22.5 9.94892 22.421 10.1397 22.2803 10.2803C22.1397 10.421 21.9489 10.5 21.75 10.5H17.25C17.1016 10.5001 16.9565 10.4562 16.833 10.3738C16.7096 10.2914 16.6134 10.1742 16.5565 10.0371C16.4997 9.89999 16.4849 9.74909 16.5139 9.60353C16.5428 9.45797 16.6144 9.32428 16.7194 9.21939L18.3131 7.62564L17.3241 6.72095L17.3006 6.69845C16.2582 5.65641 14.9318 4.94463 13.4872 4.65202C12.0426 4.35942 10.5438 4.49897 9.17803 5.05323C7.81227 5.60749 6.6401 6.5519 5.80795 7.76848C4.9758 8.98505 4.52057 10.4199 4.49913 11.8936C4.47769 13.3674 4.89098 14.8149 5.68738 16.0551C6.48378 17.2954 7.62798 18.2735 8.97704 18.8673C10.3261 19.461 11.8202 19.6441 13.2727 19.3937C14.7252 19.1432 16.0718 18.4703 17.1441 17.4591C17.2157 17.3914 17.2999 17.3384 17.3919 17.3032C17.484 17.2681 17.5821 17.2514 17.6806 17.2541C17.7791 17.2569 17.8761 17.279 17.966 17.3192C18.056 17.3595 18.1371 17.417 18.2049 17.4886C18.2726 17.5602 18.3255 17.6444 18.3607 17.7365C18.3958 17.8285 18.4125 17.9266 18.4098 18.0251C18.407 18.1236 18.3849 18.2206 18.3447 18.3106C18.3045 18.4005 18.2469 18.4817 18.1753 18.5494C16.5077 20.1285 14.2967 21.006 12 21H11.8763C10.4023 20.9798 8.95579 20.5979 7.66397 19.8877C6.37216 19.1776 5.27455 18.161 4.46762 16.9274C3.6607 15.6937 3.16915 14.2807 3.0362 12.8126C2.90324 11.3445 3.13294 9.86616 3.70511 8.5076C4.27728 7.14903 5.1744 5.95181 6.31762 5.02116C7.46085 4.09051 8.81517 3.45492 10.2616 3.17026C11.7079 2.88559 13.2021 2.96057 14.6127 3.38859C16.0234 3.81662 17.3073 4.58459 18.3516 5.62501L19.3763 6.56251L21.2194 4.71564C21.3245 4.6104 21.4585 4.53879 21.6044 4.50992C21.7504 4.48105 21.9016 4.49622 22.0388 4.5535C22.1761 4.61078 22.2933 4.70759 22.3754 4.83161C22.4575 4.95563 22.5009 5.10127 22.5 5.25001Z" fill="#7A7A7A"/> +</svg> diff --git a/resources/images/mobile/server.svg b/resources/images/mobile/server.svg new file mode 100644 index 000000000..7a0ea9ef1 --- /dev/null +++ b/resources/images/mobile/server.svg @@ -0,0 +1,4 @@ +<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M19.5 3.75H4.5C4.10218 3.75 3.72064 3.90804 3.43934 4.18934C3.15804 4.47064 3 4.85218 3 5.25V9.75C3 10.1478 3.15804 10.5294 3.43934 10.8107C3.72064 11.092 4.10218 11.25 4.5 11.25H19.5C19.8978 11.25 20.2794 11.092 20.5607 10.8107C20.842 10.5294 21 10.1478 21 9.75V5.25C21 4.85218 20.842 4.47064 20.5607 4.18934C20.2794 3.90804 19.8978 3.75 19.5 3.75ZM16.875 8.625C16.6525 8.625 16.435 8.55902 16.25 8.4354C16.065 8.31179 15.9208 8.13609 15.8356 7.93052C15.7505 7.72495 15.7282 7.49875 15.7716 7.28052C15.815 7.06229 15.9222 6.86184 16.0795 6.7045C16.2368 6.54717 16.4373 6.44002 16.6555 6.39662C16.8738 6.35321 17.1 6.37549 17.3055 6.46064C17.5111 6.54578 17.6868 6.68998 17.8104 6.87498C17.934 7.05999 18 7.2775 18 7.5C18 7.79837 17.8815 8.08452 17.6705 8.2955C17.4595 8.50647 17.1734 8.625 16.875 8.625Z" fill="#7A7A7A"/> +<path d="M19.5 12.75H4.5C4.10218 12.75 3.72064 12.908 3.43934 13.1893C3.15804 13.4706 3 13.8522 3 14.25V18.75C3 19.1478 3.15804 19.5294 3.43934 19.8107C3.72064 20.092 4.10218 20.25 4.5 20.25H19.5C19.8978 20.25 20.2794 20.092 20.5607 19.8107C20.842 19.5294 21 19.1478 21 18.75V14.25C21 13.8522 20.842 13.4706 20.5607 13.1893C20.2794 12.908 19.8978 12.75 19.5 12.75ZM16.875 17.625C16.6525 17.625 16.435 17.559 16.25 17.4354C16.065 17.3118 15.9208 17.1361 15.8356 16.9305C15.7505 16.725 15.7282 16.4988 15.7716 16.2805C15.815 16.0623 15.9222 15.8618 16.0795 15.7045C16.2368 15.5472 16.4373 15.44 16.6555 15.3966C16.8738 15.3532 17.1 15.3755 17.3055 15.4606C17.5111 15.5458 17.6868 15.69 17.8104 15.875C17.934 16.06 18 16.2775 18 16.5C18 16.7984 17.8815 17.0845 17.6705 17.2955C17.4595 17.5065 17.1734 17.625 16.875 17.625Z" fill="#7A7A7A"/> +</svg> diff --git a/resources/images/mobile/sign_out.svg b/resources/images/mobile/sign_out.svg new file mode 100644 index 000000000..acbbef89d --- /dev/null +++ b/resources/images/mobile/sign_out.svg @@ -0,0 +1,3 @@ +<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M10.5 20.25C10.5 20.4489 10.421 20.6397 10.2803 20.7803C10.1397 20.921 9.94891 21 9.75 21H4.5C4.10218 21 3.72064 20.842 3.43934 20.5607C3.15804 20.2794 3 19.8978 3 19.5V4.5C3 4.10218 3.15804 3.72064 3.43934 3.43934C3.72064 3.15804 4.10218 3 4.5 3H9.75C9.94891 3 10.1397 3.07902 10.2803 3.21967C10.421 3.36032 10.5 3.55109 10.5 3.75C10.5 3.94891 10.421 4.13968 10.2803 4.28033C10.1397 4.42098 9.94891 4.5 9.75 4.5H4.5V19.5H9.75C9.94891 19.5 10.1397 19.579 10.2803 19.7197C10.421 19.8603 10.5 20.0511 10.5 20.25ZM20.7806 11.4694L17.0306 7.71937C16.9257 7.61437 16.792 7.54284 16.6465 7.51385C16.5009 7.48487 16.35 7.49972 16.2129 7.55653C16.0758 7.61335 15.9586 7.70957 15.8762 7.83301C15.7938 7.95646 15.7499 8.10158 15.75 8.25V11.25H9.75C9.55109 11.25 9.36032 11.329 9.21967 11.4697C9.07902 11.6103 9 11.8011 9 12C9 12.1989 9.07902 12.3897 9.21967 12.5303C9.36032 12.671 9.55109 12.75 9.75 12.75H15.75V15.75C15.7499 15.8984 15.7938 16.0435 15.8762 16.167C15.9586 16.2904 16.0758 16.3867 16.2129 16.4435C16.35 16.5003 16.5009 16.5151 16.6465 16.4861C16.792 16.4572 16.9257 16.3856 17.0306 16.2806L20.7806 12.5306C20.8504 12.461 20.9057 12.3783 20.9434 12.2872C20.9812 12.1962 21.0006 12.0986 21.0006 12C21.0006 11.9014 20.9812 11.8038 20.9434 11.7128C20.9057 11.6217 20.8504 11.539 20.7806 11.4694Z" fill="#7A7A7A"/> +</svg> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a912e4882..9366d3e29 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,9 @@ # Configuration -set(QML_IMPORT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/presentation/modules ${CMAKE_CURRENT_BINARY_DIR}/" CACHE STRING "Qml modules") - +if(ANDROID) + set(QML_IMPORT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/presentation/mobile/modules CACHE STRING "Qml modules" FORCE) +else() + set(QML_IMPORT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/presentation/desktop/modules CACHE STRING "Qml modules" FORCE) +endif() # Language set(CMAKE_CXX_STANDARD 20) @@ -47,7 +50,6 @@ if(ANDROID) list(APPEND CUSTOM_ANDROID_EXTRA_LIBS "${PROJECT_SOURCE_DIR}/libs/mupdf/build/shared-debug/libmupdf.so") list(APPEND CUSTOM_ANDROID_EXTRA_LIBS "${PROJECT_SOURCE_DIR}/libs/mupdf/build/shared-debug/libmupdfcpp.so") string(REPLACE ";" "," CUSTOM_ANDROID_EXTRA_LIBS_STRING "${CUSTOM_ANDROID_EXTRA_LIBS}") - set_property(TARGET librum PROPERTY QT_ANDROID_EXTRA_LIBS ${ANDROID_SDK_ROOT}/android_openssl/ssl_3/arm64-v8a/libcrypto_3.so ${ANDROID_SDK_ROOT}/android_openssl/ssl_3/arm64-v8a/libssl_3.so diff --git a/src/application/CMakeLists.txt b/src/application/CMakeLists.txt index 0a41c5fd4..5e3426cdf 100644 --- a/src/application/CMakeLists.txt +++ b/src/application/CMakeLists.txt @@ -102,15 +102,17 @@ if(NOT ${NO_VENV}) set(VENV_OPTION "--venv") endif() +set(BUILD_MUTOOL true) if(ANDROID) set(EXTRA_MAKE_AGRS --m-vars 'HAVE_OBJCOPY=no HAVE_LIBCRYPTO=no') + set(BUILD_MUTOOL false) endif() if(UNIX) set(MUPDF_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/libs/mupdf/build/$<IF:$<CONFIG:Debug>,shared-debug,shared-release>") set(MUPDF_OUTPUT "${MUPDF_OUTPUT_DIR}/libmupdfcpp.so") set(MUPDF_OUTPUT "${MUPDF_OUTPUT_DIR}/libmupdfcpp.so" PARENT_SCOPE) - set(MUPDF_BUILD_COMMAND ./scripts/mupdfwrap.py ${VENV_OPTION} -d build/$<IF:$<CONFIG:Debug>,shared-debug,shared-release> -b --m-target 'libs tools' ${EXTRA_MAKE_AGRS} -j 0 m01) + set(MUPDF_BUILD_COMMAND ./scripts/mupdfwrap.py ${VENV_OPTION} -d build/$<IF:$<CONFIG:Debug>,shared-debug,shared-release> -b --m-target 'libs $<$<BOOL:${BUILD_MUTOOL}>:tools>' ${EXTRA_MAKE_AGRS} -j 0 m01) elseif(WIN32) set(MUPDF_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/libs/mupdf/platform/win32/x64/$<IF:$<CONFIG:Debug>,Debug,Release>") set(MUPDF_OUTPUT "${MUPDF_OUTPUT_DIR}/mupdfcpp64.lib" PARENT_SCOPE) @@ -125,9 +127,8 @@ set(CC_COMMAND "${CMAKE_C_COMPILER}") set(CXX_COMMAND "${CMAKE_CXX_COMPILER}") if(ANDROID) - string(APPEND CC_COMMAND " --target=aarch64-none-linux-android23 --sysroot=/home/creapermann/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot") - string(APPEND CXX_COMMAND " --target=aarch64-none-linux-android23 --sysroot=/home/creapermann/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot") - set(ANDROID_COMPILERS "CC=${CC_COMMAND}" "CXX=${CXX_COMMAND}") + string(APPEND CC_COMMAND " --target=aarch64-none-linux-android23 --sysroot=${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot") + string(APPEND CXX_COMMAND " --target=aarch64-none-linux-android23 --sysroot=${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot") endif() @@ -148,19 +149,27 @@ endif() add_custom_target(mupdf # Build mupdf COMMAND ${CMAKE_COMMAND} -E env - ${ANDROID_COMPILERS} + "CC=${CC_COMMAND}" + "CXX=${CXX_COMMAND}" "USE_SYSTEM_LIBJPEG=${USE_SYSTEM_LIBJPEG_VALUE}" "USE_SONAME=no" ${MUPDF_BUILD_COMMAND} - # Copy mutool to the build directory - COMMAND ${CMAKE_COMMAND} -E copy - "${MUPDF_OUTPUT_DIR}/mutool${EXECUTABLE_EXTENSION}" - "${PROJECT_BINARY_DIR}/mutool${EXECUTABLE_EXTENSION}" BYPRODUCTS ${MUPDF_OUTPUT} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/libs/mupdf COMMENT "Building mupdf (This takes a while) ..." ) +# Copy the mutool executable to the build directory +if(BUILD_MUTOOL) + add_custom_command( + TARGET mupdf POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + "${MUPDF_OUTPUT_DIR}/mutool${EXECUTABLE_EXTENSION}" + "${PROJECT_BINARY_DIR}/mutool${EXECUTABLE_EXTENSION}" + BYPRODUCTS "${PROJECT_BINARY_DIR}/mutool${EXECUTABLE_EXTENSION}" + DEPENDS ${MUPDF_OUTPUT} + ) +endif() #Copy the mupdf dlls to the build directory for windows if(WIN32) diff --git a/src/main.cpp b/src/main.cpp index f3ee09d66..9068c9ec9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,10 +29,7 @@ #include "i_free_books_service.hpp" #include "i_library_service.hpp" #include "i_user_service.hpp" -#include "key_sequence_recorder.hpp" #include "library_proxy_model.hpp" -#include "message_handler.hpp" -#include "page_view.hpp" #include "setting_groups.hpp" #include "setting_keys.hpp" #include "shortcuts_proxy_model.hpp" @@ -41,6 +38,12 @@ #include "user_controller.hpp" #include "word_definition_dto.hpp" +#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS) + #include "key_sequence_recorder.hpp" + #include "message_handler.hpp" + #include "page_view.hpp" +#endif + using namespace adapters::controllers; using namespace application::services; @@ -63,7 +66,9 @@ int main(int argc, char* argv[]) QIcon icon(":/src/logo.ico"); app.setWindowIcon(icon); +#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS) qInstallMessageHandler(logging::messageHandler); +#endif setupGlobalSettings(); setupFonts(); @@ -79,8 +84,6 @@ int main(int argc, char* argv[]) qmlRegisterType<adapters::data_models::BookTitleProxyModel>("Librum.models", 1, 0, "BookTitleModel"); qmlRegisterType<adapters::data_models::FreeBooksModel>("Librum.models", 1, 0, "FreeBooksModel"); qmlRegisterType<adapters::data_models::ShortcutsProxyModel>("Librum.models", 1, 0, "ShortcutsProxyModel"); - qmlRegisterType<cpp_elements::KeySequenceRecorder>("Librum.elements", 1, 0, "KeySequenceRecorder"); - qmlRegisterType<cpp_elements::PageView>("Librum.elements", 1, 0, "PageView"); qRegisterMetaType<adapters::dtos::BookDto>(); qRegisterMetaType<adapters::dtos::TagDto>(); qRegisterMetaType<adapters::dtos::FolderDto>(); @@ -88,6 +91,11 @@ int main(int argc, char* argv[]) qRegisterMetaType<adapters::dtos::WordTypeDto>(); qRegisterMetaType<adapters::dtos::WordDefinitionDto>(); +#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS) + qmlRegisterType<cpp_elements::KeySequenceRecorder>("Librum.elements", 1, 0, "KeySequenceRecorder"); + qmlRegisterType<cpp_elements::PageView>("Librum.elements", 1, 0, "PageView"); +#endif + // Authentication Stack auto* authenticationService = @@ -242,23 +250,23 @@ int main(int argc, char* argv[]) // Setup translations QSettings settings; auto storedLanguage = settings.value("language", QVariant("")).toString(); - if(storedLanguage.isEmpty()) - { - // If no language was specified in the settings, deduce the system language - const QStringList uiLanguages = QLocale::system().uiLanguages(); - for(const QString& locale : uiLanguages) - { - const QString name = QLocale(locale).name(); - if(appInfoController->switchToLanguage(name)) - { - break; - } - } - } - else - { - appInfoController->switchToLanguage(storedLanguage); - } + // if(storedLanguage.isEmpty()) + // { + // // If no language was specified in the settings, deduce the system language + // const QStringList uiLanguages = QLocale::system().uiLanguages(); + // for(const QString& locale : uiLanguages) + // { + // const QString name = QLocale(locale).name(); + // if(appInfoController->switchToLanguage(name)) + // { + // break; + // } + // } + // } + // else + // { + // appInfoController->switchToLanguage(storedLanguage); + // } if(app.arguments().size() == 2) { diff --git a/src/presentation/CMakeLists.txt b/src/presentation/CMakeLists.txt index 8e78eacd2..d353da63d 100644 --- a/src/presentation/CMakeLists.txt +++ b/src/presentation/CMakeLists.txt @@ -2,14 +2,31 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) # Build +if(ANDROID) + set(QML_SOURCE_QRC_PATH "mobile/qmlSourcesMobile.qrc") +else() + set(QML_SOURCE_QRC_PATH "desktop/qmlSourcesDesktop.qrc") +endif() + +if(ANDROID) + set(CPP_SOURCE_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/mobile/modules/CppElements") + set(CPP_FILES) +else() + set(CPP_SOURCE_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/desktop/modules/CppElements") + set(CPP_FILES + desktop/modules/CppElements/key_sequence_recorder.cpp + desktop/modules/CppElements/key_sequence_recorder.hpp + desktop/modules/CppElements/page_view.cpp + desktop/modules/CppElements/page_view.hpp + ) +endif() + add_library(presentation SHARED ${PROJECT_SOURCE_DIR}/resources.qrc - qmlSources.qrc - modules/CppElements/key_sequence_recorder.cpp - modules/CppElements/key_sequence_recorder.hpp - modules/CppElements/page_view.cpp - modules/CppElements/page_view.hpp + ${QML_SOURCE_QRC_PATH} + qmlSourcesGeneral.qrc + ${CPP_FILES} ) @@ -50,7 +67,7 @@ target_link_libraries(presentation target_include_directories(presentation PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/modules/CppElements + ${CPP_SOURCE_FOLDER} ${APPLICATION_INCLUDES} ${ADAPTERS_INCLUDES} ) diff --git a/src/presentation/FontSheet.qml b/src/presentation/FontSheet.qml index 36b2e4e62..213221d2b 100644 --- a/src/presentation/FontSheet.qml +++ b/src/presentation/FontSheet.qml @@ -32,11 +32,13 @@ Item { property real size13dot5: systemSize + 4.5 property real size14: systemSize + 5 property real size15: systemSize + 6 + property real size15dot5: systemSize + 6.5 property real size16: systemSize + 7 property real size16dot5: systemSize + 7.5 property real size17: systemSize + 8 property real size18: systemSize + 9 property real size19: systemSize + 10 + property real size19dot5: systemSize + 10.5 property real size20: systemSize + 11 property real size21: systemSize + 12 property real size22: systemSize + 13 @@ -44,6 +46,7 @@ Item { property real size25: systemSize + 16 property real size26: systemSize + 17 property real size28: systemSize + 19 + property real size34: systemSize + 25 property real size42: systemSize + 33 property real size46: systemSize + 37 } diff --git a/src/presentation/IconSheet.qml b/src/presentation/IconSheet.qml index cd323ceba..70346ca3c 100644 --- a/src/presentation/IconSheet.qml +++ b/src/presentation/IconSheet.qml @@ -138,6 +138,19 @@ Item { property string bookClosed property string pen + // Mobile + property string mobileLibrary: "/resources/images/mobile/library.svg" + property string mobileExplore: "/resources/images/mobile/explore.svg" + property string mobileProfile: "/resources/images/mobile/profile.svg" + property string mobileFolder: "/resources/images/mobile/folder.svg" + property string mobileBrush: "/resources/images/mobile/brush.svg" + property string mobileDiamond: "/resources/images/mobile/diamond.svg" + property string mobileRefresh: "/resources/images/mobile/refresh.svg" + property string mobileServer: "/resources/images/mobile/server.svg" + property string mobileGear: "/resources/images/mobile/gear.svg" + property string mobileSignOut: "/resources/images/mobile/sign_out.svg" + property string mobileArrowLeft: "/resources/images/mobile/arrow_left.svg" + state: "Light" states: [ State { diff --git a/src/presentation/PageNavigationLogic.js b/src/presentation/desktop/PageNavigationLogic.js similarity index 100% rename from src/presentation/PageNavigationLogic.js rename to src/presentation/desktop/PageNavigationLogic.js diff --git a/src/presentation/forgotPasswordPage/MForgotPasswordPage.qml b/src/presentation/desktop/forgotPasswordPage/MForgotPasswordPage.qml similarity index 100% rename from src/presentation/forgotPasswordPage/MForgotPasswordPage.qml rename to src/presentation/desktop/forgotPasswordPage/MForgotPasswordPage.qml diff --git a/src/presentation/freeBooksPage/MDownloadBookPopup.qml b/src/presentation/desktop/freeBooksPage/MDownloadBookPopup.qml similarity index 100% rename from src/presentation/freeBooksPage/MDownloadBookPopup.qml rename to src/presentation/desktop/freeBooksPage/MDownloadBookPopup.qml diff --git a/src/presentation/freeBooksPage/MFreeBook.qml b/src/presentation/desktop/freeBooksPage/MFreeBook.qml similarity index 100% rename from src/presentation/freeBooksPage/MFreeBook.qml rename to src/presentation/desktop/freeBooksPage/MFreeBook.qml diff --git a/src/presentation/freeBooksPage/MFreeBooksPage.qml b/src/presentation/desktop/freeBooksPage/MFreeBooksPage.qml similarity index 100% rename from src/presentation/freeBooksPage/MFreeBooksPage.qml rename to src/presentation/desktop/freeBooksPage/MFreeBooksPage.qml diff --git a/src/presentation/freeBooksPage/explorerToolbar/MExplorerToolbar.qml b/src/presentation/desktop/freeBooksPage/explorerToolbar/MExplorerToolbar.qml similarity index 100% rename from src/presentation/freeBooksPage/explorerToolbar/MExplorerToolbar.qml rename to src/presentation/desktop/freeBooksPage/explorerToolbar/MExplorerToolbar.qml diff --git a/src/presentation/homePage/MBook.qml b/src/presentation/desktop/homePage/MBook.qml similarity index 100% rename from src/presentation/homePage/MBook.qml rename to src/presentation/desktop/homePage/MBook.qml diff --git a/src/presentation/homePage/MBookDetailsPopup.qml b/src/presentation/desktop/homePage/MBookDetailsPopup.qml similarity index 100% rename from src/presentation/homePage/MBookDetailsPopup.qml rename to src/presentation/desktop/homePage/MBookDetailsPopup.qml diff --git a/src/presentation/homePage/MBookMultiSelectRightClickPopup.qml b/src/presentation/desktop/homePage/MBookMultiSelectRightClickPopup.qml similarity index 100% rename from src/presentation/homePage/MBookMultiSelectRightClickPopup.qml rename to src/presentation/desktop/homePage/MBookMultiSelectRightClickPopup.qml diff --git a/src/presentation/homePage/MBookRightClickPopup.qml b/src/presentation/desktop/homePage/MBookRightClickPopup.qml similarity index 100% rename from src/presentation/homePage/MBookRightClickPopup.qml rename to src/presentation/desktop/homePage/MBookRightClickPopup.qml diff --git a/src/presentation/homePage/MEmptyScreenContent.qml b/src/presentation/desktop/homePage/MEmptyScreenContent.qml similarity index 100% rename from src/presentation/homePage/MEmptyScreenContent.qml rename to src/presentation/desktop/homePage/MEmptyScreenContent.qml diff --git a/src/presentation/homePage/MHomePage.qml b/src/presentation/desktop/homePage/MHomePage.qml similarity index 100% rename from src/presentation/homePage/MHomePage.qml rename to src/presentation/desktop/homePage/MHomePage.qml diff --git a/src/presentation/homePage/MNoBookSatisfiesFilterItem.qml b/src/presentation/desktop/homePage/MNoBookSatisfiesFilterItem.qml similarity index 100% rename from src/presentation/homePage/MNoBookSatisfiesFilterItem.qml rename to src/presentation/desktop/homePage/MNoBookSatisfiesFilterItem.qml diff --git a/src/presentation/homePage/folderSidebar/MAddFolderPopup.qml b/src/presentation/desktop/homePage/folderSidebar/MAddFolderPopup.qml similarity index 100% rename from src/presentation/homePage/folderSidebar/MAddFolderPopup.qml rename to src/presentation/desktop/homePage/folderSidebar/MAddFolderPopup.qml diff --git a/src/presentation/homePage/folderSidebar/MDeleteFolderPopup.qml b/src/presentation/desktop/homePage/folderSidebar/MDeleteFolderPopup.qml similarity index 100% rename from src/presentation/homePage/folderSidebar/MDeleteFolderPopup.qml rename to src/presentation/desktop/homePage/folderSidebar/MDeleteFolderPopup.qml diff --git a/src/presentation/homePage/folderSidebar/MDescriptionPopup.qml b/src/presentation/desktop/homePage/folderSidebar/MDescriptionPopup.qml similarity index 100% rename from src/presentation/homePage/folderSidebar/MDescriptionPopup.qml rename to src/presentation/desktop/homePage/folderSidebar/MDescriptionPopup.qml diff --git a/src/presentation/homePage/folderSidebar/MFolderSidebar.qml b/src/presentation/desktop/homePage/folderSidebar/MFolderSidebar.qml similarity index 100% rename from src/presentation/homePage/folderSidebar/MFolderSidebar.qml rename to src/presentation/desktop/homePage/folderSidebar/MFolderSidebar.qml diff --git a/src/presentation/homePage/folderSidebar/MFolderSidebarItem.qml b/src/presentation/desktop/homePage/folderSidebar/MFolderSidebarItem.qml similarity index 100% rename from src/presentation/homePage/folderSidebar/MFolderSidebarItem.qml rename to src/presentation/desktop/homePage/folderSidebar/MFolderSidebarItem.qml diff --git a/src/presentation/homePage/folderSidebar/MFolderSidebarItemRigthclickPopup.qml b/src/presentation/desktop/homePage/folderSidebar/MFolderSidebarItemRigthclickPopup.qml similarity index 100% rename from src/presentation/homePage/folderSidebar/MFolderSidebarItemRigthclickPopup.qml rename to src/presentation/desktop/homePage/folderSidebar/MFolderSidebarItemRigthclickPopup.qml diff --git a/src/presentation/homePage/folderSidebar/MMoveToFolderPopup.qml b/src/presentation/desktop/homePage/folderSidebar/MMoveToFolderPopup.qml similarity index 100% rename from src/presentation/homePage/folderSidebar/MMoveToFolderPopup.qml rename to src/presentation/desktop/homePage/folderSidebar/MMoveToFolderPopup.qml diff --git a/src/presentation/homePage/folderSidebar/MSelectColorPopup.qml b/src/presentation/desktop/homePage/folderSidebar/MSelectColorPopup.qml similarity index 100% rename from src/presentation/homePage/folderSidebar/MSelectColorPopup.qml rename to src/presentation/desktop/homePage/folderSidebar/MSelectColorPopup.qml diff --git a/src/presentation/homePage/folderSidebar/MSelectIconPopup.qml b/src/presentation/desktop/homePage/folderSidebar/MSelectIconPopup.qml similarity index 100% rename from src/presentation/homePage/folderSidebar/MSelectIconPopup.qml rename to src/presentation/desktop/homePage/folderSidebar/MSelectIconPopup.qml diff --git a/src/presentation/homePage/manageTagsPopup/MAddTagBox.qml b/src/presentation/desktop/homePage/manageTagsPopup/MAddTagBox.qml similarity index 100% rename from src/presentation/homePage/manageTagsPopup/MAddTagBox.qml rename to src/presentation/desktop/homePage/manageTagsPopup/MAddTagBox.qml diff --git a/src/presentation/homePage/manageTagsPopup/MAddTagBoxPopup.qml b/src/presentation/desktop/homePage/manageTagsPopup/MAddTagBoxPopup.qml similarity index 100% rename from src/presentation/homePage/manageTagsPopup/MAddTagBoxPopup.qml rename to src/presentation/desktop/homePage/manageTagsPopup/MAddTagBoxPopup.qml diff --git a/src/presentation/homePage/manageTagsPopup/MManageTagsPopup.qml b/src/presentation/desktop/homePage/manageTagsPopup/MManageTagsPopup.qml similarity index 100% rename from src/presentation/homePage/manageTagsPopup/MManageTagsPopup.qml rename to src/presentation/desktop/homePage/manageTagsPopup/MManageTagsPopup.qml diff --git a/src/presentation/homePage/manageTagsPopup/MTagItem.qml b/src/presentation/desktop/homePage/manageTagsPopup/MTagItem.qml similarity index 100% rename from src/presentation/homePage/manageTagsPopup/MTagItem.qml rename to src/presentation/desktop/homePage/manageTagsPopup/MTagItem.qml diff --git a/src/presentation/homePage/toolbar/MToolbar.qml b/src/presentation/desktop/homePage/toolbar/MToolbar.qml similarity index 100% rename from src/presentation/homePage/toolbar/MToolbar.qml rename to src/presentation/desktop/homePage/toolbar/MToolbar.qml diff --git a/src/presentation/homePage/toolbar/filterByButton/MFilterByButton.qml b/src/presentation/desktop/homePage/toolbar/filterByButton/MFilterByButton.qml similarity index 100% rename from src/presentation/homePage/toolbar/filterByButton/MFilterByButton.qml rename to src/presentation/desktop/homePage/toolbar/filterByButton/MFilterByButton.qml diff --git a/src/presentation/homePage/toolbar/filterByButton/MFilterByPopup.qml b/src/presentation/desktop/homePage/toolbar/filterByButton/MFilterByPopup.qml similarity index 100% rename from src/presentation/homePage/toolbar/filterByButton/MFilterByPopup.qml rename to src/presentation/desktop/homePage/toolbar/filterByButton/MFilterByPopup.qml diff --git a/src/presentation/homePage/toolbar/sortByButton/MSortByButton.qml b/src/presentation/desktop/homePage/toolbar/sortByButton/MSortByButton.qml similarity index 100% rename from src/presentation/homePage/toolbar/sortByButton/MSortByButton.qml rename to src/presentation/desktop/homePage/toolbar/sortByButton/MSortByButton.qml diff --git a/src/presentation/homePage/toolbar/sortByButton/MSortByPopup.qml b/src/presentation/desktop/homePage/toolbar/sortByButton/MSortByPopup.qml similarity index 100% rename from src/presentation/homePage/toolbar/sortByButton/MSortByPopup.qml rename to src/presentation/desktop/homePage/toolbar/sortByButton/MSortByPopup.qml diff --git a/src/presentation/homePage/toolbar/tagSelector/MTagSelectorButton.qml b/src/presentation/desktop/homePage/toolbar/tagSelector/MTagSelectorButton.qml similarity index 100% rename from src/presentation/homePage/toolbar/tagSelector/MTagSelectorButton.qml rename to src/presentation/desktop/homePage/toolbar/tagSelector/MTagSelectorButton.qml diff --git a/src/presentation/homePage/toolbar/tagSelector/MTagSelectorPopup.qml b/src/presentation/desktop/homePage/toolbar/tagSelector/MTagSelectorPopup.qml similarity index 100% rename from src/presentation/homePage/toolbar/tagSelector/MTagSelectorPopup.qml rename to src/presentation/desktop/homePage/toolbar/tagSelector/MTagSelectorPopup.qml diff --git a/src/presentation/loginPage/MLoginPage.qml b/src/presentation/desktop/loginPage/MLoginPage.qml similarity index 100% rename from src/presentation/loginPage/MLoginPage.qml rename to src/presentation/desktop/loginPage/MLoginPage.qml diff --git a/src/presentation/main.qml b/src/presentation/desktop/main.qml similarity index 100% rename from src/presentation/main.qml rename to src/presentation/desktop/main.qml diff --git a/src/presentation/modules/CppElements/key_sequence_recorder.cpp b/src/presentation/desktop/modules/CppElements/key_sequence_recorder.cpp similarity index 100% rename from src/presentation/modules/CppElements/key_sequence_recorder.cpp rename to src/presentation/desktop/modules/CppElements/key_sequence_recorder.cpp diff --git a/src/presentation/modules/CppElements/key_sequence_recorder.hpp b/src/presentation/desktop/modules/CppElements/key_sequence_recorder.hpp similarity index 100% rename from src/presentation/modules/CppElements/key_sequence_recorder.hpp rename to src/presentation/desktop/modules/CppElements/key_sequence_recorder.hpp diff --git a/src/presentation/modules/CppElements/page_view.cpp b/src/presentation/desktop/modules/CppElements/page_view.cpp similarity index 100% rename from src/presentation/modules/CppElements/page_view.cpp rename to src/presentation/desktop/modules/CppElements/page_view.cpp diff --git a/src/presentation/modules/CppElements/page_view.hpp b/src/presentation/desktop/modules/CppElements/page_view.hpp similarity index 100% rename from src/presentation/modules/CppElements/page_view.hpp rename to src/presentation/desktop/modules/CppElements/page_view.hpp diff --git a/src/presentation/modules/CppElements/presentation_export.hpp b/src/presentation/desktop/modules/CppElements/presentation_export.hpp similarity index 100% rename from src/presentation/modules/CppElements/presentation_export.hpp rename to src/presentation/desktop/modules/CppElements/presentation_export.hpp diff --git a/src/presentation/modules/CustomComponents/MAlertBox.qml b/src/presentation/desktop/modules/CustomComponents/MAlertBox.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MAlertBox.qml rename to src/presentation/desktop/modules/CustomComponents/MAlertBox.qml diff --git a/src/presentation/modules/CustomComponents/MBaseListItem.qml b/src/presentation/desktop/modules/CustomComponents/MBaseListItem.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MBaseListItem.qml rename to src/presentation/desktop/modules/CustomComponents/MBaseListItem.qml diff --git a/src/presentation/modules/CustomComponents/MCheckBox.qml b/src/presentation/desktop/modules/CustomComponents/MCheckBox.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MCheckBox.qml rename to src/presentation/desktop/modules/CustomComponents/MCheckBox.qml diff --git a/src/presentation/modules/CustomComponents/MConfirmAccountDeletionPopup.qml b/src/presentation/desktop/modules/CustomComponents/MConfirmAccountDeletionPopup.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MConfirmAccountDeletionPopup.qml rename to src/presentation/desktop/modules/CustomComponents/MConfirmAccountDeletionPopup.qml diff --git a/src/presentation/modules/CustomComponents/MDualToggle.qml b/src/presentation/desktop/modules/CustomComponents/MDualToggle.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MDualToggle.qml rename to src/presentation/desktop/modules/CustomComponents/MDualToggle.qml diff --git a/src/presentation/modules/CustomComponents/MFeedbackPopup.qml b/src/presentation/desktop/modules/CustomComponents/MFeedbackPopup.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MFeedbackPopup.qml rename to src/presentation/desktop/modules/CustomComponents/MFeedbackPopup.qml diff --git a/src/presentation/modules/CustomComponents/MFlickWrapper.qml b/src/presentation/desktop/modules/CustomComponents/MFlickWrapper.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MFlickWrapper.qml rename to src/presentation/desktop/modules/CustomComponents/MFlickWrapper.qml diff --git a/src/presentation/modules/CustomComponents/MLabeledCheckBox.qml b/src/presentation/desktop/modules/CustomComponents/MLabeledCheckBox.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MLabeledCheckBox.qml rename to src/presentation/desktop/modules/CustomComponents/MLabeledCheckBox.qml diff --git a/src/presentation/modules/CustomComponents/MLabeledInputBox.qml b/src/presentation/desktop/modules/CustomComponents/MLabeledInputBox.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MLabeledInputBox.qml rename to src/presentation/desktop/modules/CustomComponents/MLabeledInputBox.qml diff --git a/src/presentation/modules/CustomComponents/MLanguageModel.qml b/src/presentation/desktop/modules/CustomComponents/MLanguageModel.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MLanguageModel.qml rename to src/presentation/desktop/modules/CustomComponents/MLanguageModel.qml diff --git a/src/presentation/modules/CustomComponents/MLogo.qml b/src/presentation/desktop/modules/CustomComponents/MLogo.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MLogo.qml rename to src/presentation/desktop/modules/CustomComponents/MLogo.qml diff --git a/src/presentation/modules/CustomComponents/MOnOffToggle.qml b/src/presentation/desktop/modules/CustomComponents/MOnOffToggle.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MOnOffToggle.qml rename to src/presentation/desktop/modules/CustomComponents/MOnOffToggle.qml diff --git a/src/presentation/modules/CustomComponents/MPageCleanup.qml b/src/presentation/desktop/modules/CustomComponents/MPageCleanup.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MPageCleanup.qml rename to src/presentation/desktop/modules/CustomComponents/MPageCleanup.qml diff --git a/src/presentation/modules/CustomComponents/MProgressArc.qml b/src/presentation/desktop/modules/CustomComponents/MProgressArc.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MProgressArc.qml rename to src/presentation/desktop/modules/CustomComponents/MProgressArc.qml diff --git a/src/presentation/modules/CustomComponents/MProgressBar.qml b/src/presentation/desktop/modules/CustomComponents/MProgressBar.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MProgressBar.qml rename to src/presentation/desktop/modules/CustomComponents/MProgressBar.qml diff --git a/src/presentation/modules/CustomComponents/MRadioButton.qml b/src/presentation/desktop/modules/CustomComponents/MRadioButton.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MRadioButton.qml rename to src/presentation/desktop/modules/CustomComponents/MRadioButton.qml diff --git a/src/presentation/modules/CustomComponents/MRadioButtonSelector.qml b/src/presentation/desktop/modules/CustomComponents/MRadioButtonSelector.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MRadioButtonSelector.qml rename to src/presentation/desktop/modules/CustomComponents/MRadioButtonSelector.qml diff --git a/src/presentation/modules/CustomComponents/MSlider.qml b/src/presentation/desktop/modules/CustomComponents/MSlider.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MSlider.qml rename to src/presentation/desktop/modules/CustomComponents/MSlider.qml diff --git a/src/presentation/modules/CustomComponents/MSpinbox.qml b/src/presentation/desktop/modules/CustomComponents/MSpinbox.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MSpinbox.qml rename to src/presentation/desktop/modules/CustomComponents/MSpinbox.qml diff --git a/src/presentation/modules/CustomComponents/MSpinner.qml b/src/presentation/desktop/modules/CustomComponents/MSpinner.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MSpinner.qml rename to src/presentation/desktop/modules/CustomComponents/MSpinner.qml diff --git a/src/presentation/modules/CustomComponents/MTitle.qml b/src/presentation/desktop/modules/CustomComponents/MTitle.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MTitle.qml rename to src/presentation/desktop/modules/CustomComponents/MTitle.qml diff --git a/src/presentation/modules/CustomComponents/MToolTip.qml b/src/presentation/desktop/modules/CustomComponents/MToolTip.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MToolTip.qml rename to src/presentation/desktop/modules/CustomComponents/MToolTip.qml diff --git a/src/presentation/modules/CustomComponents/MWarningPopup.qml b/src/presentation/desktop/modules/CustomComponents/MWarningPopup.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MWarningPopup.qml rename to src/presentation/desktop/modules/CustomComponents/MWarningPopup.qml diff --git a/src/presentation/modules/CustomComponents/MWrappedCheckBox.qml b/src/presentation/desktop/modules/CustomComponents/MWrappedCheckBox.qml similarity index 100% rename from src/presentation/modules/CustomComponents/MWrappedCheckBox.qml rename to src/presentation/desktop/modules/CustomComponents/MWrappedCheckBox.qml diff --git a/src/presentation/modules/CustomComponents/bookSelector/MBookSelector.qml b/src/presentation/desktop/modules/CustomComponents/bookSelector/MBookSelector.qml similarity index 100% rename from src/presentation/modules/CustomComponents/bookSelector/MBookSelector.qml rename to src/presentation/desktop/modules/CustomComponents/bookSelector/MBookSelector.qml diff --git a/src/presentation/modules/CustomComponents/bookSelector/MBookSelectorPopup.qml b/src/presentation/desktop/modules/CustomComponents/bookSelector/MBookSelectorPopup.qml similarity index 100% rename from src/presentation/modules/CustomComponents/bookSelector/MBookSelectorPopup.qml rename to src/presentation/desktop/modules/CustomComponents/bookSelector/MBookSelectorPopup.qml diff --git a/src/presentation/modules/CustomComponents/buttons/MButton.qml b/src/presentation/desktop/modules/CustomComponents/buttons/MButton.qml similarity index 100% rename from src/presentation/modules/CustomComponents/buttons/MButton.qml rename to src/presentation/desktop/modules/CustomComponents/buttons/MButton.qml diff --git a/src/presentation/modules/CustomComponents/buttons/MRemoveOptionButton.qml b/src/presentation/desktop/modules/CustomComponents/buttons/MRemoveOptionButton.qml similarity index 100% rename from src/presentation/modules/CustomComponents/buttons/MRemoveOptionButton.qml rename to src/presentation/desktop/modules/CustomComponents/buttons/MRemoveOptionButton.qml diff --git a/src/presentation/modules/CustomComponents/buttons/MSearchButton.qml b/src/presentation/desktop/modules/CustomComponents/buttons/MSearchButton.qml similarity index 100% rename from src/presentation/modules/CustomComponents/buttons/MSearchButton.qml rename to src/presentation/desktop/modules/CustomComponents/buttons/MSearchButton.qml diff --git a/src/presentation/modules/CustomComponents/comboBox/ComboBoxLogic.js b/src/presentation/desktop/modules/CustomComponents/comboBox/ComboBoxLogic.js similarity index 100% rename from src/presentation/modules/CustomComponents/comboBox/ComboBoxLogic.js rename to src/presentation/desktop/modules/CustomComponents/comboBox/ComboBoxLogic.js diff --git a/src/presentation/modules/CustomComponents/comboBox/MComboBox.qml b/src/presentation/desktop/modules/CustomComponents/comboBox/MComboBox.qml similarity index 100% rename from src/presentation/modules/CustomComponents/comboBox/MComboBox.qml rename to src/presentation/desktop/modules/CustomComponents/comboBox/MComboBox.qml diff --git a/src/presentation/modules/CustomComponents/comboBox/MComboBoxPopup.qml b/src/presentation/desktop/modules/CustomComponents/comboBox/MComboBoxPopup.qml similarity index 100% rename from src/presentation/modules/CustomComponents/comboBox/MComboBoxPopup.qml rename to src/presentation/desktop/modules/CustomComponents/comboBox/MComboBoxPopup.qml diff --git a/src/presentation/modules/CustomComponents/qmldir b/src/presentation/desktop/modules/CustomComponents/qmldir similarity index 100% rename from src/presentation/modules/CustomComponents/qmldir rename to src/presentation/desktop/modules/CustomComponents/qmldir diff --git a/src/presentation/modules/CustomComponents/rightClickMenu/MRightClickMenu.qml b/src/presentation/desktop/modules/CustomComponents/rightClickMenu/MRightClickMenu.qml similarity index 100% rename from src/presentation/modules/CustomComponents/rightClickMenu/MRightClickMenu.qml rename to src/presentation/desktop/modules/CustomComponents/rightClickMenu/MRightClickMenu.qml diff --git a/src/presentation/modules/CustomComponents/rightClickMenu/MRightClickMenuItem.qml b/src/presentation/desktop/modules/CustomComponents/rightClickMenu/MRightClickMenuItem.qml similarity index 100% rename from src/presentation/modules/CustomComponents/rightClickMenu/MRightClickMenuItem.qml rename to src/presentation/desktop/modules/CustomComponents/rightClickMenu/MRightClickMenuItem.qml diff --git a/src/presentation/modules/CustomComponents/rightClickMenu/PopupPositionLogic.js b/src/presentation/desktop/modules/CustomComponents/rightClickMenu/PopupPositionLogic.js similarity index 100% rename from src/presentation/modules/CustomComponents/rightClickMenu/PopupPositionLogic.js rename to src/presentation/desktop/modules/CustomComponents/rightClickMenu/PopupPositionLogic.js diff --git a/src/presentation/qmlSources.qrc b/src/presentation/desktop/qmlSourcesDesktop.qrc similarity index 97% rename from src/presentation/qmlSources.qrc rename to src/presentation/desktop/qmlSourcesDesktop.qrc index fb14ad156..7cc472e1c 100644 --- a/src/presentation/qmlSources.qrc +++ b/src/presentation/desktop/qmlSourcesDesktop.qrc @@ -14,9 +14,6 @@ <file>sidebar/MProfilePopupItem.qml</file> <file>sidebar/MSidebar.qml</file> <file>sidebar/MSidebarItem.qml</file> - <file>StyleSheet.qml</file> - <file>IconSheet.qml</file> - <file>FontSheet.qml</file> <file>modules/CustomComponents/buttons/MButton.qml</file> <file>modules/CustomComponents/buttons/MRemoveOptionButton.qml</file> <file>modules/CustomComponents/buttons/MSearchButton.qml</file> @@ -65,7 +62,6 @@ <file>settings/shortcutsPage/MRecordKeyBox.qml</file> <file>settings/accountPage/MAccountPage.qml</file> <file>settings/accountPage/MSelectProfilePictureArea.qml</file> - <file>Globals.qml</file> <file>modules/CustomComponents/comboBox/ComboBoxLogic.js</file> <file>modules/CustomComponents/MFlickWrapper.qml</file> <file>settings/MBehaviorPage.qml</file> @@ -97,7 +93,6 @@ <file>readingPage/MDictionaryPopup.qml</file> <file>readingPage/MBookmarkItem.qml</file> <file>readingPage/MExplanationPopup.qml</file> - <file>TranslationsModel.qml</file> <file>homePage/MBookMultiSelectRightClickPopup.qml</file> <file>modules/CustomComponents/MLanguageModel.qml</file> <file>homePage/folderSidebar/MFolderSidebarItem.qml</file> @@ -122,7 +117,6 @@ <file>toolsPage/MExtractPagesPopup.qml</file> <file>toolsPage/MImageToPdfPopup.qml</file> <file>toolsPage/MPdfToImagePopup.qml</file> - <file>GlobalSettings.qml</file> <file>modules/CustomComponents/MFeedbackPopup.qml</file> </qresource> </RCC> diff --git a/src/presentation/readingPage/DocumentNavigation.js b/src/presentation/desktop/readingPage/DocumentNavigation.js similarity index 100% rename from src/presentation/readingPage/DocumentNavigation.js rename to src/presentation/desktop/readingPage/DocumentNavigation.js diff --git a/src/presentation/readingPage/MBookmarkItem.qml b/src/presentation/desktop/readingPage/MBookmarkItem.qml similarity index 100% rename from src/presentation/readingPage/MBookmarkItem.qml rename to src/presentation/desktop/readingPage/MBookmarkItem.qml diff --git a/src/presentation/readingPage/MBookmarksSidebar.qml b/src/presentation/desktop/readingPage/MBookmarksSidebar.qml similarity index 100% rename from src/presentation/readingPage/MBookmarksSidebar.qml rename to src/presentation/desktop/readingPage/MBookmarksSidebar.qml diff --git a/src/presentation/readingPage/MChapterSidebar.qml b/src/presentation/desktop/readingPage/MChapterSidebar.qml similarity index 100% rename from src/presentation/readingPage/MChapterSidebar.qml rename to src/presentation/desktop/readingPage/MChapterSidebar.qml diff --git a/src/presentation/readingPage/MDictionaryPopup.qml b/src/presentation/desktop/readingPage/MDictionaryPopup.qml similarity index 100% rename from src/presentation/readingPage/MDictionaryPopup.qml rename to src/presentation/desktop/readingPage/MDictionaryPopup.qml diff --git a/src/presentation/readingPage/MDocumentView.qml b/src/presentation/desktop/readingPage/MDocumentView.qml similarity index 100% rename from src/presentation/readingPage/MDocumentView.qml rename to src/presentation/desktop/readingPage/MDocumentView.qml diff --git a/src/presentation/readingPage/MExplanationPopup.qml b/src/presentation/desktop/readingPage/MExplanationPopup.qml similarity index 100% rename from src/presentation/readingPage/MExplanationPopup.qml rename to src/presentation/desktop/readingPage/MExplanationPopup.qml diff --git a/src/presentation/readingPage/MExternalReadingPage.qml b/src/presentation/desktop/readingPage/MExternalReadingPage.qml similarity index 100% rename from src/presentation/readingPage/MExternalReadingPage.qml rename to src/presentation/desktop/readingPage/MExternalReadingPage.qml diff --git a/src/presentation/readingPage/MReadingPage.qml b/src/presentation/desktop/readingPage/MReadingPage.qml similarity index 100% rename from src/presentation/readingPage/MReadingPage.qml rename to src/presentation/desktop/readingPage/MReadingPage.qml diff --git a/src/presentation/readingPage/MSelectionOptionsPopup.qml b/src/presentation/desktop/readingPage/MSelectionOptionsPopup.qml similarity index 100% rename from src/presentation/readingPage/MSelectionOptionsPopup.qml rename to src/presentation/desktop/readingPage/MSelectionOptionsPopup.qml diff --git a/src/presentation/readingPage/externalReadingToolbar/MExternalReadingOptionsPopup.qml b/src/presentation/desktop/readingPage/externalReadingToolbar/MExternalReadingOptionsPopup.qml similarity index 100% rename from src/presentation/readingPage/externalReadingToolbar/MExternalReadingOptionsPopup.qml rename to src/presentation/desktop/readingPage/externalReadingToolbar/MExternalReadingOptionsPopup.qml diff --git a/src/presentation/readingPage/externalReadingToolbar/MExternalReadingToolBar.qml b/src/presentation/desktop/readingPage/externalReadingToolbar/MExternalReadingToolBar.qml similarity index 100% rename from src/presentation/readingPage/externalReadingToolbar/MExternalReadingToolBar.qml rename to src/presentation/desktop/readingPage/externalReadingToolbar/MExternalReadingToolBar.qml diff --git a/src/presentation/readingPage/readingSearchbar/MReadingSearchbar.qml b/src/presentation/desktop/readingPage/readingSearchbar/MReadingSearchbar.qml similarity index 100% rename from src/presentation/readingPage/readingSearchbar/MReadingSearchbar.qml rename to src/presentation/desktop/readingPage/readingSearchbar/MReadingSearchbar.qml diff --git a/src/presentation/readingPage/readingSearchbar/MReadingSearchbarOptionsPopup.qml b/src/presentation/desktop/readingPage/readingSearchbar/MReadingSearchbarOptionsPopup.qml similarity index 100% rename from src/presentation/readingPage/readingSearchbar/MReadingSearchbarOptionsPopup.qml rename to src/presentation/desktop/readingPage/readingSearchbar/MReadingSearchbarOptionsPopup.qml diff --git a/src/presentation/readingPage/readingToolbar/MReadingOptionsPopup.qml b/src/presentation/desktop/readingPage/readingToolbar/MReadingOptionsPopup.qml similarity index 100% rename from src/presentation/readingPage/readingToolbar/MReadingOptionsPopup.qml rename to src/presentation/desktop/readingPage/readingToolbar/MReadingOptionsPopup.qml diff --git a/src/presentation/readingPage/readingToolbar/MReadingToolBar.qml b/src/presentation/desktop/readingPage/readingToolbar/MReadingToolBar.qml similarity index 100% rename from src/presentation/readingPage/readingToolbar/MReadingToolBar.qml rename to src/presentation/desktop/readingPage/readingToolbar/MReadingToolBar.qml diff --git a/src/presentation/registerPage/MAcceptPolicy.qml b/src/presentation/desktop/registerPage/MAcceptPolicy.qml similarity index 100% rename from src/presentation/registerPage/MAcceptPolicy.qml rename to src/presentation/desktop/registerPage/MAcceptPolicy.qml diff --git a/src/presentation/registerPage/MRegisterPage.qml b/src/presentation/desktop/registerPage/MRegisterPage.qml similarity index 100% rename from src/presentation/registerPage/MRegisterPage.qml rename to src/presentation/desktop/registerPage/MRegisterPage.qml diff --git a/src/presentation/settings/MAboutPage.qml b/src/presentation/desktop/settings/MAboutPage.qml similarity index 100% rename from src/presentation/settings/MAboutPage.qml rename to src/presentation/desktop/settings/MAboutPage.qml diff --git a/src/presentation/settings/MAppearancePage.qml b/src/presentation/desktop/settings/MAppearancePage.qml similarity index 100% rename from src/presentation/settings/MAppearancePage.qml rename to src/presentation/desktop/settings/MAppearancePage.qml diff --git a/src/presentation/settings/MBehaviorPage.qml b/src/presentation/desktop/settings/MBehaviorPage.qml similarity index 100% rename from src/presentation/settings/MBehaviorPage.qml rename to src/presentation/desktop/settings/MBehaviorPage.qml diff --git a/src/presentation/settings/MSettings.qml b/src/presentation/desktop/settings/MSettings.qml similarity index 100% rename from src/presentation/settings/MSettings.qml rename to src/presentation/desktop/settings/MSettings.qml diff --git a/src/presentation/settings/MStoragePage.qml b/src/presentation/desktop/settings/MStoragePage.qml similarity index 100% rename from src/presentation/settings/MStoragePage.qml rename to src/presentation/desktop/settings/MStoragePage.qml diff --git a/src/presentation/settings/MSupportUsPage.qml b/src/presentation/desktop/settings/MSupportUsPage.qml similarity index 100% rename from src/presentation/settings/MSupportUsPage.qml rename to src/presentation/desktop/settings/MSupportUsPage.qml diff --git a/src/presentation/settings/accountPage/MAccountPage.qml b/src/presentation/desktop/settings/accountPage/MAccountPage.qml similarity index 100% rename from src/presentation/settings/accountPage/MAccountPage.qml rename to src/presentation/desktop/settings/accountPage/MAccountPage.qml diff --git a/src/presentation/settings/accountPage/MSelectProfilePictureArea.qml b/src/presentation/desktop/settings/accountPage/MSelectProfilePictureArea.qml similarity index 100% rename from src/presentation/settings/accountPage/MSelectProfilePictureArea.qml rename to src/presentation/desktop/settings/accountPage/MSelectProfilePictureArea.qml diff --git a/src/presentation/settings/settingsSidebar/MSettingsSidebar.qml b/src/presentation/desktop/settings/settingsSidebar/MSettingsSidebar.qml similarity index 100% rename from src/presentation/settings/settingsSidebar/MSettingsSidebar.qml rename to src/presentation/desktop/settings/settingsSidebar/MSettingsSidebar.qml diff --git a/src/presentation/settings/settingsSidebar/MSettingsSidebarItem.qml b/src/presentation/desktop/settings/settingsSidebar/MSettingsSidebarItem.qml similarity index 100% rename from src/presentation/settings/settingsSidebar/MSettingsSidebarItem.qml rename to src/presentation/desktop/settings/settingsSidebar/MSettingsSidebarItem.qml diff --git a/src/presentation/settings/shortcutsPage/MAddShortcutPopup.qml b/src/presentation/desktop/settings/shortcutsPage/MAddShortcutPopup.qml similarity index 100% rename from src/presentation/settings/shortcutsPage/MAddShortcutPopup.qml rename to src/presentation/desktop/settings/shortcutsPage/MAddShortcutPopup.qml diff --git a/src/presentation/settings/shortcutsPage/MRecordKeyBox.qml b/src/presentation/desktop/settings/shortcutsPage/MRecordKeyBox.qml similarity index 100% rename from src/presentation/settings/shortcutsPage/MRecordKeyBox.qml rename to src/presentation/desktop/settings/shortcutsPage/MRecordKeyBox.qml diff --git a/src/presentation/settings/shortcutsPage/MShortcutDelegate.qml b/src/presentation/desktop/settings/shortcutsPage/MShortcutDelegate.qml similarity index 100% rename from src/presentation/settings/shortcutsPage/MShortcutDelegate.qml rename to src/presentation/desktop/settings/shortcutsPage/MShortcutDelegate.qml diff --git a/src/presentation/settings/shortcutsPage/MShortcutsPage.qml b/src/presentation/desktop/settings/shortcutsPage/MShortcutsPage.qml similarity index 100% rename from src/presentation/settings/shortcutsPage/MShortcutsPage.qml rename to src/presentation/desktop/settings/shortcutsPage/MShortcutsPage.qml diff --git a/src/presentation/settings/updatesPage/MUpToDate.qml b/src/presentation/desktop/settings/updatesPage/MUpToDate.qml similarity index 100% rename from src/presentation/settings/updatesPage/MUpToDate.qml rename to src/presentation/desktop/settings/updatesPage/MUpToDate.qml diff --git a/src/presentation/settings/updatesPage/MUpdatesAvailable.qml b/src/presentation/desktop/settings/updatesPage/MUpdatesAvailable.qml similarity index 100% rename from src/presentation/settings/updatesPage/MUpdatesAvailable.qml rename to src/presentation/desktop/settings/updatesPage/MUpdatesAvailable.qml diff --git a/src/presentation/settings/updatesPage/MUpdatesPage.qml b/src/presentation/desktop/settings/updatesPage/MUpdatesPage.qml similarity index 100% rename from src/presentation/settings/updatesPage/MUpdatesPage.qml rename to src/presentation/desktop/settings/updatesPage/MUpdatesPage.qml diff --git a/src/presentation/settings/updatesPage/MWindowsUpdatingPopup.qml b/src/presentation/desktop/settings/updatesPage/MWindowsUpdatingPopup.qml similarity index 100% rename from src/presentation/settings/updatesPage/MWindowsUpdatingPopup.qml rename to src/presentation/desktop/settings/updatesPage/MWindowsUpdatingPopup.qml diff --git a/src/presentation/sidebar/MProfileBox.qml b/src/presentation/desktop/sidebar/MProfileBox.qml similarity index 100% rename from src/presentation/sidebar/MProfileBox.qml rename to src/presentation/desktop/sidebar/MProfileBox.qml diff --git a/src/presentation/sidebar/MProfilePopup.qml b/src/presentation/desktop/sidebar/MProfilePopup.qml similarity index 100% rename from src/presentation/sidebar/MProfilePopup.qml rename to src/presentation/desktop/sidebar/MProfilePopup.qml diff --git a/src/presentation/sidebar/MProfilePopupItem.qml b/src/presentation/desktop/sidebar/MProfilePopupItem.qml similarity index 100% rename from src/presentation/sidebar/MProfilePopupItem.qml rename to src/presentation/desktop/sidebar/MProfilePopupItem.qml diff --git a/src/presentation/sidebar/MSidebar.qml b/src/presentation/desktop/sidebar/MSidebar.qml similarity index 100% rename from src/presentation/sidebar/MSidebar.qml rename to src/presentation/desktop/sidebar/MSidebar.qml diff --git a/src/presentation/sidebar/MSidebarItem.qml b/src/presentation/desktop/sidebar/MSidebarItem.qml similarity index 100% rename from src/presentation/sidebar/MSidebarItem.qml rename to src/presentation/desktop/sidebar/MSidebarItem.qml diff --git a/src/presentation/statisticsPage/MStatisticsPage.qml b/src/presentation/desktop/statisticsPage/MStatisticsPage.qml similarity index 100% rename from src/presentation/statisticsPage/MStatisticsPage.qml rename to src/presentation/desktop/statisticsPage/MStatisticsPage.qml diff --git a/src/presentation/toolsPage/MExtractPagesPopup.qml b/src/presentation/desktop/toolsPage/MExtractPagesPopup.qml similarity index 100% rename from src/presentation/toolsPage/MExtractPagesPopup.qml rename to src/presentation/desktop/toolsPage/MExtractPagesPopup.qml diff --git a/src/presentation/toolsPage/MImageToPdfPopup.qml b/src/presentation/desktop/toolsPage/MImageToPdfPopup.qml similarity index 100% rename from src/presentation/toolsPage/MImageToPdfPopup.qml rename to src/presentation/desktop/toolsPage/MImageToPdfPopup.qml diff --git a/src/presentation/toolsPage/MMergePopup.qml b/src/presentation/desktop/toolsPage/MMergePopup.qml similarity index 100% rename from src/presentation/toolsPage/MMergePopup.qml rename to src/presentation/desktop/toolsPage/MMergePopup.qml diff --git a/src/presentation/toolsPage/MPdfToImagePopup.qml b/src/presentation/desktop/toolsPage/MPdfToImagePopup.qml similarity index 100% rename from src/presentation/toolsPage/MPdfToImagePopup.qml rename to src/presentation/desktop/toolsPage/MPdfToImagePopup.qml diff --git a/src/presentation/toolsPage/MToolsPage.qml b/src/presentation/desktop/toolsPage/MToolsPage.qml similarity index 100% rename from src/presentation/toolsPage/MToolsPage.qml rename to src/presentation/desktop/toolsPage/MToolsPage.qml diff --git a/src/presentation/feature/arabic-translation b/src/presentation/feature/arabic-translation deleted file mode 100644 index 1f068c5de..000000000 --- a/src/presentation/feature/arabic-translation +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS/> diff --git a/src/presentation/mobile/explorePage/MExplorePage.qml b/src/presentation/mobile/explorePage/MExplorePage.qml new file mode 100644 index 000000000..9f97ceedc --- /dev/null +++ b/src/presentation/mobile/explorePage/MExplorePage.qml @@ -0,0 +1,24 @@ +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.controllers +import CustomComponents + +Page { + id: root + horizontalPadding: 18 + background: Rectangle { + color: Style.colorPageBackground + } + + Label { + id: welcomeText + anchors.centerIn: parent + text: qsTr("Explore Page") + color: Style.colorTitle + font.weight: Font.Bold + font.pointSize: Fonts.size28 + } +} diff --git a/src/presentation/mobile/libraryPage/MLibraryPage.qml b/src/presentation/mobile/libraryPage/MLibraryPage.qml new file mode 100644 index 000000000..5ec265b1b --- /dev/null +++ b/src/presentation/mobile/libraryPage/MLibraryPage.qml @@ -0,0 +1,24 @@ +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.controllers +import CustomComponents + +Page { + id: root + horizontalPadding: 18 + background: Rectangle { + color: Style.colorPageBackground + } + + Label { + id: welcomeText + anchors.centerIn: parent + text: qsTr("Home Page") + color: Style.colorTitle + font.weight: Font.Bold + font.pointSize: Fonts.size28 + } +} diff --git a/src/presentation/mobile/loginPage/MLoginPage.qml b/src/presentation/mobile/loginPage/MLoginPage.qml new file mode 100644 index 000000000..4f615978b --- /dev/null +++ b/src/presentation/mobile/loginPage/MLoginPage.qml @@ -0,0 +1,215 @@ +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.controllers +import CustomComponents + +Page { + id: root + horizontalPadding: 18 + background: Rectangle { + color: Style.colorPageBackground + } + + Connections { + id: proccessLoginResult + target: AuthController + function onLoginFinished(errorCode, message) { + internal.processLoginResult(errorCode, message) + } + } + + Connections { + id: proccessLoadingUserResult + target: UserController + function onFinishedLoadingUser(success) { + if (success) + loadPage(homePage, navbar.libraryItem) + else + loginFailedPopup.open() + } + } + + ColumnLayout { + id: layout + anchors.fill: parent + spacing: 0 + + Item { + Layout.fillHeight: true + Layout.minimumHeight: 32 + Layout.maximumHeight: 68 + } + + MLogo { + id: logo + Layout.alignment: Qt.AlignHCenter + Layout.preferredWidth: 92 + Layout.preferredHeight: 92 + } + + Label { + id: welcomeText + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: 52 + text: qsTr("Welcome back!") + color: Style.colorTitle + font.weight: Font.Bold + font.pointSize: Fonts.size26 + } + + Label { + id: loginText + Layout.topMargin: 4 + Layout.alignment: Qt.AlignHCenter + text: qsTr("Log into your account") + color: Style.colorSubtitle + font.pointSize: Fonts.size13dot25 + } + + MLabeledInputBox { + id: emailInput + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 40 + placeHolderText: qsTr("Email") + } + + MLabeledInputBox { + id: passwordInput + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 8 + isPassword: true + placeHolderText: qsTr("Password") + textHidden: true + } + + MButton { + id: signInButton + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 20 + borderWidth: 0 + radius: 8 + backgroundColor: Style.colorBasePurple + fontSize: Fonts.size16 + opacityOnPressed: 0.85 + textColor: Style.colorFocusedButtonText + text: qsTr("Sign in") + + onClicked: internal.login() + } + + Label { + Layout.topMargin: 16 + Layout.alignment: Qt.AlignHCenter + text: qsTr("Forgot password?") + font.pointSize: Fonts.size13dot25 + font.weight: Font.Medium + opacity: forgotPasswordArea.pressed ? 0.8 : 1 + color: Style.colorBasePurple + + TapHandler { + id: forgotPasswordArea + onTapped: loadPage(forgotPasswordPage) + } + } + + Item { + Layout.fillHeight: true + } + + Item { + id: registerLinkContainer + Layout.alignment: Qt.AlignHCenter + Layout.bottomMargin: 12 + implicitHeight: registerLinkRow.implicitHeight + 8 + implicitWidth: registerLinkRow.implicitWidth + 8 + + RowLayout { + id: registerLinkRow + anchors.centerIn: parent + spacing: 0 + + Label { + text: qsTr("Don't have an account? ") + font.pointSize: Fonts.size13 + opacity: registerLinkArea.pressed ? 0.8 : 1 + font.weight: Font.Medium + color: Style.colorText + } + + Label { + text: qsTr("Register!") + font.pointSize: Fonts.size13 + opacity: registerLinkArea.pressed ? 0.8 : 1 + font.weight: Font.Medium + color: Style.colorBasePurple + } + } + + TapHandler { + id: registerLinkArea + onTapped: loadPage(registerPage) + } + } + } + + QtObject { + id: internal + property color previousBorderColor: emailInput.borderColor + + function login() { + AuthController.loginUser(emailInput.text, passwordInput.text, true) + } + + function processLoginResult(errorCode, message) { + if (errorCode === ErrorCode.NoError) { + UserController.loadUser(true) + } else { + internal.setLoginError(errorCode, message) + } + } + + function setLoginError(errorCode, message) { + switch (errorCode) { + case ErrorCode.EmailOrPasswordIsWrong: + emailInput.setError() + passwordInput.errorText = message + passwordInput.setError() + break + case ErrorCode.EmailAddressTooLong: + // Fall through + case ErrorCode.EmailAddressTooShort: + // Fall through + case ErrorCode.InvalidEmailAddressFormat: + emailInput.errorText = message + emailInput.setError() + break + case ErrorCode.PasswordTooLong: + // Fall through + case ErrorCode.PasswordTooShort: + + passwordInput.errorText = message + passwordInput.setError() + break + default: + generalErrorText.text = message + generalErrorText.visible = true + } + } + + function clearLoginError() { + emailInput.errorText = "" + emailInput.clearError() + passwordInput.errorText = "" + passwordInput.clearError() + + generalErrorText.visible = false + generalErrorText.text = "" + } + } +} diff --git a/src/presentation/mobile/main.qml b/src/presentation/mobile/main.qml new file mode 100644 index 000000000..134f202a0 --- /dev/null +++ b/src/presentation/mobile/main.qml @@ -0,0 +1,95 @@ +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Layouts +import QtQuick.Window +import "startPage" +import "loginPage" +import "registerPage" +import "navbar" +import "libraryPage" +import "explorePage" +import "profilePage" +import "myAccountPage" + +ApplicationWindow { + id: baseRoot + visible: true + width: 640 + height: 480 + visibility: Window.Maximized + title: qsTr("Librum") + + ColumnLayout { + anchors.fill: parent + spacing: 0 + + StackView { + id: stackView + property bool pageHasNavbar: false + + Layout.fillWidth: true + Layout.fillHeight: true + initialItem: startPage + + popEnter: null + popExit: null + pushEnter: null + pushExit: null + replaceEnter: null + replaceExit: null + } + + MNavbar { + id: navbar + visible: stackView.pageHasNavbar + Layout.preferredHeight: 66 + Layout.fillWidth: true + } + } + + Component { + id: startPage + MStartPage {} + } + Component { + id: loginPage + MLoginPage {} + } + Component { + id: registerPage + MRegisterPage {} + } + Component { + id: homePage + MLibraryPage {} + } + Component { + id: explorePage + MExplorePage {} + } + Component { + id: profilePage + MProfilePage {} + } + Component { + id: myAccountPage + MMyAccountPage {} + } + + + /* + loadPage() manages the page switching through out the application + */ + function loadPage(page, navbarItem = undefined) { + if (page === stackView.currentItem) + return + + stackView.pageHasNavbar = navbarItem !== undefined + + if (navbarItem !== undefined) { + navbar.currentItem = navbarItem + } + + stackView.replace(page) + } +} diff --git a/src/presentation/mobile/modules/CustomComponents/MCheckBox.qml b/src/presentation/mobile/modules/CustomComponents/MCheckBox.qml new file mode 100644 index 000000000..27955e0c5 --- /dev/null +++ b/src/presentation/mobile/modules/CustomComponents/MCheckBox.qml @@ -0,0 +1,64 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.icons + +Item { + id: root + property color borderColor: Style.colorCheckboxBorder + property color checkedBorderColor: Style.colorContainerBorder + property int borderRadius: 4 + property int borderWidth: 1 + property int checkedBorderWidth: 0 + property color uncheckedBackgroundColor: "transparent" + property color checkedBackgroundColor: Style.colorBasePurple + property string image: Icons.checkWhite + property int imageSize: container.width - 10 + property bool checked: false + property bool enabled: true + signal clicked + + implicitWidth: 22 + implicitHeight: 22 + + Rectangle { + id: container + anchors.fill: parent + radius: root.borderRadius + border.width: root.checked ? root.checkedBorderWidth : root.borderWidth + border.color: root.activeFocus ? root.checkedBorderColor : root.borderColor + color: root.checked ? root.checkedBackgroundColor : root.uncheckedBackgroundColor + antialiasing: true + + Image { + id: image + anchors.centerIn: parent + visible: root.checked ? true : false + sourceSize.width: root.imageSize + source: root.image + fillMode: Image.PreserveAspectFit + } + + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + + onClicked: root.toggle() + } + } + + function toggle() { + if (!root.enabled) + return + + root.clicked() + root.checked = !root.checked + } + + function giveFocus() { + root.forceActiveFocus() + } +} diff --git a/src/presentation/mobile/modules/CustomComponents/MFlickWrapper.qml b/src/presentation/mobile/modules/CustomComponents/MFlickWrapper.qml new file mode 100644 index 000000000..e0e933a5c --- /dev/null +++ b/src/presentation/mobile/modules/CustomComponents/MFlickWrapper.qml @@ -0,0 +1,13 @@ +import QtQuick + + +/** + A component supposed to be wrapped around pages or popups to make + them scrollable by wrapping a pre-configured Flickable around them. +*/ +Flickable { + id: root + flickableDirection: Flickable.VerticalFlick + maximumFlickVelocity: 300 + flickDeceleration: 2500 +} diff --git a/src/presentation/mobile/modules/CustomComponents/MLabeledInputBox.qml b/src/presentation/mobile/modules/CustomComponents/MLabeledInputBox.qml new file mode 100644 index 000000000..d99e37417 --- /dev/null +++ b/src/presentation/mobile/modules/CustomComponents/MLabeledInputBox.qml @@ -0,0 +1,248 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.icons + +Item { + id: root + property alias text: input.text + property bool selected: false + property color inputFontColor: Style.colorText + property bool readOnly: false + property bool textHidden: false + property int inputFontSize: Fonts.size13 + property string placeHolderText: "Input" + property color placeHolderColor: Style.colorPlaceholderText + property int fontWeight: Font.Normal + property bool isPassword: false + + implicitWidth: 200 + implicitHeight: 56 + + // If there is some preconfigured text, we want to move the placeholder + // to the header position + Component.onCompleted: { + if (text.length == 0) + return + + moveablePlaceholder.y = internal.yHeaderDest + moveablePlaceholder.font.pointSize = internal.headerPlaceholderSize + textOverlay.width = internal.widthHeaderDest + textOverlay.x = textOverlay.expandedPosition + internal.inHeaderMode = true + } + + Rectangle { + id: background + anchors.fill: parent + color: "transparent" + border.width: input.activeFocus ? 2 : 1 + border.color: input.activeFocus ? Style.colorBasePurple : "#9999A0" + radius: 6 + + Rectangle { + id: textOverlay + property int expandedWidth: movedPlaceholderReference.implicitWidth + + textOverlay.sidePadding + property int defaultPosition: 12 + expandedWidth / 2 + property int expandedPosition: 12 + property int sidePadding: 8 + + width: 0 + height: 4 + y: -(height / 2) + x: defaultPosition + color: Style.colorPageBackground + } + } + + RowLayout { + anchors.fill: parent + spacing: 0 + + TextField { + id: input + Layout.fillWidth: true + selectByMouse: true + readOnly: root.readOnly + color: root.inputFontColor + font.pointSize: root.inputFontSize + leftPadding: 16 + rightPadding: 16 + echoMode: root.textHidden ? TextInput.Password : TextInput.Normal + selectionColor: Style.colorTextSelection + selectedTextColor: root.inputFontColor + font.weight: root.fontWeight + background: Rectangle { + anchors.fill: parent + radius: 6 + color: "transparent" + } + + onActiveFocusChanged: { + if (activeFocus && !internal.inHeaderMode + && input.text.length === 0) { + moveToHeaderAnim.start() + } else if (!activeFocus && internal.inHeaderMode + && input.text.length === 0) { + moveBackAnim.start() + } + } + + Label { + id: moveablePlaceholder + property int centeredPosition + + x: input.leftPadding + font.pointSize: root.inputFontSize + y: centeredPosition + color: root.placeHolderColor + text: root.placeHolderText + + // We want to compute this only once at the start + Component.onCompleted: centeredPosition = (parent.height - implicitHeight) / 2 + } + + + /** + Since the label in the header has a smaller size than the placeholder label + we need to use that smaller size to calculate with. This is just a non-rendered + object to calculate with. + */ + Label { + id: movedPlaceholderReference + property int centeredPosition: (parent.height - implicitHeight) / 2 + + visible: false + x: input.leftPadding + y: centeredPosition + font.pointSize: internal.headerPlaceholderSize + text: root.placeHolderText + } + } + + Item { + Layout.preferredWidth: 42 + Layout.rightMargin: 8 + Layout.fillHeight: true + visible: root.isPassword + + IconImage { + id: passwordVisibilityTogglerIcon + anchors.centerIn: parent + Layout.alignment: Qt.AlignVCenter + source: root.textHidden ? Icons.eyeOn : Icons.eyeOff + opacity: imageArea.pressed ? 0.75 : 1 + sourceSize.width: 22 + fillMode: Image.PreserveAspectFit + color: "#9999A0" + } + + TapHandler { + id: imageArea + onTapped: root.textHidden = !root.textHidden + } + } + } + + TapHandler { + onTapped: input.forceActiveFocus() + } + + ParallelAnimation { + id: moveToHeaderAnim + property int zeroRelativeToLabel: mapToItem( + movedPlaceholderReference, + Qt.point( + movedPlaceholderReference.x, + 0)).y + property int halfLabelHeight: movedPlaceholderReference.implicitHeight / 2 + + NumberAnimation { + target: moveablePlaceholder + property: "y" + to: internal.yHeaderDest + duration: 340 + easing.type: Easing.InOutQuad + } + + NumberAnimation { + target: moveablePlaceholder + property: "font.pointSize" + to: internal.headerPlaceholderSize + duration: 340 + easing.type: Easing.InOutQuad + } + + NumberAnimation { + target: textOverlay + property: "width" + to: internal.widthHeaderDest + duration: 340 + easing.type: Easing.InOutQuad + } + + NumberAnimation { + target: textOverlay + property: "x" + to: textOverlay.expandedPosition + duration: 340 + easing.type: Easing.InOutQuad + } + + onFinished: internal.inHeaderMode = true + } + + ParallelAnimation { + id: moveBackAnim + + NumberAnimation { + target: moveablePlaceholder + property: "y" + to: moveablePlaceholder.centeredPosition + duration: 340 + easing.type: Easing.InOutQuad + } + + NumberAnimation { + target: moveablePlaceholder + property: "font.pointSize" + to: root.inputFontSize + duration: 340 + easing.type: Easing.InOutQuad + } + + NumberAnimation { + target: textOverlay + property: "width" + to: 0 + duration: 340 + easing.type: Easing.InOutQuad + } + + NumberAnimation { + target: textOverlay + property: "x" + to: textOverlay.defaultPosition + duration: 340 + easing.type: Easing.InOutQuad + } + + onFinished: internal.inHeaderMode = false + } + + QtObject { + id: internal + property bool inHeaderMode: false + property int yHeaderDest: moveToHeaderAnim.zeroRelativeToLabel + - moveToHeaderAnim.halfLabelHeight + - movedPlaceholderReference.centeredPosition - 1 + property int widthHeaderDest: movedPlaceholderReference.implicitWidth + + textOverlay.sidePadding + + property int headerPlaceholderSize: Fonts.size12dot5 + property bool textHiden: root.isPassword + } +} diff --git a/src/presentation/mobile/modules/CustomComponents/MLogo.qml b/src/presentation/mobile/modules/CustomComponents/MLogo.qml new file mode 100644 index 000000000..91a068bbc --- /dev/null +++ b/src/presentation/mobile/modules/CustomComponents/MLogo.qml @@ -0,0 +1,27 @@ +import QtQuick +import QtQuick.Layouts +import Librum.style + +Item { + id: root + implicitWidth: 72 + implicitHeight: 72 + + Rectangle { + id: outerRect + anchors.fill: parent + color: Style.colorBasePurple + radius: 4 + antialiasing: true + + Rectangle { + id: innerRect + width: parent.width / 2 + height: parent.height / 2 + anchors.centerIn: parent + color: Style.colorContainerBackground + radius: width / 7 + antialiasing: true + } + } +} diff --git a/src/presentation/mobile/modules/CustomComponents/buttons/MBackButton.qml b/src/presentation/mobile/modules/CustomComponents/buttons/MBackButton.qml new file mode 100644 index 000000000..3c679e289 --- /dev/null +++ b/src/presentation/mobile/modules/CustomComponents/buttons/MBackButton.qml @@ -0,0 +1,35 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.icons + +Item { + id: root + signal clicked + + implicitWidth: 40 + implicitHeight: 40 + opacity: tapHandler.pressed ? 0.07 : 1 + + Rectangle { + anchors.fill: parent + color: Style.colorTransparentHighlight + opacity: tapHandler.pressed ? 0.5 : 0 + radius: 6 + } + + IconImage { + id: backArrowIcon + anchors.centerIn: parent + source: Icons.mobileArrowLeft + sourceSize.width: 24 + color: "#121212" + } + + TapHandler { + id: tapHandler + + onTapped: root.clicked() + } +} diff --git a/src/presentation/mobile/modules/CustomComponents/buttons/MButton.qml b/src/presentation/mobile/modules/CustomComponents/buttons/MButton.qml new file mode 100644 index 000000000..47aec71bc --- /dev/null +++ b/src/presentation/mobile/modules/CustomComponents/buttons/MButton.qml @@ -0,0 +1,79 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.fonts + +Item { + id: root + property string text + property color textColor: Style.colorUnfocusedButtonText + property int fontWeight: Font.Bold + property double fontSize: Fonts.size11 + property color backgroundColor: Style.colorControlBackground + property double opacityOnPressed: 0.9 + property int borderWidth: 1 + property color borderColor: Style.colorButtonBorder + property color borderColorOnPressed: borderColor + property int radius: 4 + property string imagePath + property int imageSpacing: 8 + property int imageSize: 15 + property int imageLeftMargin: 0 + property int imageRotation: 0 + property int horizontalMargins: 1 + + implicitHeight: 30 + implicitWidth: layout.implicitWidth + 2 * horizontalMargins + + signal clicked + + Rectangle { + id: container + anchors.fill: parent + color: root.backgroundColor + border.width: root.borderWidth + border.color: mouseArea.pressed ? root.borderColorOnPressed : root.borderColor + radius: root.radius + opacity: mouseArea.pressed ? root.opacityOnPressed : 1 + antialiasing: true + + RowLayout { + id: layout + anchors.centerIn: parent + spacing: root.imageSpacing + + Image { + id: image + Layout.leftMargin: root.imageLeftMargin + visible: root.imagePath.length > 0 && !root.imageToRight + source: root.imagePath + sourceSize.width: root.imageSize + fillMode: Image.PreserveAspectFit + rotation: root.imageRotation + } + + Label { + id: buttonText + visible: text.length > 0 + Layout.preferredWidth: container.width + < implicitWidth ? container.width : implicitWidth + text: root.text + font.weight: root.fontWeight + font.pointSize: root.fontSize + color: root.textColor + elide: Text.ElideRight + } + } + + TapHandler { + id: mouseArea + + onTapped: root.clicked() + } + } + + function giveFocus() { + root.forceActiveFocus() + } +} diff --git a/src/presentation/mobile/modules/CustomComponents/qmldir b/src/presentation/mobile/modules/CustomComponents/qmldir new file mode 100644 index 000000000..8c585947f --- /dev/null +++ b/src/presentation/mobile/modules/CustomComponents/qmldir @@ -0,0 +1,7 @@ +module CustomComponents +MButton 1.0 buttons/MButton.qml +MBackButton 1.0 buttons/MBackButton.qml +MLabeledInputBox 1.0 MLabeledInputBox.qml +MLogo 1.0 MLogo.qml +MCheckBox 1.0 MCheckBox.qml +MFlickWrapper 1.0 MFlickWrapper.qml \ No newline at end of file diff --git a/src/presentation/mobile/myAccountPage/MMyAccountPage.qml b/src/presentation/mobile/myAccountPage/MMyAccountPage.qml new file mode 100644 index 000000000..6cd0991cf --- /dev/null +++ b/src/presentation/mobile/myAccountPage/MMyAccountPage.qml @@ -0,0 +1,159 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Qt.labs.platform +import Librum.style +import Librum.fonts +import Librum.icons +import Librum.controllers +import CustomComponents +import "../profilePage" + +Page { + id: root + padding: 0 + background: Rectangle { + color: Style.colorPageBackground + } + + ColumnLayout { + anchors.fill: parent + spacing: 0 + + Rectangle { + id: topPart + Layout.fillWidth: true + Layout.preferredHeight: 100 + color: Style.colorControlBackground + + RowLayout { + width: parent.width + anchors.bottom: parent.bottom + anchors.bottomMargin: 2 + + MBackButton { + id: backButton + Layout.leftMargin: 12 + Layout.bottomMargin: -3 + + onClicked: loadPage(profilePage, navbar.profileItem) + } + + Label { + id: pageTitle + Layout.alignment: Qt.AlignHCenter + text: qsTr("My Account") + color: Style.colorTitle + font.weight: Font.Bold + font.pointSize: Fonts.size20 + } + + // An element of the size of the back button to be able to correctly align the title + Item { + id: counterElem + Layout.preferredWidth: backButton.width + Layout.preferredHeight: backButton.height + Layout.rightMargin: 12 + } + } + } + + Rectangle { + id: middlePart + Layout.fillWidth: true + Layout.preferredHeight: 72 + color: Style.colorPageBackground + } + + Pane { + id: mainPart + Layout.fillWidth: true + Layout.fillHeight: true + verticalPadding: 0 + horizontalPadding: 16 + background: Rectangle { + color: Style.colorControlBackground + } + + ColumnLayout { + width: parent.width + spacing: 0 + + MProfilePicture { + Layout.preferredWidth: 92 + Layout.preferredHeight: 92 + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: -(Layout.preferredWidth / 2) + fontSize: Fonts.size34 + } + + Item { + id: changePictureItem + Layout.alignment: Qt.AlignHCenter + Layout.preferredHeight: changePictureText.implicitHeight * 2.2 + Layout.preferredWidth: 140 + Layout.topMargin: 2 + + Label { + id: changePictureText + anchors.centerIn: parent + text: "Change Picture" + color: Style.colorBasePurple + font.weight: Font.DemiBold + font.pointSize: Fonts.size15dot5 + opacity: changePictureTapHandler.pressed ? 0.7 : 1 + } + + TapHandler { + id: changePictureTapHandler + + onTapped: fileDialog.open() + } + } + + MLabeledInputBox { + id: nameInput + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 52 + text: UserController.name + placeHolderText: qsTr("Name") + } + + MLabeledInputBox { + id: emailInput + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 18 + text: UserController.name + placeHolderText: qsTr("Email") + readOnly: true + } + + MButton { + id: signInButton + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 36 + borderWidth: 0 + radius: 40 + backgroundColor: Style.colorBasePurple + fontSize: Fonts.size16 + opacityOnPressed: 0.85 + textColor: Style.colorFocusedButtonText + text: qsTr("Save Changes") + + onClicked: ; + } + } + } + } + + FileDialog { + id: fileDialog + fileMode: FileDialog.OpenFiles + folder: StandardPaths.writableLocation(StandardPaths.PicturesLocation) + + onAccepted: root.currentImage = file + } +} diff --git a/src/presentation/mobile/navbar/MNavbar.qml b/src/presentation/mobile/navbar/MNavbar.qml new file mode 100644 index 000000000..07d787dce --- /dev/null +++ b/src/presentation/mobile/navbar/MNavbar.qml @@ -0,0 +1,61 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.icons +import Librum.fonts +import CustomComponents + +Pane { + id: root + property alias libraryItem: libraryItem + property alias exploreItem: exploreItem + property alias profileItem: profileItem + property MNavbarItem currentItem: null + + horizontalPadding: 0 + verticalPadding: 0 + background: Rectangle { + color: "#EFEFEF" + } + + RowLayout { + anchors.centerIn: parent + height: parent.height + spacing: 30 + + MNavbarItem { + id: libraryItem + selected: root.currentItem === libraryItem + icon: Icons.mobileLibrary + text: "Library" + + onClicked: loadPage(homePage, navbar.libraryItem) + } + + MNavbarItem { + icon: Icons.mobileFolder + text: "Folders" + iconHeight: 18 + topMargin: 1 + } + + MNavbarItem { + id: exploreItem + selected: root.currentItem === exploreItem + icon: Icons.mobileExplore + text: "Explore" + + onClicked: loadPage(explorePage, navbar.exploreItem) + } + + MNavbarItem { + id: profileItem + selected: root.currentItem === profileItem + icon: Icons.mobileProfile + text: "Profile" + + onClicked: loadPage(profilePage, navbar.profileItem) + } + } +} diff --git a/src/presentation/mobile/navbar/MNavbarItem.qml b/src/presentation/mobile/navbar/MNavbarItem.qml new file mode 100644 index 000000000..75bd3e57f --- /dev/null +++ b/src/presentation/mobile/navbar/MNavbarItem.qml @@ -0,0 +1,46 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import CustomComponents + +Item { + id: root + property alias text: label.text + property alias icon: icon.source + property bool selected: false + property int topMargin: 0 + property int iconHeight: 20 + signal clicked + + implicitHeight: 66 + implicitWidth: 56 + + ColumnLayout { + anchors.centerIn: parent + spacing: 4 + + IconImage { + id: icon + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: root.topMargin + opacity: tapHandler.pressed ? 0.75 : 1 + sourceSize.height: root.iconHeight + fillMode: Image.PreserveAspectFit + color: root.selected ? Style.colorBasePurple : "#9F9F9F" + } + + Label { + id: label + Layout.alignment: Qt.AlignHCenter + color: root.selected ? Style.colorBasePurple : "#9F9F9F" + font.pointSize: Fonts.size12 + } + } + + TapHandler { + id: tapHandler + onTapped: root.clicked() + } +} diff --git a/src/presentation/mobile/profilePage/MProfileCard.qml b/src/presentation/mobile/profilePage/MProfileCard.qml new file mode 100644 index 000000000..3ccfb6879 --- /dev/null +++ b/src/presentation/mobile/profilePage/MProfileCard.qml @@ -0,0 +1,43 @@ +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.controllers +import CustomComponents + +Rectangle { + color: "transparent" + implicitHeight: 44 + + RowLayout { + id: layout + + MProfilePicture { + Layout.alignment: Qt.AlignVCenter + } + + ColumnLayout { + Layout.leftMargin: 10 + Layout.topMargin: -2 + Layout.alignment: Qt.AlignVCenter + spacing: -1 + + Label { + Layout.fillWidth: true + text: UserController.name + color: Style.colorText + font.weight: Font.DemiBold + font.pointSize: Fonts.size18 + } + + Label { + Layout.fillWidth: true + text: UserController.email + color: "#B8B3B3" + font.weight: Font.Thin + font.pointSize: Fonts.size15 + } + } + } +} diff --git a/src/presentation/mobile/profilePage/MProfileItem.qml b/src/presentation/mobile/profilePage/MProfileItem.qml new file mode 100644 index 000000000..218eedb36 --- /dev/null +++ b/src/presentation/mobile/profilePage/MProfileItem.qml @@ -0,0 +1,70 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.icons + +Pane { + id: root + property alias text: label.text + property alias icon: icon.source + property int iconWidth: 22 + signal clicked + + implicitHeight: 44 + horizontalPadding: 10 + verticalPadding: 0 + background: Rectangle { + id: clickHighlight + anchors.fill: parent + color: Style.colorTransparentHighlight + opacity: tapHandler.pressed ? 0.03 : 0 + radius: 10 + } + + RowLayout { + spacing: 0 + width: parent.width + anchors.verticalCenter: parent.verticalCenter + + IconImage { + id: icon + Layout.alignment: Qt.AlignVCenter + opacity: tapHandler.pressed ? 0.75 : 1 + sourceSize.width: root.iconWidth + fillMode: Image.PreserveAspectFit + color: Style.colorBasePurple + } + + Label { + id: label + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: 14 + font.pointSize: 16 + font.weight: Font.Medium + color: Style.colorText + opacity: tapHandler.pressed ? 0.75 : 1 + } + + Item { + Layout.fillWidth: true + } + + IconImage { + id: arrow + Layout.alignment: Qt.AlignVCenter + Layout.rightMargin: -8 + source: Icons.arrowheadNextIcon + opacity: tapHandler.pressed ? 0.75 : 1 + sourceSize.width: 28 + fillMode: Image.PreserveAspectFit + color: "#929292" + } + } + + TapHandler { + id: tapHandler + onTapped: root.clicked() + } +} diff --git a/src/presentation/mobile/profilePage/MProfilePage.qml b/src/presentation/mobile/profilePage/MProfilePage.qml new file mode 100644 index 000000000..4f9f5c1f4 --- /dev/null +++ b/src/presentation/mobile/profilePage/MProfilePage.qml @@ -0,0 +1,228 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.icons +import Librum.controllers +import CustomComponents + +Page { + id: root + horizontalPadding: 16 + topPadding: 52 + background: Rectangle { + color: Style.colorPageBackground + } + + ColumnLayout { + anchors.fill: parent + + Label { + id: pageTitle + Layout.alignment: Qt.AlignHCenter + text: qsTr("Profile") + color: Style.colorTitle + font.weight: Font.Bold + font.pointSize: Fonts.size19dot5 + } + + MFlickWrapper { + Layout.topMargin: 8 + Layout.fillWidth: true + Layout.fillHeight: true + contentHeight: contentLayout.implicitHeight + clip: true + + ColumnLayout { + id: contentLayout + width: parent.width + + Pane { + Layout.fillWidth: true + Layout.preferredHeight: 72 + Layout.topMargin: 12 + background: Rectangle { + color: Style.colorContainerBackground + radius: 10 + } + + MProfileCard { + width: parent.width + anchors.verticalCenter: parent.verticalCenter + } + } + + Label { + id: accountTitle + Layout.topMargin: 4 + Layout.leftMargin: 10 + text: qsTr("Account") + color: Style.colorTitle + font.weight: Font.DemiBold + font.pointSize: Fonts.size16 + } + + Pane { + Layout.fillWidth: true + Layout.preferredHeight: accountLayout.implicitHeight + 2 * verticalPadding + Layout.topMargin: 3 + verticalPadding: 10 + horizontalPadding: 6 + background: Rectangle { + color: Style.colorContainerBackground + radius: 10 + } + + ColumnLayout { + id: accountLayout + width: parent.width + spacing: 0 + + MProfileItem { + Layout.fillWidth: true + text: qsTr("My Account") + icon: Icons.mobileProfile + iconWidth: 18 + + onClicked: loadPage(myAccountPage) + } + + MProfileItem { + Layout.fillWidth: true + text: qsTr("Storage") + icon: Icons.mobileServer + + onClicked: ; + } + } + } + + Label { + id: settingsTitle + Layout.topMargin: 4 + Layout.leftMargin: 10 + text: qsTr("Settings") + color: Style.colorTitle + font.weight: Font.DemiBold + font.pointSize: Fonts.size16 + } + + Pane { + Layout.fillWidth: true + Layout.preferredHeight: settingsLayout.implicitHeight + 2 * verticalPadding + Layout.topMargin: 3 + verticalPadding: 10 + horizontalPadding: 6 + background: Rectangle { + color: Style.colorContainerBackground + radius: 10 + } + + ColumnLayout { + id: settingsLayout + width: parent.width + spacing: 0 + + MProfileItem { + Layout.fillWidth: true + text: qsTr("About") + icon: Icons.mobileDiamond + + onClicked: ; + } + + MProfileItem { + Layout.fillWidth: true + text: qsTr("Appearance") + icon: Icons.mobileBrush + + onClicked: SettingsController.setSetting( + SettingKeys.Theme, "Light", + SettingGroups.Appearance) + } + + MProfileItem { + Layout.fillWidth: true + text: qsTr("Behavior") + icon: Icons.mobileGear + + onClicked: ; + } + } + } + + Label { + id: settingsTitle2 + Layout.topMargin: 4 + Layout.leftMargin: 10 + text: qsTr("Actions") + color: Style.colorTitle + font.weight: Font.DemiBold + font.pointSize: Fonts.size16 + } + + Pane { + Layout.fillWidth: true + Layout.preferredHeight: settingsLayout2.implicitHeight + 2 * verticalPadding + Layout.topMargin: 3 + Layout.bottomMargin: 14 + verticalPadding: 10 + horizontalPadding: 6 + background: Rectangle { + color: Style.colorContainerBackground + radius: 10 + } + + ColumnLayout { + id: settingsLayout2 + width: parent.width + spacing: 0 + + MProfileItem { + Layout.fillWidth: true + text: LibraryController.isSyncing ? qsTr("Refreshing...") : qsTr( + "Refresh") + icon: Icons.mobileRefresh + + onClicked: internal.reloadApplication() + } + + MProfileItem { + Layout.fillWidth: true + text: qsTr("Logout") + icon: Icons.mobileSignOut + + onClicked: { + AuthController.logoutUser() + loadPage(loginPage) + } + } + } + } + } + } + } + + QtObject { + id: internal + + function reloadApplication() { + if (spamStopper.available) { + LibraryController.syncWithServer() + UserController.syncWithServer() + FolderController.syncWithServer() + spamStopper.available = false + spamStopper.start() + } + } + } + + Timer { + id: spamStopper + property bool available: true + + interval: 1000 + onTriggered: spamStopper.available = true + } +} diff --git a/src/presentation/mobile/profilePage/MProfilePicture.qml b/src/presentation/mobile/profilePage/MProfilePicture.qml new file mode 100644 index 000000000..44afd65bc --- /dev/null +++ b/src/presentation/mobile/profilePage/MProfilePicture.qml @@ -0,0 +1,45 @@ +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.controllers + +Rectangle { + id: root + signal clicked + property int fontSize: Fonts.size21 + + implicitWidth: 44 + implicitHeight: 44 + radius: width + clip: true + antialiasing: true + color: UserController.profilePicture.length + === 0 ? Style.colorDefaultProfilePicture : "transparent" + + Label { + id: initials + anchors.centerIn: parent + visible: UserController.profilePicture.length === 0 + text: UserController.name[0].toUpperCase() + font.pointSize: root.fontSize + font.bold: true + color: Style.colorFocusedButtonText + } + + Image { + id: profileImage + visible: UserController.profilePicture.length > 0 + anchors.centerIn: parent + Layout.leftMargin: 18 + source: UserController.profilePicture + sourceSize.height: parent.height + fillMode: Image.PreserveAspectFit + cache: false + } + + TapHandler { + onTapped: root.clicked() + } +} diff --git a/src/presentation/mobile/qmlSourcesMobile.qrc b/src/presentation/mobile/qmlSourcesMobile.qrc new file mode 100644 index 000000000..a95c7db76 --- /dev/null +++ b/src/presentation/mobile/qmlSourcesMobile.qrc @@ -0,0 +1,24 @@ +<RCC> + <qresource prefix="/"> + <file>main.qml</file> + <file>loginPage/MLoginPage.qml</file> + <file>startPage/MStartPage.qml</file> + <file>modules/CustomComponents/buttons/MButton.qml</file> + <file>modules/CustomComponents/qmldir</file> + <file>modules/CustomComponents/MLabeledInputBox.qml</file> + <file>registerPage/MRegisterPage.qml</file> + <file>modules/CustomComponents/MLogo.qml</file> + <file>modules/CustomComponents/MCheckBox.qml</file> + <file>navbar/MNavbar.qml</file> + <file>navbar/MNavbarItem.qml</file> + <file>explorePage/MExplorePage.qml</file> + <file>profilePage/MProfilePage.qml</file> + <file>libraryPage/MLibraryPage.qml</file> + <file>profilePage/MProfileCard.qml</file> + <file>profilePage/MProfilePicture.qml</file> + <file>profilePage/MProfileItem.qml</file> + <file>modules/CustomComponents/MFlickWrapper.qml</file> + <file>myAccountPage/MMyAccountPage.qml</file> + <file>modules/CustomComponents/buttons/MBackButton.qml</file> + </qresource> +</RCC> diff --git a/src/presentation/mobile/registerPage/MRegisterPage.qml b/src/presentation/mobile/registerPage/MRegisterPage.qml new file mode 100644 index 000000000..fc3d95572 --- /dev/null +++ b/src/presentation/mobile/registerPage/MRegisterPage.qml @@ -0,0 +1,158 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.controllers +import CustomComponents + +Page { + id: page + horizontalPadding: 18 + background: Rectangle { + color: Style.colorPageBackground + } + + ColumnLayout { + id: layout + anchors.fill: parent + spacing: 0 + + Item { + Layout.fillHeight: true + Layout.minimumHeight: 32 + Layout.maximumHeight: 52 + } + + MLogo { + id: logo + Layout.alignment: Qt.AlignHCenter + Layout.preferredWidth: 92 + Layout.preferredHeight: 92 + } + + Label { + id: welcomeText + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: 52 + text: qsTr("Welcome!") + color: Style.colorTitle + font.weight: Font.Bold + font.pointSize: Fonts.size26 + } + + Label { + id: registerText + Layout.topMargin: 4 + Layout.alignment: Qt.AlignHCenter + text: qsTr("Create an account and start reading!") + color: Style.colorSubtitle + font.pointSize: Fonts.size13dot25 + } + + MLabeledInputBox { + id: nameInput + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 20 + placeHolderText: qsTr("Name") + } + + MLabeledInputBox { + id: emailInput + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 8 + placeHolderText: qsTr("Email") + } + + MLabeledInputBox { + id: passwordInput + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 8 + isPassword: true + placeHolderText: qsTr("Password") + textHidden: true + } + + MButton { + id: registerButton + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 20 + borderWidth: 0 + radius: 8 + backgroundColor: Style.colorBasePurple + fontSize: Fonts.size16 + opacityOnPressed: 0.85 + textColor: Style.colorFocusedButtonText + fontWeight: Font.Bold + text: qsTr("Register") + + onClicked: { + + } + } + + Item { + id: loginLinkContainer + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: 10 + implicitHeight: loginLinkRow.implicitHeight + 8 + implicitWidth: loginLinkRow.implicitWidth + 8 + + RowLayout { + id: loginLinkRow + anchors.centerIn: parent + spacing: 0 + + Label { + text: qsTr("Already have an account? ") + font.pointSize: Fonts.size13 + opacity: loginLinkArea.pressed ? 0.8 : 1 + font.weight: Font.Medium + color: Style.colorText + } + + Label { + text: qsTr("Sign in!") + font.pointSize: Fonts.size13 + opacity: loginLinkArea.pressed ? 0.8 : 1 + font.weight: Font.Medium + color: Style.colorBasePurple + } + } + + TapHandler { + id: loginLinkArea + onTapped: loadPage(loginPage) + } + } + + Item { + Layout.fillHeight: true + } + + Label { + textFormat: Text.RichText + Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true + Layout.bottomMargin: 8 + wrapMode: Text.WordWrap + //: Make sure to translate the following words together to make a logical sentence + text: qsTr('By clicking Register, you agree to our') + '<br><a href="' + + AppInfoController.website + '/TermsOfService" style="text-decoration: none; color: ' + + Style.colorBasePurple + ';"> ' + qsTr('Terms') + '</a>' + ' ' + + qsTr('and') + ' <a href="' + AppInfoController.website + + '/privacypolicy" style="text-decoration: none; color: ' + Style.colorBasePurple + + ';">' + qsTr('Privacy Policy') + '</a>' + horizontalAlignment: Text.AlignHCenter + font.pointSize: Fonts.size12 + font.weight: Font.Medium + color: Style.colorPlaceholderText + + onLinkActivated: link => Qt.openUrlExternally(link) + } + } +} diff --git a/src/presentation/mobile/startPage/MStartPage.qml b/src/presentation/mobile/startPage/MStartPage.qml new file mode 100644 index 000000000..fcdb33c42 --- /dev/null +++ b/src/presentation/mobile/startPage/MStartPage.qml @@ -0,0 +1,250 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Librum.style +import Librum.fonts +import Librum.icons +import Librum.controllers +import CustomComponents + +Page { + id: page + padding: 0 + background: Rectangle { + color: Style.colorPageBackground + } + + Connections { + id: proccessLoginResult + target: AuthController + function onLoginFinished(errorCode, message) { + UserController.loadUser(true) + } + } + + Connections { + id: proccessLoadingUserResult + target: UserController + function onFinishedLoadingUser(success) { + if (success) + loadPage(homePage, navbar.libraryItem) + } + } + + Component.onCompleted: { + // For some reason this prevents a SEGV. Directly calling the auto login + // directly causes the application to crash on startup. + autoLoginTimer.start() + } + + Timer { + id: autoLoginTimer + interval: 0 + onTriggered: AuthController.tryAutomaticLogin() + } + + ColumnLayout { + id: layout + width: parent.width + spacing: 0 + + SwipeView { + id: view + Layout.fillWidth: true + Layout.preferredHeight: 460 + currentIndex: 0 + + Page { + id: firstPage + horizontalPadding: 22 + background: Rectangle { + opacity: 0 + } + + ColumnLayout { + width: parent.width + + Image { + Layout.fillWidth: true + Layout.topMargin: 72 + Layout.alignment: Qt.AlignHCenter + sourceSize.width: 290 + fillMode: Image.PreserveAspectFit + } + + Label { + id: title + Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true + Layout.topMargin: 36 + Layout.leftMargin: 5 + Layout.rightMargin: 5 + text: qsTr("Reading books was never this easy") + color: Style.colorText + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + font.bold: true + font.pointSize: Fonts.size25 + } + + Label { + id: description + Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true + Layout.topMargin: 12 + text: qsTr("Increase your productivity through a simple and modern interface combined with powerful tools.") + lineHeight: 1.1 + color: "#A6A6A6" + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + font.pointSize: Fonts.size15 + } + } + } + + Page { + id: secondPage + horizontalPadding: 22 + background: Rectangle { + opacity: 0 + } + + ColumnLayout { + width: parent.width + + Image { + Layout.fillWidth: true + Layout.topMargin: 72 + Layout.alignment: Qt.AlignHCenter + sourceSize.width: 290 + fillMode: Image.PreserveAspectFit + } + + Label { + Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true + Layout.topMargin: 36 + Layout.leftMargin: 5 + Layout.rightMargin: 5 + text: qsTr("Build your own online library") + color: Style.colorText + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + font.bold: true + font.pointSize: Fonts.size25 + } + + Label { + Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true + Layout.topMargin: 12 + text: qsTr("Add books to build your own online library that you can access at anytime from anywhere.") + lineHeight: 1.1 + color: "#A6A6A6" + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + font.pointSize: Fonts.size15 + } + } + } + + Page { + id: thirdPage + horizontalPadding: 22 + background: Rectangle { + opacity: 0 + } + + ColumnLayout { + width: parent.width + + Image { + Layout.fillWidth: true + Layout.topMargin: 72 + Layout.alignment: Qt.AlignHCenter + sourceSize.width: 290 + fillMode: Image.PreserveAspectFit + } + + Label { + Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true + Layout.topMargin: 36 + Layout.leftMargin: 5 + Layout.rightMargin: 5 + text: qsTr("Organize your library your way") + color: Style.colorText + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + font.bold: true + font.pointSize: Fonts.size25 + } + + Label { + Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true + Layout.topMargin: 12 + text: qsTr("Add your books to collections, tag them and sort them in any way you want.") + lineHeight: 1.1 + color: "#A6A6A6" + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + font.pointSize: Fonts.size15 + } + } + } + } + + PageIndicator { + id: indicator + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: 22 + count: view.count + currentIndex: view.currentIndex + } + + MButton { + id: mainButton + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 32 + Layout.leftMargin: 22 + Layout.rightMargin: 22 + borderWidth: 0 + radius: 8 + backgroundColor: Style.colorBasePurple + fontSize: Fonts.size16 + opacityOnPressed: 0.85 + textColor: Style.colorFocusedButtonText + fontWeight: Font.Bold + text: view.currentIndex < 2 ? qsTr("Continue") : qsTr("Get started") + + onClicked: { + if (view.currentIndex < 2) { + view.currentIndex++ + } else { + loadPage(registerPage) + } + } + } + + MButton { + id: signInButton + Layout.fillWidth: true + Layout.preferredHeight: 54 + Layout.topMargin: 6 + Layout.leftMargin: 22 + Layout.rightMargin: 22 + borderWidth: 0 + radius: 8 + backgroundColor: "#F2F2F2" + fontSize: Fonts.size16 + opacityOnPressed: 0.6 + textColor: Style.colorBasePurple + fontWeight: Font.Bold + text: qsTr("Sign In") + + onClicked: loadPage(loginPage) + } + } +} diff --git a/src/presentation/qmlSourcesGeneral.qrc b/src/presentation/qmlSourcesGeneral.qrc new file mode 100644 index 000000000..ebbb7445f --- /dev/null +++ b/src/presentation/qmlSourcesGeneral.qrc @@ -0,0 +1,10 @@ +<RCC> + <qresource prefix="/"> + <file>Globals.qml</file> + <file>GlobalSettings.qml</file> + <file>TranslationsModel.qml</file> + <file>FontSheet.qml</file> + <file>StyleSheet.qml</file> + <file>IconSheet.qml</file> + </qresource> +</RCC>