Merge branch 'update-icons' into calendar-dropdown-spacing-fix

# Conflicts:
#	www/calendar/app-calendar.less
#	www/calendar/inner.js
This commit is contained in:
daria 2025-10-09 10:52:55 +03:00
commit 1d075de2c2
No known key found for this signature in database
GPG Key ID: 3B75240E6B2F2701
155 changed files with 21011 additions and 2311 deletions

View File

@ -293,8 +293,3 @@ media-tag button.btn b {
overflow: hidden;
text-overflow: ellipsis;
}
media-tag button.btn .fa {
display: inline;
margin-right: 5px;
flex: 0;
}

View File

@ -1,9 +0,0 @@
<!--
SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-->
The "cptools" font is using the [palette-solid icon](https://fontawesome.com/icons/palette?style=solid) from the "Font Awesome 5 Free" icon set.
This icon is licensed under the [Creative Commons Attribution 4.0 International license](https://fontawesome.com/license/free).

View File

@ -1,3 +0,0 @@
SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
SPDX-License-Identifier: AGPL-3.0-or-later

View File

@ -1,44 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="cptools" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe900;" glyph-name="form-conditional" horiz-adv-x="1094" d="M300.535 125.162c0 3.87-1.548 7.739-4.335 10.525l-45.506 45.507 45.507 45.507c2.787 2.786 4.335 6.656 4.335 10.525s-1.548 7.739-4.335 10.525l-21.051 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-45.507-45.507-45.507 45.507c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l45.507-45.507-45.507-45.507c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l21.051-21.051c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l45.507 45.507 45.507-45.507c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l21.051 21.051c2.787 2.786 4.335 6.656 4.335 10.525zM999.093 237.227c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM514.273 890.273v-260.273h-332.955v-277.227h65.364v211.955h600.546v-211.955h65.273v277.227h-332.955v260.273z" />
<glyph unicode="&#xe901;" glyph-name="folder-no-color" d="M194.559 846.275c-77.457-0.137-140.211-62.89-140.348-140.334v-515.869c0.137-77.457 62.892-140.211 140.336-140.348h634.893c77.457 0.137 140.211 62.892 140.348 140.336v396.602c0 77.561-62.808 140.453-140.336 140.59h-296.852l-47.104 62.885c-25.923 34.066-66.407 55.898-112 56.139h-178.937zM194.553 787.607h178.906c26.48-0.030 50.004-12.656 64.908-32.207l0.146-0.199 47.104-62.766 17.709-24.094h326.113c45.125-0.069 81.68-36.665 81.68-81.799v-396.471c-0.042-27.788-13.947-52.311-35.156-67.064l-725.621 651.525c12.744 8.239 27.912 13.050 44.211 13.074zM115.25 725.406l687.184-617.014h-607.875c-45.083 0.068-81.61 36.598-81.678 81.674v515.861c0.010 6.714 0.834 13.236 2.369 19.479z" />
<glyph unicode="&#xe902;" glyph-name="whiteboard" horiz-adv-x="878" d="M65.524 945.762c-29.444 0-53.333-23.889-53.333-53.333v-888.857c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.206 70.54-37.762 91.095l-173.333 173.333c-20.556 20.556-61.698 37.762-91.143 37.762h-497.762zM83.286 874.667h426.667v-231.095c0-29.444 23.889-53.333 53.333-53.333h231.143v-568.905h-711.143v853.333zM581.095 870.238c9.444-3.333 18.873-8.349 22.762-12.238l173.905-173.905c3.889-3.889 8.857-13.317 12.19-22.762h-208.857v208.905zM446.333 524.286c-17.277 0.517-34.937-1.027-52.952-4.571-22.15-4.43-42.984-11.806-62.476-22.143-19.492-10.632-37.062-23.776-52.714-39.429-15.357-15.357-28.321-32.794-38.952-52.286-10.632-19.196-18.189-39.85-22.619-62-7.974-41.346-5.87-79.57 6.238-114.714 12.404-35.144 30.421-65.145 54.048-89.952 23.626-24.512 50.629-42.977 81.048-55.381 30.714-12.108 60.087-15.954 88.143-11.524 18.31 2.658 31.188 12.718 38.571 30.143 7.679 17.72 7.364 34.709-0.905 50.952-10.337 20.082-9.623 39.575 2.19 58.476 11.813 19.196 29.117 28.762 51.857 28.762h70.429c15.948 0 29.539 5.635 40.762 16.857 11.222 11.518 16.81 25.243 16.81 41.19 0 34.849-7.51 67.353-22.571 97.476-14.766 29.828-34.707 55.089-59.809 75.762-24.808 20.673-53.599 35.559-86.381 44.714-16.538 4.578-33.438 7.15-50.714 7.667zM439 467.476c7.974 0 14.636-2.817 19.952-8.429 5.611-5.316 8.429-11.979 8.429-19.952s-2.817-14.77-8.429-20.381c-5.316-5.316-11.978-7.952-19.952-7.952s-14.77 2.636-20.381 7.952c-5.316 5.611-7.952 12.407-7.952 20.381s2.636 14.636 7.952 19.952c5.611 5.611 12.407 8.429 20.381 8.429zM325.619 410.762c7.974 0 14.589-2.817 19.905-8.429 5.611-5.316 8.429-11.979 8.429-19.952s-2.817-14.77-8.429-20.381c-5.316-5.316-11.931-7.952-19.905-7.952s-14.77 2.636-20.381 7.952c-5.316 5.611-8 12.407-8 20.381s2.684 14.636 8 19.952c5.611 5.611 12.407 8.429 20.381 8.429zM552.429 410.762c7.974 0 14.636-2.817 19.952-8.429 5.611-5.316 8.381-11.979 8.381-19.952s-2.77-14.77-8.381-20.381c-5.316-5.316-11.978-7.952-19.952-7.952s-14.77 2.636-20.381 7.952c-5.316 5.611-7.952 12.407-7.952 20.381s2.636 14.636 7.952 19.952c5.611 5.611 12.407 8.429 20.381 8.429zM297.238 297.333c7.974 0 14.636-2.77 19.952-8.381 5.611-5.316 8.429-11.978 8.429-19.952s-2.817-14.77-8.429-20.381c-5.316-5.316-11.979-8-19.952-8s-14.722 2.684-20.333 8c-5.316 5.611-8 12.407-8 20.381s2.684 14.636 8 19.952c5.611 5.611 12.359 8.381 20.333 8.381z" />
<glyph unicode="&#xe903;" glyph-name="new-template" horiz-adv-x="878" d="M65.524 945.762c-29.444 0-53.333-23.889-53.333-53.333v-888.857c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.206 70.54-37.762 91.095l-173.333 173.333c-20.556 20.556-61.698 37.762-91.143 37.762h-497.762zM83.286 874.667h426.667v-231.095c0-29.444 23.889-53.333 53.333-53.333h231.143v-568.905h-711.143v853.333zM581.095 870.238c9.444-3.333 18.873-8.349 22.762-12.238l173.905-173.905c3.889-3.889 8.857-13.317 12.19-22.762h-208.857v208.905zM414.476 490.857c-12.963 0-23.476-10.514-23.476-23.476v-101.762h-101.762c-12.963 0-23.476-10.514-23.476-23.476v-46.952c0-12.963 10.514-23.476 23.476-23.476h101.762v-101.762c0-12.963 10.514-23.476 23.476-23.476h46.952c12.963 0 23.476 10.514 23.476 23.476v101.762h101.762c12.963 0 23.476 10.514 23.476 23.476v46.952c0 12.963-10.514 23.476-23.476 23.476h-101.762v101.762c0 12.963-10.514 23.476-23.476 23.476h-46.952z" />
<glyph unicode="&#xe904;" glyph-name="shared-folder" d="M829.44 727.251h-296.84l-47.104 62.886c-25.923 34.066-66.406 55.898-111.999 56.139h-178.938c-77.457-0.137-140.211-62.891-140.348-140.335v-515.868c0.137-77.457 62.891-140.211 140.335-140.348h634.893c77.457 0.137 140.211 62.891 140.348 140.335v396.482c0 0.036 0 0.078 0 0.121 0 77.561-62.807 140.452-140.335 140.589h-0.013zM911.119 190.072c-0.068-45.083-36.597-81.611-81.673-81.679h-634.887c-45.083 0.068-81.611 36.597-81.679 81.673v515.862c0.068 45.083 36.597 81.611 81.673 81.679h178.906c26.48-0.030 50.004-12.656 64.908-32.207l0.146-0.199 47.104-62.765 17.709-24.094h326.114c45.125-0.069 81.679-36.665 81.679-81.799 0 0 0 0 0 0v0zM614.4 451.132c0.071 0 0.156 0 0.24 0 34.132 0 61.801 27.669 61.801 61.801s-27.669 61.801-61.801 61.801c-34.047 0-61.664-27.532-61.801-61.547v-0.013c0-0.018 0-0.040 0-0.061 0-7.309 1.235-14.33 3.508-20.865l-0.135 0.446-103.966-60.235c-0.474 0.655-1.031 1.213-1.665 1.672l-0.021 0.015c-10.785 9.46-25.010 15.231-40.582 15.231-34.065 0-61.681-27.615-61.681-61.681 0-11.035 2.898-21.393 7.974-30.355l-0.16 0.307c11.046-18 30.619-29.824 52.953-29.824 16.92 0 32.255 6.786 43.431 17.785l-0.008-0.008 103.966-60.235c-2.138-5.921-3.374-12.754-3.374-19.876 0-0.085 0-0.171 0.001-0.256v0.013c-0.003-0.217-0.005-0.474-0.005-0.731 0-7.409 1.417-14.486 3.994-20.977l-0.135 0.384c8.944-23.66 31.407-40.178 57.728-40.178 33.999 0 61.56 27.562 61.56 61.56 0 28.833-19.822 53.036-46.582 59.725l-0.424 0.090c-4.366 1.539-9.418 2.572-14.664 2.884l-0.154 0.007c-19.639 0-37.082-9.398-48.078-23.943l-0.11-0.152-101.798 59.031c3.729 7.764 5.908 16.879 5.908 26.504s-2.179 18.74-6.070 26.88l0.162-0.376 101.798 58.79c11.336-14.332 28.681-23.481 48.167-23.612h0.022z" />
<glyph unicode="&#xe905;" glyph-name="file-upload" horiz-adv-x="878" d="M65.524 945.762c-29.444 0-53.333-23.889-53.333-53.333v-888.857c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.206 70.54-37.762 91.095l-173.333 173.333c-20.556 20.556-61.698 37.762-91.143 37.762h-497.762zM83.286 874.667h426.667v-231.095c0-29.444 23.889-53.333 53.333-53.333h231.143v-568.905h-711.143v853.333zM581.095 870.238c9.444-3.333 18.873-8.349 22.762-12.238l173.905-173.905c3.889-3.889 8.857-13.317 12.19-22.762h-208.857v208.905zM438.857 487.905c-8.019 0-15.814-3.102-21.238-8.762l-153.524-153.524c-5.66-5.66-8.952-13.457-8.952-21.476s3.292-15.53 8.952-21.19l17.667-17.714c5.424-5.66 13.219-8.952 21.238-8.952s15.814 3.292 21.238 8.952l69.333 69.095v-166c0-16.981 14.153-27.619 30.19-27.619h30.19c16.038 0 30.19 10.638 30.19 27.619v166l69.333-69.095c5.424-5.66 13.219-8.952 21.238-8.952s15.816 3.292 21.476 8.952l17.667 17.714c5.425 5.66 8.714 13.172 8.714 21.19s-3.29 15.816-8.714 21.476l-153.524 153.524c-5.66 5.66-13.457 8.762-21.476 8.762z" />
<glyph unicode="&#xe906;" glyph-name="template" horiz-adv-x="878" d="M65.524 945.762c-29.444 0-53.333-23.889-53.333-53.333v-888.857c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.206 70.54-37.762 91.095l-173.333 173.333c-20.556 20.556-61.698 37.762-91.143 37.762h-497.762zM83.286 874.667h426.667v-231.095c0-29.444 23.889-53.333 53.333-53.333h231.143v-568.905h-711.143v853.333zM581.095 870.238c9.444-3.333 18.873-8.349 22.762-12.238l173.905-173.905c3.889-3.889 8.857-13.317 12.19-22.762h-208.857v208.905zM535.524 513.905c-63.766 0-115.619-51.901-115.619-115.667s51.854-115.619 115.619-115.619c48.792 0 92.974 31.714 109.238 77.667 2.84 8.261 5.905 18.862 5.905 27.381 0 5.163-3.075 9.048-8.238 9.048s-65.052-37.714-73.571-42.619l-49.857 27.619v57.857l75.667 43.619c2.323 1.549 4.143 4.398 4.143 7.238 0 3.098-1.562 5.431-4.143 7.238-15.748 10.585-40.297 16.238-59.143 16.238zM412.667 349.714l-175.81-175.81c-6.196-6.196-9.81-14.699-9.81-23.476s3.614-17.3 9.81-23.238l27.333-27.905c6.196-5.938 14.746-9.524 23.524-9.524s17.3 3.586 23.238 9.524l176.048 176.095c-33.819 13.424-60.909 40.514-74.333 74.333zM304.238 183.476c9.036 0 16.524-7.488 16.524-16.524s-7.488-16.524-16.524-16.524c-9.036 0-16.524 7.488-16.524 16.524s7.488 16.524 16.524 16.524z" />
<glyph unicode="&#xe907;" glyph-name="poll" horiz-adv-x="878" d="M65.524 945.762c-29.444 0-53.333-23.889-53.333-53.333v-888.857c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.206 70.54-37.762 91.095l-173.333 173.333c-20.556 20.556-61.698 37.762-91.143 37.762h-497.762zM83.286 874.667h426.667v-231.095c0-29.444 23.889-53.333 53.333-53.333h231.143v-568.905h-711.143v853.333zM581.095 870.238c9.444-3.333 18.873-8.349 22.762-12.238l173.905-173.905c3.889-3.889 8.857-13.317 12.19-22.762h-208.857v208.905zM569.762 482.524v-349.238h162.714v349.238h-162.714zM358.238 385.476v-252.19h162.714v252.19h-162.714zM146.667 277.381v-144.095h162.762v144.095h-162.762z" />
<glyph unicode="&#xe908;" glyph-name="slide" horiz-adv-x="878" d="M65.524 945.762c-29.444 0-53.333-23.889-53.333-53.333v-888.857c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.206 70.54-37.762 91.095l-173.333 173.333c-20.556 20.556-61.698 37.762-91.143 37.762h-497.762zM83.286 874.667h426.667v-231.095c0-29.444 23.889-53.333 53.333-53.333h231.143v-568.905h-711.143v853.333zM581.095 870.238c9.444-3.333 18.873-8.349 22.762-12.238l173.905-173.905c3.889-3.889 8.857-13.317 12.19-22.762h-208.857v208.905zM142.286 550.714v-255.238h133.19v-109.762h133.143v-109.81h326.809v255.381h-133.143v109.81h-133.143v109.619h-326.857zM191.048 501.905h229.286v-60.81h-144.857v-96.81h-84.429v157.619zM324.238 392.333h229.286v-61.048h-144.905v-96.81h-84.381v157.857zM457.381 282.524h229.286v-157.81h-229.286v157.81z" />
<glyph unicode="&#xe909;" glyph-name="sheet" horiz-adv-x="878" d="M65.524 945.762c-29.444 0-53.333-23.889-53.333-53.333v-888.857c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.206 70.54-37.762 91.095l-173.333 173.333c-20.556 20.556-61.698 37.762-91.143 37.762h-497.762zM83.286 874.667h426.667v-231.095c0-29.444 23.889-53.333 53.333-53.333h231.143v-568.905h-711.143v853.333zM581.095 870.238c9.444-3.333 18.873-8.349 22.762-12.238l173.905-173.905c3.889-3.889 8.857-13.317 12.19-22.762h-208.857v208.905zM141.286 532.571v-463.81h598.429v463.81h-598.429zM190.048 483.762h134.429v-158.714h-134.429v158.714zM373.286 483.762h134.429v-158.714h-134.429v158.714zM556.524 483.762h134.429v-158.714h-134.429v158.714zM190.048 276.286h134.429v-158.762h-134.429v158.762zM373.286 276.286h134.429v-158.762h-134.429v158.762zM556.524 276.286h134.429v-158.762h-134.429v158.762z" />
<glyph unicode="&#xe90a;" glyph-name="folder-open" d="M100.232 590.035h828.717c-5.175 69.899-63.091 124.668-133.829 124.808h-283.843l-44.936 60.235c-24.766 32.712-63.599 53.649-107.326 53.73h-170.599c-0.036 0-0.078 0-0.121 0-73.968 0-133.946-59.894-134.084-133.83v-213.366l10.12 76.74c2.295 17.95 17.476 31.684 35.865 31.684 0.012 0 0.025 0 0.037 0h-0.002zM929.19 541.606h-805.948c-13.269-0.004-24.238-9.848-26.006-22.632l-0.016-0.137-43.008-317.801c-0.002-0.261-0.003-0.569-0.003-0.877 0-6.111 0.483-12.11 1.413-17.96l-0.085 0.646c0.904-6.888 2.169-12.966 3.837-18.875l-0.223 0.925c16.563-56.812 68.138-97.63 129.257-97.702h606.698c61.093 0.086 112.628 40.906 128.907 96.752l0.237 0.95c1.459 5.065 2.725 11.228 3.544 17.531l0.070 0.66c0.844 5.201 1.327 11.196 1.327 17.304 0 0.227-0.001 0.454-0.002 0.681v-0.035l40.237 295.755c0.219 1.556 0.344 3.354 0.344 5.18 0 21.624-17.529 39.153-39.153 39.153-0.036 0-0.073 0-0.109 0h0.006z" />
<glyph unicode="&#xe90b;" glyph-name="kanban" horiz-adv-x="878" d="M65.524 945.762c-29.444 0-53.333-23.889-53.333-53.333v-888.857c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.206 70.54-37.762 91.095l-173.333 173.333c-20.556 20.556-61.698 37.762-91.143 37.762h-497.762zM83.286 874.667h426.667v-231.095c0-29.444 23.889-53.333 53.333-53.333h231.143v-568.905h-711.143v853.333zM581.095 870.238c9.444-3.333 18.873-8.349 22.762-12.238l173.905-173.905c3.889-3.889 8.857-13.317 12.19-22.762h-208.857v208.905zM146.667 493.81v-90.143h162.762v90.143h-162.762zM358.238 493.81v-90.143h162.714v90.143h-162.714zM569.762 493.81v-90.143h162.714v90.143h-162.714zM146.667 358.619v-90.143h162.762v90.143h-162.762zM569.762 358.619v-90.143h162.714v90.143h-162.714zM146.667 223.429v-90.143h162.762v90.143h-162.762z" />
<glyph unicode="&#xe90c;" glyph-name="folder" d="M373.459 846.276h-178.899c-77.457-0.137-140.211-62.891-140.348-140.335v-515.868c0.137-77.457 62.891-140.211 140.335-140.348h634.893c77.457 0.137 140.211 62.891 140.348 140.335v396.482c0 0.036 0 0.078 0 0.121 0 77.561-62.807 140.452-140.335 140.589h-296.853l-47.104 62.886c-25.923 34.066-66.406 55.898-111.999 56.139h-0.039z" />
<glyph unicode="&#xe90d;" glyph-name="shared-folder-open" d="M98.424 593.288h797.274c-4.8 67.457-60.657 120.376-128.894 120.471h-272.876l-43.249 57.705c-23.816 31.47-61.17 51.611-103.232 51.682h-164.213c-0.036 0-0.079 0-0.121 0-71.191 0-128.904-57.712-128.904-128.904 0-0.17 0-0.339 0.001-0.508v0.026-204.8l9.638 73.487c2.062 17.437 16.753 30.833 34.574 30.84h0.001zM900.759 255.608l33.973 248.049c0.196 1.447 0.308 3.12 0.308 4.819 0 20.873-16.906 37.797-37.772 37.828h-776.797c-12.746-0.016-23.272-9.5-24.923-21.796l-0.014-0.129-41.321-304.791c-0.002-0.25-0.003-0.546-0.003-0.843 0-5.87 0.483-11.628 1.412-17.235l-0.083 0.609c0.793-6.689 1.977-12.655 3.576-18.449l-0.203 0.861c15.92-54.648 65.53-93.912 124.319-93.967h583.566c0.061 0 0.133 0 0.205 0 16.48 0 32.227 3.14 46.675 8.853l-0.86-0.3c16.639-15.985 39.283-25.829 64.225-25.829 51.231 0 92.762 41.531 92.762 92.762 0 42.798-28.984 78.827-68.394 89.528l-0.65 0.15zM766.795 148.51h-583.56c-32.265 0.073-59.5 21.523-68.297 50.935l-0.13 0.506c-0.742 2.66-1.376 5.889-1.775 9.19l-0.032 0.327v1.566c0 1.566 0 3.373 0 5.301l36.382 272.023h724.751l-32.407-236.845c-1.82-0.63-3.331-1.281-4.788-2.025l0.21 0.097c-16.682-8.067-30.192-20.454-39.403-35.727l-0.232-0.415c-1.574-2.381-3.028-5.115-4.218-7.987l-0.119-0.325c-5.551-11.368-8.797-24.735-8.797-38.86 0-0.23 0.001-0.46 0.003-0.689v0.035c0-0.017 0-0.037 0-0.057 0-5.166 0.394-10.241 1.154-15.195l-0.070 0.554c-5.405-1.532-11.612-2.412-18.026-2.412-0.228 0-0.455 0.001-0.682 0.003h0.035zM877.026 84.781c-20.129 0.108-38.483 7.622-52.493 19.954l0.089-0.077c-14.994 12.543-25.212 30.362-27.788 50.568l-0.041 0.392c-0.537 3.145-0.844 6.769-0.844 10.463 0 0.091 0 0.182 0.001 0.273v-0.014c-0.001 0.109-0.001 0.239-0.001 0.368 0 12.484 2.89 24.293 8.038 34.794l-0.207-0.466c1.278 2.771 2.523 5.062 3.896 7.265l-0.161-0.278c7.898 12.884 18.884 23.175 31.958 30.024l0.449 0.214c0.692 0.493 1.491 0.902 2.346 1.186l0.064 0.018c10.065 4.991 21.914 7.922 34.445 7.951h0.010c0.046 0 0.1 0 0.154 0 7.802 0 15.336-1.144 22.444-3.275l-0.553 0.142c35.119-9.412 60.555-40.954 60.555-78.437 0-44.777-36.299-81.077-81.077-81.077-0.451 0-0.902 0.004-1.351 0.011l0.068-0.001zM906.059 183.206c9.581 0 17.348 7.767 17.348 17.348s-7.767 17.348-17.348 17.348v0c-0.002 0-0.004 0-0.007 0-9.411 0-17.072-7.495-17.341-16.841l-0.001-0.025c-0.004-0.12-0.006-0.262-0.006-0.404 0-1.849 0.356-3.615 1.003-5.232l-0.034 0.095-29.274-16.986c-3.089 3.105-7.328 5.063-12.025 5.18h-0.022c-9.003-0.772-16.019-8.271-16.019-17.408s7.015-16.636 15.954-17.404l0.065-0.004c4.719 0.117 8.958 2.075 12.046 5.179l0.001 0.001 12.047-7.228 16.504-9.638c-0.536-1.568-0.846-3.375-0.846-5.255 0-0.101 0.001-0.202 0.003-0.302v0.015c0-9.581 7.767-17.348 17.348-17.348s17.348 7.767 17.348 17.348c0 9.581-7.767 17.348-17.348 17.348v0c-5.563-0.038-10.508-2.653-13.705-6.709l-0.028-0.037-16.143 9.397-12.047 7.228c1.007 2.155 1.621 4.672 1.686 7.326v0.023c-0.052 2.758-0.667 5.36-1.736 7.712l0.050-0.122 28.672 16.625c3.116-4.367 8.151-7.19 13.848-7.228h0.006z" />
<glyph unicode="&#xe90e;" glyph-name="code" horiz-adv-x="878" d="M827.746 734.667l-173.333 173.333c-20.556 20.556-61.667 37.778-91.111 37.778h-497.778c-29.444 0-53.333-23.889-53.333-53.333v-888.889c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.222 70.556-37.778 91.111zM581.079 870.222c9.444-3.333 18.889-8.333 22.778-12.222l173.889-173.889c3.889-3.889 8.889-13.333 12.222-22.778h-208.889zM794.413 21.333h-711.111v853.333h426.667v-231.111c0-29.444 23.889-53.333 53.333-53.333h231.111zM278.857 519.111l-125.556-167.222c-4.444-6.111-4.444-15 0-21.111l125.556-167.222c6.111-7.778 17.222-9.444 25-3.333l28.333 21.111c7.778 6.111 9.444 17.222 3.333 25l-101.111 135 101.111 135c6.111 7.778 4.444 18.889-3.333 25l-28.333 21.111c-7.777 6.111-18.889 4.444-25-3.333zM724.413 351.889l-125.556 167.222c-6.111 7.778-17.222 9.444-25 3.333l-28.333-21.111c-7.777-6.111-9.444-17.222-3.333-25l101.111-135-101.111-135c-6.111-7.778-4.444-18.889 3.333-25l28.333-21.111c7.778-6.111 18.889-4.444 25 3.333l125.556 167.222c4.444 6.111 4.444 15 0 21.111zM379.968 95.778l35-5.556c9.444-1.667 18.889 4.444 20.556 14.444l76.667 461.667c1.667 9.444-4.444 18.889-14.444 20.556l-35 5.556c-9.444 1.667-18.889-4.444-20.556-14.444l-76.667-461.667c-1.667-9.444 4.444-18.889 14.444-20.556z" />
<glyph unicode="&#xe90f;" glyph-name="richtext" horiz-adv-x="878" d="M827.746 734.667l-173.333 173.333c-20.556 20.556-61.667 37.778-91.111 37.778h-497.778c-29.444 0-53.333-23.889-53.333-53.333v-888.889c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.222 70.556-37.778 91.111zM581.079 870.222c9.444-3.333 18.889-8.333 22.778-12.222l173.889-173.889c3.889-3.889 8.889-13.333 12.222-22.778h-208.889zM794.413 21.333h-711.111v853.333h426.667v-231.111c0-29.444 23.889-53.333 53.333-53.333h231.111zM225.524 501.333v-35.556c0-10 7.778-17.778 17.778-17.778h391.111c10 0 17.778 7.778 17.778 17.778v35.556c0 10-7.778 17.778-17.778 17.778h-391.111c-10 0-17.778-7.778-17.778-17.778zM634.413 376.889h-391.111c-10 0-17.778-7.778-17.778-17.778v-35.556c0-10 7.778-17.778 17.778-17.778h391.111c10 0 17.778 7.778 17.778 17.778v35.556c0 10-7.778 17.778-17.778 17.778zM634.413 234.667h-391.111c-10 0-17.778-7.778-17.778-17.778v-35.556c0-10 7.778-17.778 17.778-17.778h391.111c10 0 17.778 7.778 17.778 17.778v35.556c0 10-7.778 17.778-17.778 17.778z" />
<glyph unicode="&#xe910;" glyph-name="form-poll" horiz-adv-x="1094" d="M667.572 771.752c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM964.853 659.687c0 3.87-1.548 7.739-4.335 10.525l-45.506 45.507 45.507 45.507c2.787 2.786 4.335 6.656 4.335 10.525s-1.548 7.739-4.335 10.525l-21.051 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-45.507-45.507-45.507 45.507c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l45.507-45.507-45.507-45.507c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l21.051-21.051c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l45.507 45.507 45.507-45.507c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l21.051 21.051c2.787 2.786 4.335 6.656 4.335 10.525zM300.535 659.687c0 3.87-1.548 7.739-4.335 10.525l-45.506 45.507 45.507 45.507c2.787 2.786 4.335 6.656 4.335 10.525s-1.548 7.739-4.335 10.525l-21.051 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-45.507-45.507-45.507 45.507c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l45.507-45.507-45.507-45.507c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l21.051-21.051c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l45.507 45.507 45.507-45.507c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l21.051 21.051c2.787 2.786 4.335 6.656 4.335 10.525zM330.094 505.894c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM665.995 505.894c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM665.995 237.227c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM999.093 237.227c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM832.205 352.915h-31.571q-16.264 26.256-24.024 49.855-7.76 23.705-7.76 46.985t7.76 47.091q7.866 23.918 24.024 49.961h31.571q-13.606-25.193-20.41-49.323-6.803-24.024-6.803-47.516t6.697-47.623q6.803-24.13 20.516-49.43zM913.617 352.915q13.607 25.3 20.41 49.43t6.804 47.623-6.804 47.516q-6.803 24.13-20.41 49.323h31.571q16.158-26.044 23.918-49.961 7.866-23.811 7.866-47.091t-7.76-46.985q-7.76-23.599-24.024-49.855zM169.429 84.249h-31.571q-16.264 26.256-24.024 49.855-7.76 23.705-7.76 46.985t7.76 47.091q7.866 23.918 24.024 49.961h31.571q-13.606-25.193-20.41-49.323-6.803-24.024-6.803-47.516t6.697-47.623q6.803-24.13 20.516-49.43zM250.84 84.249q13.607 25.3 20.41 49.43t6.804 47.623-6.804 47.516q-6.803 24.13-20.41 49.323h31.571q16.158-26.044 23.918-49.961 7.866-23.811 7.866-47.091t-7.76-46.985q-7.76-23.599-24.024-49.855z" />
<glyph unicode="&#xe911;" glyph-name="file" horiz-adv-x="878" d="M827.745 734.666l-173.333 173.333c-20.556 20.556-61.667 37.778-91.111 37.778h-497.777c-29.444 0-53.333-23.889-53.333-53.333v-888.887c0-29.444 23.889-53.333 53.333-53.333h746.665c29.444 0 53.333 23.889 53.333 53.333v639.999c0 29.444-17.222 70.555-37.778 91.111zM581.079 870.221c9.444-3.333 18.889-8.333 22.778-12.222l173.889-173.889c3.889-3.889 8.889-13.333 12.222-22.778h-208.889zM794.412 21.334h-711.11v853.332h426.666v-231.111c0-29.444 23.889-53.333 53.333-53.333h231.111z" />
<glyph unicode="&#xe912;" glyph-name="palette" d="M408.6 950c-198.8-38.8-359-198.6-398.2-396.8-74-374 263.4-652.8 517.6-613.4 82.4 12.8 122.8 109.2 85 183.4-46.2 90.8 19.8 196.8 121.8 196.8h159.4c71.6 0 129.6 59.2 129.8 130.6-1 315.2-287.8 563.2-615.4 499.4zM192 320c-35.4 0-64 28.6-64 64s28.6 64 64 64 64-28.6 64-64-28.6-64-64-64zM256 576c-35.4 0-64 28.6-64 64s28.6 64 64 64 64-28.6 64-64-28.6-64-64-64zM512 704c-35.4 0-64 28.6-64 64s28.6 64 64 64 64-28.6 64-64-28.6-64-64-64zM768 576c-35.4 0-64 28.6-64 64s28.6 64 64 64 64-28.6 64-64-28.6-64-64-64z" />
<glyph unicode="&#xe913;" glyph-name="folder-upload" d="M829.44 727.251h-296.84l-47.104 62.886c-25.923 34.066-66.406 55.898-111.999 56.139h-178.938c-77.457-0.137-140.211-62.891-140.348-140.335v-515.868c0.137-77.457 62.891-140.211 140.335-140.348h634.893c77.457 0.137 140.211 62.891 140.348 140.335v396.482c0 0.036 0 0.078 0 0.121 0 77.561-62.807 140.452-140.335 140.589h-0.013zM911.119 190.072c-0.068-45.083-36.597-81.611-81.673-81.679h-634.887c-45.083 0.068-81.611 36.597-81.679 81.673v515.862c0.068 45.083 36.597 81.611 81.673 81.679h178.906c26.48-0.030 50.004-12.656 64.908-32.207l0.146-0.199 47.104-62.765 17.709-24.094h326.114c45.125-0.069 81.679-36.665 81.679-81.799 0 0 0 0 0 0v0zM562.838 166.883h-102.039v203.957h-72.523l123.723 214.076 123.723-214.076h-72.885v-203.957z" />
<glyph unicode="&#xe914;" glyph-name="add-bottom" d="M108.793 271.501c-15.312 0-27.996 12.684-27.996 27.996v55.992c0 15.312 12.684 28.006 27.996 28.006h225.414v-111.993zM108.793 495.478c-15.312 0-27.996 12.694-27.996 28.006v55.992c0 15.312 12.684 27.996 27.996 27.996h403.491v-111.993zM108.793 719.465c-15.312 0-27.996 12.694-27.996 28.006v55.992c0 15.312 12.684 27.996 27.996 27.996h615.968c15.312 0 27.996-12.684 27.996-27.996v-55.992c0-15.312-12.684-28.006-27.996-28.006zM943.202 287.839c0-19.465-15.792-35.257-35.258-35.257h-152.782v-152.782c0-19.465-15.792-35.257-35.258-35.257h-70.515c-19.465 0-35.257 15.792-35.257 35.257v152.782h-152.782c-19.465 0-35.257 15.792-35.257 35.257v70.515c0 19.465 15.792 35.258 35.257 35.258h152.782v152.782c0 19.465 15.792 35.258 35.257 35.258h70.515c19.465 0 35.258-15.792 35.258-35.258v-152.782h152.782c19.465 0 35.258-15.792 35.258-35.258z" />
<glyph unicode="&#xe915;" glyph-name="add-top" d="M108.793 624.499c-15.312 0-27.996-12.684-27.996-27.996v-55.992c0-15.312 12.684-28.006 27.996-28.006h225.414v111.993zM108.793 400.522c-15.312 0-27.996-12.694-27.996-28.006v-55.992c0-15.312 12.684-27.996 27.996-27.996h403.491v111.993zM108.793 176.535c-15.312 0-27.996-12.694-27.996-28.006v-55.992c0-15.312 12.684-27.996 27.996-27.996h615.968c15.312 0 27.996 12.684 27.996 27.996v55.992c0 15.312-12.684 28.006-27.996 28.006zM943.202 608.161c0 19.465-15.792 35.257-35.258 35.257h-152.782v152.782c0 19.465-15.792 35.257-35.258 35.257h-70.515c-19.465 0-35.257-15.792-35.257-35.257v-152.782h-152.782c-19.465 0-35.257-15.792-35.257-35.257v-70.515c0-19.465 15.792-35.258 35.257-35.258h152.782v-152.782c0-19.465 15.792-35.258 35.257-35.258h70.515c19.465 0 35.258 15.792 35.258 35.258v152.782h152.782c19.465 0 35.258 15.792 35.258 35.258z" />
<glyph unicode="&#xe916;" glyph-name="form-list-check" horiz-adv-x="1094" d="M1012.362 763.843c0 8.831-7.792 16.623-16.623 16.623h-631.687c-8.831 0-16.623-7.792-16.623-16.623v-99.74c0-8.831 7.792-16.623 16.623-16.623h631.687c8.831 0 16.623 7.792 16.623 16.623zM1012.362 497.87c0 8.831-7.792 16.623-16.623 16.623h-631.687c-8.831 0-16.623-7.792-16.623-16.623v-99.74c0-8.831 7.792-16.623 16.623-16.623h631.687c8.831 0 16.623 7.792 16.623 16.623zM1012.362 231.897c0 8.831-7.792 16.623-16.623 16.623h-631.687c-8.831 0-16.623-7.792-16.623-16.623v-99.74c0-8.831 7.792-16.623 16.623-16.623h631.687c8.831 0 16.623 7.792 16.623 16.623zM279.136 239.834c0 22.077-17.911 39.988-39.988 39.988h-115.521c-22.077 0-39.988-17.911-39.988-39.988v-115.521c0-22.077 17.911-39.988 39.988-39.988h115.521c22.077 0 39.988 17.911 39.988 39.988zM307.396 779.338c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM307.396 513.228c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525z" />
<glyph unicode="&#xe917;" glyph-name="form-grid-check" horiz-adv-x="1094" d="M645.063 506.257c0 22.077-17.911 39.988-39.988 39.988h-115.521c-22.077 0-39.988-17.911-39.988-39.988v-115.521c0-22.077 17.911-39.988 39.988-39.988h115.521c22.077 0 39.988 17.911 39.988 39.988zM1011.782 771.036c0 22.077-17.911 39.988-39.988 39.988h-115.521c-22.077 0-39.988-17.911-39.988-39.988v-115.521c0-22.077 17.911-39.988 39.988-39.988h115.521c22.077 0 39.988 17.911 39.988 39.988zM279.090 506.257c0 22.077-17.911 39.988-39.988 39.988h-115.521c-22.077 0-39.988-17.911-39.988-39.988v-115.521c0-22.077 17.911-39.988 39.988-39.988h115.521c22.077 0 39.988 17.911 39.988 39.988zM279.136 239.834c0 22.077-17.911 39.988-39.988 39.988h-115.521c-22.077 0-39.988-17.911-39.988-39.988v-115.521c0-22.077 17.911-39.988 39.988-39.988h115.521c22.077 0 39.988 17.911 39.988 39.988zM1011.753 239.834c0 22.077-17.911 39.988-39.988 39.988h-115.521c-22.077 0-39.988-17.911-39.988-39.988v-115.521c0-22.077 17.911-39.988 39.988-39.988h115.521c22.077 0 39.988 17.911 39.988 39.988zM1047.594 513.673c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM676.789 238.106c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM676.789 771.743c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525zM318.428 771.743c0 3.87-1.548 7.739-4.335 10.525l-21.050 21.051c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-101.54-101.694-45.507 45.662c-2.787 2.786-6.655 4.334-10.525 4.334s-7.739-1.548-10.525-4.334l-21.051-21.051c-2.787-2.786-4.335-6.656-4.335-10.525s1.548-7.739 4.335-10.525l77.083-77.083c2.787-2.786 6.655-4.334 10.525-4.334s7.739 1.548 10.525 4.334l133.116 133.116c2.787 2.786 4.335 6.656 4.335 10.525z" />
<glyph unicode="&#xe918;" glyph-name="form-grid-radio" horiz-adv-x="1094" d="M181.227 823.091c-60.1 0-109.091-48.991-109.091-109.091s48.991-109.091 109.091-109.091c60.1 0 108.955 48.991 108.955 109.091s-48.855 109.091-108.955 109.091zM545.091 823.091c-60.1 0-109.091-48.991-109.091-109.091s48.991-109.091 109.091-109.091c60.1 0 109.091 48.991 109.091 109.091s-48.991 109.091-109.091 109.091zM908.955 823.091c-60.1 0-109.091-48.991-109.091-109.091s48.991-109.091 109.091-109.091c60.1 0 109.091 48.991 109.091 109.091s-48.991 109.091-109.091 109.091zM181.227 747.318c19.623 0 33.364-13.695 33.364-33.318 0-19.583-13.943-33.5-33.364-33.5-19.381 0-33.5 14.119-33.5 33.5 0 19.421 13.917 33.318 33.5 33.318zM181.227 556.955c-60.1 0-109.091-48.809-109.091-108.909s48.991-109.091 109.091-109.091c60.1 0 108.955 48.991 108.955 109.091s-48.855 108.909-108.955 108.909zM545.091 556.955c-60.1 0-109.091-48.809-109.091-108.909s48.991-109.091 109.091-109.091c60.1 0 109.091 48.991 109.091 109.091s-48.991 108.909-109.091 108.909zM908.955 556.955c-60.1 0-109.091-48.809-109.091-108.909s48.991-109.091 109.091-109.091c60.1 0 109.091 48.991 109.091 109.091s-48.991 108.909-109.091 108.909zM909.045 481.364c19.623 0 33.318-13.74 33.318-33.364 0-19.583-13.897-33.5-33.318-33.5-19.381 0-33.5 14.119-33.5 33.5 0 19.421 13.917 33.364 33.5 33.364zM181.227 291.045c-60.1 0-109.091-48.855-109.091-108.955s48.991-109.091 109.091-109.091c60.1 0 108.955 48.991 108.955 109.091s-48.855 108.955-108.955 108.955zM545.091 291.045c-60.1 0-109.091-48.855-109.091-108.955s48.991-109.091 109.091-109.091c60.1 0 109.091 48.991 109.091 109.091s-48.991 108.955-109.091 108.955zM908.955 291.045c-60.1 0-109.091-48.855-109.091-108.955s48.991-109.091 109.091-109.091c60.1 0 109.091 48.991 109.091 109.091s-48.991 108.955-109.091 108.955zM545.318 214c19.623 0 33.318-13.695 33.318-33.318 0-19.583-13.897-33.5-33.318-33.5-19.381 0-33.5 14.119-33.5 33.5 0 19.421 13.917 33.318 33.5 33.318z" />
<glyph unicode="&#xe919;" glyph-name="form-list-radio" horiz-adv-x="1094" d="M1012.362 763.843c0 8.831-7.792 16.623-16.623 16.623h-631.687c-8.831 0-16.623-7.792-16.623-16.623v-99.74c0-8.831 7.792-16.623 16.623-16.623h631.687c8.831 0 16.623 7.792 16.623 16.623zM1012.362 497.87c0 8.831-7.792 16.623-16.623 16.623h-631.687c-8.831 0-16.623-7.792-16.623-16.623v-99.74c0-8.831 7.792-16.623 16.623-16.623h631.687c8.831 0 16.623 7.792 16.623 16.623zM181.227 823.091c-60.1 0-109.091-48.991-109.091-109.091s48.991-109.091 109.091-109.091c60.1 0 108.955 48.991 108.955 109.091s-48.855 109.091-108.955 109.091zM181.227 747.318c19.623 0 33.364-13.695 33.364-33.318 0-19.583-13.943-33.5-33.364-33.5-19.381 0-33.5 14.119-33.5 33.5 0 19.421 13.917 33.318 33.5 33.318zM181.227 556.955c-60.1 0-109.091-48.809-109.091-108.909s48.991-109.091 109.091-109.091c60.1 0 108.955 48.991 108.955 109.091s-48.855 108.909-108.955 108.909zM181.227 291.045c-60.1 0-109.091-48.855-109.091-108.955s48.991-109.091 109.091-109.091c60.1 0 108.955 48.991 108.955 109.091s-48.855 108.955-108.955 108.955zM1012.362 231.897c0 8.831-7.792 16.623-16.623 16.623h-631.687c-8.831 0-16.623-7.792-16.623-16.623v-99.74c0-8.831 7.792-16.623 16.623-16.623h631.687c8.831 0 16.623 7.792 16.623 16.623z" />
<glyph unicode="&#xe91a;" glyph-name="form-page-break" horiz-adv-x="1094" d="M190.545 923.136c-28.106 0-50.909-22.803-50.909-50.909v-410.318h67.864v393.364h407.273v-220.591c0-28.106 22.803-50.909 50.909-50.909h220.636v-121.864h67.864v172.773c0 28.106-16.424 67.333-36.045 86.955l-165.455 165.455c-19.621 19.621-58.894 36.045-87 36.045zM682.682 851.046c9.015-3.182 18.015-7.97 21.727-11.682l166-166c3.712-3.712 8.455-12.712 11.636-21.727h-199.364zM139.636 236.273v-212.5c0-28.106 22.803-50.909 50.909-50.909h712.727c28.106 0 50.909 22.803 50.909 50.909v212.5h-67.864v-195.545h-678.818v195.545zM66.394 387.23v-65.283h195.505v65.283zM327.009 387.23v-65.283h195.505v65.283zM587.797 387.23v-65.283h195.505v65.283zM848.412 387.23v-65.283h179.012v65.283z" />
<glyph unicode="&#xe91b;" glyph-name="form-paragraph" horiz-adv-x="1094" d="M1012.362 182.027c0 18.182-15.065 33.247-33.247 33.247h-864.413c-18.182 0-33.247-15.065-33.247-33.247v-66.493c0-18.182 15.065-33.247 33.247-33.247h864.413c18.182 0 33.247 15.065 33.247 33.247zM812.882 381.507c0 18.182-15.065 33.247-33.247 33.247h-664.933c-18.182 0-33.247-15.065-33.247-33.247v-66.493c0-18.182 15.065-33.247 33.247-33.247h664.933c18.182 0 33.247 15.065 33.247 33.247zM945.869 580.987c0 18.182-15.065 33.247-33.247 33.247h-797.92c-18.182 0-33.247-15.065-33.247-33.247v-66.493c0-18.182 15.065-33.247 33.247-33.247h797.92c18.182 0 33.247 15.065 33.247 33.247zM746.389 780.467c0 18.182-15.065 33.247-33.247 33.247h-598.44c-18.182 0-33.247-15.065-33.247-33.247v-66.493c0-18.182 15.065-33.247 33.247-33.247h598.44c18.182 0 33.247 15.065 33.247 33.247z" />
<glyph unicode="&#xe91c;" glyph-name="form-text" horiz-adv-x="1094" d="M1012.362 481.247c0 18.182-15.065 33.247-33.247 33.247h-864.413c-18.182 0-33.247-15.065-33.247-33.247v-66.493c0-18.182 15.065-33.247 33.247-33.247h864.413c18.182 0 33.247 15.065 33.247 33.247z" />
<glyph unicode="&#xe91d;" glyph-name="form-list-ordered" horiz-adv-x="1094" d="M279.377 71.897c0 35.844-22.857 62.857-57.662 71.169l49.351 59.74v45.714h-172.987v-78.961h55.065v27.532c16.623 0 33.766 1.039 50.389 1.039v-0.52c-22.338-20.259-39.48-46.753-58.182-70.649l13.506-29.091c21.299 1.558 54.545 0 54.545-29.091 0-20.779-19.221-29.61-37.402-29.61-19.74 0-41.039 10.39-55.065 23.376l-29.61-45.714c23.377-23.377 56.623-34.286 89.35-34.286 54.026 0 98.701 32.208 98.701 89.35zM280.416 397.611h-54.545v-31.169h-65.974c1.558 40.519 114.285 57.662 114.285 134.545 0 51.428-41.558 80-89.87 80-39.48 0-74.805-20.26-91.948-56.104l44.156-30.649c8.831 14.545 23.896 30.13 42.078 30.13 17.143 0 28.052-9.351 28.052-27.013 0-43.636-117.402-58.182-117.402-154.285 0-9.351 1.558-18.701 3.117-28.052h188.051zM1012.362 231.897c0 9.351-7.792 16.623-16.623 16.623h-631.687c-9.351 0-16.623-7.273-16.623-16.623v-99.74c0-8.831 7.273-16.623 16.623-16.623h631.687c8.831 0 16.623 7.792 16.623 16.623zM280.936 698.908h-56.104v209.87h-55.065l-70.649-65.974 36.883-39.48c9.87 8.831 20.26 16.623 25.974 28.052h1.039v-6.234c0-42.078-0.52-84.156-0.52-126.233h-55.584v-51.428h174.025zM1012.362 497.87c0 9.351-7.792 16.623-16.623 16.623h-631.687c-9.351 0-16.623-7.273-16.623-16.623v-99.74c0-8.831 7.273-16.623 16.623-16.623h631.687c8.831 0 16.623 7.792 16.623 16.623zM1012.362 763.843c0 8.831-7.792 16.623-16.623 16.623h-631.687c-9.351 0-16.623-7.792-16.623-16.623v-99.74c0-8.831 7.273-16.623 16.623-16.623h631.687c8.831 0 16.623 7.792 16.623 16.623z" />
<glyph unicode="&#xe91e;" glyph-name="form-poll-maybe" horiz-adv-x="1094" d="M856.492 569.333c0 9.987-3.996 19.973-11.187 27.163l-54.325 54.327c-7.191 7.191-17.175 11.185-27.163 11.185s-19.972-3.995-27.163-11.185l-262.048-262.447-117.442 117.841c-7.191 7.19-17.175 11.185-27.163 11.185s-19.972-3.995-27.163-11.185l-54.327-54.327c-7.191-7.191-11.187-17.177-11.187-27.163s3.995-19.973 11.187-27.163l198.932-198.932c7.191-7.191 17.175-11.185 27.163-11.185s19.972 3.995 27.163 11.185l343.538 343.537c7.192 7.191 11.187 17.177 11.187 27.163zM65.903 444.364q0 120.454 35 225.454 35.454 105 101.818 184.090h73.636q-65.454-87.727-98.636-192.727-32.727-105-32.727-215.908 0-109.091 33.636-213.181t96.818-189.999h-72.727q-66.818 77.273-101.818 180.454t-35 221.818zM1027.916 444.364q0-119.545-35.454-222.727-35-103.182-101.363-179.545h-72.727q63.182 85.454 96.818 189.545 33.636 104.545 33.636 213.636 0 110.909-33.182 215.908-32.727 105-98.182 192.727h73.636q66.818-79.545 101.818-184.999 35-105 35-224.545z" />
<glyph unicode="&#xe91f;" glyph-name="destroy" horiz-adv-x="1094" d="M191.671 946.511c-28.024 0-50.742-22.731-50.742-50.756v-399.384h-74.822c-29.561-0.003-53.524-23.966-53.527-53.527 0.025-29.545 23.982-53.484 53.527-53.487h174.773l-88.853-95.929 95.929-104.66-95.835-104.524 121.3-132.182 43.855 55.423-70.369 76.813 95.781 104.471-95.687 104.364 89.122 96.225h190.445l-88.853-95.929 95.929-104.66-95.781-104.524 121.246-132.182 43.855 55.423-70.369 76.813 95.781 104.471-95.687 104.364 89.122 96.225h190.445l-88.853-95.929 95.983-104.66-95.835-104.524 121.286-132.182 43.815 55.423-70.383 76.759 95.835 104.524-95.727 104.417 89.122 96.171h117.318c29.55-0.004 53.515 23.936 53.54 53.487-0.003 29.566-23.974 53.531-53.54 53.527h-71.728v162.501c0 28.024-16.394 67.15-35.958 86.714l-164.966 164.966c-19.564 19.564-58.69 35.958-86.714 35.958zM208.607 878.832h406.073v-219.96c0-28.024 22.745-50.769 50.769-50.769h219.96v-111.732h-676.802zM682.359 874.608c8.989-3.172 17.984-7.936 21.685-11.636l165.505-165.505c3.702-3.7 8.463-12.696 11.636-21.685h-198.826z" />
<glyph unicode="&#xe920;" glyph-name="drive" horiz-adv-x="878" d="M586.884 124.372c0 23.946-19.592 43.537-43.537 43.537s-43.537-19.592-43.537-43.537c0-23.946 19.592-43.537 43.537-43.537s43.537 19.592 43.537 43.537zM726.203 124.372c0 23.946-19.592 43.537-43.537 43.537s-43.537-19.592-43.537-43.537c0-23.946 19.592-43.537 43.537-43.537s43.537 19.592 43.537 43.537zM787.155 37.298c0-9.252-8.163-17.415-17.415-17.415h-661.767c-9.252 0-17.415 8.163-17.415 17.415v174.149c0 9.252 8.163 17.415 17.415 17.415h661.767c9.252 0 17.415-8.163 17.415-17.415zM117.77 298.521l85.442 262.312c2.721 9.252 13.061 16.326 22.857 16.326h425.577c9.796 0 20.136-7.075 22.857-16.326l85.442-262.312zM856.815 211.447c0 14.694-4.354 27.211-8.707 40.816l-107.211 329.795c-12.517 38.095-48.979 64.762-89.251 64.762h-425.577c-40.272 0-76.734-26.667-89.251-64.762l-107.211-329.795c-4.354-13.605-8.707-26.122-8.707-40.816v-174.149c0-47.891 39.184-87.075 87.075-87.075h661.767c47.891 0 87.075 39.184 87.075 87.075z" />
<glyph unicode="&#xe921;" glyph-name="diagram" horiz-adv-x="878" d="M827.746 734.667l-173.333 173.333c-20.556 20.556-61.667 37.778-91.111 37.778h-497.778c-29.444 0-53.333-23.889-53.333-53.333v-888.889c0-29.444 23.889-53.333 53.333-53.333h746.667c29.444 0 53.333 23.889 53.333 53.333v640c0 29.444-17.222 70.556-37.778 91.111zM581.079 870.222c9.444-3.333 18.889-8.333 22.778-12.222l173.889-173.889c3.889-3.889 8.889-13.333 12.222-22.778h-208.889zM794.413 21.333h-711.111v853.333h426.667v-231.111c0-29.444 23.889-53.333 53.333-53.333h231.111zM142.19 699.381v-233.667h242.476l103.19-129.667-66.571 7.571c-0.464 0.060-1 0.095-1.544 0.095-6.469 0-11.802-4.862-12.545-11.13l-0.006-0.060c-0.043-0.393-0.068-0.848-0.068-1.309 0-6.459 4.847-11.786 11.103-12.542l0.060-0.006 119.095-13.714 13.667 119.095c0.059 0.459 0.093 0.99 0.093 1.529 0 6.519-4.937 11.884-11.276 12.562l-0.055 0.005c-0.401 0.045-0.865 0.071-1.336 0.071-6.528 0-11.899-4.95-12.564-11.302l-0.005-0.055-7.571-66.571-101.952 128.143v210.952h-274.19zM190.952 650.619h176.667v-136.143h-176.667v136.143zM628.143 307.952c-64.030 0-117.525-47.559-126.857-109.095l-73.095 0.762 47.857 46.81c2.398 2.303 3.888 5.536 3.888 9.117 0 3.487-1.413 6.645-3.698 8.931v0c-2.288 2.295-5.452 3.714-8.947 3.714-0.018 0-0.037 0-0.055 0h0.003c-0.058 0.001-0.127 0.002-0.196 0.002-3.425 0-6.532-1.363-8.807-3.576l0.003 0.003-85.524-83.81 83.809-85.714c2.293-2.327 5.478-3.768 9.001-3.768 3.427 0 6.536 1.365 8.812 3.58l-0.003-0.003c2.327 2.293 3.768 5.478 3.768 9.001 0 3.427-1.365 6.536-3.58 8.812l0.003-0.003-46.952 47.857 73.81-0.714c9.614-61.186 62.962-108.286 126.762-108.286 70.545 0 128.095 57.551 128.095 128.095s-57.551 128.286-128.095 128.286zM626.095 259.19c0.686 0.017 1.357 0 2.048 0 44.192 0 79.333-35.332 79.333-79.524s-35.141-79.524-79.333-79.524c-44.192 0-79.524 35.332-79.524 79.524 0 43.501 34.254 78.443 77.476 79.524zM244.048 438.143l-85.381-84.048c-2.384-2.301-3.864-5.525-3.864-9.094 0-3.475 1.403-6.623 3.674-8.907l-0.001 0.001c2.295-2.341 5.49-3.792 9.024-3.792s6.729 1.451 9.022 3.79l0.002 0.002 47.571 46.762-0.952-117.667h-80.952v-191.286h202.381v191.286h-82.381l0.905 117.571 47.143-47.81c2.29-2.312 5.466-3.744 8.977-3.744 3.439 0 6.557 1.374 8.835 3.603l-0.002-0.002c2.384 2.301 3.864 5.525 3.864 9.094 0 3.475-1.403 6.623-3.674 8.907l0.001-0.001-84.19 85.333zM190.952 216.429h104.857v-93.762h-104.857v93.762z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 44 KiB

View File

@ -1,3 +0,0 @@
SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
SPDX-License-Identifier: AGPL-3.0-or-later

View File

@ -1,3 +0,0 @@
SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
SPDX-License-Identifier: AGPL-3.0-or-later

View File

@ -1,3 +0,0 @@
SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
SPDX-License-Identifier: AGPL-3.0-or-later

View File

@ -1,136 +0,0 @@
/*
* SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
@font-face {
font-family: 'cptools';
src: url('fonts/cptools.eot?nobkj');
src: url('fonts/cptools.eot?nobkj#iefix') format('embedded-opentype'),
url('fonts/cptools.ttf?nobkj') format('truetype'),
url('fonts/cptools.woff?nobkj') format('woff'),
url('fonts/cptools.svg?nobkj#cptools') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
.cptools {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'cptools' !important;
display: inline-block;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.cptools-diagram:before {
content: "\e921";
}
.cptools-drive:before {
content: "\e920";
}
.cptools-form-conditional:before {
content: "\e900";
}
.cptools-form-poll:before {
content: "\e910";
}
.cptools-form-poll-maybe:before {
content: "\e91e";
}
.cptools-form-list-check:before {
content: "\e916";
}
.cptools-form-grid-check:before {
content: "\e917";
}
.cptools-form-grid-radio:before {
content: "\e918";
}
.cptools-form-list-radio:before {
content: "\e919";
}
.cptools-form-page-break:before {
content: "\e91a";
}
.cptools-form-paragraph:before {
content: "\e91b";
}
.cptools-form-text:before {
content: "\e91c";
}
.cptools-form-list-ordered:before {
content: "\e91d";
}
.cptools-folder-no-color:before {
content: "\e901";
}
.cptools-whiteboard:before {
content: "\e902";
}
.cptools-new-template:before {
content: "\e903";
}
.cptools-shared-folder:before {
content: "\e904";
}
.cptools-file-upload:before {
content: "\e905";
}
.cptools-template:before {
content: "\e906";
}
.cptools-poll:before {
content: "\e907";
}
.cptools-slide:before {
content: "\e908";
}
.cptools-sheet:before {
content: "\e909";
}
.cptools-folder-open:before {
content: "\e90a";
}
.cptools-kanban:before {
content: "\e90b";
}
.cptools-folder:before {
content: "\e90c";
}
.cptools-shared-folder-open:before {
content: "\e90d";
}
.cptools-code:before {
content: "\e90e";
}
.cptools-richtext:before {
content: "\e90f";
}
.cptools-file:before {
content: "\e911";
}
.cptools-palette:before {
content: "\e912";
}
.cptools-folder-upload:before {
content: "\e913";
}
.cptools-add-bottom:before {
content: "\e914";
}
.cptools-add-top:before {
content: "\e915";
}
.cptools-destroy:before {
content: "\e91f";
}

View File

@ -19,7 +19,7 @@ define([
'</div>',
'<div class="cp-loading-container">',
'<div class="cp-loading-spinner-container">',
'<span class="cp-spinner"></span>',
'<span class="cp-spinner-main"></span>',
'</div>',
'<div class="cp-loading-progress" aria-hidden="true" role="presentation">',
'<div class="cp-loading-progress-list"></div>',
@ -36,14 +36,14 @@ define([
var c = types.indexOf(data.type);
current = c;
var getLi = function (i) {
var check = (i < c || (i === c && data.progress >= 100)) ? 'fa-check-square-o'
: 'fa-square-o';
var check = (i < c || (i === c && data.progress >= 100)) ? 'square-check'
: 'square';
var percentStr = '';
if (i === c) {
var p = Math.min(Math.floor(data.progress), 100);
percentStr = '<span class="percent">('+p+'%)</span>';
}
return '<li><i class="fa '+check+'"></i><span>'+Messages['loading_state_'+i]+'</span>' + percentStr;
return '<li><i data-lucide="'+check+'"></i><span>'+Messages['loading_state_'+i]+'</span>' + percentStr;
};
var list = '<ul>';
types.forEach(function (el, i) {

18327
customize.dist/lucide.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -134,6 +134,14 @@ define(req, function(AppConfig, Default, Language) {
}
};
// XXX
Messages.password_note1 = 'Your password is the secret key that encrypts all of your documents.';
Messages.password_note2 = 'If you lose it there is no way we can recover your data.';
Messages.password_note3 = "Your password is the secret key that encrypts all of your documents and administrator privileges on this instance.";
Messages.computer_note = 'If you are using a shared computer, {0}remember to log out{1} when you are done. Only closing the browser window leaves your account exposed.';
Messages.import_note = 'To keep the documents you created and/or stored without being logged in, tick "Import documents from your guest session".';
Messages.admin_creation_note = "Create your first administrator account on this page. Administrators manage instance settings including storage quotas, and have access to moderation tools.";
return Messages;
});

View File

@ -12,8 +12,9 @@ define([
'/api/config',
'/common/extensions.js',
'optional!/api/instance',
'/common/common-icons.js',
], function (h, Language, Util, AppConfig, Msg, $, ApiConfig,
Extensions, Instance) {
Extensions, Instance, Icons) {
var Pages = {};
Pages.setHTML = function (e, html) {
@ -79,7 +80,6 @@ define([
href: ref,
role: 'button',
};
var iconName = '';
if (!/^\//.test(ref)) {
attrs.target = '_blank';
attrs.rel = 'noopener noreferrer';
@ -89,8 +89,7 @@ define([
text = Msg[loc];
}
if (icon) {
iconName = 'i.fa.fa-' + icon;
icon = h(iconName);
icon = Icons.get(icon);
}
return h('a', attrs, [icon, text]);
};
@ -151,7 +150,7 @@ define([
Pages.infopageFooter = function () {
var donateButton;
if (!ApiConfig.removeDonateButton) {
donateButton = footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate', null, 'money'); // TODO migrate to forkawesome and use the OpenCollective icon
donateButton = footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate', null, 'donate'); // TODO migrate to forkawesome and use the OpenCollective icon
}
return h('footer.cp-footer', [
@ -176,7 +175,7 @@ define([
]),
h('div.cp-footer-right', [
h('div.cp-footer-language', [
h('i.fa.fa-language', {'aria-hidden': 'true'}),
Icons.get('language'),
languageSelector()
])
])
@ -190,7 +189,7 @@ define([
if (!ApiConfig.restrictRegistration) {
registerLink = h('a.nav-item.nav-link.cp-register-btn', { href: '/register/', role: 'button'}, [
h('i.fa.fa-user', {'aria-hidden':'true'}),
Icons.get('user-account'),
Msg.login_register
]);
}
@ -198,14 +197,14 @@ define([
if (username === null) {
rightLinks = [
h('a.nav-item.nav-link.cp-login-btn', { href: '/login/', role: 'button'}, [
h('i.fa.fa-sign-in', {'aria-hidden':'true'}),
Icons.get('login'),
Msg.login_login
]),
registerLink,
];
} else {
rightLinks = h('a.nav-item.nav-link.cp-user-btn', { href: '/drive/', role: 'button'}, [
h('i.fa.fa-user-circle', {'aria-hidden':'true'}),
Icons.get('user-profile'),
" ",
username
]);
@ -213,7 +212,7 @@ define([
var isHome = ['/', '/index.html'].includes(window.location.pathname);
var homeLink = h('a.nav-item.nav-link.cp-back-home' /* .navbar-brand */, { href: '/index.html', role: 'button'}, [
h('i.fa.fa-arrow-left'),
Icons.get('chevron-left'),
h('img', {
src: '/customize/CryptPad_logo.svg',
"aria-hidden": true,
@ -233,11 +232,12 @@ define([
[
!isHome? homeLink: undefined,
h('a.nav-item.nav-link', { href: '/features.html', role: 'button'}, [
h('i.fa.fa-info-circle'),
Icons.get('properties'),
pricingName
]),
h('a.nav-item.nav-link', { href: 'https://docs.cryptpad.org'},
[h('i.fa.fa-book', {'aria-hidden':'true'}),Msg.docs_link]),
h('a.nav-item.nav-link', { href: 'https://docs.cryptpad.org'}, [
Icons.get('documentation'),
Msg.docs_link]),
].concat(rightLinks)
);
};

View File

@ -12,7 +12,7 @@ define([
return function () {
document.title = Msg.contact;
var developerEmail = "contact@cryptpad.fr";
var developerEmail = "contact@cryptpad.org";
var adminEmail = Config.adminEmail && [
'i.did.not.read.my.config@cryptpad.fr',
developerEmail

View File

@ -13,8 +13,9 @@ define([
'/common/common-ui-elements.js',
'/common/common-constants.js',
'/common/pad-types.js',
'/common/extensions.js'
], function ($, h, Msg, AppConfig, LocalStore, Pages, Config, UIElements, Constants, PadTypes, Extensions) {
'/common/extensions.js',
'/common/common-icons.js'
], function ($, h, Msg, AppConfig, LocalStore, Pages, Config, UIElements, Constants, PadTypes, Extensions, Icons) {
return function () {
document.title = Msg.features;
Msg.features_f_apps_note = PadTypes.availableTypes.map(function (app) {
@ -27,7 +28,7 @@ define([
var groupItemTemplate = function (title, content) {
return h('li.list-group-item', [
h('div.cp-check'),
Icons.get('check'),
h('div.cp-content', [
h('div.cp-feature', title),
h('div.cp-note', content),

View File

@ -15,8 +15,9 @@ define([
'/common/outer/local-store.js',
'/customize/pages.js',
'/common/pad-types.js',
'/common/extensions.js'
], function ($, Config, h, Hash, Constants, Util, TextFit, Msg, AppConfig, LocalStore, Pages, PadTypes, Extensions) {
'/common/extensions.js',
'/common/common-icons.js'
], function ($, Config, h, Hash, Constants, Util, TextFit, Msg, AppConfig, LocalStore, Pages, PadTypes, Extensions, Icons) {
var urlArgs = Config.requireConf.urlArgs;
var checkEarlyAccess = function (x) {
@ -58,7 +59,6 @@ define([
var isEAEnabled = checkEarlyAccess(x[0]);
//if (i > 2) { s += '.cp-more.cp-hidden'; }
var icon = AppConfig.applicationsIcon[x[0]];
var font = icon.indexOf('cptools') === 0 ? 'cptools' : 'fa';
var href = '/'+ x[0] +'/';
var attr = isEnabled ? { href: href } : {
onclick: function () {
@ -79,7 +79,7 @@ define([
return h('a.cp-index-appitem' + cls, [
attr,
h(s, [
h('i.' + font + '.' + icon, {'aria-hidden': 'true'}),
Icons.get(icon),
h('div.pad-button-text', [ x[1] ])
])
]);
@ -142,7 +142,7 @@ define([
var locationBlock;
if (Pages.Instance.location) {
locationBlock = h('div.cp-instance-location', [
h('i.fa.fa-map-pin', {'aria-hidden': 'true'}),
Icons.get('map-pin'),
Msg._getKey('home_location', [ Pages.Instance.location ]),
]);
} else {
@ -203,7 +203,7 @@ define([
h('div.cp-apps.col-lg-6', [
h('div.cp-app-grid', [
h('span.cp-app-new', [
h('i.fa.fa-plus'),
Icons.get('add'),
Msg.fm_newFile
]),
h('div.cp-app-grid-apps', [
@ -212,7 +212,7 @@ define([
]),
h('div.cp-app-drive', [
h('a.cp-drive-btn', {'href': '/drive/'}, [
h('i.fa.fa-hdd-o', {'aria-hidden': 'true'}),
Icons.get('drive'),
Msg.team_cat_drive
]),
extraButtons

View File

@ -8,8 +8,9 @@ define([
'/common/hyperscript.js',
'/common/common-interface.js',
'/customize/messages.js',
'/customize/pages.js'
], function (Config, $, h, UI, Msg, Pages) {
'/customize/pages.js',
'/common/common-icons.js',
], function (Config, $, h, UI, Msg, Pages, Icons) {
Config.adminKeys = [];
return function () {
// Redirect to drive if this instance already has admins
@ -36,7 +37,23 @@ define([
h('div.row.cp-register-det', [
h('div#data.hidden.col-md-6', [
h('h2', Msg.register_notes_title),
Pages.setHTML(h('div.cp-register-notes'), Msg.install_notes)
h('div.cp-register-notes', [
h('ul.cp-notes-list', [
h('li', [
Icons.get('alert'),
Msg.admin_note
]),
h('li', [
Icons.get('alert'),
Msg.password_note3,
h('span.red', Msg.password_note2)
]),
h('li', [
Icons.get('alert'),
Pages.setHTML(h('span'), Msg._getKey('computer_note', ['<span class="red">','</span>']))
])
])
])
]),
h('div.cp-reg-form.col-md-6', [
h('div#userForm.form-group.hidden', [

View File

@ -8,8 +8,9 @@ define([
'/common/hyperscript.js',
'/common/common-interface.js',
'/customize/messages.js',
'/customize/pages.js'
], function (Config, $, h, UI, Msg, Pages) {
'/customize/pages.js',
'/common/common-icons.js',
], function (Config, $, h, UI, Msg, Pages, Icons) {
return function () {
document.title = Msg.recovery_header;
@ -68,7 +69,7 @@ define([
autofocus: true,
}),
h('div.cp-recovery-forgot', [
h('i.fa.fa-caret-right'),
Icons.get('chevron-right'),
h('span', Msg.recovery_forgot)
]),
h('div.cp-recovery-alt', {style: 'display: none;'}, [

View File

@ -8,8 +8,9 @@ define([
'/common/hyperscript.js',
'/common/common-interface.js',
'/customize/messages.js',
'/customize/pages.js'
], function (Config, $, h, UI, Msg, Pages) {
'/customize/pages.js',
'/common/common-icons.js',
], function (Config, $, h, UI, Msg, Pages, Icons) {
return function () {
document.title = Msg.register_header;
var tos = $(UI.createCheckbox('accept-terms')).find('.cp-checkmark-label').append(Msg.register_acceptTerms).parent()[0];
@ -54,7 +55,23 @@ define([
h('div.row.cp-register-det', [
h('div#data.hidden.col-md-6', [
h('h2', Msg.register_notes_title),
Pages.setHTML(h('div.cp-register-notes'), Msg.register_notes)
h('div.cp-register-notes', [
h('ul.cp-notes-list', [
h('li', [
Icons.get('alert'),
Msg.password_note1,
h('span.red', Msg.password_note2)
]),
h('li', [
Icons.get('alert'),
Pages.setHTML(h('span'), Msg._getKey('computer_note', ['<span class="red">','</span>']))
]),
h('li', [
Icons.get('alert'),
Msg.import_note
])
])
])
]),
h('div.col-md-3.cp-closed-filler'+ssoEnabled, h('div')),
h('div.cp-reg-form.col-md-6', [

View File

@ -57,8 +57,9 @@
&:hover {
cursor: pointer;
}
i.cp-icon {
font-size: 2.8rem;
.cp-icon {
min-height: 2.8rem;
min-width: 2.8rem;
}
.cp-app-name {
flex-grow: 1;

View File

@ -67,8 +67,19 @@
outline: none;
font: @colortheme_app-font;
.lucide {
width: @variables_icon_width;
height: @variables_icon_height;
margin-right: @variables_icon_margin;
}
.cp-checkmark {
color: @cryptpad_text_col;
height: 1.5rem;
svg {
margin-left: @variables_icon_margin;
min-height: @variables_icon_height;
min-width: @variables_icon_width;
}
}
.cp-admin-message {
@ -91,6 +102,8 @@
h1, h2, h3 {
margin-top: 0;
display: flex;
align-items: center;
}
&.hide {
@ -198,12 +211,20 @@
text-decoration: none;
}
}
.cp-usergrid-user, textarea, a, .fa-times {
.cp-usergrid-user, textarea, a {
outline: none;
&:focus-visible {
outline: @variables_focus_style;
}
}
.cp-usergrid-user {
span {
&:focus-visible {
outline: @variables_focus_style;
border-radius: @variables_radius;
}
}
}
}
.cp-alertify-type-container {
overflow: visible !important;
@ -221,6 +242,8 @@
box-sizing: content-box;
.alertify-tabs-title {
.tools_unselectable();
display: inline-flex;
align-items: center;
font-size: 20px;
height: 40px;
line-height: 40px;
@ -290,9 +313,16 @@
button {
margin: 0 !important;
}
svg {
margin: 0;
}
.cp-password-reveal {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
}
.fa-question-circle { // help links to Docs
.lucide-circle-question-mark { // help links to Docs
color: @cp_alertify-fg;
&:hover {
text-decoration: none;
@ -323,6 +353,11 @@
min-height: 36px;
min-width: 88px;
}
.cp-spinner {
svg {
animation: spin 10s linear infinite;
}
}
nav {
padding: @alertify_padding-base;
@ -489,7 +524,6 @@
margin-bottom: @alertify_padding-base;
}
button {
width: 50px;
margin: 0;
min-width: 0;
font-size: 18px !important;

View File

@ -40,15 +40,9 @@
position: relative;
.cp-avatar-default, media-tag {
display: inline-flex;
width: @avatar-width;
width: var(--avatar-width);
height: @avatar-width;
height: var(--avatar-width);
border-radius: @variables_radius;
justify-content: center;
align-items: center;
overflow: hidden;
@ -84,7 +78,7 @@
}
}
.badges_include();
& > i.cp-badge {
& > span.cp-badge {
position: absolute;
z-index: 10;
bottom: var(--badges-offset);

View File

@ -22,7 +22,7 @@
}
& {
i.cp-badge {
span.cp-badge {
width: var(--badges-width);
height: var(--badges-width);
box-sizing: content-box;
@ -43,7 +43,12 @@
background-color: @value;
}
});
svg {
margin: 0;
}
.lucide-star {
fill: currentcolor;
}
}
}

View File

@ -70,6 +70,11 @@
button:not(:last-child) {
margin-right: 5px;
}
svg {
width: 1rem;
height: 1rem;
margin-right: 0.35rem;
}
}
.cp-comment-container {
@ -91,6 +96,11 @@
&:last-child {
margin-bottom: 10px;
}
svg {
width: 1rem;
height: 1rem;
margin-right: 0.35rem;
}
}
.cp-comment {
&:not(:first-child) {

View File

@ -26,6 +26,10 @@
.dropdown-menu {
padding: 6px 0px;
}
.dropdown-item {
display: inline-flex;
align-items: center;
}
li {
padding: 0;
font-size: @colortheme_app-font-size;
@ -39,10 +43,9 @@
color: inherit;
}
}
.dropdown-toggle {
transform: rotate(270deg);
span svg {
margin-right: 0;
margin-left: 1rem;
float: right;
}
.dropdown-menu {
top: -0.7rem;
@ -65,22 +68,16 @@
background-color: @cp_context-bg-active;
color: @cp_context-fg;
}
.fa, .cptools {
&:first-child {
margin-right: 10px;
}
&.cptools:not(:first-child) {
vertical-align: middle;
}
color: @cp_context-icon;
width: 16px;
}
&.cp-app-disabled {
cursor: not-allowed !important;
opacity: 0.5;
}
}
}
li.dropdown-submenu > ul.dropdown-menu li > a.dropdown-item > svg.lucide {
vector-effect: non-scaling-stroke;
stroke-width: 1.7;
}
.cp-app-drive-context-noAction {
font-style: italic;
color: @cp_context-disabled;

View File

@ -72,10 +72,6 @@
.cp-corner-dontshow {
cursor: pointer;
.fa {
margin-right: 0.3em;
font-size: 1.1em;
}
&:hover {
color: @corner-fg-alt;
@ -125,9 +121,6 @@
text-transform: uppercase;
border: 1px solid @corner-fg;
border-radius: @variables_radius;
.fa, .cptools {
margin-right: 0.3em;
}
&.cp-corner-primary {
background-color: @corner-fg;
color: @corner-bg;

View File

@ -122,10 +122,13 @@
position: relative;
a {
position: absolute;
top: 7px;
margin-left: 30px;
margin-left: 1em;
font-size: 16px;
color: inherit;
svg {
margin: 0;
}
}
a:focus-visible {
border-radius: 50%;
@ -196,6 +199,9 @@
&:hover {
text-decoration: none;
}
svg {
margin: 0;
}
}
.cp-creation-slider {
display: none;
@ -249,11 +255,6 @@
background-color: @cp_creation-button-bg;
color: @cp_creation-button-fg;
}
.cp-creation-team-avatar {
.fa {
font-size: 25px;
}
}
.cp-creation-team-name {
overflow: hidden;
white-space: nowrap;
@ -315,11 +316,14 @@
flex: none;
}
.cp-password-reveal {
margin:0.2rem;
margin:0.5rem;
&:focus-visible {
outline: @variables_focus_style;
border-radius: @variables_radius;
}
svg {
margin: 0;
}
}
}
}
@ -341,9 +345,8 @@
width: 100%;
//flex: 1 0 auto;
flex-wrap: nowrap;
justify-content: space-between;
justify-content: center;
.cp-creation-template-more {
font-size: 30px;
margin: 0 5px;
text-align: center;
background-color: transparent;
@ -366,6 +369,11 @@
outline: @variables_focus_style;
border-radius: @variables_radius;
}
svg {
margin: 0;
width: @variables_icon_width;
height: @variables_icon_height;
}
}
}
.cp-creation-template-container {
@ -399,7 +407,7 @@
&.cp-creation-template-selected, &:hover {
background-color: @creation-bg-color-light;
background-color: var(--creation-bg-color-light);
.fa, .cptools {
svg {
color: @creation-color;
color: var(--creation-color);
}
@ -430,11 +438,12 @@
line-height: 25px;
max-width: 100%;
}
.fa, .cptools {
svg {
color: @creation-bg-color;
color: var(--creation-bg-color);
cursor: pointer;
font-size: 30px;
height: 1.8rem;
width: 1.8rem;
text-align: center;
margin-right: 10px;
}

View File

@ -27,6 +27,18 @@
max-height: 100%;
min-height: auto;
.lucide {
width: @variables_icon_width;
height: @variables_icon_height;
margin-right: @variables_icon_margin;
}
.cp-icon-hidden {
display: none;
}
.cp-icon-hidden > svg {
visibility: hidden;
position: absolute;
}
.cp-unselectable {
.tools_unselectable();
}
@ -51,7 +63,12 @@
padding-top: 5px;
padding-bottom: 5px;
border: 1px solid transparent;
svg.cp-app-drive-element-icon {
min-width: 1.25em;
min-height: 1.25em;
font-size: 1em;
margin-right: 0.2rem;
}
&:not(.cp-app-drive-element-selected):not(.cp-app-drive-element-selected-tmp) {
border: 1px solid @cp_drive-icon-border;
}
@ -83,23 +100,24 @@
max-width: none;
margin: 8px 0;
}
.fa, .cptools {
display: block;
svg {
margin: auto;
font-size: 64px;
margin: 18px 0;
text-align: center;
&.listonly {
display: none;
}
}
svg {
font-size: 55px; //temporary XXX
}
&.cp-app-hidden {
display: none !important;
}
&.cp-app-disabled {
cursor: not-allowed !important;
.fa, .cptools { cursor: not-allowed !important; }
svg { cursor: not-allowed !important; }
opacity: 0.5;
}
}
@ -151,13 +169,6 @@
// outline: none;
//}
.fa {
font-family: FontAwesome;
}
.cptools {
font-family: cptools;
}
ul {
list-style: none;
padding-left: 0px; // Remove the default padding
@ -180,12 +191,6 @@
.cp-app-drive-element-selected {
background: @cp_drive-selected-bg !important;
color: @cp_drive-selected-fg;
.fa-minus-square-o, .fa-plus-square-o {
color: @cp_sidebar-left-fg;
}
.cptools {
color: @cp_drive-selected-fg;
}
&.cp-app-drive-element-active {
background: @cp_drive-selected-bg !important;
color: @cryptpad_text_col !important;
@ -195,9 +200,6 @@
.cp-app-drive-element-selected-tmp {
background: @cp_drive-selection-bg;
color: @cp_drive-selection-fg;
.fa-minus-square-o, .fa-plus-square-o {
color: @cp_sidebar-left-fg;
}
}
.cp-app-drive-color-picker {
@ -217,17 +219,9 @@
position: absolute;
font-size: 50px;
}
.cptools-folder-no-color {
.folder-no-color {
color: @cryptpad_color_grey_500;
}
.fa-check {
position: absolute;
top: 40%; left: 35%;
color: transparent;
}
&.cp-app-drive-current-color > .fa-check {
color: @cryptpad_color_grey_900;
}
}
}
@ -235,16 +229,18 @@
#cp-app-drive-search {
display: inline-flex;
align-items: center;
max-width: 400px;
max-width: 500px;
font-size: 30px;
margin: 15px;
height: 2.5rem;
input {
background: transparent;
color: @cp_drive-fg;
width: 20rem;
.tools_placeholder-color();
outline-width: 0px;
border-radius: 0;
width: 100%;
max-width: 100%;
border: 0;
border-bottom: 3px solid @cp_drive-fg;
margin: 0 5px;
@ -270,9 +266,16 @@
.cp-app-drive-search-spinner {
display: inline-flex;
color: @cp_drive-fg;
font-size: 40px;
align-items: center;
justify-content: center;
svg {
height: 2rem;
width: 2rem;
margin-bottom: 1.5rem;
}
.cp-spinner svg {
animation: spin 10s linear infinite;
}
}
.cp-app-drive-search-noresult {
font-size: 30px;
@ -281,6 +284,26 @@
color: fade(@cryptpad_text_col, 80%);
}
//make search drive component responsive
@media screen and (max-width: @browser_media-medium-screen) {
#cp-app-drive-search {
max-width: 100%;
font-size: 22px;
margin: 10px;
input {
border-bottom-width: 2px;
width: 17rem;
}
}
.cp-app-drive-search-spinner svg {
width: 1.5rem;
margin-bottom: 1rem;
}
.cp-app-drive-search-noresult {
font-size: 22px;
padding: 10px;
}
}
/* TREE */
@ -344,14 +367,6 @@
align-items: center;
cursor: pointer;
margin: 0 0 2px -5px;
padding-left: 5px;
.fa, .cptools {
display: inline-block;
min-width: 0;
width: 20px;
margin-right: 0px;
z-index: 99;
}
.cp-app-drive-element {
flex: 1;
min-width: 0;
@ -375,14 +390,13 @@
box-shadow: @cryptpad_ui_shadow;
.cp-app-drive-tree-root {
.droppable-tree-element();
.fa-trash-o {
padding-left: 2px;
}
}
li {
padding: 0;
.cp-app-drive-element-row {
display: block;
display: inline-flex;
align-items: center;
width: 100%;
padding-left: 20px;
.leftside-menu-category_main();
margin: 0;
@ -398,26 +412,32 @@
.cp-limit-container {
margin-top: 5px;
}
.fa.cp-app-drive-icon-expcol {
margin-left: -10px;
.cp-app-drive-icon-expcol {
font-size: 14px;
position: absolute;
left: -17px;
top: 11px;
width: 11px !important;
height: 11px !important;
top: 10px;
overflow: hidden;
width: calc(1em - 2px) !important;
height: calc(1em - 2px) !important;
background-color: @cp_sidebar-left-item-bg;
padding: 0;
margin: 0;
z-index: 10;
cursor: default;
&:before {
position: relative;
top: -1px;
display: inline-flex;
svg {
margin: -1px;
width: 1em;
height: 1em;
}
&:focus-visible {
outline: @variables_focus_style;
border-radius: @variables_radius_S;
outline: none;
svg {
outline: @variables_focus_style;
border-radius: @variables_radius_S;
margin: 0;
}
}
}
.cp-app-drive-tree-docs {
@ -432,6 +452,12 @@
}
.cp-app-drive-tree-root > .cp-app-drive-element-row {
margin-left: 0px;
.cp-icon-hidden ~ svg {
margin-left: -21px;
}
.cp-app-drive-icon-expcol {
top: -1px;
}
&.cp-app-drive-element-active {
.cp-app-drive-icon-expcol {
color: @cp_sidebar-left-active-fg; // +/- expand icon for drive
@ -444,8 +470,8 @@
left: -10px;
background-color: transparent;
}
.cp-app-drive-tree-root > .cp-app-drive-element-row > .cp-app-drive-icon-folder {
margin-left: -5px;
.cp-app-drive-tree-root > .cp-app-drive-element-row > svg {
margin-left: -6px;
}
.cp-app-drive-tree-root {
&> .cp-app-drive-element-row {
@ -466,18 +492,18 @@
position: relative;
&:before {
position: absolute;
left: -12px;
left: -10px;
top: -10px;
content: '';
display: block;
border-left: 1px solid @cp_drive-tree-branch;
height: ~"calc(1em + 11px)";
border-bottom: 1px solid @cp_drive-tree-branch;
width: 15px;
width: 11px;
}
&:after {
position: absolute;
left: -12px;
left: -10px;
bottom: -7px;
content: '';
display: block;
@ -511,7 +537,7 @@
.cp-splitter {
position: absolute;
height: 100%;
width: 8px;
width: 1rem;
top: 0;
left: 0;
cursor: col-resize;
@ -528,9 +554,9 @@
&:hover {
border-left: 1px solid @cryptpad_text_col;
}
i {
svg {
color: @cryptpad_text_col;
font-size: 1.6rem;
transform: scale(2.5);
}
}
&.cp-app-drive-readonly { // applied to offline drive (not read-only shared folders)
@ -577,7 +603,7 @@
color: @cryptpad_color_link;
text-decoration: underline;
}
span {
svg {
cursor: pointer;
float: right;
margin-top: 0.5em;
@ -589,6 +615,7 @@
&:hover {
&:not(.-cp-app-drive-element-selected, .cp-app-drive-element-selected-tmp) {
background-color: @cp_drive-icon-hover;
cursor: pointer;
}
}
}
@ -623,6 +650,10 @@
line-height: 16px;
color: @cp_drive-header-fg;
}
.cp-icon {
height: 1.5rem;
width: 1.5rem;
}
}
&.cp-app-drive-tags-list {
width: 100%;
@ -646,6 +677,9 @@
}
.cp-app-drive-element {
.cp-app-drive-element-truncated { display: none; }
span.cp-app-drive-element-name {
padding: 0;
}
}
.cp-app-drive-new-ghost {
@ -658,7 +692,7 @@
&:hover {
opacity: 0.7;
}
.fa, .cptools {
svg {
cursor: pointer;
}
}
@ -691,16 +725,13 @@
.cp-app-drive-element-state, .cp-app-drive-element-menu {
position: absolute;
top: 3px;
.fa, .cptools {
display: flex;
flex-direction: column;
svg {
margin: 0;
font-size: 18px;
font-size: 16px;
}
}
.cp-app-drive-element-icon {
font-size: 0.9rem;
margin: 0;
margin-right: 0.3rem;
}
.cp-app-drive-element-name-text {
overflow: hidden;
white-space: nowrap;
@ -717,7 +748,7 @@
max-width: 100px;
max-height: 100px;
background: @cp_drive-thumb-bg;
& ~ .fa, & ~ .cptools {
& ~ svg {
display: none;
font-size: 17px;
position: absolute;
@ -729,10 +760,9 @@
}
.cp-app-drive-new-ghost {
flex-flow: column;
.fa, .cptools {
svg {
font-size: 90px;
margin-top: 5px;
margin-bottom: 0;
margin: 0;
}
}
.cp-app-drive-element-list {
@ -741,9 +771,6 @@
}
div.cp-app-drive-content-list {
.cp-app-drive-element-icon {
display: none !important;
}
.cp-app-drive-element-grid {
display: none;
}
@ -758,7 +785,14 @@
}
li {
display: flex;
align-items: center;
border-radius: @variables_radius;
&.cp-app-drive-element-row:not(.cp-app-drive-element-header) {
svg * {
stroke-width: 1.5;
vector-effect: non-scaling-stroke;
}
}
input {
border: 1px solid transparent;
margin: 0;
@ -793,7 +827,7 @@
align-items: center;
justify-content: end;
height: @variables_bar-height;
.fa, .cptools {
svg {
&:not(:last-child) {
margin-right: 2px;
}
@ -815,9 +849,6 @@
color: inherit;
background: none;
border: none;
.fa {
margin-right: 5px;
}
}
}
}
@ -838,7 +869,7 @@
cursor: default;
color: @cp_drive-header-fg;
span {
&:not(.fa):not(.cptools) {
&:not(svg) {
text-align: left;
}
&.sortasc, &.sortdesc {
@ -966,6 +997,11 @@
#cp-app-drive-content-folder {
padding-right: 10px;
flex: 1;
.cp-app-drive-element-row.cp-app-drive-element-file > svg.lucide *,
.cp-app-drive-element-row.cp-app-drive-element-folder > svg.lucide * {
stroke-width: 3.5;
vector-effect: non-scaling-stroke;
}
}
#cp-app-drive-new-ghost-dialog.cp-modal-container {
@ -977,13 +1013,34 @@
.cp-modal {
display: flex;
flex-flow: column;
li, li .fa, li .cptools {
li, li svg.lucide {
cursor: pointer;
border-radius: @variables_radius;
&:focus {
outline: @cryptpad_color_brand solid 2px;
}
}
li svg.lucide * {
stroke-width: 3.5;
vector-effect: non-scaling-stroke;
}
ul {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
li {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
text-align: center;
}
h3 {
display:inline-flex;
align-items: center;
justify-content: center;
}
&> p {
display: flex;
align-items: center;
@ -1020,7 +1077,7 @@
display: flex;
align-items: center;
align-content: unset;
.fa, .cptools {
svg {
font-size: 32px;
min-width: 50px;
}
@ -1050,17 +1107,16 @@
}
}
.cp-toolbar-bottom-right {
.fa-history { order: 50; }
// .fa-list, .fa-th-large,
.lucide-history { order: 50; }
.cp-app-drive-viewmode-button {
order: 25;
i {
margin-right: 0;
}
}
svg {
margin-right: 0;
}
#cp-app-drive-toolbar-context-mobile, #cp-app-drive-toolbar-contextbuttons { order: 0; }
#cp-app-drive-toolbar-context-mobile {
.fa { margin: 0 !important; }
.svg { margin: 0 !important; }
}
#cp-app-drive-toolbar-contextbuttons {
height: @variables_bar-height;
@ -1080,6 +1136,12 @@
.cp-app-drive-button {
order: 15;
margin: 0 1em;
.btn.btn-danger {
svg.lucide {
width: @variables_icon_width;
height: @variables_icon_height;
}
}
}
}

View File

@ -58,14 +58,7 @@
}
}
.fa {
font-family: FontAwesome;
}
button {
.fa-caret-down {
margin-right: 0.5em !important;
}
* {
.tools_unselectable();
}
@ -122,26 +115,13 @@
line-height: 1em;
align-items: center;
&:not(.fa) {
span {
display: inline-flex;
align-items: center;
}
&:not(svg) {
font: @dropdown_font;
}
&.fa, &.cptools {
font-size: 18px;
&::before {
width: 40px;
margin-left: -10px;
text-align: center;
}
* {
font: @dropdown_font;
}
}
.fa, .cptools {
width: 20px;
text-align: center;
margin-right: 5px !important;
}
&.cp-dropdown-element-active {
background-color: @cp_dropdown-bg-active;

View File

@ -50,9 +50,6 @@
display: flex;
align-items: center;
padding: 5px 0;
.fa {
width: 25px;
}
}
}
.cp-export-actions {

View File

@ -49,6 +49,10 @@
&:hover {
color: lighten(@cp_upload-fg, 10%);
}
svg {
margin: 0;
}
}
}
#cp-fileupload-table {
@ -66,9 +70,8 @@
white-space: nowrap;
max-width: 40vw;
margin: 0px @upload_pad_v;
.fa {
svg {
margin-top: 4px;
margin-right: 5px;
}
.cp-fileupload-table-name {
overflow: hidden;
@ -112,9 +115,9 @@
&:not(.success):not(.cancelled):hover {
background-color: rgba(0,0,0,0.1);
}
.fa {
svg {
padding: @upload_pad_h @upload_pad_v;
&.fa-times {
.lucide-x {
cursor: pointer;
}
}

View File

@ -64,12 +64,12 @@
}
}
&.mfa-enabled {
span, i {
span, i, svg {
color: @cp_settings_enabled;
}
}
&.mfa-disabled {
span, i {
span, i, svg {
color: @cp_settings_disabled;
}
}
@ -137,7 +137,7 @@
line-height: 30px;
color: @cp_kanban-fg;
border: 1px solid fade(@cp_kanban-fg, 40%);
&.fa-check { // tick on selected color
&.svg { // tick on selected color
color: @cryptpad_text_col;
}
outline: none;
@ -150,7 +150,9 @@
button.btn {
background-color: @cp_buttons-cancel;
box-sizing: border-box;
display: inline-flex;
align-items: center;
justify-content: center;
line-height: 20px;
padding: 8px 6px;
white-space: nowrap;
@ -161,17 +163,6 @@
cursor: pointer;
border-radius: @variables_radius;
transition: none;
&:not(.fa):not(.cptools) {
font-family: inherit;
}
i, .fa, .cptools {
&:not(.nomargin) {
margin-right: 5px;
}
}
color: @cp_buttons-fg;
border: 1px solid @cp_buttons-fg;
@ -316,9 +307,6 @@
font-size: 12px;
padding: 5px;
border-radius: @variables_radius;
i {
margin-right: 10px;
}
&.cp-alert-top {
margin-top: @alertify_padding-base;
}
@ -358,11 +346,6 @@
&.dismissable {
display: flex;
align-items: center;
span.fa-times {
font-size: @colortheme_app-font-size;
margin-left: 20px;
cursor: pointer;
}
}
}
.cp-banner {

View File

@ -12,7 +12,8 @@
};
& {
.cp-help-container {
display:inline-flex;
align-items: center;
position: relative;
background-color: @cp_help-bg;
max-height: 50%;
@ -25,12 +26,14 @@
border: none;
position: absolute;
color: @cryptpad_text_col;
top: 5px;
right: 5px;
&:focus-visible {
outline: @variables_focus_style;
border-radius: @variables_radius;
}
svg {
margin: 0;
}
}
.cp-help-text {
color: @cp_help-fg;

View File

@ -36,9 +36,9 @@
color: @cp_drive-fg;
outline: @cryptpad_color_brand solid 2px;
}
.fa, .cptools {
display: block;
font-size: 64px;
svg {
height: 4rem;
width: 4rem;
margin: 18px 0;
text-align: center;
&.listonly {
@ -51,7 +51,7 @@
}
&.cp-app-disabled {
cursor: not-allowed !important;
.fa, .cptools { cursor: not-allowed !important; }
svg { cursor: not-allowed !important; }
opacity: 0.5;
}
}

View File

@ -51,6 +51,11 @@ body.html {
outline: @variables_focus_style;
border-radius: @variables_radius;
}
.lucide {
width: @variables_icon_width;
height: @variables_icon_height;
margin-right: @variables_icon_margin;
}
border: 0;
padding: 0;
margin: 0;
@ -209,10 +214,8 @@ body.html {
border-radius: @infopages-radius;
padding: 0.5em 0.7em;
white-space: nowrap;
display: inline-block;
i {
margin-right: 5px;
}
display: inline-flex;
align-items: center;
&:hover {
background-color: @cp_static-card-bg;
color: @cryptpad_text_col;
@ -225,10 +228,8 @@ body.html {
.cp-footer-language {
padding: 10px;
margin-right: 10px;
i {
font-size: 1.3em;
margin-right: 5px;
}
display: inline-flex;
align-items: center;
select {
min-width: 0;
background-color: @cp_static-card-bg;
@ -290,9 +291,11 @@ body.html {
padding: 0.5em 0.7em;
margin: 5px;
color: @cp_static-link;
display: inline-block;
display: flex;
align-items: center;
img {
max-height: 30px;
width: @variables_icon_width;
height: @variables_icon_height;
margin-right: 10px;
}
&.cp-back-home {
@ -304,14 +307,10 @@ body.html {
&:focus-visible {
outline: @variables_focus_style;
}
i {
margin-right: 5px;
}
}
.cp-register-btn {
background-color: @cp_static-topbar-fg;
color: @cp_static-bg;
display: inline-block;
&:hover {
background-color: @cp_static-card-bg;
color: @cryptpad_text_col;

View File

@ -16,12 +16,6 @@
height: @variables_bar-height;
border-radius: @variables_radius;
background-color: @cp_sidebar-left-item-bg;
.fa, .cptools {
display: inline-flex;
justify-content: center;
margin-right: 5px;
min-width: 20px;
}
&:hover {
background: @cryptpad_text_col_inv;
}

View File

@ -185,9 +185,6 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
i {
width: 22px;
}
span {
margin-left: 10px;
&.percent {
@ -219,7 +216,7 @@
}
}
.cp-spinner {
.cp-spinner-main {
display: inline-block;
box-sizing: border-box;
width: 80px;
@ -231,4 +228,13 @@
animation-timing-function: cubic-bezier(.6,0.15,0.4,0.85);
}
button {
.cp-spinner {
svg {
animation: spin 10s linear infinite ;
margin: 0 0 0.1rem 0.3rem;
}
}
}
}

View File

@ -99,9 +99,6 @@
max-width: 250px;
min-height: 38px;
justify-content: center;
.fa {
margin-right: 5px;
}
b {
margin-left: 5px;
white-space: nowrap;
@ -210,16 +207,6 @@
a {
color: @cryptpad_text_col;
font-size: 0.8em;
&.cp-remote-img::before { // .fa.fa-question-circle
font-family: FontAwesome;
//content: "\f08e\00a0";
content: "\f08e\00a0\00a0";
}
&.cp-learn-more::before { // .fa.fa-external-link
font-family: FontAwesome;
content: "\f059\00a0";
//content: "\f059\00a0\00a0";
}
}
}
}
@ -237,12 +224,6 @@
}
.todo-list-item {
list-style: none;
position: relative;
.fa {
position: absolute;
margin-left: -17px;
margin-top: 4px;
}
}
.mediatag_cryptpad();

View File

@ -62,12 +62,12 @@
}
}
span.cp-app-contacts-spinner {
.cp-app-contacts-spinner {
display: none;
}
.cp-app-contacts-initializing {
span.cp-app-contacts-spinner {
svg.cp-app-contacts-spinner {
color: @cp_messenger-fg;
display: block;
}
@ -115,16 +115,19 @@
& > span:hover {
color: @msg-color-hover;
}
svg {
margin-right: 0.1rem;
}
}
}
i.cp-badge {
span.cp-badge {
color: var(--msg-bg-color-dark);
border-color: var(--msg-bg-color-dark);
}
&:hover {
background-color: @msg-bg-color-darker;
background-color: var(--msg-bg-color-darker);
i.cp-badge {
span.cp-badge {
color: var(--msg-bg-color-darker);
border-color: var(--msg-bg-color-darker);
}
@ -174,9 +177,6 @@
margin: 10px;
display: none;
order: 3;
.fa-bell-slash {
margin-right: 10px;
}
}
}
}
@ -247,7 +247,7 @@
.cp-app-contacts-header {
background-color: @msg-bg-color-lighter;
background-color: var(--msg-bg-color-lighter);
i.cp-badge {
span.cp-badge {
color: var(--msg-bg-color-lighter);
border-color: var(--msg-bg-color-lighter);
}
@ -256,6 +256,9 @@
justify-content: space-between;
align-items: center;
height: 50px;
svg {
margin-right: 0;
}
.hover () {
height: 100%;

View File

@ -129,16 +129,16 @@
// Access modal
button.cp-access-add {
i {
svg {
margin-right: 0px !important;
}
i.fa-arrow-left {
svg[data-lucide='arrow-left'] {
display: inline;
@media (max-width: @browser_media-medium-screen) {
display: none;
}
}
i.fa-arrow-up {
svg[data-lucide='arrow-up'] {
display: none;
@media (max-width: @browser_media-medium-screen) {
display: inline;
@ -161,6 +161,14 @@
.cp-access-margin-right {
margin-right: 5px !important;
}
.cp-share-columns {
.cp-checkmark {
svg.lucide {
margin-left: 0;
margin-right: 0.2rem;
}
}
}
// teams invite modal
.cp-teams-invite-block {
@ -184,9 +192,6 @@
}
.cp-teams-invite-spinner {
font-size: 1.2em;
.fa {
margin-right: 10px;;
}
}
.cp-teams-help {
margin-left: 10px;
@ -209,6 +214,14 @@
.cp-snapshot-spinner {
min-height: 90px;
text-align: center;
.cp-spinner {
svg {
width: 4rem;
height: 4rem;
vertical-align: middle;
animation: spin 10s linear infinite;
}
}
}
.cp-snapshot-element {
display: flex;
@ -216,7 +229,7 @@
padding: 5px 0;
outline: none;
border-radius: @variables_radius;
& > i {
& > svg {
margin-left: @snapshot_spacing;
text-align: center;
}
@ -310,17 +323,13 @@
color: @cp_markdown-block-fg;
}
}
.cp-spinner {
.cp-spinner-main {
border-color: @cryptpad_color_brand;
border-top-color: transparent;
}
}
.cp-mediatag-control {
align-self: center;
.fa {
margin: 10px;
cursor: pointer;
}
}
.cp-mediatag-outer {
display: flex;

View File

@ -11,6 +11,11 @@
--LessLoader_require: LessLoader_currentFile();
}
& {
.lucide {
width: @variables_icon_width;
height: @variables_icon_height;
margin-right: @variables_icon_margin;
}
@notif-height: 50px;
.cp-notifications-container {
max-width: 300px;
@ -24,13 +29,16 @@
.cp-notification {
min-height: @notif-height;
display: flex;
align-items: center;
svg {
margin: 0;
}
.cp-broadcast {
display: flex;
font-size: 30px;
align-items: center;
padding: 0 5px;
margin: 0.5rem;
width: var(--avatar-width);
height: var(--avatar-width);
color: @cp_dropdown-fg;
&.preview:not(.fa-calendar) {
&.preview:not(.lucide-calendar-days) {
color: @cryptpad_color_red;
}
}
@ -39,7 +47,7 @@
}
.cp-avatar {
.avatar_main(30px);
padding: 0 5px;
padding: 5px;
}
.cp-avatar-image {
display: inline-flex;
@ -50,8 +58,9 @@
}
}
.cp-notification-content {
display: flex;
flex: 1;
align-items: stretch;
align-items: center;
min-width: 0;
p {
word-break: break-word;
@ -62,7 +71,6 @@
}
.cp-notification-dismiss {
color: @cp_dropdown-fg;
width: 25px;
display: flex;
align-items: center;
justify-content: center;

View File

@ -16,13 +16,7 @@
flex: 1;
min-width: 0;
}
.fa {
width: 30px;
height: 30px;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
svg {
&:hover {
color: darken(@cryptpad_color_brand, 10%);
}

View File

@ -60,9 +60,9 @@
display: flex;
max-width: 100%;
align-items: center;
.fa, .cptools {
margin-right: 0;
flex: 0;
svg {
min-width: @variables_icon_width;
min-height: @variables_icon_height;
}
span.cp-sidebarlayout-category-name {
padding-left: 5px;
@ -257,9 +257,6 @@
}
label.noTitle {
display: inline-flex;
.fa {
margin-left: 10px;
}
}
margin-bottom: 20px;
}
@ -301,7 +298,7 @@
margin: 10px 0;
}
button.btn {
margin: 0 @sidebar_base-margin 0 0;
//margin: 0 @sidebar_base-margin 0 0;
&:last-child {
margin-right: 0;
}

View File

@ -43,9 +43,9 @@
}
.cp-support-attachments {
display: flex;
.fa {
svg {
cursor: pointer;
margin-right: 10px;
vertical-align: middle;
}
&> span {
border: 1px solid @fromme-bg;
@ -95,6 +95,9 @@
}
.cp-support-title-buttons {
margin-left: 1em;
svg {
margin: 0;
}
}
}
.cp-support-ticket-tags {
@ -155,6 +158,9 @@
display: none;
cursor: default;
position: relative;
button svg {
margin-right: 0;
}
.cp-support-copydata {
position: absolute;
right: 0;
@ -196,7 +202,7 @@
display: none;
}
.cp-support-hide {
display: inline;
display: inline-flex;
}
}
.cp-support-form-container {

View File

@ -101,6 +101,11 @@
&:hover {
color: contrast(@cp_token-fg, darken(@cp_token-fg, 10%), lighten(@cp_token-fg, 10%));
}
svg {
width: @variables_icon_width;
height: @variables_icon_height;
margin: 0;
}
}
}
.token-input {

View File

@ -32,6 +32,9 @@
&.cp-history-init {
padding: 0;
height: 32px;
svg {
animation: spin 10s linear infinite;
}
}
.cp-toolbar-history-timeline {
@ -62,6 +65,11 @@
align-self: baseline;
margin-right: 5px;
.cp-history-actions-first {
.cp-history-create-snapshot {
svg {
margin: 0;
}
}
margin-right: @fill-width;
}
button {
@ -104,6 +112,13 @@
}
.cp-toolbar-history-loadmore {
font-size: 10px !important;
&:focus-visible {
outline: @variables_focus_style;
border-radius: @variables_radius;
}
.cp-loadmore-loading {
animation: spin 10s linear infinite;
}
}
.cp-history-timeline-actions {
margin-left: 21px !important;
@ -123,9 +138,6 @@
border-left: none;
width: 2px !important;
background: @pos-color;
&:before {
left: -6px;
}
}
}
&.cp-history-oo {
@ -159,9 +171,6 @@
height: 100%;
background: @history_lineBg;
margin-right: 1px;
.fa-refresh {
font-size: 13px;
}
}
}
.cp-history-timeline-container {
@ -222,8 +231,8 @@
width: 50px;
color: @cp_toolbar-fg;
border-radius: @variables_radius;
.fa:first-child:not(:last-child) {
margin-right: 5px;
svg {
margin: 0;
}
&:disabled {
cursor: not-allowed !important;
@ -257,11 +266,10 @@
height: 37px;
//background: @pos-color;
position: absolute;
&:before {
top: -17px;
font-size: 24px;
svg {
top: -14px;
position: absolute;
left: ~"calc(50% - 6px)";
left: ~"calc(50% - 9px)";
}
}
@media screen and (max-width: 870px) {
@ -273,6 +281,9 @@
.cp-history-actions-first {
margin-right: 0 !important;
}
.cp-history-actions-last {
margin-right: 0.5rem;
}
button {
margin: 0.1rem;
}

View File

@ -51,10 +51,6 @@
@toolbar_top-height: 76px;
@toolbar_button-font: @colortheme_app-font;
// if we spell 'share' correctly, then adblock plus hides the share button
// this is a workaround
.fa-shhare-alt:before { content: "\f1e0"; }
.ckeditor_fix();
.cp-burn-after-reading {
@ -77,7 +73,7 @@
border-radius: @variables_radius;
color: @toolbar-color;
.toolbar_button;
padding: 3px 9px;
padding: 3px 7px;
&:hover {
background-color: contrast(@cp_toolbar-bg, darken(@cp_toolbar-bg, 5%), lighten(@cp_toolbar-bg, 5%));
}
@ -85,10 +81,11 @@
outline: @variables_focus_style;
}
}
@media screen and (max-width: @browser_media-medium-screen) {
button:nth-of-type(1) {
margin-left: 0;
}
svg {
margin: 0;
}
button:nth-of-type(1) {
margin-left: 0.2rem;
}
}
@ -99,7 +96,7 @@
.toolbar_button {
height: @toolbar_line-height;
box-sizing: border-box;
padding: 3px 10px;
padding: 5px 7px;
margin: 0;
transition: all 0.15s;
.tools_unselectable();
@ -166,6 +163,9 @@
box-sizing: border-box;
order: 100;
z-index: 1;
span.cp-badge > svg.lucide {
width: 0.625rem; // ~10px
}
.cp-toolbar-userlist-drawer-close {
position: absolute;
margin-top: -10px;
@ -220,7 +220,7 @@
border-radius: @variables_radius;
border-right: 3px solid transparent;
.avatar_main(35px);
i.cp-badge {
span.cp-badge {
color: @cp_toolbar-bg2;
border-color: @cp_toolbar-bg2;
}
@ -228,7 +228,7 @@
cursor: pointer;
&:hover {
background: @cp_toolbar-bg3;
i.cp-badge {
span.cp-badge {
color: @cp_toolbar-bg3;
border-color: @cp_toolbar-bg3;
}
@ -259,6 +259,10 @@
border: none;
height: 20px;
cursor: pointer;
svg {
width: @variables_icon_width;
margin: 0 0 @variables_icon_margin 0;
}
}
}
.cp-toolbar-userlist-name-input {
@ -280,10 +284,10 @@
padding: 0;
}
.cp-userlist-badge {
i {
span {
color: @cryptpad_color_brand;
}
i.cp-badge-error {
span.cp-badge-error {
color: @cryptpad_color_warn_red;
}
}
@ -298,7 +302,16 @@
#cp-app-toolbar-creation-dialog.cp-modal-container {
.icons_main();
h3 {
display: inline-flex;
justify-content: center;
align-items: center;
svg {
height: 2rem;
width: 2rem;
}
}
li {
color: @cp_drive-fg;
border: 1px solid @cp_drive-icon-border;
@ -310,8 +323,21 @@
.cp-modal {
display: flex;
flex-flow: column;
li, li .fa {
li {
cursor: pointer;
svg.lucide * {
stroke-width: 3.5;
vector-effect: non-scaling-stroke;
}
@media screen and (max-width: @browser_media-medium-screen) {
svg {
margin: 0 @variables_icon_margin 0 @variables_icon_margin;
width: 2.5rem;
}
svg.lucide, svg.lucide * {
stroke-width: 2;
}
}
}
&> p {
text-align: center;
@ -359,10 +385,6 @@
width: 200px;
display: flex;
align-items: center;
.fa, .cptools {
font-size: 32px;
min-width: 50px;
}
.cp-icons-name {
height: auto;
text-align: left;
@ -412,10 +434,6 @@
color: @toolbar-bg-color;
color: var(--toolbar-bg-color);
.fa {
font: normal normal normal 14px/1 FontAwesome;
}
.tools_unselectable();
font: @toolbar_button-font;
@ -426,16 +444,25 @@
//height: 100%;
//display: inline-block;
button {
height: 100%;
margin: 0;
background: transparent;
}
svg {
height: @variables_icon_height;
width: @variables_icon_width;
margin-right: @variables_icon_margin;
}
}
button {
.toolbar_button;
&.cp-notifications-bell, &.cp-maintenance-wrench {
color: @cryptpad_text_col;
svg {
margin:0;
height: 2.5rem;
width: 2.5rem;
}
}
}
@ -526,9 +553,6 @@
line-height: @toolbar_line-height;
display: inline-flex;
.fa {
font-size: @colortheme_app-font-size;
}
}
input {
height: @toolbar_line-height;
@ -550,9 +574,6 @@
//transform: scale(0.5);
.cp-toolbar-link-logo {
padding: 5px;
span {
font-size: 24px;
}
}
}
.cp-toolbar-user {
@ -601,6 +622,12 @@
line-height: 32px;
margin: 0;
}
.cp-notifications-bell {
svg {
width: @variables_icon_width;
height: @variables_icon_height;
}
}
}
}
}
@ -648,12 +675,7 @@
.cp-toolbar-title-edit, .cp-toolbar-title-save {
display: flex;
align-items: center;
font-size: 20px;
vertical-align: middle;
border-radius: 0 @variables_radius @variables_radius 0;
.fa {
font-size: 20px;
}
}
.cp-toolbar-title-readonly {
margin-left: 10px;
@ -699,8 +721,8 @@
border: 1px solid transparent;
padding: 0 5px;
border-collapse: collapse;
span {
cursor: pointer;
svg {
margin: 0;
}
}
.cp-toolbar-title-save {
@ -709,8 +731,8 @@
cursor: pointer;
padding: 5px;
border-collapse: collapse;
span {
cursor: pointer;
svg {
margin: 0;
}
}
.cp-toolbar-title-value {
@ -780,7 +802,7 @@
.cp-dropdown-button-title {
position: absolute;
bottom: 10px;
right: 16px;
right: 13px;
font-size: 14px;
border: 1px solid;
border-radius: 50%;
@ -814,36 +836,27 @@
justify-content: center;
cursor: pointer;
order: 1;
.fa {
margin: 0;
}
a.cp-toolbar-link-logo {
cursor: pointer;
display: inline-flex;
text-decoration: none;
position: absolute;
height: auto;
padding: 10px;
color: @toolbar-bg-color;
color: var(--toolbar-bg-color);
border-radius: @variables_radius;
span {
font-size: 45px;
padding: 0;
line-height: 0;
svg {
height: 3rem;
width: 3rem;
margin: 0;
}
&:hover {
// Icons shown when hovering the toolbar icon (where logo used to be)
.cptools::before {
content: "\e920"; // shows drive icon in document toolbars
}
.fa::before {
content: "\f0a0"; // shows hdd-o for all FA icons (settings, etc)
}
.fa-hdd-o::before {
content: "\f015"; // shows home for drive
}
.lucide * {
stroke-width: 3;
vector-effect: non-scaling-stroke;
}
// svg {
// #outline, #squares {
// fill: @toolbar-bg-color;
@ -860,6 +873,21 @@
// width: 100%;
// }
}
@media screen and (max-height: @browser_media-medium-screen),
screen and (max-width: @browser_media-medium-screen) {
a.cp-toolbar-link-logo {
svg {
width: @variables_icon_width;
height: @variables_icon_height;
}
.lucide * {
stroke-width: 1.5;
}
}
}
a.cp-toolbar-link-logo > svg:nth-of-type(2){ display: none; }
a.cp-toolbar-link-logo:hover > svg:nth-of-type(1){ display: none; }
a.cp-toolbar-link-logo:hover > svg:nth-of-type(2){ display: block; }
}
.cp-toolbar-user {
height: @toolbar_top-height;
@ -994,6 +1022,8 @@
}
.cp-toolbar-dropdown-nowrap {
white-space: nowrap;
display: inline-flex;
align-items: center;
}
.cp-toolbar-bottom {
color: @cp_toolbar-bottom-fg;
@ -1047,6 +1077,11 @@
border-color: @cryptpad_text_col;
color: @cryptpad_text_col;
}
.cp-toolbar-userlist-button {
svg {
margin: 0;
}
}
&.cp-toolbar-button-active {
background-color: @cp_toolbar-bg;
border-color: @cp_toolbar-fg;
@ -1080,8 +1115,8 @@
you hover perfectly. The same is true of the drive's grid/list view toggle.
*/
position: relative;
.fa {
margin-right: 0px;
svg {
margin-right: 0;
}
.cp-collapsed-notif {
display: inline-block;
@ -1104,7 +1139,7 @@
.cp-toolbar-name, .cp-button-name, .cp-dropdown-button-title {
display: none;
}
i, span {
span, svg {
margin-right: 0;
}
}
@ -1166,24 +1201,24 @@
.cp-toolbar-icon-pad_toc {
order: 8;
}
.cp-toolbar-file {
li, button {
.fa-plus { order: 0; }
.fa-history { order: 5; }
.fa-hashtag { order: 10; }
.fa-bookmark { order: 15; }
.fa-upload { order: 20; }
.fa-files-o { order: 25; }
.fa-download { order: 30; }
.fa-print { order: 35; }
.fa-trash { order: 40; }
.cp-toolbar-icon-pad-settings { order: 75; }
.fa-info-circle { order: 100; }
.cp-toolbar-file li > a {
&.cp-toolbar-icon-newpad { order: 0; }
&.cp-toolbar-icon-snapshots { order: 5; }
&.cp-toolbar-icon-template { order: 10; }
&.cp-toolbar-icon-pad-settings { order: 15; }
&.cp-toolbar-icon-history { order: 20; }
&.cp-toolbar-icon-hashtag { order: 25; }
&.cp-toolbar-icon-import-template{ order: 30; }
&.cp-toolbar-icon-import { order: 35; }
&.cp-toolbar-icon-copy { order: 40; }
&.cp-toolbar-icon-export { order: 45; }
&.cp-toolbar-icon-print { order: 50; }
&.cp-toolbar-icon-forget { order: 60; }
.fa-question { order: 150; }
&.cp-toolbar-icon-properties { order: 100; }
&.cp-toolbar-icon-help { order: 150; }
span { order: 1000; } // text always after icon
}
> span { order: 1000; } // text always after icon
}
.cp-toolbar-drawer-contentsss:empty ~ .cp-toolbar-drawer-button {
@ -1209,9 +1244,6 @@
z-index: 10000; //Z cp-toolbar-drawer-content
color: @cp_dropdown-fg;
.tools_unselectable();
.fa {
font-size: 17px;
}
&> span {
order: 8;
box-sizing: border-box;
@ -1259,27 +1291,12 @@
min-width: 200px;
box-sizing: border-box;
margin-bottom: 5px;
&> span.fa {
height: 20px;
width: 20px;
//margin: 8px;
line-height: 20px;
font-size: 20px;
text-align: center;
}
}
.cp-toolbar-readonly {
margin-right: 5px;
font-weight: bold;
text-transform: uppercase;
}
.cp-toolbar-share {
a {
.fa {
margin-right: 5px;
}
}
}
}

View File

@ -120,7 +120,7 @@
color: @cp_usergrid-selected-fg;
}
}
.fa-times {
.lucide-x {
border-radius: @variables_radius;
margin-left: 5px;
cursor: pointer;

View File

@ -23,3 +23,7 @@
@variables_radius_L: 10px;
@variables_focus_style: @cryptpad_color_brand solid 2px;
@variables_icon_margin: 0.5rem;
@variables_icon_height: 1.2em;
@variables_icon_width: 1.2em;

View File

@ -10,10 +10,6 @@
&.cp-page-contact {
.infopages_main();
.fa {
padding-right: 0.25em;
}
.cp-container {
.cp-iconCont {

View File

@ -18,7 +18,7 @@
text-decoration: none;
text-align: center;
background-color: @cp_buttons-primary;
color: @cryptpad_text_col;
color: @cryptpad_text_col_inv;
font-size: 20px;
margin: 10px 0;
border-radius: @infopages-radius;
@ -27,7 +27,7 @@
background-color: contrast(@cp_buttons-primary-text, darken(@cp_buttons-primary, 10%), lighten(@cp_buttons-primary, 10%));
}
&:visited {
color: @cryptpad_text_col;
color: @cryptpad_text_col_inv;
}
}
.cp-features-web {
@ -76,22 +76,15 @@
.list-group {
li {
display: flex;
align-items: center;
padding-left: 0;
padding-right: 5px;
svg {
width: 30px;
color: @cryptpad_color_brand;
}
}
div {
&.cp-check {
width: 30px;
display: flex;
align-items: center;
justify-content: center;
&:before {
content: "\f00c";
font-family: "FontAwesome";
font-size: 14px;
color: @cryptpad_color_brand;
}
}
&.cp-content {
flex: 1;
display: flex;

View File

@ -52,7 +52,6 @@
font-size: 2.5em;
}
}
.cp-home-hero {
width: 100%;
align-self: center;
@ -90,9 +89,11 @@
}
.cp-instance-location {
margin-top: 20px;
i {
display: inline-flex;
align-items: center;
svg {
font-size: 1.2em;
margin-right: 5px;
margin-right: @variables_icon_margin;
}
}
.cp-instance-links {
@ -126,15 +127,21 @@
font-size: 1.4em;
line-height: 100%;
color: fade(@cryptpad_text_col, 80%);
i {
margin-right: 5px;
}
display: inline-flex;
align-items: center;
}
.cp-app-grid-apps {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 0 0.8rem;
svg {
margin: 0;
}
.lucide * {
stroke-width: 2.7;
vector-effect: non-scaling-stroke;
}
}
a {
margin: 10px;
@ -147,7 +154,7 @@
@icons-text-size: 24px;
.bs-callout {
display: flex;
align-items: stretch;
align-items: center;
margin: 0;
box-sizing: border-box;
position: relative;
@ -167,11 +174,10 @@
align-items: center;
justify-content: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 16px;
}
.fa, .cptools {
svg {
display: flex;
align-items: center;
font-size: 3.5em;
@ -183,6 +189,8 @@
.pad-button-text {
color: @cryptpad_text_col;
padding: 5px;
white-space: wrap;
text-align: center;
}
}
.cp-index-appitem {
@ -216,11 +224,11 @@
each(@colortheme_apps, {
.cp-callout-@{key} {
border-radius: @infopages-radius;
i { color: @value; }
svg { color: @value; }
&:hover {
@desat: desaturate(@value, 15%);
background-color: contrast(@cryptpad_text_col, lighten(@value, 30%), darken(@desat, 20%));
i { color: @cryptpad_text_col; }
svg { color: @cryptpad_text_col; }
}
}
});
@ -232,7 +240,8 @@
a.cp-drive-btn {
color: @cryptpad_text_col;
font-size: 1.5rem;
display: block;
display: inline-flex;
align-items: center;
height: min-content;
flex-shrink: 0;
width: fit-content;
@ -245,10 +254,13 @@
&:hover {
background-color: fade(@cryptpad_text_col, 10%);
}
i {
svg {
color: @cryptpad_color_brand;
margin-right: 10px;
font-size: 1.3em;
}
svg.lucide, svg.lucide * {
stroke-width: 2;
vector-effect: non-scaling-stroke;
}
}
.cp-sub-prompt {
@ -263,7 +275,7 @@
margin: 10px 0;
border-radius: @infopages-radius-L;
padding: 0.75rem;
i {
svg {
display: inline;
margin-right: 10px;
}
@ -288,10 +300,11 @@
div {
.infopages_link();
color: @cryptpad_color_white;
.fa, .cptools {
svg {
font-size: inherit;
padding: 0;
width: 1em;
width: @variables_icon_width;
height: @variables_icon_height;
padding-left: 5px;
}
}

View File

@ -62,9 +62,9 @@
li {
margin-bottom: 1em;
}
.fa {
padding-right: 10px;
}
}
h2 {
padding-left: 30px;
}
h3 {
font-weight: 700;
@ -112,12 +112,6 @@
position: relative;
li {
margin-bottom: 10px;
&::before {
position: absolute;
left: 0;
font-family: "FontAwesome";
content: "\f071";
}
.red {
background-color: @cp_static-danger;
}

View File

@ -87,9 +87,6 @@
li {
margin-bottom: 1em;
}
.fa {
padding-right: 10px;
}
}
h3 {
font-weight: 700;
@ -122,7 +119,9 @@
#ssoForm {
margin-top: 15px;
}
h2 {
padding-left: 30px;
}
.cp-register-notes {
ul.cp-notes-list {
list-style: none;
@ -131,12 +130,6 @@
position: relative;
li {
margin-bottom: 10px;
&::before {
position: absolute;
left: 0;
font-family: "FontAwesome";
content: "\f071";
}
.red {
background-color: @cp_static-danger;
}

View File

@ -7,8 +7,6 @@ define([
'/common/hyperscript.js',
'/customize/pages.js',
'/components/nthen/index.js',
'css!/components/components-font-awesome/css/font-awesome.min.css',
], function ($, h, Pages, nThen) {
// we consider that there is no valid reason to load any of the info pages
// in an iframe. abort everything if you detect that you are embedded.
@ -16,7 +14,6 @@ define([
$(function () {
var $body = $('body');
var pathname = location.pathname;
// add class on info-pages
@ -50,7 +47,6 @@ $(function () {
'optional!/api/instance',
'less!/customize/src/less2/pages/page-' + pageName + '.less',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'css!/customize/fonts/cptools/style.css'
], function (ApiConfig, Util, Instance) {
var $main = $(infoPage());
var titleSuffix = (Util.find(Instance, ['name','default']) || '').trim();
@ -58,7 +54,6 @@ $(function () {
titleSuffix = window.location.hostname;
}
document.title = document.title + ' - ' + titleSuffix;
$('#placeholder').remove();
$body.append($main);

View File

@ -69,7 +69,7 @@ This means that using chainpad, clients can collaborate in realtime while using
## Datastore
While it's possible for messages to propogate using a [gossip protocol](https://en.wikipedia.org/wiki/Gossip_protocol) and therefore not rely on havinga centralized service for storing messages, it's possible for the members of a gossip network to [Netsplit](https://en.wikipedia.org/wiki/Netsplit).
While it's possible for messages to propagate using a [gossip protocol](https://en.wikipedia.org/wiki/Gossip_protocol) and therefore not rely on having a centralized service for storing messages, it's possible for the members of a gossip network to [Netsplit](https://en.wikipedia.org/wiki/Netsplit).
Chainpad currently has no mechanism for resolving such an event.
If a member of a session disconnects (as defined by not responding to a ping with a pong in a specified timeframe) any revisions that they make to their version of a document will be ignored.
@ -128,7 +128,7 @@ If an interface is interactive, which they typically are, then the user will lik
If the interface is a plain text editor, maintaining the location of the cursor while updating the contents of the editor is not especially difficult.
The process involves checking where the user's selection is located (possibly a start and end), determining whether the changes to the document occurred before or after those points, and updating the selection boundaries if necessary.
If the interface is a WYSIWYG editor, maintaining the location of the cursor is more difficult, as the number of characters changed in the authoratative document does not correspond directly to the number of characters which the user perceives.
If the interface is a WYSIWYG editor, maintaining the location of the cursor is more difficult, as the number of characters changed in the authoritative document does not correspond directly to the number of characters which the user perceives.
It is the application developers' responsibility to infer from the new content where the cursor should be, and to render the modified content in such a way that it does not disrupt user experience.
In the process of developing its [Realtime CKEditor](https://cryptpad.fr) XWiki Labs discovered that many of the [existing Javascript libraries](https://github.com/Matt-Esch/virtual-dom) for updating a **DOM** are very destructive, and replace elements completely once a difference is detected within the tree (when scanning left to right).
@ -213,7 +213,7 @@ The encryption scheme employed by CryptPad is a [symmetric encryption](https://e
Encryption is complex, and poorly understood by the majority of those who use it on a daily basis.
Pre-shared-keys are among the weakest possible cryptographic tools available today, however, few if any other encryption schemes scale to any number of users.
For our purposes, we would like our application to offerthe benefits of encryption without being any more difficult to use.
For our purposes, we would like our application to offer the benefits of encryption without being any more difficult to use.
Since the method of collaborating on any web resource typically involves sharing the URL, we use the hash of the URl to share the pre-shared-key.
Anything in a URL which follows a `#` is not sent to the server, meaning that our web app will store your users' messages without ever knowing their content.

View File

@ -255,6 +255,30 @@ server {
add_header Cross-Origin-Embedder-Policy require-corp;
}
location ~ ^/upload-blob {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' "${allowed_origins}";
add_header 'Access-Control-Allow-Credentials' true;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'application/octet-stream; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# These settings prevent both NGINX and the API server
# from setting the same headers and creating duplicates
proxy_hide_header Cross-Origin-Resource-Policy;
add_header Cross-Origin-Resource-Policy cross-origin;
proxy_hide_header Cross-Origin-Embedder-Policy;
add_header Cross-Origin-Embedder-Policy require-corp;
}
# Requests for blobs and blocks are now proxied to the API server
# This simplifies NGINX path configuration in the event they are being hosted in a non-standard location
# or with odd unexpected permissions. Serving blobs in this manner also means that it will be possible to

View File

@ -49,6 +49,7 @@ module.exports = [{
"_build",
"scripts/api/testapi.js",
"rollup.config.mjs",
"*/lucide.js"
],
}, ...compat.extends("eslint:recommended", "plugin:compat/recommended"), {
plugins: {

View File

@ -808,7 +808,7 @@ const handleGetHistoryRange = function (Env, Server, seq, userId, parsed) {
if (hash === untilHash || untilHash === 'NONE') { found = true; }
let then = hash === oldestKnownHash ? abort : readMore;
if (found) {
Server.send(userId, [0, HISTORY_KEEPER_ID, 'MSG', userId,
return void Server.send(userId, [0, HISTORY_KEEPER_ID, 'MSG', userId,
JSON.stringify(['HISTORY_RANGE', txid, parsed])], then);
}
return void readMore();

10
package-lock.json generated
View File

@ -22,7 +22,6 @@
"chainpad-server": "^5.2.4",
"ckeditor": "npm:ckeditor4@~4.22.1",
"codemirror": "^5.19.0",
"components-font-awesome": "^4.6.3",
"connect-gzip-static": "^4.2.1",
"cookie-parser": "^1.4.7",
"croppie": "^2.5.0",
@ -2273,15 +2272,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/components-font-awesome": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/components-font-awesome/-/components-font-awesome-4.7.0.tgz",
"integrity": "sha512-kwptdKxXBD4mMxQK5mv+5qzw0hIoxC6z30+obfZKJ4mEcaQRqXm7/S0Y87ENixy0GI77GyONPcEXvmVk2AulmA==",
"license": [
"MIT",
"OFL-1.1"
]
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",

View File

@ -25,7 +25,6 @@
"chainpad-server": "^5.2.4",
"ckeditor": "npm:ckeditor4@~4.22.1",
"codemirror": "^5.19.0",
"components-font-awesome": "^4.6.3",
"connect-gzip-static": "^4.2.1",
"cookie-parser": "^1.4.7",
"croppie": "^2.5.0",

View File

@ -20,7 +20,6 @@ Fse.rmSync(oldComponentsPath, { recursive: true, force: true });
"chainpad-netflux",
"ckeditor",
"codemirror",
"components-font-awesome",
"croppie",
"file-saver",
"hyper-json",

View File

@ -21,6 +21,17 @@
display: flex;
flex-flow: column;
font: @colortheme_app-font;
.cp-spinner {
svg {
animation: spin 10s linear infinite;
}
}
.cp-checkmark {
height: 1.2rem;
svg {
margin-left: @variables_icon_margin;
}
}
input, textarea, .cp-appblock {
&:focus-visible {
@ -83,6 +94,14 @@
width: ~"calc(100% - 5rem)";
padding-left: 0.5rem;
vertical-align: middle;
.cp-palette-color {
svg.lucide {
margin: 0;
}
}
.is-hidden {
display: none;
}
}
.cp-admin-color-preview {
@ -119,10 +138,14 @@
flex-flow: column;
}
.cp-broadcast-lang {
h4 {
margin-bottom: 0;
}
margin-left: 30px;
display: flex;
flex-flow: column;
align-items: baseline;
gap: 1rem;
&:not(:last-child) {
margin-bottom: @sidebar_base-margin;
}
@ -134,7 +157,7 @@
}
.cp-admin-support-state {
i {
svg {
margin-right: @sidebar_base-margin;
}
}

View File

@ -22,10 +22,10 @@ define([
'/api/instance',
'/lib/datepicker/flatpickr.js',
'/install/onboardscreen.js',
'/common/common-icons.js',
'css!/lib/datepicker/flatpickr.min.css',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'css!/components/components-font-awesome/css/font-awesome.min.css',
'less!/admin/app-admin.less',
], function(
$,
@ -47,6 +47,7 @@ define([
Instance,
Flatpickr,
Onboarding,
Icons
) {
var APP = window.APP = {};
@ -60,7 +61,7 @@ define([
// UNUSED-TRANSLATIONS:START
var categories = {
'general': { // Msg.admin_cat_general
icon: 'fa fa-user-o',
icon: 'user-account',
content: [
'instance-info-notice',
'name',
@ -71,21 +72,21 @@ define([
]
},
'customize': { // Msg.admin_cat_customize
icon: 'fa fa-paint-brush',
icon: 'customize',
content: [
'logo',
'color',
]
},
'admins': {
icon: 'fa fa-users',
icon: 'users',
content: [
'list-admins',
'add-admins'
]
},
'broadcast' : { // Msg.admin_cat_broadcast
icon: 'fa fa-bullhorn',
icon: 'broadcast',
content : [
'notice',
'maintenance',
@ -94,20 +95,20 @@ define([
]
},
'security': { // Msg.admin_cat_security
icon: 'fa fa-lock',
icon: 'lock',
content: [
'enableembeds',
'forcemfa',
]
},
'apps': { // Msg.admin_cat_apps
icon: 'fa fa-wrench',
icon: 'apps-settings',
content: [
'apps',
]
},
'users' : { // Msg.admin_cat_users
icon : 'fa fa-address-card-o',
icon : 'user-directory',
content : [
'registration',
'invitation',
@ -115,7 +116,7 @@ define([
]
},
'quota': { // Msg.admin_cat_quota
icon: 'fa fa-hdd-o',
icon: 'drive',
content: [
'defaultlimit',
'setlimit',
@ -123,7 +124,7 @@ define([
]
},
'database' : { // Msg.admin_cat_database
icon : 'fa fa-database',
icon : 'database',
content : [
'account-metadata',
'document-metadata',
@ -133,14 +134,14 @@ define([
]
},
'support' : { // Msg.admin_cat_support
icon : 'fa fa-ambulance',
icon : 'moderation',
content : [
'support-setup',
'support-team',
]
},
'stats' : { // Msg.admin_cat_stats
icon : 'fa fa-line-chart',
icon : 'stats',
content : [
'refresh-stats',
'uptime',
@ -152,7 +153,7 @@ define([
]
},
'performance' : { // Msg.admin_cat_performance
icon : 'fa fa-heartbeat',
icon : 'performance',
content : [
'refresh-performance',
'performance-profiling',
@ -161,7 +162,7 @@ define([
]
},
'network' : { // Msg.admin_cat_network
icon : 'fa fa-sitemap',
icon : 'network',
content : [
'update-available',
'checkup',
@ -223,7 +224,7 @@ define([
// Msg.admin_flushCacheHint, .admin_flushCacheTitle, .admin_flushCacheButton
sidebar.addItem('flush-cache', function (cb) {
var button = blocks.activeButton('primary', '',
var button = blocks.activeButton('primary', 'trash-full',
Messages.admin_flushCacheButton, done => {
flushCache(function (e, data) {
done(!!data);
@ -265,7 +266,7 @@ define([
const newRows = admins.map(obj => {
let { name, edPublic, hardcoded } = obj;
name = name || Messages.admin_admin;
let button = blocks.button('danger','fa-ban', Messages.admin_usersRemove);
let button = blocks.button('danger','restricted', Messages.admin_usersRemove);
let $b = $(button);
Util.onClickEnter($b, () => {
$b.prop('disabled', 'disabled');
@ -323,7 +324,7 @@ define([
placeholder: Messages.admin_accountMetadataPlaceholder
});
const keyLabel = blocks.labelledInput(Messages.admin_addKeyLabel, keyInput);
const keyButton = blocks.button('primary', 'fa-plus', Messages.tag_add);
const keyButton = blocks.button('primary', 'add', Messages.tag_add);
const keyForm = blocks.form([keyLabel], blocks.nav([keyButton]));
const $keyInput = $(keyInput).on('input', () => {
let val = $keyInput.val().trim();
@ -364,7 +365,7 @@ define([
large: true,
data: friends
}, function () {});
let addBtn = blocks.button('primary', 'fa-plus', Messages.tag_add);
let addBtn = blocks.button('primary', 'add', Messages.tag_add);
Util.onClickEnter($(addBtn), () => {
var $sel = $(contactsGrid.div).find('.cp-usergrid-user.cp-selected');
if (!$sel.length) {
@ -451,7 +452,6 @@ define([
h('td', value)
]));
};
return {
row: row,
table: table,
@ -504,7 +504,7 @@ define([
};
var copyToClipboard = (content) => {
var button = blocks.activeButton('primary','', Messages.copyToClipboard, () => {
var button = blocks.activeButton('primary','copy', Messages.copyToClipboard, () => {
var toCopy = JSON.stringify(content, null, 2);
Clipboard.copy(toCopy, (err) => {
if (err) { return UI.warn(Messages.error); }
@ -568,7 +568,7 @@ define([
row(Messages.admin_planName, data.plan || Messages.ui_none);
// plan note
row(Messages.admin_note, data.note || Messages.ui_none);
row(Messages.admin_creation_note, data.note || Messages.ui_none);
// storage limit
if (data.limit) { row(Messages.admin_planlimit, getPrettySize(data.limit)); }
@ -598,7 +598,7 @@ define([
let button, pre;
row(Messages.admin_accountReport, h('div', [
pre = h('pre', data.archiveReport_formatted),
button = blocks.activeButton('primary', '',
button = blocks.activeButton('primary', 'report',
Messages.admin_accountReportFull, () => {
$(button).remove();
$(pre).html(JSON.stringify(data.archiveReport, 0, 2));
@ -609,7 +609,7 @@ define([
// actions
if (data.archived && data.live === false && data.archiveReport) {
let button = blocks.activeButton('primary', '',
let button = blocks.activeButton('primary', 'restore',
Messages.ui_restore, () => {
justifyRestorationDialog('', reason => {
sframeCommand('RESTORE_ACCOUNT', {
@ -663,7 +663,7 @@ define([
};
// get full pin list
row(Messages.admin_getPinList, blocks.activeButton('primary', '', Messages.ui_fetch, getPins));
row(Messages.admin_getPinList, blocks.activeButton('primary', 'export', Messages.ui_fetch, getPins));
// get full pin history
var getHistoryHandler = (done) => {
@ -676,7 +676,7 @@ define([
UI.alert(history); // TODO NOT_IMPLEMENTED
});
};
var pinHistoryButton = blocks.activeButton('primary', '', Messages.ui_fetch, getHistoryHandler);
var pinHistoryButton = blocks.activeButton('primary', 'export', Messages.ui_fetch, getHistoryHandler);
disable($(pinHistoryButton));
// TODO pin history is not implemented
@ -705,7 +705,7 @@ define([
h('br'),
h('small', Messages.admin_archiveAccountInfo)
]);
let archiveAccountButton = blocks.activeButton('danger', '',
let archiveAccountButton = blocks.activeButton('danger', 'archive',
Messages.admin_archiveButton, archiveHandler, true);
row(archiveAccountLabel, archiveAccountButton);
@ -730,7 +730,6 @@ define([
}
row(reportContentLabel, copyToClipboard(data));
return tableObj.table;
};
@ -818,7 +817,7 @@ define([
});
var $input = $(input);
var button = blocks.activeButton('primary', '', Messages.settings_save, function (done) {
var button = blocks.activeButton('primary', 'save', Messages.settings_save, function (done) {
sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'ADMIN_DECREE',
data: ['SET_ADMIN_EMAIL', [$input.val().trim()]]
@ -850,7 +849,7 @@ define([
const appsToDisable = ApiConfig.appsToDisable || [];
const grid = Onboarding.createAppsGrid(appsToDisable);
var save = blocks.activeButton('primary', '', Messages.settings_save, function (done) {
var save = blocks.activeButton('primary', 'save', Messages.settings_save, function (done) {
sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'ADMIN_DECREE',
data: ['DISABLE_APPS', appsToDisable]
@ -894,7 +893,7 @@ define([
});
var $input = $(input);
var button = blocks.activeButton('primary', '', Messages.settings_save, function (done) {
var button = blocks.activeButton('primary', 'save', Messages.settings_save, function (done) {
sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'ADMIN_DECREE',
data: ['SET_INSTANCE_NAME', [$input.val().trim()]]
@ -929,7 +928,7 @@ define([
'aria-labelledby': 'cp-admin-description'
}, getInstanceString('instanceDescription'));
var $input = $(textarea);
var button = blocks.activeButton('primary', '', Messages.settings_save, function (done) {
var button = blocks.activeButton('primary', 'save', Messages.settings_save, function (done) {
sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'ADMIN_DECREE',
data: ['SET_INSTANCE_DESCRIPTION', [$input.val().trim()]]
@ -967,7 +966,7 @@ define([
});
var $input = $(input);
var button = blocks.activeButton('primary', '', Messages.settings_save, function (done) {
var button = blocks.activeButton('primary', 'save', Messages.settings_save, function (done) {
sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'ADMIN_DECREE',
data: ['SET_INSTANCE_JURISDICTION', [$input.val().trim()]]
@ -1005,7 +1004,7 @@ define([
});
var $input = $(input);
var button = blocks.activeButton('primary', '', Messages.settings_save, function (done) {
var button = blocks.activeButton('primary', 'save', Messages.settings_save, function (done) {
sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'ADMIN_DECREE',
data: ['SET_INSTANCE_NOTICE', [$input.val().trim()]]
@ -1049,8 +1048,8 @@ define([
};
redraw();
var upload = blocks.button('primary', '', Messages.admin_logoButton);
var remove = blocks.button('danger', '', Messages.admin_logoRemoveButton);
var upload = blocks.button('primary', 'upload', Messages.admin_logoButton);
var remove = blocks.button('danger', 'restore', Messages.admin_logoRemoveButton);
let spinnerBlock = blocks.inline();
let spinner = UI.makeSpinner($(spinnerBlock));
@ -1130,19 +1129,19 @@ define([
let preview = blocks.block([
blocks.block([
blocks.link('CryptPad', '/admin/#customize'),
blocks.button('primary', 'fa-floppy-o', Messages.settings_save),
blocks.button('secondary', 'fa-floppy-o', Messages.settings_save)
blocks.button('primary', 'save', Messages.settings_save),
blocks.button('secondary', 'save', Messages.settings_save)
], 'cp-admin-color-preview-dark cp-sidebar-flex-block'),
blocks.block([
blocks.link('CryptPad', '/admin/#customize'),
blocks.button('primary', 'fa-floppy-o', Messages.settings_save),
blocks.button('secondary', 'fa-floppy-o', Messages.settings_save)
blocks.button('primary', 'save', Messages.settings_save),
blocks.button('secondary', 'save', Messages.settings_save)
], 'cp-admin-color-preview-light cp-sidebar-flex-block')
], 'cp-admin-color-preview');
let labelPreview = blocks.labelledInput(Messages.admin_colorPreview, preview);
let $preview = $(preview);
let remove = blocks.button('danger', '', Messages.admin_logoRemoveButton);
let remove = blocks.button('danger', 'restore', Messages.admin_logoRemoveButton);
let $remove = $(remove);
let setColor = (color, done) => {
@ -1182,7 +1181,7 @@ define([
};
$input = $(input).on('change', onColorPicked).addClass('cp-admin-color-picker');
let btn = blocks.activeButton('primary', '',
let btn = blocks.activeButton('primary', 'color-palette',
Messages.admin_colorChange, (done) => {
let color = $input.val();
setColor(color, done);
@ -1282,7 +1281,7 @@ define([
// Msg.admin_invitationHint, admin_invitationTitle
sidebar.addItem('invitation', function(cb){
var button = blocks.button('primary', '', Messages.admin_invitationCreate);
var button = blocks.button('primary', 'link', Messages.admin_invitationCreate);
var $b = $(button);
var inputAlias = blocks.input({
@ -1296,7 +1295,7 @@ define([
var blockEmail = blocks.labelledInput(Messages.admin_invitationEmail, inputEmail);
var refreshInvite = function () {};
var refreshButton = blocks.button('secondary', '', Messages.oo_refresh);
var refreshButton = blocks.button('secondary', 'refresh', Messages.oo_refresh);
Util.onClickEnter($(refreshButton), function () {
refreshInvite();
});
@ -1358,7 +1357,7 @@ define([
var data = all[key];
var url = privateData.origin + Hash.hashToHref(key, 'register');
var del = blocks.button('danger', 'fa-trash', Messages.kanban_delete );
var del = blocks.button('danger', 'trash-full', Messages.kanban_delete );
var $del = $(del);
Util.onClickEnter($del, function () {
$del.attr('disabled', 'disabled');
@ -1368,7 +1367,7 @@ define([
deleteInvite(key);
});
});
var copy = blocks.button('secondary', 'fa-clipboard', Messages.admin_invitationCopy);
var copy = blocks.button('secondary', 'copy', Messages.admin_invitationCopy);
Util.onClickEnter($(copy), function () {
Clipboard.copy(url, () => {
UI.log(Messages.genericCopySuccess);
@ -1595,7 +1594,7 @@ define([
});
var ssoEnabled = ApiConfig.sso && ApiConfig.sso.list && ApiConfig.sso.list.length;
var button = blocks.button('primary', '', Messages.admin_usersAdd);
var button = blocks.button('primary', 'add', Messages.admin_usersAdd);
var $b = $(button);
var userAlias = blocks.input({ type: 'text' });
@ -1611,7 +1610,7 @@ define([
var blockUser = blocks.labelledInput(Messages.admin_usersBlock, userBlock);
var refreshUsers = function () {};
var refreshButton = blocks.button('secondary', '', Messages.oo_refresh);
var refreshButton = blocks.button('secondary', 'refresh', Messages.oo_refresh);
Util.onClickEnter($(refreshButton), function () {
refreshUsers();
});
@ -1688,7 +1687,7 @@ define([
Object.keys(all).sort(sort(all)).forEach(function (key) {
var data = all[key];
var editUser = () => {};
var del = blocks.button('danger', 'fa fa-trash', Messages.admin_usersRemove);
var del = blocks.button('danger', 'trash-full', Messages.admin_usersRemove);
var $del = $(del);
Util.onClickEnter($del, function () {
$del.attr('disabled', 'disabled');
@ -1698,7 +1697,7 @@ define([
deleteUser(key);
});
});
var edit = blocks.activeButton('secondary', 'fa fa-pencil',
var edit = blocks.activeButton('secondary', 'edit',
Messages.tag_edit, () => { editUser(); }, true);
let aliasCell = blocks.inline(data.alias);
@ -1714,8 +1713,8 @@ define([
var emailInput = h('input');
$(aliasInput).val(data.alias);
$(emailInput).val(data.email);
var save = blocks.button('primary', '', Messages.settings_save);
var cancel = blocks.button('secondary', '', Messages.cancel);
var save = blocks.button('primary', 'save', Messages.settings_save);
var cancel = blocks.button('secondary', 'close', Messages.cancel);
Util.onClickEnter($(save), function () {
var aliasVal = $(aliasInput).val().trim();
if (!aliasVal) { return void UI.warn(Messages.error); }
@ -1733,7 +1732,7 @@ define([
$actions.html('').append([save, cancel]);
};
let infoBtn = blocks.activeButton('primary', 'fa fa-database',
let infoBtn = blocks.activeButton('primary', 'database',
Messages.admin_diskUsageButton, function (done) {
getAccountData(key, (err, data) => {
done(!err);
@ -1810,7 +1809,7 @@ define([
value: _limitMB,
'aria-labelledby': 'cp-admin-defaultlimit'
});
var button = blocks.button('primary', '', Messages.admin_setlimitButton);
var button = blocks.button('primary', 'limit', Messages.admin_setlimitButton);
var nav = blocks.nav([button]);
var text = blocks.inline(Messages._getKey('admin_limit', [limit]));
@ -1866,8 +1865,8 @@ define([
var noteBlock = blocks.labelledInput(Messages.admin_limitSetNote, note);
var $note = $(note);
var remove = blocks.button('danger', '', Messages.fc_remove );
var set = blocks.button('primary', '', Messages.admin_setlimitButton);
var remove = blocks.button('danger', 'restricted', Messages.fc_remove );
var set = blocks.button('primary', 'limit', Messages.admin_setlimitButton);
var nav = blocks.nav([set, remove]);
var form = blocks.form([
@ -1984,7 +1983,7 @@ define([
var content = list.map(function (key) {
var user = obj[key];
var limit = getPrettySize(user.limit);
var infoButton = blocks.button('primary','', Messages.admin_diskUsageButton);
var infoButton = blocks.button('primary','report', Messages.admin_diskUsageButton);
Util.onClickEnter($(infoButton), function () {
getAccountData(key, (err, data) => {
if (err) { return void console.error(err); }
@ -2030,7 +2029,7 @@ define([
});
var $input = $(input);
var btn = blocks.button('primary', '', Messages.ui_generateReport);
var btn = blocks.button('primary', 'report', Messages.ui_generateReport);
var $btn = $(btn);
var nav = blocks.nav([btn]);
@ -2209,7 +2208,7 @@ define([
// actions
// get raw metadata history
var metadataHistoryButton = blocks.activeButton('primary', '', Messages.ui_fetch, done => {
var metadataHistoryButton = blocks.activeButton('primary', 'export', Messages.ui_fetch, done => {
sframeCommand('GET_METADATA_HISTORY', data.id, (err, result) => {
done(!err);
if (err) {
@ -2279,7 +2278,7 @@ define([
if (data.live && data.archived) {
let disableButtons;
let restoreButton = blocks.activeButton('danger', '', Messages.admin_unarchiveButton, function () {
let restoreButton = blocks.activeButton('danger', 'restore', Messages.admin_unarchiveButton, function () {
justifyRestorationDialog('', reason => {
nThen(function (w) {
sframeCommand('REMOVE_DOCUMENT', {
@ -2307,7 +2306,7 @@ define([
});
}, true);
let archiveButton = blocks.activeButton('danger', '',Messages.admin_archiveButton, function () {
let archiveButton = blocks.activeButton('danger', 'archive',Messages.admin_archiveButton, function () {
justifyArchivalDialog('', result => {
sframeCommand('ARCHIVE_DOCUMENT', {
id: data.id,
@ -2344,7 +2343,7 @@ define([
]));
} else if (data.live) {
// archive
var archiveDocumentButton = blocks.activeButton('danger', '' ,Messages.admin_archiveButton, function () {
var archiveDocumentButton = blocks.activeButton('danger', 'archive' ,Messages.admin_archiveButton, function () {
justifyArchivalDialog('', result => {
sframeCommand('ARCHIVE_DOCUMENT', {
id: data.id,
@ -2364,7 +2363,7 @@ define([
h('small', Messages.admin_archiveHint),
]));
} else if (data.archived) {
var restoreDocumentButton = blocks.activeButton('primary', '',Messages.admin_unarchiveButton, function () {
var restoreDocumentButton = blocks.activeButton('primary', 'restore',Messages.admin_unarchiveButton, function () {
justifyRestorationDialog('', reason => {
sframeCommand("RESTORE_ARCHIVED_DOCUMENT", {
id: data.id,
@ -2386,7 +2385,6 @@ define([
}
row(reportContentLabel, copyToClipboard(data));
return tableObj.table;
};
@ -2396,7 +2394,7 @@ define([
'aria-labelledby': 'cp-admin-documents-deletion'
});
const $textarea = $(textarea);
const archiveButton = blocks.activeButton('danger', '',
const archiveButton = blocks.activeButton('danger', 'archive',
Messages.admin_archiveButton, () => {
const $btn = $(archiveButton);
justifyArchivalDialog('', result => {
@ -2521,7 +2519,7 @@ define([
var results = blocks.inline([]);
var btn = blocks.button('primary', '', Messages.ui_generateReport);
var btn = blocks.button('primary', 'report', Messages.ui_generateReport);
var $btn = $(btn);
var nav = blocks.nav([btn]);
@ -2626,7 +2624,7 @@ define([
row(Messages.admin_totpRecoveryMethod, data.totp.recovery);
if (data.live) {
var archiveButton = blocks.activeButton('danger', '', Messages.ui_archive, function () {
var archiveButton = blocks.activeButton('danger', 'archive', Messages.ui_archive, function () {
justifyArchivalDialog('', reason => {
sframeCommand('ARCHIVE_BLOCK', {
key: data.key,
@ -2649,7 +2647,7 @@ define([
row(Messages.admin_channelPlaceholder, UI.getDestroyedPlaceholderMessage(data.placeholder, true));
}
if (data.archived && !data.live) {
var restoreButton = blocks.activeButton('danger', '', Messages.ui_restore, function () {
var restoreButton = blocks.activeButton('danger', 'restore', Messages.ui_restore, function () {
justifyRestorationDialog('', reason => {
sframeCommand('RESTORE_ARCHIVED_BLOCK', {
key: data.key,
@ -2681,7 +2679,7 @@ define([
value: ''
});
var $input = $(input);
var btn = blocks.button('primary', '', Messages.ui_generateReport);
var btn = blocks.button('primary', 'report', Messages.ui_generateReport);
var $btn = $(btn);
disable($btn);
@ -2772,7 +2770,7 @@ define([
if (!data.totpCheck || !data.totp.enabled) { return tableObj.table; }
// TOTP is enabled and the signature is correct: display "disable TOTP" button
var disableButton = blocks.button('danger', '', Messages.admin_totpDisableButton);
var disableButton = blocks.button('danger', 'restricted', Messages.admin_totpDisableButton);
UI.confirmButton(disableButton, { classes: 'btn-danger' }, () => {
sframeCommand('DISABLE_MFA', data.key, (err, res) => {
if (err) {
@ -2808,7 +2806,7 @@ define([
'aria-labelledby': 'cp-admin-totp-recovery'
});
var $input = $(textarea);
var btn = blocks.button('primary','', Messages.admin_totpDisable);
var btn = blocks.button('primary','restricted', Messages.admin_totpDisable);
var $btn = $(btn);
var results = blocks.inline([]);
@ -2878,7 +2876,7 @@ define([
var onRefreshStats = Util.mkEvent();
sidebar.addItem('refresh-stats', function(cb){
var btn = blocks.button('primary', '', Messages.oo_refresh);
var btn = blocks.button('primary', 'refresh', Messages.oo_refresh);
var $btn = $(btn);
Util.onClickEnter($btn, function () {
onRefreshStats.fire();
@ -2986,7 +2984,7 @@ define([
// Msg.admin_diskUsageHint, .admin_diskUsageTitle, .admin_diskUsageButton
sidebar.addItem('disk-usage', function(cb){
var button = blocks.button('primary', '', Messages.admin_diskUsageButton);
var button = blocks.button('primary', 'report', Messages.admin_diskUsageButton);
var $button = $(button);
var called = false;
var nav = blocks.nav([button]);
@ -3126,7 +3124,7 @@ define([
const state = blocks.block([], 'cp-admin-support-state');
const $state = $(state).appendTo($div);
const button = blocks.activeButton('primary', '',
const button = blocks.activeButton('primary', 'support',
Messages.admin_supportInit, done => {
generateSupportKey(moderatorsData, supportKey, (err) => {
done(!err);
@ -3134,7 +3132,7 @@ define([
});
const $button = $(button).appendTo($div);
const delButton = blocks.activeButton('danger', '',
const delButton = blocks.activeButton('danger', 'restricted',
Messages.admin_supportDelete, done => {
UI.confirm(Messages.admin_supportConfirm, function (yes) {
if (!yes) { return void done(false); }
@ -3153,7 +3151,7 @@ define([
});
const $delButton = $(delButton).hide();
const openButton = blocks.button('primary', '', Messages.admin_supportOpen);
const openButton = blocks.button('primary', 'external-link', Messages.admin_supportOpen);
const $openButton = $(openButton).hide();
Util.onClickEnter($(openButton), () => {
common.openURL('/moderation/');
@ -3170,12 +3168,12 @@ define([
$delButton.show();
$openButton.show();
return $state.append([
blocks.icon('fa-check'),
Icons.get('check'),
blocks.inline(Messages.admin_supportEnabled)
]);
}
$state.append([
blocks.icon('fa-times'),
Icons.get('close'),
blocks.inline(Messages.admin_supportDisabled)
]);
};
@ -3227,7 +3225,7 @@ define([
const drawModerators = () => {
if (!supportKey) {
const list = blocks.block([
blocks.icon('fa-times'),
Icons.get('close'),
blocks.inline(Messages.admin_supportDisabled)
], 'cp-admin-support-state');
$div.append(list);
@ -3266,7 +3264,7 @@ define([
data: friends
}, function () {});
let addBtn = blocks.button('primary', '', Messages.tag_add);
let addBtn = blocks.button('primary', 'add', Messages.tag_add);
Util.onClickEnter($(addBtn), () => {
var $sel = $(contactsGrid.div).find('.cp-usergrid-user.cp-selected');
nThen((waitFor) => {
@ -3399,7 +3397,7 @@ define([
};
// Msg.admin_maintenanceHint, admin_maintenanceTitle
sidebar.addItem('maintenance', function(cb){
var button = blocks.button('primary', '', Messages.admin_maintenanceButton);
var button = blocks.button('primary', 'maintenance', Messages.admin_maintenanceButton);
var $button = $(button);
var start = blocks.input({
type: 'date',
@ -3425,7 +3423,7 @@ define([
let send = function () {};
var refresh = getApi(function (Broadcast) {
$active.empty();
var removeButton = blocks.button('danger', '', Messages.admin_maintenanceCancel);
var removeButton = blocks.button('danger', 'close', Messages.admin_maintenanceCancel);
if (Broadcast && Broadcast.maintenance) {
var m = Broadcast.maintenance;
@ -3526,7 +3524,7 @@ define([
// Msg.admin_surveyHint, admin_surveyTitle
sidebar.addItem('survey', function(cb){
var button = blocks.button('primary', '', Messages.admin_surveyButton);
var button = blocks.button('primary', 'survey', Messages.admin_surveyButton);
var $button = $(button);
let nav = blocks.nav([button]);
let active = blocks.block([], 'cp-sidebar-flex-block');
@ -3541,7 +3539,7 @@ define([
let send = function () {};
var refresh = getApi(function (Broadcast) {
var removeButton = blocks.button('danger', '', Messages.admin_surveyCancel);
var removeButton = blocks.button('danger', 'restricted', Messages.admin_surveyCancel);
UI.confirmButton(removeButton, {
classes: 'btn-danger',
}, function () {
@ -3610,9 +3608,9 @@ define([
var form = blocks.block([], 'cp-admin-broadcast-form');
var $form = $(form);
var refresh = getApi(function(Broadcast) {
var button = blocks.button('primary', '', Messages.admin_broadcastButton);
var button = blocks.button('primary', 'send', Messages.admin_broadcastButton);
var $button = $(button);
var removeButton = blocks.button('danger', '', Messages.admin_broadcastCancel);
var removeButton = blocks.button('danger', 'close', Messages.admin_broadcastCancel);
var activeContent = Messages.admin_broadcastActive;
var active = blocks.block(blocks.inline(activeContent), 'cp-broadcast-active');
var $active = $(active);
@ -3712,7 +3710,7 @@ define([
// Add a textarea
var addLang = function (l) {
if ($container.find('.cp-broadcast-lang[data-lang="'+l+'"]').length) { return; }
var preview = blocks.button('secondary', '', Messages.broadcast_preview);
var preview = blocks.button('secondary', 'broadcast', Messages.broadcast_preview);
$(preview).click(function () {
onPreview(l);
});
@ -3838,7 +3836,7 @@ define([
var onRefreshPerformance = Util.mkEvent();
sidebar.addItem('refresh-performance', function(cb){
var btn = blocks.button('primary', '', Messages.oo_refresh);
var btn = blocks.button('primary', 'refresh', Messages.oo_refresh);
Util.onClickEnter($(btn), function () {
onRefreshPerformance.fire();
});
@ -3932,7 +3930,7 @@ define([
min: 0,
value: duration
});
var set = blocks.button('primary', '', Messages.admin_setDuration);
var set = blocks.button('primary', 'duration', Messages.admin_setDuration);
var label = blocks.labelledInput( Messages.ui_ms, newDuration);
var nav = blocks.nav([set]);
var form = blocks.form([
@ -3978,7 +3976,7 @@ define([
if (typeof(APP.instanceStatus.updateAvailable) === 'string') {
updateURL = APP.instanceStatus.updateAvailable;
}
var button = blocks.button('primary', '', Messages.admin_updateAvailableButton);
var button = blocks.button('primary', 'release-notes', Messages.admin_updateAvailableButton);
Util.onClickEnter($(button), function () {
common.openURL(updateURL);
});
@ -3988,7 +3986,7 @@ define([
// Messages.admin_checkupButton.admin_checkupHint.admin_checkupTitle
sidebar.addItem('checkup', function(cb){
var button = blocks.button('primary', '', Messages.admin_checkupButton);
var button = blocks.button('primary', 'checkup', Messages.admin_checkupButton);
Util.onClickEnter($(button), function () {
common.openURL('/checkup/');
});

View File

@ -38,12 +38,6 @@
.tui-full-calendar-confirm {
span, i {
padding: 0 0.5rem;
}
span {
padding-left: 0;
}
width: unset;
}
@ -171,7 +165,7 @@
color: @cryptpad_text_col;
border-radius: @variables_radius_L;
font-weight: normal;
.tui-full-calendar-icon:not(.tui-full-calendar-calendar-dot):not(.tui-full-calendar-dropdown-arrow):not(.tui-full-calendar-ic-checkbox):not(.fa-map-marker):not(.fa-align-left):not(.tui-full-calendar-dropdown-arrow-custom) {
.tui-full-calendar-icon:not(.tui-full-calendar-calendar-dot):not(.tui-full-calendar-dropdown-arrow):not(.tui-full-calendar-ic-checkbox):not(svg) {
display: none;
}
.tui-full-calendar-icon {
@ -190,13 +184,11 @@
display: flex;
align-items: center;
}
.fa-align-left {
margin-top: 4px;
}
&.tui-full-calendar-popup-detail-item-separate {
&>span {
display: flex;
width: 100%;
align-items: center;
}
.event-description {
display: block;
@ -227,7 +219,8 @@
.tui-full-calendar-section-button-save {
height: 40px;
.btn-primary { // Update button
margin-right: 0px;
margin-right: 0;
display: flex;
}
}
@ -363,6 +356,8 @@
button {
flex: 1;
margin: 0;
display: inline-flex;
justify-content: center;
}
}
.tui-full-calendar-popup-top-line {
@ -378,13 +373,13 @@
.cp-recurrence-label, .cp-notif-label {
color: @cryptpad_text_col;
margin-right: 1rem;
i {
margin-right: 0.5rem;
}
display: inline-flex;
align-items: center;
}
.cp-calendar-recurrence-container {
margin-top: 1rem;
display: inline-flex;
.cp-calendar-rec-translated-str {
margin-top: 0.5rem;
}
@ -400,6 +395,7 @@
}
& > div {
display: flex;
align-items: self-start;
}
.cp-calendar-notif-list-container {
width: 100%;
@ -441,8 +437,8 @@
margin-left: 0.3rem;
}
.btn-danger-outline {
display: block;
margin-right: 0px !important;
display: inline-flex;
align-items: center;
background-color: transparent;
color: @cryptpad_text_col;
border-color: @cryptpad_text_col;
@ -451,6 +447,9 @@
background-color: @cp_buttons-red;
border-color: @cp_buttons-red;
}
svg {
margin-right: 0;
}
}
}
}
@ -470,6 +469,7 @@
.cp-calendar-notif-form-buttons {
display: inline-flex;
align-items: center;
gap: 0.5rem;
& > input {
height: 40px;
}
@ -478,11 +478,15 @@
outline: @cryptpad_color_brand solid 2px;
}
}
.btn:last-of-type {
svg {
margin: 0;
}
}
}
// margin-bottom: 20px;
input {
width: 80px;
margin-right: 0.5rem;
}
}
}
@ -497,6 +501,9 @@
&:not(:hover) {
background: transparent;
}
svg {
margin: 0;
}
}
}
@ -612,6 +619,9 @@
background-color: fade(@cp_toolbar-fg, 50%);
cursor: pointer;
}
svg {
margin: 0;
}
}
}
@ -676,13 +686,18 @@
padding: 5px;
border-radius: @variables_radius;
background-color: @cp_sidebar-left-bg;
svg {
margin: 0;
}
&:not(.cp-unclickable) {
cursor: pointer;
}
.cp-dropdown-container {
position: initial;
.cp-dropdown-content{
svg {
margin-right: @variables_icon_margin;
}
@media screen and (max-width: 600px)
{
left: 50%;
@ -721,9 +736,6 @@
&:focus-visible {
outline: @variables_focus_style;
}
i {
margin-left: 5px;
}
}
}
&:not(:last-child) {
@ -786,10 +798,11 @@
.cp-calendar-notif-list-container, .cp-calendar-notif-form {
flex-direction: column;
align-items: unset !important;
gap: 1rem;
}
.cp-calendar-newevent {
i {
margin: 0 !important;
svg {
margin: 0;
}
span {
display: none;

View File

@ -33,6 +33,8 @@ define([
'/common/sframe-common-codemirror.js',
'cm/lib/codemirror',
'/common/common-icons.js',
'cm/addon/display/autorefresh',
'cm/addon/display/placeholder',
'cm/mode/gfm/gfm',
@ -41,7 +43,6 @@ define([
'css!/lib/calendar/tui-calendar.min.css',
'css!/components/codemirror/lib/codemirror.css',
'css!/components/codemirror/addon/dialog/dialog.css',
'css!/components/components-font-awesome/css/font-awesome.min.css',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'less!/calendar/app-calendar.less',
], function (
@ -69,7 +70,8 @@ define([
Share, Access, Properties,
diffMk,
SFCodeMirror,
CodeMirror
CodeMirror,
Icons
)
{
@ -408,12 +410,14 @@ define([
str = `<a href="${l}" id="${uid}">${str}</a>`;
APP.nextLocationUid = uid;
}
let location_icon = h('i.fa.fa-map-marker.tui-full-calendar-icon', { 'aria-hidden': true }, []);
let location_icon = Icons.get('calendar-location', { class: 'tui-full-calendar-icon'});
return `<div class="event-location"> ${location_icon.outerHTML} ${str} </div>`;
},
popupDetailBody: function(schedule) {
var str = schedule.body ? schedule.body.trim() : ""; //check also whitespace
delete APP.eventBody;
let description_icon = Icons.get('calendar-description', { class: 'tui-full-calendar-icon'});
if (!str) { return "";}
let description_icon = h('i.fa.fa-align-left.tui-full-calendar-icon', { 'aria-hidden': true }, []);
let description = diffMk.render(str, true);
@ -536,10 +540,7 @@ define([
if (!data.readOnly) {
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-pencil',
},
content: h('span', Messages.tag_edit),
content: h('span',[Icons.get('rename'), Messages.tag_edit]),
action: function (e) {
e.stopPropagation();
editCalendar(id);
@ -550,10 +551,7 @@ define([
if (APP.loggedIn && (data.teams.indexOf(1) === -1 || teamId === 0)) {
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-clone',
},
content: h('span', Messages.calendar_import),
content: h('span', [ Icons.get('copy'), Messages.calendar_import]),
action: function (e) {
e.stopPropagation();
importCalendar({
@ -572,10 +570,7 @@ define([
if (!data.restricted) {
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-shhare-alt',
},
content: h('span', Messages.shareButton),
content: h('span', [ Icons.get('share'), Messages.shareButton]),
action: function (e) {
e.stopPropagation();
var friends = common.getFriends();
@ -602,10 +597,7 @@ define([
});
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-lock',
},
content: h('span', Messages.accessButton),
content: h('span',[ Icons.get('lock'), Messages.accessButton]),
action: function (e) {
e.stopPropagation();
var cal = APP.calendars[id];
@ -634,10 +626,7 @@ define([
if (!data.readOnly) {
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-upload',
},
content: h('span', Messages.importButton),
content: h('span', Icons.get('upload'), Messages.importButton),
action: function () {
UIElements.importContent('text/calendar', function (res) {
Export.import(res, id, function (err, json) {
@ -660,10 +649,7 @@ define([
}
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-download',
},
content: h('span', Messages.exportButton),
content: h('span', Icons.get('download'), Messages.exportButton),
action: function (e) {
e.stopPropagation();
var cal = APP.calendars[id];
@ -705,10 +691,7 @@ define([
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-info-circle',
},
content: h('span', Messages.propertiesButton),
content: h('span', Icons.get('properties'), Messages.propertiesButton),
action: function (e) {
e.stopPropagation();
var cal = APP.calendars[id];
@ -733,10 +716,7 @@ define([
if (!cantRemove) {
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-trash-o',
},
content: h('span', Messages.poll_remove),
content: h('span', Icons.get('trash-full'), Messages.poll_remove),
action: function (e) {
e.stopPropagation();
var cal = APP.calendars[id];
@ -768,7 +748,8 @@ define([
text: '',
options: options, // Entries displayed in the menu
common: common,
buttonCls: 'btn btn-default fa fa-gear small cp-calendar-actions',
buttonCls: 'btn btn-default small cp-calendar-actions',
iconCls: 'settings',
buttonTitle: Messages.calendar_settings,
};
return UIElements.createDropdown(dropdownConfig)[0];
@ -777,7 +758,7 @@ define([
var data = APP.calendars[id];
var edit;
if (data.loading) {
edit = h('i.fa.fa-spinner.fa-spin', {'aria-hidden': 'true'});
edit = Icons.get('loading');
} else {
edit = makeEditDropdown(id, teamId);
}
@ -792,14 +773,17 @@ define([
h('span.cp-calendar-icon', {
style: 'background-color: '+md.color+';'
}, [
h('i.cp-calendar-active.fa.fa-calendar', {
Icons.get('calendar', {
class: 'cp-calendar-active',
style: 'color: '+getContrast(md.color)+';'
}),
h('i.cp-calendar-inactive.fa.fa-calendar-o')
Icons.get('calendar-inactive',{
class: 'cp-calendar-inactive'
})
]),
h('span.cp-calendar-title', md.title),
data.restricted ? h('i.fa.fa-ban', {title: Messages.fm_restricted, 'aria-hidden': 'true'}) :
(isReadOnly(id, teamId) ? h('i.fa.fa-eye', {title: Messages.readonly, 'aria-hidden': 'true'}) : undefined),
data.restricted ? Icons.get('restricted', {title: Messages.fm_restricte}) :
(isReadOnly(id, teamId) ? Icons.get('read-only', {title: Messages.readonly}) : undefined),
edit
]);
var $calendar = $(calendar).click(function () {
@ -858,7 +842,7 @@ define([
]));
makeCalendarEntry(tempCalendars[0], 0);
var importTemp = h('button', [
h('i.fa.fa-calendar-plus-o'),
Icons.get('calendar-add'),
h('span', Messages.calendar_import_temp),
h('span')
]);
@ -904,7 +888,7 @@ define([
// Add the new calendar button
var $newContainer = $(h('div.cp-calendar-entry.cp-ghost')).appendTo($contentContainer);
var newButton = h('button', [
h('i.fa.fa-calendar-plus-o', {'aria-hidden': 'true'}),
Icons.get('calendar-add'),
h('span', Messages.calendar_new),
h('span')
]);
@ -934,10 +918,10 @@ define([
// hide the calendars list and display a "show" button
if (APP.numberCalendars > 2 || totalCalendars > 2) {
var $showContainer = $(h('div.cp-calendar-entry.cp-ghost')).appendTo($calendars);
var iconClass = visible ? 'fa-eye-slash' : 'fa-eye';
var iconClass = visible ? 'password-hide' : 'password-reveal';
var buttonText = visible ? Messages.calendar_hide : Messages.calendar_show;
var showCalendarsBtn = h('button', [
h('i.fa.' + iconClass, {'aria-hidden': "true"}),
Icons.get(iconClass),
h('span.cp-calendar-title', buttonText),
h('span')
]);
@ -945,10 +929,12 @@ define([
$(showCalendarsBtn).click(() => {
visible = !visible;
$contentContainer.toggle(visible);
iconClass = visible ? 'fa-eye-slash' : 'fa-eye';
iconClass = visible ? 'password-hide' : 'password-reveal';
buttonText = visible ? Messages.calendar_hide : Messages.calendar_show;
$(showCalendarsBtn).find('i').attr('class', 'fa ' + iconClass).attr('aria-hidden', "true");
$(showCalendarsBtn).find('span').first().text(visible ? Messages.calendar_hide : Messages.calendar_show);
$(showCalendarsBtn).empty();
$(showCalendarsBtn).append(Icons.get(iconClass));
$(showCalendarsBtn).append(h('span.cp-calendar-title', visible ? Messages.calendar_hide : Messages.calendar_show));
$(showCalendarsBtn).append(h('span'));
}).appendTo($showContainer);
}
else {visible = true;}
@ -1332,7 +1318,7 @@ ICS ==> create a new event with the same UID and a RECURRENCE-ID field (with a v
APP.toolbar.$bottomR.append($block);
// New event button
var newEventBtn = h('button.cp-calendar-newevent', [
h('i.fa.fa-plus', {'aria-hidden': 'true'}),
Icons.get('add'),
h('span', Messages.calendar_newEvent)
]);
$(newEventBtn).click(function (e) {
@ -1340,10 +1326,10 @@ ICS ==> create a new event with the same UID and a RECURRENCE-ID field (with a v
cal.openCreationPopup({isAllDay:false});
}).appendTo(APP.toolbar.$bottomL);
// Change page
var goLeft = h('button.fa.fa-chevron-left',{'aria-label': Messages.goLeft});
var goRight = h('button.fa.fa-chevron-right', {'aria-label': Messages.goRight});
var goLeft = h('button',{'aria-label': Messages.goLeft}, [Icons.get('chevron-left')]);
var goRight = h('button', {'aria-label': Messages.goRight}, [Icons.get('chevron-right')]);
var goToday = h('button', Messages.calendar_today);
var goDate = h('button.fa.fa-calendar',{'aria-label': Messages.date});
var goDate = h('button',{'aria-label': Messages.date}, Icons.get('calendar'));
$(goLeft).click(function () {
cal.prev();
updateDateRange();
@ -1378,7 +1364,6 @@ ICS ==> create a new event with the same UID and a RECURRENCE-ID field (with a v
APP.toolbar.$bottomL.append(h('div.cp-calendar-browse', [
goLeft, goToday, goRight, goDate
]));
};
@ -1951,7 +1936,7 @@ APP.recurrenceRule = {
return h('div.cp-calendar-recurrence-container', [
h('span.cp-recurrence-label', [
h('i.fa.fa-repeat', {'aria-hidden':'true'}),
Icons.get('calendar-repeat'),
Messages.calendar_rec]),
$block[0],
translated
@ -2020,11 +2005,11 @@ APP.recurrenceRule = {
$number.attr('max', max);
if ($number.val() > max) { $number.val(max); }
});
var addNotif = h('button.btn.btn-primary-outline.fa.fa-plus');
var addNotif = h('button.btn.btn-primary-outline', Icons.get('add'));
var $list = $(h('div.cp-calendar-notif-list'));
var listContainer = h('div.cp-calendar-notif-list-container', [
h('span.cp-notif-label', [
h('i.fa.fa-bell', {'aria-hidden':'true'}),
Icons.get('calendar-reminder'),
Messages.calendar_notifications
]),
$list[0],
@ -2033,8 +2018,9 @@ APP.recurrenceRule = {
var addNotification = function (unit, value) {
var unitValue = (unit === "minutes") ? 1 : (unit === "hours" ? 60 : (60*24));
var del = h('button.btn.btn-danger-outline.small.fa.fa-times',
{'title': Messages.calendar_removeNotification}
var del = h('button.btn.btn-danger-outline.small',
{'title': Messages.calendar_removeNotification},
Icons.get('close')
);
var minutes = value * unitValue;
if ($list.find('[data-minutes="'+minutes+'"]').length) { return; }
@ -2200,11 +2186,11 @@ APP.recurrenceRule = {
// Customize creation/update popup
var onCalendarPopup = function (el) {
var $el = $(el);
$el.find('.tui-full-calendar-confirm').addClass('btn btn-primary').prepend(h('i.fa.fa-floppy-o', {'aria-hidden': 'true'}));
$el.find('.tui-full-calendar-confirm').addClass('btn btn-primary').prepend(Icons.get('save'));
$el.find('input').attr('autocomplete', 'off');
$el.find('.tui-full-calendar-dropdown-button').addClass('btn btn-secondary');
$el.find('.tui-full-calendar-dropdown-arrow').append(h('i.fa.fa-caret-down', {'aria-hidden': 'true'})).removeClass('tui-full-calendar-dropdown-arrow').addClass('tui-full-calendar-dropdown-arrow-custom');
$el.find('.tui-full-calendar-popup-close').addClass('btn btn-cancel fa fa-times cp-calendar-close').empty();
$el.find('.tui-full-calendar-popup-close').addClass('btn btn-cancel cp-calendar-close').empty();
$el.find('.tui-full-calendar-popup-close').append(Icons.get('close'));
$el.find('.tui-full-calendar-section-allday').attr('tabindex', 0);
$el.find('.cp-calendar-close').attr('tabindex',-1);
$el.find('.tui-full-calendar-section-allday').keydown(function (e) {
@ -2377,11 +2363,12 @@ APP.recurrenceRule = {
$el.attr('aria-describedby', 'tui-full-calendar-section-detail');
$el.find('.tui-full-calendar-popup-edit').addClass('btn btn-primary');
$el.find('.tui-full-calendar-popup-edit .tui-full-calendar-icon').addClass('fa fa-pencil').removeClass('tui-full-calendar-icon');
$el.find('.tui-full-calendar-popup-edit .tui-full-calendar-icon').append(Icons.get('edit'));
$el.find('.tui-full-calendar-popup-edit .tui-full-calendar-icon').removeClass('tui-full-calendar-icon');
$el.find('.tui-full-calendar-content').removeClass('tui-full-calendar-content');
var delButton = h('button.btn.btn-danger', [
h('i.fa.fa-trash', {'aria-hidden': 'true'}),
Icons.get('trash-full'),
h('span', Messages.kanban_delete)
]);
var $del = $el.find('.tui-full-calendar-popup-delete').hide();
@ -2431,7 +2418,7 @@ APP.recurrenceRule = {
// This is a recurring event, add button to stop recurrence now
var $b = $(h('button.btn.btn-default', [
h('i.fa.fa-times', {'aria-hidden': 'true'}),
Icons.get('close'),
h('span', Messages.calendar_rec_stop)
])).insertBefore($section);
UI.confirmButton($b[0], { classes: 'btn-default' }, function () {

View File

@ -48,9 +48,6 @@ html, body {
.pending {
border: 1px solid @cryptpad_text_col;
.fa {
margin-right: 20px;
}
}
.hidden {
display: none;

View File

@ -22,7 +22,7 @@ define([
var OS_HINTS = {
"Win": "Windows",
"Mac": "MacOS",
"Mac": "macOS",
"X11": "UNIX",
"Linux": "Linux",
};

View File

@ -21,14 +21,14 @@ define([
'/checkup/checkup-tools.js',
'/customize/application_config.js',
'/common/onlyoffice/current-version.js',
'/common/common-icons.js',
'/components/tweetnacl/nacl-fast.min.js',
'css!/components/components-font-awesome/css/font-awesome.min.css',
'less!/checkup/app-checkup.less',
], function ($, ApiConfig, Assertions, h, Messages, DomReady,
nThen, SFCommonO, Login, Hash, Util, Pinpad,
NetConfig, Block, Pages, Tools, AppConfig,
OOCurrentVersion) {
OOCurrentVersion, Icons) {
window.CHECKUP_MAIN_LOADED = true;
var Assert = Assertions();
@ -1649,6 +1649,27 @@ define([
});
});
// confirm that POST requests to the `/upload-blob` endpoint
// return something other than a 404, which would probably indicate
// a reverse proxy misconfiguration
assert(function (cb, msg) {
msg.appendChild(h('span', [
`The server returned a 404 error when attempting to reach the `,
h('code', `/upload-blob`),
` endpoint. This can be caused by an incorrectly configured reverse proxy.`,
]));
fetch('/upload-blob', {
method: 'POST',
}).then(res => {
console.log({ upload_fetch_response: res });
cb(res.status !== 404);
}).catch(err => {
console.error(err);
cb(false);
});
});
var row = function (cells) {
return h('tr', cells.map(function (cell) {
return h('td', cell);
@ -1816,7 +1837,7 @@ define([
$progress.html('').append(h('div.report.pending.summary', [
versionStatement(),
h('p', [
h('i.fa.fa-spinner.fa-pulse'),
Icons.get('loading'),
h('span', Messages._getKey('assert_numberOfTestsCompleted', [completed, total]))
])
]));

View File

@ -8,7 +8,6 @@ define([
'/checkup/checkup-tools.js',
'/components/tweetnacl/nacl-fast.min.js',
'css!/components/components-font-awesome/css/font-awesome.min.css',
'less!/checkup/app-checkup.less',
], function ($, Util, Tools) {
var postMessage = function (content) {

View File

@ -75,14 +75,6 @@
.markdown_main();
.markdown_cryptpad();
.todo-list-item {
.fa {
&.fa-check-square {
font-size: 15px;
margin-top: 5px;
}
}
}
.cp-app-code-preview-empty {
display: none;

View File

@ -88,7 +88,7 @@ define([
text: Messages.toolbar_theme,
options: [],
common: framework._.sfCommon,
iconCls: 'cptools cptools-palette'
iconCls: 'color-palette'
});
framework._.toolbar.$theme = $drawer.find('ul.cp-dropdown-content');
framework._.toolbar.$bottomL.append($drawer);
@ -99,7 +99,7 @@ define([
var $showAuthorColorsButton = framework._.sfCommon.createButton('', true, {
text: Messages.cba_hide,
name: 'authormarks',
icon: 'fa-paint-brush',
icon: 'customize',
}).hide();
var $showAuthorColors = UIElements.getEntryFromButton($showAuthorColorsButton).hide();
$showAuthorColors.find('span').addClass('cp-toolbar-name cp-toolbar-drawer-element');
@ -421,7 +421,7 @@ define([
var mkColorByAuthor = function (framework, markers) {
var common = framework._.sfCommon;
var $cbaButton = framework._.sfCommon.createButton(null, true, {
icon: 'fa-paint-brush',
icon: 'customize',
text: Messages.cba_title,
name: 'cba'
}, function () {

View File

@ -194,32 +194,32 @@ const factory = () => {
// Customize the icon used for each application.
// You can update the colors by making a copy of /customize.dist/src/less2/include/colortheme.less
AppConfig.applicationsIcon = {
file: 'cptools-file',
fileupload: 'cptools-file-upload',
folderupload: 'cptools-folder-upload',
link: 'fa-link',
pad: 'cptools-richtext',
code: 'cptools-code',
slide: 'cptools-slide',
poll: 'cptools-poll',
form: 'cptools-poll',
whiteboard: 'cptools-whiteboard',
diagram: 'cptools-diagram',
todo: 'cptools-todo',
contacts: 'fa-address-book',
calendar: 'fa-calendar',
kanban: 'cptools-kanban',
doc: 'fa-file-word-o',
presentation: 'fa-file-powerpoint-o',
sheet: 'fa-file-excel-o',
drive: 'fa-hdd-o',
teams: 'fa-users',
admin: 'fa-gears',
settings: 'fa-gear',
moderation: 'fa-ambulance',
profile: 'fa-user-circle',
support: 'fa-life-ring',
accounts: 'fa-ticket'
file: 'file',
fileupload: 'drive-upload-file',
folderupload: 'drive-upload-folder',
link: 'link',
pad: 'pad',
code: 'code-pad',
slide: 'slide',
poll: 'poll',
form: 'form',
whiteboard: 'whiteboard',
diagram: 'diagram',
todo: 'file',
contacts: 'contacts',
calendar: 'calendar',
kanban: 'kanban',
doc: 'doc',
presentation: 'presentation',
sheet: 'sheet',
drive: 'drive',
teams: 'teams',
admin: 'administration',
settings: 'settings',
moderation: 'moderation',
profile: 'user-profile',
support: 'support',
accounts: 'subscribe'
};
// Ability to create owned pads and expiring pads through a new pad creation screen.

296
www/common/common-icons.js Normal file
View File

@ -0,0 +1,296 @@
define([
'/common/hyperscript.js',
'/customize/lucide.js'
], function (h, Lucide) {
const Icons = {};
const map = {
// Drive
"homepage": "house",
"drive": "hard-drive",
"search": "search",
"drive-shared-folder": "folder-users",
"drive-upload-file": "file-up",
"drive-upload-folder": "folder-up",
"file": "file",
"drive-recent": "clock",
"drive-password-document": "file-lock",
"folder": "folder",
"folder-open": "folder-open",
"folder-nocolor": "folder-minus",
"folder-check": "folder-check",
"file-template": "file-cog",
"file-pad": "file-text",
"grid": "layout-grid",
"list": "list",
"document-owner": "id-card-lanyard",
"burn-drive": "ban",
// Teams
"teams": "users-round",
"promote": "chevrons-up",
"downgrade": "chevrons-down",
// CryptPad apps
// Pad
"pad": "file-text",
"pad-settings": "settings",
"expand-pad": "maximize-2",
"shrink-pad": "minimize-2",
"slide": "cp-file-slide",
"poll": "file-chart-column-increasing",
// Form
"form": "file-chart-column-increasing",
"form-responses": "chart-no-axes-combined",
"form-text": "minus",
"form-paragraph": "text",
"form-grid-radio": "cp-form-grid-radio",
"form-grid-check": "cp-form-grid-check",
"form-list-check": "list-checks",
"form-list-radio": "list",
"form-list-ordered": "list-ordered",
"form-poll": "cp-form-poll",
"form-page-break": "cp-form-page-break",
"form-conditional": "cp-form-conditional",
"form-poll-maybe": "cp-form-poll-maybe",
"form-poll-switch": "arrow-right-left",
// Whiteboard
"whiteboard": "cp-file-whiteboard",
// Diagram
"diagram": "cp-file-diagram",
// Code
"code-pad": "file-code",
"todo": "file",
// Kanban
"kanban": "cp-file-kanban",
"kanban-tags": "tags",
"kanban-minimize": "minus",
"kanban-maximize": "menu",
"touch-mode": "hand",
"kanban-add-top": "cp-kanban-add-top",
"kanban-add-bottom": "cp-kanban-add-bottom",
"delete-token": "x",
// Doc
"doc": "cp-file-oo-document",
// Sheet
"sheet": "cp-file-oo-sheet",
// Presentation
"presentation": "cp-file-oo-presentation",
// Actions
"add": "plus",
"check": "check",
"filter": "list-filter-plus",
"share": "share-2",
"download": "hard-drive-download",
"destroy": "shredder",
"donate": "hand-coins",
"send": "send",
"cloud-upload": "cloud-upload",
"print": "printer",
"play": "circle-play",
"grip-move": "grip-horizontal",
"grip-move-vertical": "grip-vertical",
"refresh": "refresh-ccw",
"select": "move",
// General
"trash-empty": "trash",
"trash-full": "trash-2",
"properties": "info",
"documentation": "book-open-text",
"language": "languages",
"link": "link",
"external-link": "external-link",
"chevron-left": "chevron-left",
"chevron-right": "chevron-right",
"chevron-down": "chevron-down",
"chevron-up": "chevron-up",
"copy": "copy",
"close": "x",
"square": "square",
"timer": "hourglass",
"map-pin": "map-pin",
"pin": "pin",
"checked-box": "square-check",
"unchecked-box": "square",
"table": "table",
"inbox": "inbox",
"server": "server",
"minus": "minus",
"alert": "triangle-alert",
"sort-amount-desc": "arrow-down-wide-narrow",
"announcement": "megaphone",
"reply": "reply",
"comment": "message-square-text",
"file-image": "file-image",
"snapshot": "camera",
"certificate": "shield-check",
"circle-question": "circle-question-mark",
"list-ol": "list-ordered",
"list-todo": "list-todo",
"ellipsis-vertical": "ellipsis-vertical",
"ellipsis-horizontal": 'ellipsis',
"toolbar-insert": "image-plus",
"features": "info",
"report": "clipboard-plus",
"limit": "settings-2",
"duration": "timer-reset",
"checkup": "square-activity",
// Login + Register
"login": "log-in",
"logout": "log-out",
"logout-everywhere": "unplug",
"register": "user-round-plus",
// User
"user-profile": "circle-user-round",
"users": "users-round",
"secret-user": "venetian-mask",
"user-account": "user",
// History
"history": "history",
"history-prev": 'arrow-left',
"history-next": "arrow-right",
"history-fast-next": "arrow-right-to-line",
"history-fast-prev": "arrow-left-to-line",
"history-timeline-position": "chevron-down",
"history-restore": "archive-restore",
"remove-history": "eraser",
"history-moderation": "archive",
"archive": "archive",
// Calendar
"calendar": "calendar-days",
"calendar-inactive": "calendar",
"calendar-add": "calendar-plus-2",
"calendar-repeat": "calendar-sync",
"calendar-reminder": "bell-ring",
"calendar-location": "map-pin",
"calendar-description": "align-justify",
"closing-date": "calendar-x",
// Contacts
"contacts": "contact-round",
"contacts-book": "book-user",
"unfriend": "user-round-x",
"add-friend": "user-round-plus",
"sort-asc": "chevron-down",
"sort-desc": "chevron-up",
"access": "lock-open",
"rename": "pen-line",
"color-palette": "palette",
"customize": "brush",
"upload": "hard-drive-upload",
"read-only": "pen-off",
"preview": "eye",
"tag": "hash",
"password-reveal": "eye",
"password-hide": "eye-closed",
"password-change": "rotate-ccw-key",
"arrow-left": "arrow-left",
"arrow-up": "arrow-up",
"code": "code-xml",
"qr-code": "qr-code",
"lock": "lock",
"unlocked": "lock-open",
"help": "info",
"expand-menu": "chevron-right",
"location": "navigation",
"collapse": "square-minus",
"expand": "square-plus",
"expire": "clock-alert",
"restricted": "ban",
"renamed": "flag",
"restore": "rotate-cw",
"all": "menu",
"chat": "message-circle-more",
"comments": "message-square-more",
"mail": "mail",
"upload-avatar": "image-up",
"edit": "pencil",
"save": "save",
"loading": "loader",
"notification" : "bell",
"notifications" : "notebook-text",
"mute": "bell-off",
"cursor": "text-cursor",
"import": "upload",
"import-template": "file-up",
"export": "download",
// Settings + Admin
"settings": "settings",
"apps-settings": "wrench",
"administration": "monitor-cog",
"support": "life-buoy",
"moderation": "ambulance",
"broadcast": "radio",
"support-ticket": "mail",
"user-directory": "id-card",
"database": "database",
"stats": "chart-line",
"performance": "heart-pulse",
"network": "network",
"survey": "graduation-cap",
// Markdown toolbar
"undo": "undo",
"redo": "redo",
"type": "type",
"clear-canvas": "brush-cleaning",
"key": "key",
"bold": "bold",
"italic": "italic",
"heading": "heading",
"strikethrough": "strikethrough",
"quote": "quote",
"toc": "newspaper",
"embed": "image-plus",
// Badges
"badge-admin": "star",
"badge-moderator": "life-buoy",
"badge-premium": "ticket-check",
"badge-error": "circle-alert",
// Other
"maintenance": "construction",
"release-notes": "notepad-text"
};
Icons.add = (newIcons) => {
Object.keys(newIcons).forEach(k => {
map[k] = newIcons[k];
});
};
Icons.get = (name, attrs = {}) => {
if (!map[name]) {
alert(`Invalid icon: ${name}`);
// throw new Error(`Invalid icon: ${name}`);
}
attrs['data-lucide'] = map[name];
attrs['aria-hidden'] = "true";
return h('i', attrs);
};
if (!window.CP_Lucide_observer) {
window.CP_Lucide_observer = true;
Lucide.createIcons();
const observer = new MutationObserver((mutations) => {
let found = mutations.some((mutation) => {
for (var i = 0; i < mutation.addedNodes.length; i++) {
let added = mutation.addedNodes[i];
if (added.tagName === "svg") { continue; }
if (added?.hasAttribute?.('data-lucide')) {
return true;
}
if (added?.querySelector?.(':not(svg)[data-lucide]')) {
return true;
}
}
});
if (found) { Lucide.createIcons(); }
});
observer.observe(document.body, {
attributes: true,
childList: true,
characterData: false,
subtree: true
});
}
return Icons;
});

View File

@ -22,6 +22,7 @@ define([
'/lib/tippy/tippy.min.js',
'/common/hyperscript.js',
'/customize/loading.js',
'/common/common-icons.js',
//'/common/test.js',
'/lib/jquery-ui/jquery-ui.min.js', // autocomplete widget
@ -29,7 +30,7 @@ define([
'css!/lib/tippy/tippy.css',
'css!/lib/jquery-ui/jquery-ui.min.css'
], function ($, Messages, Util, Hash, Notifier, AppConfig,
Alertify, Tippy, h, Loading/*, Test */) {
Alertify, Tippy, h, Loading, Icons /*, Test */) {
var UI = {};
/*
@ -248,7 +249,7 @@ define([
var title = h('span.alertify-tabs-title'+ (tab.disabled ? '.disabled' : ''), h('span.tab-title-text',{id: 'cp-tab-' + tab.title.toLowerCase(), 'aria-hidden':"true"}, tab.title));
$(title).attr('tabindex', '0');
if (tab.icon) {
var icon = h('i', {class: tab.icon, 'aria-labelledby': 'cp-tab-' + tab.title.toLowerCase()});
var icon = Icons.get(tab.icon, {'aria-labelledby': 'cp-tab-' + tab.title.toLowerCase()});
$(title).prepend(' ').prepend(icon);
}
@ -313,7 +314,7 @@ define([
$input.attr('tabindex', 0);
var $button = $(h('button.btn.btn-primary', [
h('i.fa.fa-plus'),
Icons.get('add'),
h('span', Messages.tag_add)
]));
@ -338,7 +339,7 @@ define([
if (!$tokens.length) {
$container.prepend(h('span.tokenfield-empty', Messages.kanban_noTags));
}
$tokens.find('.close').attr('tabindex', 0).on('keydown', e => {
$tokens.find('.close').attr('tabindex', 0).empty().append(Icons.get('delete-token')).on('keydown', e => {
e.stopPropagation();
});
$tokens.find('.token-label').attr('tabindex', 0).on('keydown', function (e) {
@ -520,7 +521,7 @@ define([
buttons.forEach(function (b) {
if (!b.name || !b.onClick) { return; }
var button = h('button', { 'class': b.className || '' }, [
b.iconClass ? h('i' + b.iconClass) : undefined,
b.iconClass ? Icons.get(b.iconClass): undefined,
b.name
]);
button.classList.add('btn');
@ -635,7 +636,6 @@ define([
});
addTabListener(frame);
return frame;
};
@ -661,9 +661,12 @@ define([
};
$blockContainer.html('').appendTo($body);
var $block = $(h('div.cp-modal')).appendTo($blockContainer);
$(h('span.cp-modal-close.fa.fa-times', {
title: Messages.filePicker_close
})).click(hide).appendTo($block);
$(h('span',[
Icons.get('close', {
'class': 'cp-modal-close',
'title': Messages.filePicker_close
}),
])).click(hide).appendTo($block);
$body.click(hide);
$block.click(function (e) {
e.stopPropagation();
@ -673,6 +676,7 @@ define([
hide();
}
});
return {
$modal: $blockContainer,
show: function () {
@ -848,7 +852,6 @@ define([
document.body.appendChild(frame);
addTabListener(frame);
listener = listenForKeys(function () {
// Only trigger OK if cancel is not focused
if (document.activeElement === $cancel[0]) {
@ -996,12 +999,16 @@ define([
}, opts);
var input = h('input.cp-password-input', attributes);
var eye = h('span.fa.fa-eye.cp-password-reveal', {
let passwordReveal = Icons.get('password-reveal');
let passwordHide = Icons.get('password-hide');
var eye = h('span.cp-password-reveal', {
tabindex: 0,
role: 'button',
'aria-label': Messages.show_password,
'aria-pressed': 'false'
});
},[
passwordReveal
]);
var $eye = $(eye);
var $input = $(input);
@ -1020,15 +1027,15 @@ define([
} else {
Util.onClickEnter($eye, function (e) {
e.stopPropagation();
if ($eye.hasClass('fa-eye')) {
$input.prop('type', 'text');
$input.focus();
$eye.removeClass('fa-eye').addClass('fa-eye-slash').attr('aria-label', Messages.hide_password).attr('aria-pressed', 'true');
return;
if ($input.prop('type') === 'password') {
$input.prop('type', 'text').focus();
$eye.empty().append(passwordHide);
$eye.attr('aria-label', Messages.hide_password).attr('aria-pressed', 'true');
} else {
$input.prop('type', 'password').focus();
$eye.empty().append(passwordReveal);
$eye.attr('aria-label', Messages.show_password).attr('aria-pressed', 'false');
}
$input.prop('type', 'password');
$input.focus();
$eye.removeClass('fa-eye-slash').addClass('fa-eye').attr('aria-label', Messages.show_password).attr('aria-pressed', 'false');
});
}
@ -1039,7 +1046,7 @@ define([
};
UI.createHelper = function (href, text) {
var q = h('a.fa.fa-question-circle', {
var q = h('a', {
'data-cptippy-html': true,
style: 'text-decoration: none !important;',
title: text,
@ -1047,35 +1054,10 @@ define([
target: "_blank",
'data-tippy-placement': "right",
'aria-label': text
});
}, Icons.get('circle-question'));
return q;
};
/*
* spinner
*/
UI.spinner = function (parent) {
var $target = $('<span>', {
'class': 'fa fa-circle-o-notch fa-spin fa-4x fa-fw',
}).hide();
$(parent).append($target);
return {
show: function () {
$target.css('display', 'inline');
return this;
},
hide: function () {
$target.hide();
return this;
},
get: function () {
return $target;
},
};
};
var LOADING = 'cp-loading';
UI.addLoadingScreen = function (config) {
@ -1195,32 +1177,30 @@ define([
};
UI.getNewIcon = function (type) {
var icon = h('i.fa.fa-file-text-o');
var icon = Icons.get('file');
if (AppConfig.applicationsIcon && AppConfig.applicationsIcon[type]) {
icon = AppConfig.applicationsIcon[type];
var font = icon.indexOf('cptools') === 0 ? 'cptools' : 'fa';
if (type === 'fileupload') { type = 'file'; }
if (type === 'folderupload') { type = 'file'; }
if (type === 'link') { type = 'drive'; }
var appClass = ' cp-icon cp-icon-color-'+type;
icon = h('i', {'class': font + ' ' + icon + appClass});
icon = Icons.get(icon, {'class': appClass});
}
return icon;
};
var $defaultIcon = $('<span>', {"class": "fa fa-file-text-o"});
var $defaultIcon = $(Icons.get('file'));
UI.getIcon = function (type) {
var $icon = $defaultIcon.clone();
if (AppConfig.applicationsIcon && AppConfig.applicationsIcon[type]) {
var icon = AppConfig.applicationsIcon[type];
var font = icon.indexOf('cptools') === 0 ? 'cptools' : 'fa';
if (type === 'fileupload') { type = 'file'; }
if (type === 'folderupload') { type = 'file'; }
if (type === 'link') { type = 'drive'; }
var appClass = ' cp-icon cp-icon-color-'+type;
$icon = $('<span>', {'class': font + ' ' + icon + appClass});
$icon = Icons.get(icon, {'class': appClass});
}
return $icon;
@ -1448,7 +1428,7 @@ define([
opts = opts || {};
var dontShowAgain = h('div.cp-corner-dontshow', [
h('span.fa.fa-times'),
Icons.get('close'),
Messages.dontShowAgain
]);
@ -1516,10 +1496,9 @@ define([
delete: deletePopup
};
};
UI.makeSpinner = function ($container) {
var $ok = $('<span>', {'class': 'fa fa-check', title: Messages.saved}).hide();
var $spinner = $('<span>', {'class': 'fa fa-spinner fa-pulse'}).hide();
var $okWrap = $('<span>', {class: "cp-ok"}).hide().append(Icons.get('check', { title: Messages.saved }));
var $spinWrap = $('<span>', {class: "cp-spinner"}).hide().append(Icons.get('loading'));
var state = false;
var to;
@ -1527,34 +1506,34 @@ define([
var spin = function () {
clearTimeout(to);
state = true;
$ok.hide();
$spinner.show();
$okWrap.hide();
$spinWrap.show();
};
var hide = function () {
clearTimeout(to);
state = false;
$ok.hide();
$spinner.hide();
$okWrap.hide();
$spinWrap.hide();
};
var done = function () {
clearTimeout(to);
state = false;
$ok.show();
$spinner.hide();
$okWrap.show();
$spinWrap.hide();
to = setTimeout(function () {
$ok.hide();
$okWrap.hide();
}, 500);
};
if ($container && $container.append) {
$container.append($ok);
$container.append($spinner);
$container.append($okWrap);
$container.append($spinWrap);
}
return {
getState: function () { return state; },
ok: $ok[0],
spinner: $spinner[0],
ok: $okWrap[0],
spinner: $spinWrap[0],
spin: spin,
hide: hide,
done: done

View File

@ -11,7 +11,6 @@ define([
'/components/chainpad/chainpad.dist.js',
'/common/common-realtime.js',
'/common/common-constants.js',
'/common/common-interface.js',
'/common/common-feedback.js',
'/common/outer/local-store.js',
'/customize/messages.js',
@ -22,7 +21,7 @@ define([
'/components/tweetnacl/nacl-fast.min.js',
'/components/scrypt-async/scrypt-async.min.js', // better load speed
], function (Listmap, Crypto, Util, NetConfig, Cred, ChainPad, Realtime, Constants, UI,
], function (Listmap, Crypto, Util, NetConfig, Cred, ChainPad, Realtime, Constants,
Feedback, LocalStore, Messages, nThen, Block, Hash, ServerCommand) {
var Nacl = window.nacl;

View File

@ -21,10 +21,10 @@ define([
'/common/inner/invitation.js',
'/common/visible.js',
'/common/pad-types.js',
'/common/common-icons.js',
'css!/customize/fonts/cptools/style.css',
], function ($, Config, Broadcast, Util, Hash, Language, UI, Constants, Feedback, h, Clipboard,
Messages, AppConfig, Pages, NThen, InviteInner, Visible, PadTypes) {
Messages, AppConfig, Pages, NThen, InviteInner, Visible, PadTypes, Icons) {
var UIElements = {};
var urlArgs = Config.requireConf.urlArgs;
@ -172,8 +172,8 @@ define([
common.displayAvatar($(avatar), data.avatar, name, Util.noop, data.uid);
var removeBtn, el;
if (config.remove) {
removeBtn = h('span.fa.fa-times');
$(removeBtn).attr('tabindex', '0');
removeBtn = h('span',[Icons.get('close')]);
$(removeBtn).attr('tabindex', '0').attr('role', 'button');
$(removeBtn).on('click keydown', function(event) {
if (event.type === 'click' || (event.type === 'keydown' && event.key === 'Enter')) {
event.preventDefault();
@ -317,6 +317,7 @@ define([
buttons: [{
className: 'secondary',
name: Messages.share_copyProfileLink,
iconClass: 'copy',
onClick: function () {
var profile = data.profile ? (origin + '/profile/#' + data.profile) : '';
Clipboard.copy(profile, (err) => {
@ -383,6 +384,7 @@ define([
$div.append(list.div);
var contactsButtons = [{
className: 'primary',
iconClass: 'send',
name: Messages.team_inviteModalButton,
onClick: function () {
var $sel = $div.find('.cp-usergrid-user.cp-selected');
@ -432,7 +434,7 @@ define([
var linkForm, linkSpin, linkResult, linkUses, linkRole;
var linkWarning;
// Invite from link
var dismissButton = h('span.fa.fa-times');
var dismissButton = h('span', Icons.get('close'));
var roleViewer = UI.createRadio('cp-team-role', 'cp-team-role-viewer',
Messages.team_viewers, true, {
@ -459,11 +461,11 @@ define([
h('br'),
h('div.cp-teams-invite-block', [
h('span', Messages.team_inviteLinkSetPassword),
h('a.cp-teams-help.fa.fa-question-circle', {
h('a.cp-teams-help', {
href: Pages.localizeDocsLink('https://docs.cryptpad.org/en/user_guide/security.html#passwords-for-documents-and-folders'),
target: "_blank",
'data-tippy-placement': "right"
})
}, Icons.get('circle-question'))
]),
linkPassword = UI.passwordInput({
id: 'cp-teams-invite-password',
@ -494,7 +496,7 @@ define([
linkSpin = h('div.cp-teams-invite-spinner', {
style: 'display: none;'
}, [
h('i.fa.fa-spinner.fa-spin'),
Icons.get('loading'),
h('span', Messages.team_inviteLinkLoading)
]),
linkResult = h('div', {
@ -597,6 +599,7 @@ define([
}, {
className: 'primary cp-teams-invite-create',
name: Messages.team_inviteLinkCreate,
iconClass: 'link',
onClick: function () {
return process();
},
@ -604,6 +607,7 @@ define([
}, {
className: 'primary cp-teams-invite-copy',
name: Messages.team_inviteLinkCopy,
iconClass: 'copy',
onClick: function () {
if (!href) { return; }
Clipboard.copy(href, (err) => {
@ -621,12 +625,12 @@ define([
// Create modal
var tabs = [{
title: Messages.share_contactCategory,
icon: "fa fa-address-book",
icon: "contacts-book",
content: frameContacts,
active: hasFriends
}, {
title: Messages.share_linkCategory,
icon: "fa fa-link",
icon: "link",
content: frameLink,
active: !hasFriends
}];
@ -646,7 +650,8 @@ define([
UIElements.getEntryFromButton = function ($button) {
if (!$button || !$button.length) { return; }
let $icon = $button.find('> i');
let $icon = $button.children('svg,i,[data-lucide]').first();
if (!$icon.length) $icon = $button.find('svg,i,[data-lucide]').first();
let attributes = {};
let btnClass = $button.attr('class');
@ -661,7 +666,7 @@ define([
tag: 'a',
attributes: attributes,
content: [
h('i',{ 'class': $icon.attr('class') }),
$icon.length ? $icon.clone()[0] : null,
h('span', $button.text())
],
action: function () {
@ -687,14 +692,14 @@ define([
title: title,
'aria-label': ariaLabel
}, [
iconClasses ? h('i', { class: iconClasses }) : null,
iconClasses ? Icons.get(iconClasses) : null,
text ? h('span', { class: 'cp-toolbar-drawer-element' }, text) : null
]));
};
switch (type) {
case 'export':
button = makeButton('fa fa-download', 'cp-toolbar-icon-export', Messages.exportButtonTitle, Messages.exportButton);
button = makeButton('export', 'cp-toolbar-icon-export', Messages.exportButtonTitle, Messages.exportButton);
button
.click(common.prepareFeedback(type))
.click(UI.clearTooltipsDelay);
@ -703,7 +708,7 @@ define([
}
break;
case 'import':
button = makeButton('fa fa-upload', 'cp-toolbar-icon-import', Messages.importButtonTitle, Messages.importButton);
button = makeButton('import', 'cp-toolbar-icon-import', Messages.importButtonTitle, Messages.importButton);
var importer = importContent((data && data.binary) ? 'application/octet-stream' : 'text/plain', callback, {
accept: data ? data.accept : undefined,
binary: data ? data.binary : undefined
@ -724,7 +729,7 @@ define([
//}
break;
case 'upload':
button = makeButton('fa fa-upload', 'btn btn-primary new', Messages.uploadButtonTitle, Messages.uploadButton);
button = makeButton('upload', 'btn btn-primary new', Messages.uploadButtonTitle, Messages.uploadButton);
if (!data.FM) { return; }
var $input = $('<input>', {
'type': 'file',
@ -756,7 +761,7 @@ define([
});
break;
case 'copy':
button = makeButton('fa fa-files-o', 'cp-toolbar-icon-import', '', Messages.makeACopy);
button = makeButton('copy', 'cp-toolbar-icon-copy', '', Messages.makeACopy);
button
.click(common.prepareFeedback(type))
.click(function () {
@ -767,7 +772,7 @@ define([
case 'importtemplate':
if (!AppConfig.enableTemplates) { return; }
if (!common.isLoggedIn()) { return; }
button = makeButton('fa fa-upload', 'cp-toolbar-icon-import', '', Messages.template_import);
button = makeButton('import-template', 'cp-toolbar-icon-import-template', '', Messages.template_import);
button
.click(common.prepareFeedback(type))
.click(function () {
@ -779,7 +784,7 @@ define([
case 'template':
if (!AppConfig.enableTemplates) { return; }
if (!common.isLoggedIn()) { return; }
button = makeButton('cptools cptools-new-template', 'cp-toolbar-icon-template', '', Messages.saveTemplateButton);
button = makeButton('file-template', 'cp-toolbar-icon-template', '', Messages.saveTemplateButton);
if (data.rt || data.callback) {
button
.click(function () {
@ -827,7 +832,7 @@ define([
}
break;
case 'forget':
button = makeButton('fa fa-trash', 'cp-toolbar-icon-forget', '', Messages.fc_delete);
button = makeButton('trash-full', 'cp-toolbar-icon-forget', '', Messages.fc_delete);
callback = typeof callback === "function" ? callback : function () {};
button
.click(common.prepareFeedback(type))
@ -875,7 +880,7 @@ define([
button = $(h('button', {
//title: Messages.presentButtonTitle, // TODO display if the label text is collapsed
}, [
h('i.fa.fa-play-circle'),
Icons.get('play'),
h('span.cp-toolbar-name', Messages.share_linkPresent)
])).click(common.prepareFeedback(type));
break;
@ -883,19 +888,19 @@ define([
button = $(h('button', {
//title: Messages.previewButtonTitle, // TODO display if the label text is collapsed
}, [
h('i.fa.fa-eye'),
Icons.get('preview'),
h('span.cp-toolbar-name', Messages.toolbar_preview)
])).click(common.prepareFeedback(type));
break;
case 'print':
button = makeButton('fa fa-print', 'cp-toolbar-icon-print', Messages.printButtonTitle2, Messages.printText);
button = makeButton('print', 'cp-toolbar-icon-print', Messages.printButtonTitle2, Messages.printText);
break;
case 'history':
if (!AppConfig.enableHistory) {
button = $('<span>');
break;
}
button = makeButton('fa fa-history', 'cp-toolbar-icon-history', Messages.historyButton, Messages.historyText, Messages.historyButton);
button = makeButton('history', 'cp-toolbar-icon-history', Messages.historyButton, Messages.historyText, Messages.historyButton);
if (data.histConfig) {
button.click(common.prepareFeedback(type)).on('click', function () {
common.getHistory(data.histConfig);
@ -907,7 +912,7 @@ define([
button = $(h('button.cp-toolbar-mediatag', {
//title: Messages.filePickerButton, // TODO display if the label text is collapsed
}, [
h('i.fa.fa-picture-o'),
Icons.get('toolbar-insert'),
h('span.cp-toolbar-name', Messages.toolbar_insert)
])).click(common.prepareFeedback(type));
break;
@ -915,7 +920,7 @@ define([
button = $(h('button.cp-toolbar-savetodrive', {
title: Messages.canvas_saveToDrive,
}, [
h('i.fa.fa-file-image-o'),
Icons.get('file-image'),
h('span.cp-toolbar-name.cp-toolbar-drawer-element', Messages.toolbar_savetodrive)
])).click(common.prepareFeedback(type));
if (callback) { button.click(callback); }
@ -924,7 +929,7 @@ define([
button = $(h('button.cp-toolbar-storeindrive', {
style: 'display:none;'
}, [
h('i.fa.fa-hdd-o'),
Icons.get('drive'),
h('span.cp-toolbar-name.cp-toolbar-drawer-element', Messages.toolbar_storeInDrive)
])).click(common.prepareFeedback(type)).click(function () {
$('.cp-toolbar-storeindrive').hide();
@ -945,7 +950,7 @@ define([
});
break;
case 'hashtag':
button = makeButton('fa fa-hashtag', 'cp-toolbar-icon-hashtag', Messages.tags_title, Messages.fc_hashtag);
button = makeButton('tag', 'cp-toolbar-icon-hashtag', Messages.tags_title, Messages.fc_hashtag);
button.click(common.prepareFeedback(type))
.click(function () {
common.isPadStored(function (err, data) {
@ -963,7 +968,7 @@ define([
'aria-label': data.text || Messages.toolbar_tools, // Fallback
'aria-pressed': false
}, [
h('i.fa.' + (data.icon || 'fa-wrench')),
Icons.get('apps-settings'),
h('span.cp-toolbar-name', data.text || Messages.toolbar_tools)
])).click(common.prepareFeedback(type));
/*
@ -993,7 +998,7 @@ define([
//updateIcon(data.element.is(':visible'));
break;
case 'properties':
button = makeButton('fa fa-info-circle', 'cp-toolbar-icon-properties', Messages.propertiesButtonTitle, Messages.propertiesButton);
button = makeButton('properties', 'cp-toolbar-icon-properties', Messages.propertiesButtonTitle, Messages.propertiesButton);
button
.click(common.prepareFeedback(type))
.click(function () {
@ -1010,7 +1015,7 @@ define([
});
break;
case 'save': // OnlyOffice save
button = makeButton('fa fa-save', '', Messages.settings_save, Messages.settings_save);
button = makeButton('save', '', Messages.settings_save, Messages.settings_save);
button
.click(function() {
common.prepareFeedback(type);
@ -1019,7 +1024,7 @@ define([
if (callback) { button.click(callback); }
break;
case 'newpad':
button = makeButton('fa fa-plus', 'cp-toolbar-icon-newpad', Messages.newButtonTitle, Messages.newButton);
button = makeButton('add', 'cp-toolbar-icon-newpad', Messages.newButtonTitle, Messages.newButton);
button
.click(common.prepareFeedback(type))
.click(function () {
@ -1028,7 +1033,7 @@ define([
});
break;
case 'snapshots':
button = makeButton('fa fa-camera', 'cp-toolbar-icon-snapshots', Messages.snapshots_button,Messages.snapshots_button);
button = makeButton('snapshot', 'cp-toolbar-icon-snapshots', Messages.snapshots_button,Messages.snapshots_button);
button
.click(common.prepareFeedback(type))
.click(function () {
@ -1041,12 +1046,12 @@ define([
break;
default:
var drawerCls = data.drawer === false ? '' : '.cp-toolbar-drawer-element';
var icon = data.icon || "fa-question";
var icon = data.icon || "circle-question";
button = $(h('button', {
title: data.tippy || ''
//title: data.title || '',
}, [
h('i.fa.' + icon),
Icons.get(icon),
h('span.cp-toolbar-name'+drawerCls, data.text)
]));
var feedbackHandler = common.prepareFeedback(data.name || 'DEFAULT');
@ -1080,17 +1085,17 @@ define([
'bold': {
// Msg.mdToolbar_bold
expr: '**{0}**',
icon: 'fa-bold'
icon: 'bold'
},
'italic': {
// Msg.mdToolbar_italic
expr: '_{0}_',
icon: 'fa-italic'
icon: 'italic'
},
'strikethrough': {
// Msg.mdToolbar_strikethrough
expr: '~~{0}~~',
icon: 'fa-strikethrough'
icon: 'strikethrough'
},
'heading': {
// Msg.mdToolbar_heading
@ -1099,12 +1104,12 @@ define([
return '# '+line;
}).join('\n')+'\n';
},
icon: 'fa-header'
icon: 'heading'
},
'link': {
// Msg.mdToolbar_link
expr: '[{0}](http://)',
icon: 'fa-link'
icon: 'link'
},
'quote': {
// Msg.mdToolbar_quote
@ -1113,7 +1118,7 @@ define([
return '> '+line;
}).join('\n')+'\n\n';
},
icon: 'fa-quote-right'
icon: 'quote'
},
'nlist': {
// Msg.mdToolbar_nlist
@ -1122,7 +1127,7 @@ define([
return '1. '+line;
}).join('\n')+'\n';
},
icon: 'fa-list-ol'
icon: 'list-ol'
},
'list': {
// Msg.mdToolbar_list
@ -1131,7 +1136,7 @@ define([
return '* '+line;
}).join('\n')+'\n';
},
icon: 'fa-list-ul'
icon: 'list'
},
'check': {
// Msg.mdToolbar_check
@ -1140,7 +1145,7 @@ define([
return '* [ ] ' + line;
}).join('\n') + '\n';
},
icon: 'fa-check-square-o'
icon: 'list-todo'
},
'code': {
// Msg.mdToolbar_code
@ -1150,18 +1155,18 @@ define([
}
return '`' + str + '`';
},
icon: 'fa-code'
icon: 'code'
},
'toc': {
// Msg.mdToolbar_toc
expr: '[TOC]',
icon: 'fa-newspaper-o'
icon: 'toc'
}
};
if (typeof(cfg.embed) === "function") {
actions.embed = { // Messages.mdToolbar_embed
icon: 'fa-picture-o',
icon: 'embed',
action: function () {
var _cfg = {
types: ['file', 'link'],
@ -1219,11 +1224,7 @@ define([
'class': 'pure-button cp-markdown-' + k,
'title': Messages['mdToolbar_' + k] || k,
'aria-label': Messages['mdToolbar_' + k] || k
}).append(
$('<i>', {
'class': 'fa ' + actions[k].icon,
'aria-hidden': 'true'
})).click(onClick);
}).append(Icons.get(actions[k].icon)).click(onClick);
if (k === "embed") { $toolbar.prepend($b); }
else { $toolbar.append($b); }
}
@ -1233,10 +1234,7 @@ define([
'title': Messages.mdToolbar_help,
'aria-label': Messages.mdToolbar_help
}).append(
$('<i>', {
'class': 'fa fa-question',
'aria-hidden': 'true'
})).click(function () {
Icons.get('help')).click(function () {
var href = Messages.mdToolbar_tutorial;
common.openUnsafeURL(href);
}).appendTo($toolbar);
@ -1319,7 +1317,7 @@ define([
'type': 'button',
'title': Messages.toolbar_show_text_tools
})).append([
h('i.fa.fa-pencil', { 'aria-hidden': 'true' }),
Icons.get('edit'),
h('span.cp-toolbar-label', {}, Messages.toolbar_text_tools)
]).click(function () {
var isExpanded = $toolbar.is(':visible');
@ -1380,7 +1378,7 @@ define([
var apps = {
pad: 'richtext',
code: 'code',
code: 'code-pad',
slide: 'slides',
sheet: 'sheets',
poll: 'poll',
@ -1412,7 +1410,9 @@ define([
common.fixLinks(text);
var closeButton = h('button.cp-help-close.fa.fa-times', {
var closeButton = h('button.cp-help-close',[
Icons.get('close')
], {
title: Messages.help_close_button
});
var $toolbarButton = common.createButton('', true, {
@ -1693,7 +1693,7 @@ define([
// Button
let icon = config.iconCls ? h('i', {class:config.iconCls}) : undefined;
let icon = config.iconCls ? Icons.get(config.iconCls) : undefined;
var $button = $(h('button', {
class: config.buttonCls || '',
'aria-haspopup': 'menu',
@ -1706,10 +1706,10 @@ define([
]));
if (config.caretDown) {
$button.prepend(h('i.fa.fa-caret-down'));
$button.prepend(Icons.get('chevron-down'));
}
if (config.angleDown) {
$button.prepend(h('i.fa.fa-angle-down'));
$button.prepend(Icons.get('chevron-down'));
}
// Menu
@ -1793,7 +1793,8 @@ define([
var topPos = button.bottom;
$button.attr('aria-expanded', 'true');
$innerblock.css('bottom', '');
$innerblock.show();
$innerblock.css('display', 'flex'); // for the css order rules to apply
$innerblock.css('flex-direction', 'column');
if ($parentMenu) {
// keep parent open when recursive
$parentMenu.show();
@ -2155,8 +2156,8 @@ define([
if (accountName && !AppConfig.disableProfile) {
options.push({
tag: 'a',
attributes: {'class': 'cp-toolbar-menu-profile fa fa-user-circle'},
content: h('span', Messages.profileButton),
attributes: {'class': 'cp-toolbar-menu-profile'},
content: h('span',[Icons.get('user-profile')], Messages.profileButton),
action: function () {
if (padType) {
Common.openURL(origin+'/profile/');
@ -2169,10 +2170,7 @@ define([
if (padType !== 'drive' || (!accountName && priv.newSharedFolder)) {
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-hdd-o',
},
content: h('span', Messages.type.drive),
content: h('span', [Icons.get('drive')], Messages.type.drive),
action: function () {
Common.openURL(origin+'/drive/');
},
@ -2181,10 +2179,7 @@ define([
if (padType !== 'teams' && accountName) {
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-users',
},
content: h('span', Messages.type.teams),
content: h('span', [Icons.get('users')], Messages.type.teams),
action: function () {
Common.openURL('/teams/');
},
@ -2193,10 +2188,7 @@ define([
if (padType !== 'calendar' && accountName) {
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-calendar',
},
content: h('span', Messages.calendar),
content: h('span', [Icons.get('calendar')], Messages.calendar),
action: function () {
Common.openURL('/calendar/');
},
@ -2205,10 +2197,7 @@ define([
if (padType !== 'contacts' && accountName) {
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-address-book',
},
content: h('span', Messages.type.contacts),
content: h('span', [Icons.get('contacts')], Messages.type.contacts),
action: function () {
Common.openURL('/contacts/');
},
@ -2217,8 +2206,8 @@ define([
if (padType !== 'settings') {
options.push({
tag: 'a',
attributes: {'class': 'cp-toolbar-menu-settings fa fa-cog'},
content: h('span', Messages.settingsButton),
attributes: {'class': 'cp-toolbar-menu-settings'},
content: h('span', [Icons.get('settings')], Messages.settingsButton),
action: function () {
if (padType) {
Common.openURL(origin+'/settings/');
@ -2234,8 +2223,8 @@ define([
if (priv.edPublic && Array.isArray(Config.adminKeys) && Config.adminKeys.includes(priv.edPublic)) {
options.push({
tag: 'a',
attributes: {'class': 'cp-toolbar-menu-admin fa fa-cogs'},
content: h('span', Messages.adminPage || 'Admin'),
attributes: {'class': 'cp-toolbar-menu-admin'},
content: h('span', [Icons.get('administration')], Messages.adminPage || 'Admin'),
action: function () {
if (padType) {
Common.openURL(origin+'/admin/');
@ -2249,8 +2238,8 @@ define([
if (priv.edPublic && Config.supportMailboxKey && Array.isArray(Config.moderatorKeys) && Config.moderatorKeys.includes(priv.edPublic)) {
options.push({
tag: 'a',
attributes: {'class': 'cp-toolbar-menu-admin fa fa-ambulance'},
content: h('span', Messages.moderationPage || 'Support mailbox'),
attributes: {'class': 'cp-toolbar-menu-admin'},
content: h('span', [Icons.get('moderation')], Messages.moderationPage || 'Support mailbox'),
action: function () {
Common.openURL(origin+'/moderation/');
return true;
@ -2263,15 +2252,14 @@ define([
'target': '_blank',
'rel': 'noopener',
'href': 'https://docs.cryptpad.org',
'class': 'fa fa-book',
},
content: h('span', Messages.docs_link)
content: h('span', [Icons.get('documentation')], Messages.docs_link)
});
if (padType !== 'support' && accountName && Config.supportMailboxKey) {
options.push({
tag: 'a',
attributes: {'class': 'cp-toolbar-menu-support fa fa-life-ring'},
content: h('span', Messages.supportPage || 'Support'),
attributes: {'class': 'cp-toolbar-menu-support'},
content: h('span', [Icons.get('support')], Messages.supportPage || 'Support'),
action: function () {
if (padType) {
Common.openURL(origin+'/support/');
@ -2285,9 +2273,9 @@ define([
options.push({
tag: 'a',
attributes: {
'class': 'cp-toolbar-about fa fa-info',
'class': 'cp-toolbar-about',
},
content: h('span', Messages.user_about),
content: h('span', [Icons.get('properties')], Messages.user_about),
action: function () {
UIElements.displayInfoMenu(Common, metadataMgr);
},
@ -2295,10 +2283,7 @@ define([
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-home',
},
content: h('span', Messages.homePage),
content: h('span',[Icons.get('homepage')], Messages.homePage),
action: function () {
Common.openURL('/index.html');
},
@ -2333,10 +2318,7 @@ define([
surveyAlone = false;
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-gift',
},
content: h('span', Messages.crowdfunding_button2),
content: h('span',[Icons.get('donate')], Messages.crowdfunding_button2),
action: function () {
Common.openUnsafeURL(priv.accounts.donateURL);
},
@ -2349,9 +2331,9 @@ define([
options.push({
tag: 'a',
attributes: {
'class': 'cp-toolbar-survey fa fa-graduation-cap'
'class': 'cp-toolbar-survey'
},
content: h('span', Messages.survey),
content: h('span', [Icons.get('survey'), Messages.survey]),
action: function () {
Common.openUnsafeURL(surveyURL);
Feedback.send('SURVEY_CLICKED');
@ -2364,9 +2346,9 @@ define([
options.push({
tag: 'a',
attributes: {
'class': 'cp-toolbar-menu-logout-everywhere fa fa-plug',
'class': 'cp-toolbar-menu-logout-everywhere',
},
content: h('span', Messages.logoutEverywhere),
content: h('span',[Icons.get('logout-everywhere')], Messages.logoutEverywhere),
action: function () {
UI.confirm(Messages.settings_logoutEverywhereConfirm, function (yes) {
if (!yes) { return; }
@ -2378,8 +2360,8 @@ define([
});
options.push({
tag: 'a',
attributes: {'class': 'cp-toolbar-menu-logout fa fa-sign-out'},
content: h('span', Messages.logoutButton),
attributes: {'class': 'cp-toolbar-menu-logout'},
content: h('span',[Icons.get('logout')], Messages.logoutButton),
action: function () {
Common.logout(function () {
Common.gotoURL(origin+'/');
@ -2389,8 +2371,8 @@ define([
} else {
options.push({
tag: 'a',
attributes: {'class': 'cp-toolbar-menu-login fa fa-sign-in'},
content: h('span', Messages.login_login),
attributes: {'class': 'cp-toolbar-menu-login'},
content: h('span', [Icons.get('login')], Messages.login_login),
action: function () {
Common.setLoginRedirect('login');
},
@ -2398,15 +2380,15 @@ define([
if (!Config.restrictRegistration) {
options.push({
tag: 'a',
attributes: {'class': 'cp-toolbar-menu-register fa fa-user-plus'},
content: h('span', Messages.login_register),
attributes: {'class': 'cp-toolbar-menu-register'},
content: h('span',[Icons.get('register')], Messages.login_register),
action: function () {
Common.setLoginRedirect('register');
},
});
}
}
var $icon = $('<span>', {'class': 'fa fa-user-secret'});
var $icon = Icons.get('secret-user');
var $userButton = $('<div>').append($icon);
if (accountName) {
$userButton = $('<div>').append(accountName);
@ -2568,7 +2550,7 @@ define([
$body: $('body')
});
var $modal = modal.$modal;
var $title = $(h('h3', [ h('i.fa.fa-plus'), ' ', Messages.fm_newButton ]));
var $title = $(h('h3', [ Icons.get('add'), ' ', Messages.fm_newButton ]));
var $description = $(Pages.setHTML(h('p'), Messages.creation_newPadModalDescription));
$modal.find('.cp-modal').append($title);
@ -2841,7 +2823,7 @@ define([
'data-id': '-1',
title: Messages.settings_cat_drive
}, [
h('span.cp-creation-team-avatar.fa.fa-hdd-o'),
h('span.cp-creation-team-avatar', Icons.get('drive')),
h('span.cp-creation-team-name', Messages.settings_cat_drive)
]));
team = h('div.cp-creation-teams', [
@ -2917,20 +2899,20 @@ define([
var $w = $(window);
var big = $w.width() > 800;
var right = h('button.fa.fa-chevron-right.cp-creation-template-more', {
var right = h('button.cp-creation-template-more', {
'aria-label': Messages.page_next
});
var left = h('button.fa.fa-chevron-left.cp-creation-template-more', {
}, Icons.get('chevron-right'));
var left = h('button.cp-creation-template-more', {
'aria-label': Messages.page_previous
});
}, Icons.get('chevron-left'));
if (!big) {
$(left).removeClass('fa-chevron-left').addClass('fa-chevron-up');
$(right).removeClass('fa-chevron-right').addClass('fa-chevron-down');
$(left).empty().append(Icons.get('chevron-up'));
$(right).empty().append(Icons.get('chevron-down'));
}
var templates = h('div.cp-creation-template', [
left,
h('div.cp-creation-template-container', [
h('span.fa.fa-circle-o-notch.fa-spin.fa-4x.fa-fw')
Icons.get('loading')
]),
right
]);
@ -2971,14 +2953,12 @@ define([
allData.unshift({
name: Messages.creation_newTemplate,
id: -1,
//icon: h('span.fa.fa-bookmark')
icon: h('span.cptools.cptools-new-template')
icon: Icons.get('file-template')
});
}*/
allData.unshift({
name: Messages.creation_noTemplate,
id: 0,
//icon: h('span.fa.fa-file')
icon: UI.getFileIcon({type: type})
});
var redraw = function (index) {
@ -3004,7 +2984,7 @@ define([
$span.attr('aria-checked', true);
}
if (!obj.thumbnail) {
$span.append(obj.icon || h('span.cptools.cptools-template'));
$span.append(obj.icon || Icons.get('file-template'));
}
$('<span>', {'class': 'cp-creation-template-element-name'}).text(name)
.appendTo($span);
@ -3040,7 +3020,7 @@ define([
name: fromFileData.title,
id: 0,
thumbnail: thumbnail,
icon: h('span.cptools.cptools-file'),
icon: Icons.get('file'),
}];
redraw(0);
};
@ -3054,7 +3034,7 @@ define([
allData = [{
name: fromContent.title,
id: 0,
icon: h('span.cptools.cptools-poll'),
icon: Icons.get('poll'),
}];
redraw(0);
}
@ -3067,11 +3047,11 @@ define([
if (big === _big) { return; }
big = _big;
if (!big) {
$(left).removeClass('fa-chevron-left').addClass('fa-chevron-up');
$(right).removeClass('fa-chevron-right').addClass('fa-chevron-down');
$(left).empty().append(Icons.get('chevron-up'));
$(right).empty().append(Icons.get('chevron-down'));
} else {
$(left).removeClass('fa-chevron-up').addClass('fa-chevron-left');
$(right).removeClass('fa-chevron-down').addClass('fa-chevron-right');
$(left).empty().append(Icons.get('chevron-left'));
$(right).empty().append(Icons.get('chevron-right'));
}
TEMPLATES_DISPLAYED = big ? 6 : 3;
redraw(0);
@ -3401,7 +3381,7 @@ define([
// Display the popup
var text = Messages.crowdfunding_popup_text;
var yes = h('button.cp-corner-primary', [
h('span.fa.fa-external-link'),
Icons.get('external-link'),
'OpenCollective'
]);
var no = h('button.cp-corner-cancel', Messages.crowdfunding_popup_no);
@ -3528,7 +3508,7 @@ define([
Messages._getKey('formattedMB', [mb])
]);
var yes = h('button.cp-corner-primary', [
h('span.fa.fa-trash-o'),
Icons.get('trash-full'),
Messages.trimHistory_button
]);
var no = h('button.cp-corner-cancel', Messages.crowdfunding_popup_no); // Not now
@ -3901,7 +3881,7 @@ define([
if (priv.friends && priv.friends[curve]) {
$verified.addClass('cp-notifications-requestedit-verified');
var f = priv.friends[curve];
$verified.append(h('span.fa.fa-certificate'));
$verified.append(Icons.get('certificate'));
var $avatar = $(h('span.cp-avatar')).appendTo($verified);
name = UI.getDisplayName(f.displayName);
$verified.append(h('p', Messages._getKey('isContact', [name])));
@ -4305,7 +4285,7 @@ define([
var openButton = h('button.cp-snapshot-view.btn.btn-light', {
tabindex: 1,
}, [
h('i.fa.fa-eye'),
Icons.get('preview'),
h('span', Messages.snapshots_open)
]);
$(openButton).click(function () {
@ -4318,7 +4298,7 @@ define([
var deleteButton = h('button.cp-snapshot-delete.btn.btn-light', {
tabindex: 1,
}, [
h('i.fa.fa-trash'),
Icons.get('trash-full'),
h('span', Messages.snapshots_delete)
]);
UI.confirmButton(deleteButton, {
@ -4329,7 +4309,7 @@ define([
});
return h('span.cp-snapshot-element', {tabindex:1}, [
h('i.fa.fa-camera'),
Icons.get('snapshot'),
h('span.cp-snapshot-title', [
h('span', s.title),
h('span.cp-snapshot-time', new Date(s.time).toLocaleString())
@ -4358,14 +4338,15 @@ define([
if (!readOnly) {
buttons.push({
className: 'primary',
iconClass: '.fa.fa-camera',
iconClass: 'snapshot',
name: Messages.snapshots_new,
onClick: function () {
var val = $input.val();
if (!val) { return true; }
$container.html('').append(h('div.cp-snapshot-spinner'));
var to = setTimeout(function () {
UI.spinner($container.find('div')).get().show();
var spinner = UI.makeSpinner($container.find('div'));
spinner.spin();
});
make(val, function (err) {
clearTimeout(to);
@ -4410,9 +4391,12 @@ define([
var all = [];
palette.forEach(function (color, i) {
var $color = $(h('button.cp-palette-color.fa'));
var $color = $(h('button.cp-palette-color'));
all.push($color);
$color.addClass('cp-palette-'+(color || 'nocolor'));
const checkIcon = Icons.get('check');
$(checkIcon).addClass('cp-check-icon is-hidden'); // added hidden class to overcome Lucide rendering
$color.append(checkIcon);
$color.keydown(function (e) {
if (e.which === 13) {
e.stopPropagation();
@ -4423,9 +4407,9 @@ define([
$color.click(function () {
if (offline) { return; }
if (color === selectedColor) { return; }
$container.find('.cp-palette-color').find('.cp-check-icon').addClass('is-hidden');
$(this).find('.cp-check-icon').removeClass('is-hidden');
selectedColor = color;
$container.find('.cp-palette-color').removeClass('fa-check');
$color.addClass('fa-check');
onSelect(color, $color);
}).appendTo($container);
$color.keydown(e => {
@ -4462,9 +4446,11 @@ define([
return selectedColor;
};
container.setValue = color => {
$container.find('.cp-palette-color').removeClass('fa-check');
$container.find('.cp-palette-color').find('.cp-check-icon').addClass('is-hidden');
let $color = $container.find('.cp-palette-'+(color || 'nocolor'));
$color.addClass('fa-check');
if ($color.length) {
$color.find('.cp-check-icon').removeClass('is-hidden');
}
selectedColor = color;
};
return container;
@ -4482,9 +4468,8 @@ define([
let nodeWithOrder;
if (isDrawer) { // HACK: the order is set on their inner "a" tag
let $n = $(node);
if (!$n.attr('class') &&
($n.find('.fa').length || $n.find('.cptools').length)) {
nodeWithOrder = $n.find('.fa')[0] || $n.find('.cptools')[0];
if (!$n.attr('class') && $n.find('.lucide').length) {
nodeWithOrder = $n.find('.lucide')[0];
}
}
var order = getComputedStyle(nodeWithOrder || node).getPropertyValue("order");

View File

@ -17,7 +17,7 @@ define([
'/common/events-channel.js',
'/common/outer/login-block.js',
'/common/common-credential.js',
'/customize/login.js',
'/common/common-login.js',
'/common/store-interface.js',
'/common/pad-types.js',
@ -431,6 +431,14 @@ define([
cb(obj);
});
};
common.getAccountObject = function (teamId, cb) {
postMessage("GET", {
teamId: teamId,
key: []
}, function (obj) {
cb(obj);
});
};
common.getSharedFolder = function (data, cb) {
postMessage("GET_SHARED_FOLDER", data, function (obj) {
cb(obj);

View File

@ -214,7 +214,6 @@ define([
r = r.replace(/<div class="cp-md-toc"><\/div>/g, getTOC());
}
toc = [];
return r;
};
@ -276,16 +275,16 @@ define([
var isCheckbox = true;
if (isCheckedTaskItem) {
text = text.replace(checkedTaskItemPtn,
'<i class="fa fa-check-square" aria-hidden="true"></i>') + '\n';
'<i data-lucide="square-check" aria-hidden="true"></i>') + '\n';
} else if (isUncheckedTaskItem) {
text = text.replace(uncheckedTaskItemPtn,
'<i class="fa fa-square-o" aria-hidden="true"></i>') + '\n';
'<i data-lucide="square" aria-hidden="true"></i>') + '\n';
} else if (hasBogusCheckedInput) {
text = text.replace(bogusCheckPtn,
'<i class="fa fa-check-square" aria-hidden="true"></i>') + '\n';
'<i data-lucide="square-check" aria-hidden="true"></i>') + '\n';
} else if (hasBogusUncheckedInput) {
text = text.replace(bogusUncheckPtn,
'<i class="fa fa-square-o" aria-hidden="true"></i>') + '\n';
'<i data-lucide="square" aria-hidden="true"></i>') + '\n';
} else {
isCheckbox = false;
}

View File

@ -26,6 +26,7 @@ define([
'/customize/pages.js',
'/common/pad-types.js',
'/common/onlyoffice/broken-formats.js',
'/common/common-icons.js'
], function (
$,
ApiConfig,
@ -47,7 +48,8 @@ define([
Messages,
Pages,
PadTypes,
BrokenFormats)
BrokenFormats,
Icons)
{
var APP = window.APP = {
@ -89,65 +91,54 @@ define([
var FILTER = "filter";
// Icons
var faFolder = 'cptools-folder';
var faFolderOpen = 'cptools-folder-open';
var faSharedFolder = 'cptools-shared-folder';
var faSharedFolderOpen = 'cptools-shared-folder-open';
var faExpandAll = 'fa-plus-square-o';
var faCollapseAll = 'fa-minus-square-o';
var faShared = 'fa-shhare-alt';
var faReadOnly = 'fa-eye';
var faPreview = 'fa-eye';
var faRename = 'fa-pencil';
var faColor = 'cptools-palette';
var faTrash = 'fa-trash';
var faCopy = 'fa-files-o';
var faDelete = 'cptools-destroy';
var faAccess = 'fa-unlock-alt';
var faProperties = 'fa-info-circle';
var faTags = 'fa-hashtag';
var faUploadFiles = 'cptools-file-upload';
var faUploadFolder = 'cptools-folder-upload';
var faEmpty = 'fa-trash-o';
var faRestore = 'fa-repeat';
var faShowParent = 'fa-location-arrow';
var faDownload = 'fa-download';
var $folderIcon = $('<span>', {
"class": faFolder + " cptools cp-app-drive-icon-folder cp-app-drive-content-icon"
});
var $fileMenuIcon = $('<span>', {"class": "fa fa-ellipsis-h"});
//var $folderIcon = $('<img>', {src: "/customize/images/icons/folder.svg", "class": "folder icon"});
var folder = 'folder';
var folderOpen = 'folder-open';
var sharedFolder = 'drive-shared-folder';
var expandAll = 'expand';
var collapseAll = 'collapse';
var readOnly = 'read-only';
var preview = 'preview';
var rename = 'rename';
var palette = 'color-palette';
var trashFull = 'trash-full';
var copy = 'copy';
var destroy = 'destroy';
var access = 'access';
var properties = 'properties';
var tags = 'tag';
var uploadFile = 'drive-upload-file';
var uploadFolder = 'drive-upload-folder';
var trashEmpty = 'trash-empty';
var restore = 'restore';
var showParent = 'location';
var download = 'download';
var $folderIcon = $(Icons.get(folder,{"class": "cp-app-drive-icon-folder cp-app-drive-content-icon"}));
var $fileMenuIcon = $(Icons.get('ellipsis-horizontal'));
var $folderEmptyIcon = $folderIcon.clone();
var $folderOpenedIcon = $('<span>', {"class": faFolderOpen + " cptools cp-app-drive-icon-folder"});
//var $folderOpenedIcon = $('<img>', {src: "/customize/images/icons/folderOpen.svg", "class": "folder icon"});
var $folderOpenedIcon = $(Icons.get('folder-open'));
var $folderOpenedEmptyIcon = $folderOpenedIcon.clone();
var $sharedFolderIcon = $('<span>', {"class": faSharedFolder + " cptools cp-app-drive-icon-folder"});
var $sharedFolderOpenedIcon = $('<span>', {"class": faSharedFolderOpen + " cptools cp-app-drive-icon-folder"});
//var $upIcon = $('<span>', {"class": "fa fa-arrow-circle-up"});
var $unsortedIcon = $('<span>', {"class": "fa fa-files-o"});
var $templateIcon = $('<span>', {"class": "cptools cptools-template"});
var $recentIcon = $('<span>', {"class": "fa fa-clock-o"});
var $trashIcon = $('<span>', {"class": "fa " + faTrash});
var $trashEmptyIcon = $('<span>', {"class": "fa fa-trash-o"});
//var $collapseIcon = $('<span>', {"class": "fa fa-minus-square-o cp-app-drive-icon-expcol"});
var $expandIcon = $('<span>', {"class": "fa fa-plus-square-o cp-app-drive-icon-expcol"});
//var $listIcon = $('<button>', {"class": "fa fa-list"});
//var $gridIcon = $('<button>', {"class": "fa fa-th-large"});
var $sortAscIcon = $('<span>', {"class": "fa fa-angle-up sortasc"});
var $sortDescIcon = $('<span>', {"class": "fa fa-angle-down sortdesc"});
var $closeIcon = $('<span>', {"class": "fa fa-times"});
//var $backupIcon = $('<span>', {"class": "fa fa-life-ring"});
var $searchIcon = $('<span>', {"class": "fa fa-search cp-app-drive-tree-search-icon"});
var $addIcon = $('<span>', {"class": "fa fa-plus"});
var $renamedIcon = $('<span>', {"class": "fa fa-flag"});
var $readonlyIcon = $('<span>', {"class": "fa " + faReadOnly});
var $ownedIcon = $('<span>', {"class": "fa fa-id-badge"});
var $sharedIcon = $('<span>', {"class": "fa " + faShared});
//var $ownerIcon = $('<span>', {"class": "fa fa-id-card"});
var $tagsIcon = $('<span>', {"class": "fa " + faTags});
var $passwordIcon = $('<span>', {"class": "fa fa-lock"});
var $restrictedIcon = $('<span>', {"class": "fa fa-ban"});
var $expirableIcon = $('<span>', {"class": "fa fa-clock-o"});
var $sharedFolderIcon = $(Icons.get('drive-shared-folder', {"class": "cp-app-drive-icon-folder"}));
var $sharedFolderOpenedIcon = $(Icons.get('folder-open', {"class": "cp-app-drive-icon-folder"}));
var $unsortedIcon = $(Icons.get('copy'));
var $templateIcon = $(Icons.get('file-template'));
var $recentIcon = $(Icons.get('drive-recent'));
var $trashIcon = $(Icons.get('trash-full'));
var $trashEmptyIcon = $(Icons.get('trash-empty'));
var $expandIcon = $(Icons.get('expand'));
var $expandedIcon = $(Icons.get('collapse'));
var $sortAscIcon = $(Icons.get('sort-asc', {'class': 'sortasc'}));
var $sortDescIcon = $(Icons.get('sort-desc', {'class': 'sortdesc'}));
var $closeIcon = $(Icons.get('close'));
var $searchIcon = $($(Icons.get('search', {'class': 'cp-app-drive-tree-search-icon'})));
var $addIcon = $(Icons.get('add'));
var $renamedIcon = $(Icons.get('renamed'));
var $readonlyIcon = $(Icons.get(readOnly));
var $ownedIcon = $(Icons.get('document-owner'));
var $sharedIcon = $(Icons.get('share'));
var $tagsIcon = $(Icons.get(tags));
var $passwordIcon = $(Icons.get('drive-password-document'));
var $restrictedIcon = $(Icons.get('restricted'));
var $expirableIcon = $(Icons.get('expire'));
var $separator = $('<div>', {"class": "dropdown-divider"});
var LS_VIEWMODE = "app-drive-viewMode";
@ -369,8 +360,7 @@ define([
APP.premiumPlan = priv.plan;
var getOpenIn = function (app) {
var icon = AppConfig.applicationsIcon[app];
var cls = icon.indexOf('cptools') === 0 ? 'cptools '+icon : 'fa '+icon;
var html = '<i class="'+cls+'"></i>' + Messages.type[app];
var html = '<i data-lucide="'+icon+'"></i>' + Messages.type[app];
return Messages._getKey('fc_openIn', [html]);
};
var restricted = {};
@ -394,165 +384,208 @@ define([
h('span.cp-app-drive-context-noAction.dropdown-item.disabled', Messages.fc_noAction || "No action possible"),
h('li', h('a.cp-app-drive-context-preview.dropdown-item', {
'tabindex': '-1',
'data-icon': faPreview,
}, Messages.pad_mediatagPreview)),
}, [
Icons.get(preview),
Messages.pad_mediatagPreview
])),
h('li', h('a.cp-app-drive-context-open.dropdown-item', {
'tabindex': '-1',
'data-icon': faFolderOpen,
}, Messages.fc_open)),
}, [
Icons.get(folderOpen),
Messages.fc_open
]
)),
h('li', h('a.cp-app-drive-context-openfolder.dropdown-item', {
'tabindex': '-1',
'data-icon': faFolderOpen,
}, Messages.fc_open)),
}, [
Icons.get(folderOpen),
Messages.fc_open
])),
h('li', h('a.cp-app-drive-context-openro.dropdown-item', {
'tabindex': '-1',
'data-icon': faReadOnly,
}, h('span.cp-text', Messages.fc_open_ro))),
}, [
Icons.get(readOnly),
h('span.cp-text', Messages.fc_open_ro)
])),
isAppEnabled('code') ? h('li', UI.setHTML(h('a.cp-app-drive-context-openincode.dropdown-item', {
'tabindex': '-1',
'data-icon': 'fa-arrows',
}), getOpenIn('code'))) : undefined,
}, [Icons.get('select')]), getOpenIn('code'))) : undefined,
isAppEnabled('sheet') ? h('li', UI.setHTML(h('a.cp-app-drive-context-openinsheet.dropdown-item', {
'tabindex': '-1',
'data-icon': 'fa-arrows',
}), getOpenIn('sheet'))) : undefined,
}, [Icons.get('select')]), getOpenIn('sheet'))) : undefined,
isAppEnabled('doc') ? h('li', UI.setHTML(h('a.cp-app-drive-context-openindoc.dropdown-item' + (restricted.doc === 0 ? '.cp-app-disabled' : ''), {
'tabindex': '-1',
'data-icon': 'fa-arrows',
}), getOpenIn('doc'))) : undefined,
}, [Icons.get('select')]), getOpenIn('doc'))) : undefined,
isAppEnabled('presentation') ? h('li', UI.setHTML(h('a.cp-app-drive-context-openinpresentation.dropdown-item' + (restricted.presentation === 0 ? '.cp-app-disabled' : ''), {
'tabindex': '-1',
'data-icon': 'fa-arrows',
}), getOpenIn('presentation'))) : undefined,
}, [Icons.get('select')]), getOpenIn('presentation'))) : undefined,
h('li', h('a.cp-app-drive-context-savelocal.dropdown-item', {
'tabindex': '-1',
'data-icon': 'fa-cloud-upload',
}, Messages.pad_mediatagImport)), // Save in your CryptDrive
}, [
Icons.get('cloud-upload'),
Messages.pad_mediatagImport
])), // Save in your CryptDrive
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-expandall.dropdown-item', {
'tabindex': '-1',
'data-icon': faExpandAll,
}, Messages.fc_expandAll)),
}, [
Icons.get(expandAll),
Messages.fc_expandAll
])),
h('li', h('a.cp-app-drive-context-collapseall.dropdown-item', {
'tabindex': '-1',
'data-icon': faCollapseAll,
}, Messages.fc_collapseAll)),
}, [
Icons.get(collapseAll),
Messages.fc_collapseAll
])),
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-openparent.dropdown-item', {
'tabindex': '-1',
'data-icon': faShowParent,
}, Messages.fm_openParent)),
}, [
Icons.get(showParent),
Messages.fm_openParent
])),
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-share.dropdown-item', {
'tabindex': '-1',
'data-icon': 'fa-shhare-alt',
}, Messages.shareButton)),
}, [
Icons.get('share'),
Messages.shareButton
])),
h('li', h('a.cp-app-drive-context-access.dropdown-item', {
'tabindex': '-1',
'data-icon': faAccess,
}, Messages.accessButton)),
}, [
Icons.get(access),
Messages.accessButton
])),
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-newfolder.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faFolder,
}, Messages.fc_newfolder)),
},[
Icons.get(folder),
Messages.fc_newfolder
])),
h('li', h('a.cp-app-drive-context-newsharedfolder.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faSharedFolder,
}, Messages.fc_newsharedfolder)),
},[
Icons.get(sharedFolder),
Messages.fc_newsharedfolder
])),
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-uploadfiles.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faUploadFiles,
}, Messages.uploadButton)),
},[
Icons.get(uploadFile),
Messages.uploadButton
])),
h('li', h('a.cp-app-drive-context-uploadfolder.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faUploadFolder,
}, Messages.uploadFolderButton)),
}, [
Icons.get(uploadFolder),
Messages.uploadFolderButton
])),
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': AppConfig.applicationsIcon.link,
'data-type': 'link'
}, Messages.fm_link_new)),
},[
Icons.get('link'),
Messages.fm_link_new
])),
h('li.dropdown-submenu', [
h('a.cp-app-drive-context-newdocmenu.dropdown-item', {
'tabindex': '-1',
'data-icon': "fa-plus",
}, Messages.fm_newFile),
},[
Icons.get('add'),
Messages.fm_newFile
]),
h("ul.dropdown-menu", getNewPadTypes().map(function (app) {
return isAppEnabled(app) ? h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable' + (restricted[app] === 0 ? '.cp-app-disabled' : ''), {
'tabindex': '-1',
'data-icon': AppConfig.applicationsIcon[app],
'data-type': app
}, Messages.type[app])) : undefined;
},[
Icons.get(AppConfig.applicationsIcon[app]),
Messages.type[app]
])) : undefined;
})),
]),
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-empty.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faEmpty,
}, Messages.fc_empty)),
}, [
Icons.get(trashEmpty),
Messages.fc_empty
])),
h('li', h('a.cp-app-drive-context-restore.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faRestore,
}, Messages.fc_restore)),
'data-icon': restore,
}, [
Icons.get(restore),
Messages.fc_restore
])),
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-rename.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faRename,
}, Messages.fc_rename)),
}, [
Icons.get(rename),
Messages.fc_rename
])),
h('li', h('a.cp-app-drive-context-color.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faColor,
}, Messages.fc_color)),
}, [
Icons.get(palette),
Messages.fc_color
])),
h('li', h('a.cp-app-drive-context-hashtag.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faTags,
}, Messages.fc_hashtag)),
}, [
Icons.get(tags),
Messages.fc_hashtag
])),
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-makeacopy.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faCopy,
}, Messages.makeACopy)),
}, [
Icons.get(copy),
Messages.makeACopy
])),
h('li', h('a.cp-app-drive-context-download.dropdown-item', {
'tabindex': '-1',
'data-icon': faDownload,
}, Messages.download_mt_button)),
}, [
Icons.get(download),
Messages.download_mt_button
])),
h('li', h('a.cp-app-drive-context-delete.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faTrash,
}, Messages.fc_delete)), // "Move to trash"
}, [
Icons.get(trashFull),
Messages.fc_delete
])), // "Move to trash"
h('li', h('a.cp-app-drive-context-deleteowned.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faDelete,
}, Messages.fc_delete_owned)),
}, [
Icons.get(destroy),
Messages.fc_delete_owned
])),
h('li', h('a.cp-app-drive-context-remove.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faTrash,
}, Messages.fc_remove)),
}, [
Icons.get(trashFull),
Messages.fc_remove
] )),
h('li', h('a.cp-app-drive-context-removesf.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faTrash,
}, Messages.fc_remove_sharedfolder)),
}, [
Icons.get(trashFull),
Messages.fc_remove_sharedfolder
])),
$separator.clone()[0],
h('li', h('a.cp-app-drive-context-properties.dropdown-item', {
'tabindex': '-1',
'data-icon': faProperties,
}, Messages.fc_prop))
},[
Icons.get(properties),
Messages.fc_prop
]))
])
]);
// add icons to the contextmenu options
$(menu).find("li a.dropdown-item").each(function (i, el) {
var $icon = $("<span>");
if ($(el).attr('data-icon')) {
var font = $(el).attr('data-icon').indexOf('cptools') === 0 ? 'cptools' : 'fa';
$icon.addClass(font).addClass($(el).attr('data-icon'));
} else {
$icon.text($(el).text());
}
$(el).prepend($icon);
});
// add events handlers for the contextmenu submenus
$(menu).find(".dropdown-submenu").each(function (i, el) {
var $el = $(el);
@ -580,7 +613,7 @@ define([
timeoutId = setTimeout(hideSubmenu, 100);
};
// Add submenu expand icon
$a.append(h("span.dropdown-toggle"));
$a.append(h("span", [Icons.get('expand-menu')]));
// Show / hide submenu
$el.hover(function () {
showSubmenu();
@ -662,7 +695,7 @@ define([
$content.attr("tabindex", "0");
if (APP.loggedIn) {
var splitter = h('div.cp-splitter', [
h('i.fa.fa-ellipsis-v')
Icons.get('ellipsis-vertical')
]);
$contentContainer.append(splitter);
APP.$splitter = $(splitter).on('mousedown touchstart', function (e) {
@ -1274,20 +1307,36 @@ define([
var colors = ["", "#f23c38", "#ff0073", "#da0eba", "#9d00ac", "#6c19b3", "#4a42b1", "#3d8af0", "#30a0f1", "#1fb9d1", "#009686", "#45b354", "#84c750", "#c6e144", "#faf147", "#fbc423", "#fc9819", "#fd5227", "#775549", "#9c9c9c", "#607a89"];
var colorsElements = [];
var currentElement = null;
const icon_classes = 'cp-app-drive-icon-folder cp-app-drive-content-icon';
colors.forEach(function (color, i) {
var element = h("span.cp-app-drive-color-picker-color", [
h("span.cptools.cp-app-drive-icon-folder.cp-app-drive-content-icon" + (i === 0 ? ".cptools-folder-no-color" : ".cptools-folder")),
h("span.fa.fa-check")
(i === 0 ? Icons.get('folder-nocolor', {'class': icon_classes + ' folder-no-color'}): Icons.get('folder', {'class': icon_classes})),
]);
$(element).css("color", colors[i]);
if (colors[i] === currentColor) {
currentElement = element;
$(element).find('.cp-app-drive-icon-folder').replaceWith(
Icons.get('folder-check', {'class': icon_classes})
);
if (i === 0) {
$(element).addClass("folder-no-color");
}
$(element).addClass("cp-app-drive-current-color");
}
$(element).on("click", function () {
$(currentElement).removeClass("cp-app-drive-current-color");
if (currentElement) {
$(currentElement).removeClass("cp-app-drive-current-color");
var currentIndex = colorsElements.indexOf(currentElement);
var originalIcon = currentIndex === 0 ?
Icons.get('folder-nocolor', {'class': icon_classes + ' folder-no-color'}) :
Icons.get('folder', {'class': icon_classes});
$(currentElement).find('.cp-app-drive-icon-folder').replaceWith(originalIcon);
}
currentElement = element;
$(element).addClass("cp-app-drive-current-color");
$(element).find('.cp-app-drive-icon-folder').replaceWith(
Icons.get('folder-check', {'class': icon_classes})
);
cb(color);
});
colorsElements.push(element);
@ -2195,6 +2244,10 @@ define([
$(icon).addClass('cp-app-drive-element-icon');
$name.addClass('cp-app-drive-element-name-icon');
$name.prepend($(icon));
// Clean up
setTimeout(function() {
$name.closest('li').children('svg').remove();
}, 0);
};
var addFileData = function (element, $element) {
@ -2471,7 +2524,7 @@ define([
return;
}
$element.find('.fa').on('mouseenter', function (e) {
$element.find('.lucide').on('mouseenter', function (e) {
if ($element[0] && $element[0]._tippy) {
$element[0]._tippy.destroy();
}
@ -2739,15 +2792,18 @@ define([
$box.hide();
} else {
$box.text(msg);
var $close = $closeIcon.clone().css({
'cursor': 'pointer',
'margin-left': '10px',
title: Messages.fm_closeInfoBox
}).on('click', function () {
$box.hide();
APP.store['hide-info-' + path[0]] = '1';
localStore.put('hide-info-' + path[0], '1');
});
var $close = $('<span>').css({
'cursor': 'pointer',
'margin-left': '10px'
})
.attr('title', Messages.fm_closeInfoBox)
.attr('role', 'button')
.append($closeIcon.clone())
.on('click', function () {
$box.hide();
APP.store['hide-info-' + path[0]] = '1';
localStore.put('hide-info-' + path[0], '1');
});
$box.prepend($close);
}
return $box;
@ -2762,17 +2818,21 @@ define([
// Create the button allowing the user to switch from list to icons modes
var createViewModeButton = function ($container) {
var viewMode = getViewMode();
var gridIcon = h('i.fa.fa-th-large', { title: Messages.fm_viewGridButton });
var listIcon = h('i.fa.fa-list', { title: Messages.fm_viewListButton });
var gridIcon = Icons.get('grid', {title: Messages.fm_viewGridButton});
var listIcon = Icons.get('list', {title: Messages.fm_viewListButton});
var $button = $(h('button.cp-app-drive-viewmode-button', [
gridIcon,
listIcon
]));
$button.attr('aria-label', Messages.label_viewMode);
var $gridIcon = $(gridIcon);
var $listIcon = $(listIcon);
var showMode = function (mode) {
var $gridIcon = $button.find('svg.lucide-layout-grid');
var $listIcon = $button.find('svg.lucide-list');
if (!$gridIcon.length && !$listIcon.length) {
$gridIcon = $button.find('[data-lucide=layout-grid]');
$listIcon = $button.find('[data-lucide=list]');
}
if (mode === 'grid') {
$gridIcon.hide();
$listIcon.show();
@ -2817,7 +2877,7 @@ define([
if (hasOwned) {
buttons.push({
className: 'danger',
iconClass: '.cptools.cptools-destroy',
iconClass: 'destroy',
name: Messages.fc_delete_owned,
onClick: function () {
manager.emptyTrash(true, refresh);
@ -2828,7 +2888,7 @@ define([
buttons.push({
className: 'primary',
// We may want to use a new key here
iconClass: '.fa.fa-trash',
iconClass: 'trash-full',
name: hasOwned ? Messages.fc_remove : Messages.okButton,
onClick: function () {
manager.emptyTrash(false, refresh);
@ -2842,7 +2902,7 @@ define([
};
var createEmptyTrashButton = function () {
var button = h('button.btn.btn-danger', [
h('i.fa.'+faTrash),
Icons.get(trashFull),
h('span', Messages.fc_empty)
]);
$(button).click(function () {
@ -2925,7 +2985,7 @@ define([
var showLinkModal = function () {
var name, url;
var warning = h('div.alert.alert-warning', [
h('i.fa.fa-exclamation-triangle'),
Icons.get('alert'),
h('span', Messages.fm_link_warning)
]);
var content = h('p', [
@ -2970,7 +3030,7 @@ define([
buttons.push({
className: 'primary',
// We may want to use a new key here
iconClass: '.fa.fa-plus',
iconClass: 'add',
name: Messages.tag_add,
onClick: function () {
var $name = $(name);
@ -3082,20 +3142,20 @@ define([
options.push({ separator: true });
options.push({
class: 'cp-app-drive-new-fileupload',
icon: getIcon('fileupload')[0],
icon: Icons.get('drive-upload-file',{'class': 'cp-icon-color-file'}),
name: Messages.uploadButton,
});
if (APP.allowFolderUpload) {
options.push({
class: 'cp-app-drive-new-folderupload',
icon: getIcon('folderupload')[0],
icon: Icons.get('drive-upload-folder',{'class': 'cp-icon-color-file'}),
name: Messages.uploadFolderButton,
});
}
options.push({ separator: true });
options.push({
class: 'cp-app-drive-new-link',
icon: getIcon('link')[0],
icon: Icons.get('link', {class:'cp-icon-color-drive'}),
name: Messages.fm_link_new,
});
options.push({ separator: true });
@ -3113,7 +3173,7 @@ define([
options.push({
class: typeClass,
type: type,
icon: getIcon(type)[0],
icon: getIcon(type),
name: Messages.type[type],
});
});
@ -3165,7 +3225,7 @@ define([
var dropdownConfig = {
buttonContent: [
h('i.fa.fa-plus'),
Icons.get('add'),
h('span.cp-button-name', Messages.fm_newButton),
],
buttonCls: 'cp-toolbar-dropdown-nowrap',
@ -3195,7 +3255,7 @@ define([
'class': 'cp-app-drive-rm-filter',
},
content: [
h('i.fa.fa-times'),
Icons.get('close'),
Messages.fm_rmFilter,
],
});
@ -3218,7 +3278,7 @@ define([
tag: 'a',
attributes: attributes,
content: [
getIcon(type)[0],
getIcon(type),
Messages.type[type]
],
});
@ -3232,7 +3292,7 @@ define([
'data-type': 'link',
},
content: [
getIcon('link')[0],
Icons.get('link', {'class': 'cp-icon-color-drive'}),
Messages.fm_link_type
],
});
@ -3243,14 +3303,14 @@ define([
'data-type': 'file',
},
content: [
getIcon('file')[0],
Icons.get('file', {'class': 'cp-icon-color-file'}),
Messages.type['file']
],
});
}
var dropdownConfig = {
buttonContent: [
h('i.fa.fa-filter'),
Icons.get('filter'),
h('span.cp-button-name', Messages.fm_filterBy),
],
buttonCls: 'cp-toolbar-dropdown-nowrap',
@ -3263,7 +3323,7 @@ define([
var message = type === 'link' ? Messages.fm_link_type : Messages.type[type];
dropdownConfig.buttonContent.push(
h('span.cp-button-name', ':'),
getIcon(type)[0],
getIcon(type),
h('span.cp-button-name', message)
);
}
@ -3296,11 +3356,13 @@ define([
var SORT_FILE_BY = 'sortFilesBy';
var SORT_FILE_DESC = 'sortFilesDesc';
var getSortFileDesc = function () {
return APP.store[SORT_FILE_DESC]+"" === "true";
var getSortFolderDesc = function () { // this way the icon change is triggered
var v = APP.store[SORT_FOLDER_DESC];
return v === true;
};
var getSortFolderDesc = function () {
return APP.store[SORT_FOLDER_DESC]+"" === "true";
var getSortFileDesc = function () {
var v = APP.store[SORT_FILE_DESC];
return v === true;
};
var onSortByClick = function () {
@ -3359,7 +3421,7 @@ define([
tag: 'a',
attributes: {'class': 'cp-app-drive-element-type'},
content: [
h('i.fa.fa-minus'),
Icons.get('minus'),
Messages.fm_type,
],
action: function (e) { onSortByClick.call($(e.target).find('a')[0]); }
@ -3367,7 +3429,7 @@ define([
tag: 'a',
attributes: {'class': 'cp-app-drive-element-atime'},
content: [
h('i.fa.fa-minus'),
Icons.get('minus'),
Messages.fm_lastAccess,
],
action: function (e) { onSortByClick.call($(e.target).find('a')[0]); }
@ -3375,7 +3437,7 @@ define([
tag: 'a',
attributes: {'class': 'cp-app-drive-element-ctime'},
content: [
h('i.fa.fa-minus'),
Icons.get('minus'),
Messages.fm_creation,
],
action: function (e) { onSortByClick.call($(e.target).find('a')[0]); }
@ -3389,7 +3451,7 @@ define([
common: common
};
var $sortBlock = UIElements.createDropdown(dropdownConfig);
$sortBlock.find('button').append(h('span.fa.fa-sort-amount-desc')).append(h('span', Messages.fm_sort));
$sortBlock.find('button').append(Icons.get('sort-amount-desc')).append(h('span', Messages.fm_sort));
return $fhSort;
};
var getFolderListHeader = function (clickable, small) {
@ -3430,7 +3492,7 @@ define([
if (APP.store[SORT_FILE_BY] === '') { classSorted = 'cp-app-drive-sort-filename'; }
else if (APP.store[SORT_FILE_BY]) { classSorted = 'cp-app-drive-element-' + APP.store[SORT_FILE_BY]; }
if (classSorted) {
$list.find('.' + classSorted).addClass('cp-app-drive-sort-active').prepend($icon).find('i').hide();
$list.find('.' + classSorted).addClass('cp-app-drive-sort-active').prepend($icon).find('i').eq(1).hide();
}
};
var getFileListHeader = function (clickable) {
@ -3660,7 +3722,7 @@ define([
$body: $('body')
});
var $modal = modal.$modal;
var $title = $(h('h3', [ h('i.fa.fa-plus'), ' ', Messages.fm_newButton ]));
var $title = $(h('h3', [ Icons.get('add'), ' ', Messages.fm_newButton ]));
var $description = $('<p>').text(Messages.fm_newButtonTitle);
$modal.find('.cp-modal').append($title);
$modal.find('.cp-modal').append($description);
@ -3688,7 +3750,7 @@ define([
APP.$collapseButton = APP.$collapseButton || common.createButton('', true, {
text: Messages.drive_treeButton,
name: 'files',
icon: 'fa-hdd-o',
icon: 'drive',
drawer: false,
});
checkCollapseButton();
@ -3927,7 +3989,7 @@ define([
$input[0].selectionStart = search.cursor || 0;
$input[0].selectionEnd = search.cursor || 0;
var cancel = h('span.fa.fa-times.cp-app-drive-search-cancel', {title:Messages.cancel});
var cancel = Icons.get('close', {class: 'cp-app-drive-search-cancel',title:Messages.cancel}); // not visible
cancel.addEventListener('click', function () {
$input.val('');
search.cursor = 0;
@ -3935,8 +3997,8 @@ define([
});
$div.append(cancel);
$div.append($spinnerContainer);
$list.append($div);
$spinnerContainer.appendTo($list);
setTimeout(function () {
$input.focus();
});
@ -4491,7 +4553,7 @@ define([
$icon.css("color", isSharedFolder ? getFolderColor(path.slice(0, -1)) : getFolderColor(path));
var $collapse;
if (collapsable) {
$collapse = $expandIcon.clone().attr('tabindex', 0);
$collapse = $('<span>').attr('tabindex', 0).attr('class', 'cp-app-drive-icon-expcol').append($expandIcon.clone());
}
var $elementRow = $('<span>', {
'class': 'cp-app-drive-element-row cp-app-drive-element-folder',
@ -4531,14 +4593,12 @@ define([
// It is closed, open it
$element.removeClass('cp-app-drive-element-collapsed');
LS.setFolderOpened(path, true);
$collapse.removeClass('fa-plus-square-o');
$collapse.addClass('fa-minus-square-o');
$collapse.empty().append($expandedIcon.clone());
} else {
// Collapse the folder
$element.addClass('cp-app-drive-element-collapsed');
LS.setFolderOpened(path, false);
$collapse.removeClass('fa-minus-square-o');
$collapse.addClass('fa-plus-square-o');
$collapse.empty().append($expandIcon.clone());
// Change the current opened folder if it was collapsed
if (manager.isSubpath(currentPath, path)) {
displayDirectory(path);
@ -4585,7 +4645,7 @@ define([
(isRootOpened ? $folderOpenedIcon : $folderIcon);
var $rootElement = createTreeElement(rootName, $rootIcon.clone(), path.slice(), false, true, true, isRootOpened);
if (!manager.hasSubfolder(root)) {
$rootElement.find('.cp-app-drive-icon-expcol').css('visibility', 'hidden');
$rootElement.find('.cp-app-drive-icon-expcol').addClass('cp-icon-hidden').attr('tabindex','-1');
}
$rootElement.addClass('cp-app-drive-tree-root');
$rootElement.find('>.cp-app-drive-element-row')
@ -5355,7 +5415,7 @@ define([
$contextMenu.remove();
$contextMenu = createContextMenu(common).appendTo($appContainer);
if (!APP.loggedIn) {
$contextMenu.find('.cp-app-drive-context-delete').attr('data-icon', faDelete)
$contextMenu.find('.cp-app-drive-context-delete').attr('data-icon', destroy)
.html($contextMenu.find('.cp-app-drive-context-remove').html());
}
addContextEvent();
@ -5602,7 +5662,7 @@ define([
var pw = $(newPassword).find('.cp-password-input').val();
locked = true;
$(div).find('.alert').remove();
$(passwordOk).html('').append(h('span.fa.fa-spinner.fa-spin', {style: 'margin-left: 0'}));
$(passwordOk).html('').append(Icons.get('loading'));
manager.restoreSharedFolder(fId, pw, function (err, obj) {
if (obj && obj.error) {
var wrong = h('div.alert.alert-danger', Messages.drive_sfPasswordError);

View File

@ -13,8 +13,9 @@ define([
'/common/hyperscript.js',
'/customize/messages.js',
'/components/nthen/index.js',
'/common/common-icons.js',
], function ($, Util, Hash, UI, UIElements, Types, Modal, h,
Messages, nThen) {
Messages, nThen, Icons) {
var Access = {};
var getOwnersTab = function (Env, data, opts, _cb) {
@ -45,7 +46,7 @@ define([
opts = opts || {};
var redrawAll = function () {};
var addBtn = h('button.btn.btn-primary.cp-access-add', [h('i.fa.fa-arrow-left'), h('i.fa.fa-arrow-up')]);
var addBtn = h('button.btn.btn-primary.cp-access-add', [Icons.get('arrow-left'), Icons.get('arrow-up')]);
var div1 = h('div.cp-share-column.cp-ownership');
var divMid = h('div.cp-share-column-mid', addBtn);
@ -368,7 +369,7 @@ define([
UI.log(Messages.saved);
});
});
$(addBtn).on('keydown', function () {
$(addBtn).on('keydown', function (event) {
if (event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@ -447,7 +448,7 @@ define([
var redrawAll = function () {};
var addBtn = h('button.btn.btn-primary.cp-access-add', [h('i.fa.fa-arrow-left'), h('i.fa.fa-arrow-up')]);
var addBtn = h('button.btn.btn-primary.cp-access-add', [[Icons.get('arrow-left'), Icons.get('arrow-up')]]);
var div1 = h('div.cp-share-column.cp-allowlist');
var divMid = h('div.cp-share-column-mid.cp-overlay-container', [
@ -725,7 +726,7 @@ define([
UI.log(Messages.saved);
});
});
$(addBtn).on('keydown', function () {
$(addBtn).on('keydown', function (event) {
if (event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@ -941,7 +942,7 @@ define([
pLocked = true;
UI.confirm(changePwConfirm, function (yes) {
if (!yes) { pLocked = false; return; }
$(passwordOk).html('').append(h('span.fa.fa-spinner.fa-spin', {style: 'margin-left: 0'}));
$(passwordOk).html('').append(Icons.get('loading', {style: 'margin: 0; animation: spin 10s linear infinite;'}));
var q = isFile ? 'Q_BLOB_PASSWORD_CHANGE' :
(isOO ? 'Q_OO_PASSWORD_CHANGE' : 'Q_PAD_PASSWORD_CHANGE');
@ -1053,7 +1054,7 @@ define([
$d.append(changePass);
}
if (owned) {
var deleteOwned = h('button.btn.btn-danger', [h('i.cptools.cptools-destroy'), Messages.fc_delete_owned]);
var deleteOwned = h('button.btn.btn-danger', [Icons.get('destroy'), Messages.fc_delete_owned]);
var spinner = UI.makeSpinner();
UI.confirmButton(deleteOwned, {
classes: 'btn-danger'
@ -1177,7 +1178,7 @@ define([
});
$cbox.find('.cp-checkmark-label').addClass('cp-access-margin-right');
$cbox.find('.cp-checkmark-mark')
.after(h('span.fa.fa-bell-slash.cp-access-margin-right'));
.after(Icons.get('mute'));
content.push(h('p', cbox));
}
@ -1208,7 +1209,6 @@ define([
redraw(ownersOrAllow);
});
});
cb(void 0, $div);
};
@ -1230,16 +1230,16 @@ define([
var tabs = [{
getTab: getAccessTab,
title: Messages.access_main,
icon: "fa fa-unlock-alt",
icon: "access",
}, {
getTab: getAllowTab,
title: Messages.access_allow,
icon: "fa fa-list",
icon: "list",
buttons: buttons,
}, {
getTab: getOwnersTab,
title: Messages.creation_owners,
icon: "fa fa-id-badge",
icon: "document-owner",
buttons: buttons,
}];
Modal.getModal(common, opts, tabs, cb);

View File

@ -5,14 +5,15 @@
define([
'/common/hyperscript.js',
'/customize/messages.js',
], function (h, Messages) {
'/common/common-icons.js'
], function (h, Messages, Icons) {
var Badges = {};
const badges = {
admin: 'fa-star',
moderator: 'fa-life-ring',
premium: 'fa-ticket',
error: 'fa-exclamation-circle'
admin: 'badge-admin',
moderator: 'badge-moderator',
premium: 'badge-premium',
error: 'badge-error'
};
// safeBadges won't show an error when they aren't active anymore
@ -22,13 +23,14 @@ define([
Badges.render = id => {
let icon = badges[id];
if (!icon) { return; }
let cls = icon.indexOf('cptools') === 0 ? 'cptools '+icon : 'fa '+icon;
let cls = 'cp-badge';
if (id === 'error') { cls += ' cp-badge-error'; }
return h('i', {
'data-badge': id,
'class': `cp-badge ${cls}`,
'title': Messages[`badges_${id}`] || id
});
let span = document.createElement('span');
span.setAttribute('class', cls);
span.setAttribute('title', Messages[`badges_${id}`] || id);
span.setAttribute('data-badge', id);
span.append(Icons.get(icon));
return span;
};
return Badges;

View File

@ -13,12 +13,13 @@ define([
'/common/inner/badges.js',
'/customize/messages.js',
'/customize/application_config.js',
'/common/common-icons.js',
'/components/croppie/croppie.min.js',
'/components/file-saver/FileSaver.min.js',
'css!/components/croppie/croppie.css',
], function ($, ApiConfig, Util, Hash, UI, h, MediaTag, Badges,
Messages, AppConfig) {
Messages, AppConfig, Icons) {
var MT = {};
// Configure MediaTags to use our local viewer
@ -331,11 +332,11 @@ define([
modal.show();
var $modal = modal.$modal.focus();
var $container = $modal.find('.cp-modal').append([
h('div.cp-mediatag-control', left = h('span.fa.fa-chevron-left')),
h('div.cp-mediatag-control', left = Icons.get('chevron-left')),
h('div.cp-mediatag-container', [
h('div.cp-loading-spinner-container', h('span.cp-spinner')),
]),
h('div.cp-mediatag-control', right = h('span.fa.fa-chevron-right')),
h('div.cp-mediatag-control', right = Icons.get('chevron-right')),
]);
var $close = $modal.find('.cp-modal-close');
var $left = $(left);
@ -484,37 +485,36 @@ define([
}, [
h('li.cp-svg', h('a.cp-app-code-context-open.dropdown-item', {
'tabindex': '-1',
'data-icon': "fa-eye",
}, Messages.pad_mediatagPreview)),
}, [
Icons.get('preview'),
Messages.pad_mediatagPreview
])),
h('li', h('a.cp-app-code-context-openin.dropdown-item', {
'tabindex': '-1',
'data-icon': "fa-external-link",
}, Messages.pad_mediatagOpen)),
}, [
Icons.get('external-link'),
Messages.pad_mediatagOpen
])),
h('li', h('a.cp-app-code-context-share.dropdown-item', {
'tabindex': '-1',
'data-icon': "fa-shhare-alt",
}, Messages.pad_mediatagShare)),
}, [
Icons.get('share'),
Messages.pad_mediatagShare
])),
h('li', h('a.cp-app-code-context-saveindrive.dropdown-item', {
'tabindex': '-1',
'data-icon': "fa-cloud-upload",
}, Messages.pad_mediatagImport)),
}, [
Icons.get('cloud-upload'),
Messages.pad_mediatagImport
])),
h('li.cp-svg', h('a.cp-app-code-context-download.dropdown-item', {
'tabindex': '-1',
'data-icon': "fa-download",
}, Messages.download_mt_button)),
},[
Icons.get('download'),
Messages.download_mt_button
])),
])
]);
// create the icon for each contextmenu option
$(menu).find("li a.dropdown-item").each(function (i, el) {
var $icon = $("<span>");
if ($(el).attr('data-icon')) {
var font = $(el).attr('data-icon').indexOf('cptools') === 0 ? 'cptools' : 'fa';
$icon.addClass(font).addClass($(el).attr('data-icon'));
} else {
$icon.text($(el).text());
}
$(el).prepend($icon);
});
var m = UI.createContextMenu(menu);
mediatagContextMenu = m;

View File

@ -10,8 +10,9 @@ define([
'/components/nthen/index.js',
'/customize.dist/login.js',
'/common/common-util.js',
'/common/common-icons.js',
], function ($, Messages, h, UI, nThen, Login, Util) {
], function ($, Messages, h, UI, nThen, Login, Util, Icons) {
const MFA = {};
MFA.totpSetup = function (common, config, content, enabled, cb) {
@ -23,10 +24,9 @@ define([
var $content = $(content).empty();
$content.append(h('div.cp-settings-mfa-hint.cp-settings-mfa-status' + (enabled ? '.mfa-enabled' : '.mfa-disabled'), [
h('i.fa' + (enabled ? '.fa-check' : '.fa-times')),
(enabled ? Icons.get('check') : Icons.get('close')),
h('span', enabled ? Messages.mfa_status_on : Messages.mfa_status_off)
]));
if (enabled) {
(function () {
var button = h('button.btn', Messages.mfa_disable);
@ -134,7 +134,7 @@ define([
return;
}
var button = h('button.btn.btn-primary', Messages.mfa_setup_button);
var button = h('button.btn.btn-primary', [Icons.get('lock'), Messages.mfa_setup_button]);
var $mfaSetupBtn = $(button);
var pwInput;
$content.append(h('div.cp-password-container', [
@ -214,7 +214,7 @@ define([
var next = waitFor();
recoverySecret = Util.encodeBase64(Nacl.randomBytes(24));
var button = h('button.btn.btn-primary', [
h('i.fa.fa-check'),
Icons.get('check'),
h('span', Messages.done)
]);
$content.append(h('div.alert.alert-danger', [
@ -268,7 +268,7 @@ define([
var description = h('p.cp-settings-mfa-hint', Messages.settings_otp_tuto);
var confirmOTP = h('button.btn.btn-primary', [
h('i.fa.fa-check'),
Icons.get('check'),
h('span', Messages.mfa_enable)
]);
var lock = false;

View File

@ -199,7 +199,7 @@ define([
var tabs = [{
getTab: getPadProperties,
title: Messages.fc_prop,
icon: "fa fa-info-circle",
icon: "features",
}];
Modal.getModal(common, opts, tabs, cb);
};

View File

@ -16,11 +16,12 @@ define([
'/customize/messages.js',
'/components/nthen/index.js',
'/customize/pages.js',
'/common/common-icons.js',
'/components/file-saver/FileSaver.min.js',
'/lib/qrcode.min.js',
], function ($, ApiConfig, Util, Hash, UI, UIElements, Feedback, Modal, h, Clipboard,
Messages, nThen, Pages) {
Messages, nThen, Pages, Icons) {
var Share = {};
var embeddableApps = [
@ -93,7 +94,7 @@ define([
var shareButton = {
className: 'primary cp-share-with-friends',
name: Messages.share_withFriends,
iconClass: '.fa.fa-shhare-alt',
iconClass: 'share',
onClick: function () {
var href;
nThen(function (waitFor) {
@ -304,7 +305,7 @@ define([
var makeFaqLink = function (opts) {
var link = h('span', [
h('i.fa.fa-question-circle'),
Icons.get('help'),
h('a', {href: '#'}, Messages.passwordFaqLink)
]);
$(link).click(function () {
@ -355,7 +356,7 @@ define([
// Show alert if the pad is password protected
if (opts.hasPassword) {
$contactsContent.append(h('div.alert.alert-primary', [
h('i.fa.fa-unlock'),
Icons.get('access'),
Messages.share_contactPasswordAlert, h('br'),
makeFaqLink(opts)
]));
@ -396,7 +397,7 @@ define([
// Show alert if the pad is password protected
if (opts.hasPassword) {
linkContent.push(h('div.alert.alert-primary', [
h('i.fa.fa-lock'),
Icons.get('lock'),
Messages.share_linkPasswordAlert, h('br'),
makeFaqLink(opts)
]));
@ -407,7 +408,7 @@ define([
// to avoid alert fatigue
if (!opts.versionHash && !opts.static) {
var localStore = window.cryptpadStore;
var dismissButton = h('span.fa.fa-times');
var dismissButton = h('span', [Icons.get('close')]);
var shareLinkWarning = h('div.alert.alert-warning.dismissable',
{ style: 'display: none;' },
[
@ -443,7 +444,7 @@ define([
!opts.sharedFolder && {
className: 'secondary cp-nobar',
name: Messages.share_linkOpen,
iconClass: '.fa.fa-eye',
iconClass: 'preview',
onClick: function () {
opts.saveValue();
var v = opts.getLinkValue({
@ -460,7 +461,7 @@ define([
}, {
className: 'primary cp-nobar',
name: Messages.share_linkCopy,
iconClass: '.fa.fa-link',
iconClass: 'link',
onClick: function () {
opts.saveValue();
var v = opts.getLinkValue({
@ -532,7 +533,7 @@ define([
{
className: 'primary cp-nobar',
name: Messages.download_dl,
iconClass: '.fa.fa-download',
iconClass: 'download',
onClick: function () {
qr.querySelector('canvas').toBlob(blob => {
var name = Util.fixFileName((opts.title || 'document') + '-qr.png');
@ -559,7 +560,7 @@ define([
// Show alert if the pad is password protected
if (opts.hasPassword) {
embedContent.push(h('div.alert.alert-primary', [
h('i.fa.fa-lock'), ' ',
Icons.get('lock'), ' ',
Messages.share_embedPasswordAlert, h('br'),
makeFaqLink(opts)
]));
@ -570,7 +571,7 @@ define([
{
className: 'primary',
name: Messages.share_linkCopy,
iconClass: '.fa.fa-link',
iconClass: 'link',
onClick: function () {
Feedback.send('SHARE_EMBED');
var v = opts.getEmbedValue();
@ -860,25 +861,25 @@ define([
var tabs = [{
getTab: getContactsTab,
title: Messages.share_contactCategory,
icon: "fa fa-address-book",
icon: "contacts",
active: contactsActive,
onShow: onShowContacts,
onHide: resetTab
}, {
getTab: getLinkTab,
title: Messages.share_linkCategory,
icon: "fa fa-link",
icon: "link",
active: !contactsActive,
}, window.CP_DEV_MODE ? { // NEXT enable for all
getTab: getQRTab,
title: Messages.share_QRCategory,
icon: 'fa fa-qrcode',
icon: 'qr-code',
} : undefined].filter(Boolean);
if (!opts.static && ApiConfig.enableEmbedding && embeddableApps.includes(pathname)) {
tabs.push({
getTab: getEmbedTab,
title: Messages.share_embedCategory,
icon: "fa fa-code",
icon: "code",
onShow: onShowEmbed,
onHide: resetTab
});
@ -894,7 +895,7 @@ define([
// Add the versionHash warning if needed
if (opts.versionHash) {
$rights.after(h('div.alert.alert-warning', [
h('i.fa.fa-history'),
Icons.get('history'),
UI.setHTML(h('span'), Messages.share_versionHash)
]));
}
@ -917,7 +918,7 @@ define([
// Show alert if the pad is password protected
if (opts.hasPassword) {
$contactsContent.append(h('div.alert.alert-primary', [
h('i.fa.fa-lock'),
Icons.get('lock'),
Messages.share_linkPasswordAlert, h('br'),
makeFaqLink(opts)
]));
@ -943,7 +944,7 @@ define([
// Show alert if the pad is password protected
if (opts.hasPassword) {
linkContent.push(h('div.alert.alert-primary', [
h('i.fa.fa-lock'),
Icons.get('lock'),
Messages.share_linkPasswordAlert, h('br'),
makeFaqLink(opts)
]));
@ -951,7 +952,7 @@ define([
// warning about sharing links
var localStore = window.cryptpadStore;
var dismissButton = h('span.fa.fa-times');
var dismissButton = Icons.get('close');
var shareLinkWarning = h('div.alert.alert-warning.dismissable',
{ style: 'display: none;' },
[
@ -976,7 +977,7 @@ define([
{
className: 'primary',
name: Messages.share_linkCopy,
iconClass: '.fa.fa-link',
iconClass: 'link',
onClick: function () {
var v = opts.getLinkValue();
Clipboard.copy(v, (err) => {
@ -1008,7 +1009,7 @@ define([
// Show alert if the pad is password protected
if (opts.hasPassword) {
$(embed).append(h('div.alert.alert-primary', [
h('i.fa.fa-lock'),
Icons.get('lock'),
Messages.share_linkPasswordAlert, h('br'),
makeFaqLink(opts)
]));
@ -1022,7 +1023,7 @@ define([
}, {
className: 'primary',
name: Messages.share_mediatagCopy,
iconClass: '.fa.fa-link',
iconClass: 'link',
onClick: function () {
var v = common.getMediatagFromHref(opts.fileData);
Clipboard.copy(v, (err) => {
@ -1062,12 +1063,12 @@ define([
var tabs = [{
getTab: getFileContactsTab,
title: Messages.share_contactCategory,
icon: "fa fa-address-book",
icon: "contacts",
active: hasFriends,
}, {
getTab: getFileLinkTab,
title: Messages.share_linkCategory,
icon: "fa fa-link",
icon: "link",
active: !hasFriends,
}];
@ -1076,7 +1077,7 @@ define([
tabs.push({
getTab: getFileEmbedTab,
title: Messages.share_embedCategory,
icon: "fa fa-code",
icon: "code",
});
}

View File

@ -12,6 +12,7 @@ define([
'/common/common-hash.js',
'/customize/messages.js',
'/common/hyperscript.js',
'/common/common-icons.js',
], function(
$,
ApiConfig,
@ -21,7 +22,8 @@ define([
Util,
Hash,
Messages,
h
h,
Icons
) {
const Sidebar = {};
const keyToCamlCase = (key) => {
@ -55,21 +57,10 @@ define([
]);
};
blocks.icon = (icon) => {
let s = icon.split(' ');
let cls;
if (s.length > 1) {
cls = '.' + s.join('.');
} else {
let prefix = icon.slice(0, icon.indexOf('-'));
cls = `.${prefix}.${icon}`;
}
return h(`i${cls}`, { 'aria-hidden': 'true' });
};
blocks.button = (type, icon, text) => {
type = type || 'primary';
return h(`button.btn.btn-${type}`, [
icon ? blocks.icon(icon) : undefined,
icon ? Icons.get(icon) : undefined,
h('span', text)
]);
};
@ -380,7 +371,7 @@ define([
if (!active && !i) { active = key; }
var category = categories[key];
var icon;
if (category.icon) { icon = h('span', { class: category.icon }); }
if (category.icon) { icon = Icons.get(category.icon); }
var item = h('li.cp-sidebarlayout-category', {
'role': 'menuitem',
'tabindex': 0,

View File

@ -9,7 +9,8 @@ define([
'/customize/messages.js',
'/components/nthen/index.js',
'/components/chainpad/chainpad.dist.js',
], function ($, UI, h, Messages, nThen, ChainPad /* JsonOT */) {
'/common/common-icons.js',
], function ($, UI, h, Messages, nThen, ChainPad, Icons /* JsonOT */) {
var Snapshots = {};
Snapshots.create = function (common, config) {
@ -75,7 +76,7 @@ define([
var $actions = $(actions);
var content = [
h('span.cp-toolbar-snapshots-info', [
h('i.fa.fa-camera'),
Icons.get('snapshot'),
h('span.cp-toolbar-snapshots-title', data.title + ' - ' + new Date(data.time).toLocaleString()),
]),
actions
@ -83,7 +84,7 @@ define([
if (!config.readOnly) {
$(h('button.cp-toolbar-snapshots-restore', [
h('i.fa.fa-check'),
Icons.get('check'),
h('spap.cp-button-name', Messages.snapshots_restore)
])).click(function () {
var closed = config.close(true, snapshot);
@ -99,7 +100,7 @@ define([
$(h('button.cp-toolbar-snapshots-close', [
h('i.fa.fa-times'),
Icons.get('close'),
h('spap.cp-button-name', Messages.snapshots_close)
])).click(function () {
$snap.hide();

View File

@ -15,9 +15,10 @@ define([
'/customize/messages.js',
'/components/nthen/index.js',
'/components/saferphore/index.js',
'/common/common-icons.js',
'/components/jszip/dist/jszip.min.js',
], function ($, FileCrypto, Hash, Util, UI, h, Feedback, UO,
Cache, Messages, nThen, Saferphore, JsZip) {
Cache, Messages, nThen, Saferphore, Icons, JsZip) {
var saveAs = window.saveAs;
var sanitize = function (str) {
@ -502,14 +503,13 @@ define([
});
};
var download = h('button.btn.btn-primary', Messages.download_mt_button);
var download = h('button.btn.btn-primary', [Icons.get('download'), Messages.download_mt_button]);
var completed = false;
var complete = function(h, err) {
if (completed) { return; }
completed = true;
$(progress).find('.fa-square-o').removeClass('fa-square-o')
.addClass('fa-check-square-o');
$(cancel).text(Messages.filePicker_close).off('click').click(function() {
$(progress).find('svg').empty().append(Icons.get('checked-box'));
$(cancel).empty().append(Icons.get('close'), Messages.filePicker_close).off('click').click(function() {
_onCancel.forEach(function(h) { h(); });
});
$(download).click(h).appendTo(actions);
@ -525,10 +525,9 @@ define([
// New step
if (!done[step]) {
$(progress).find('.fa-square-o').removeClass('fa-square-o')
.addClass('fa-check-square-o');
$(progress).find('svg').empty().append(Icons.get('checked-box'));
$(progress).append(h('p', [
h('span.fa.fa-square-o'),
Icons.get('checked-box'),
h('span.text', Messages['settings_export_' + step] || step)
]));
done[step] = state; // -1 if no bar, object otherwise

View File

@ -136,7 +136,7 @@ var factory = function (Util) {
var btn = document.createElement('button');
btn.setAttribute('class', 'btn btn-default');
btn.setAttribute('alt', metadata.alt || "");
btn.innerHTML = '<i class="fa fa-save"></i>' + cfg.download.text + '<br>' +
btn.innerHTML = '<i data-lucide="save"></i>' + cfg.download.text + '<br>' +
(metadata.name ? '<b>' + fixHTML(metadata.name) + '</b>' : '');
btn.addEventListener('click', function () {
saveFile(content, url, metadata.name);
@ -205,7 +205,7 @@ var factory = function (Util) {
};
var makeDownloadButton = function (cfg, mediaObject, size, cb) {
var metadata = cfg.metadata || {};
var i = '<i class="fa fa-paperclip"></i>';
var i = '<i data-lucide="paperclip"></i>';
var name = metadata.name ? '<span class="mediatag-download-name">'+ i +'<b>'+
fixHTML(metadata.name)+'</b></span>' : '';
var btn = document.createElement('button');

View File

@ -11,7 +11,8 @@ define([
'/common/inner/badges.js',
'/common/hyperscript.js',
'/common/diffMarked.js',
], function ($, Messages, Util, UI, UIElements, Badges, h, DiffMd) {
'/common/common-icons.js',
], function ($, Messages, Util, UI, UIElements, Badges, h, DiffMd, Icons) {
'use strict';
var debug = console.log;
@ -58,7 +59,7 @@ define([
$container.addClass('cp-app-contacts-initializing');
var messaging = h('div#cp-app-contacts-messaging', [
h('span.fa.fa-spinner.fa-pulse.fa-4x.fa-fw.cp-app-contacts-spinner'),
Icons.get('loading', {'class': 'cp-app-contacts-spinner'}),
h('div.cp-app-contacts-info', [
h('h2', Messages.contacts_info1),
h('ul', [
@ -70,13 +71,13 @@ define([
]);
var friendList = h('div#cp-app-contacts-friendlist', [
h('span.fa.fa-spinner.fa-pulse.fa-4x.fa-fw.cp-app-contacts-spinner'),
Icons.get('loading', {'class': 'cp-app-contacts-spinner'}),
h('div.cp-app-contacts-padchat.cp-app-contacts-category', [
h('div.cp-app-contacts-category-content')
]),
h('div.cp-app-contacts-friends.cp-app-contacts-category', [
h('button.btn.btn-default.cp-app-contacts-muted-button', {tabindex:0},[
h('i.fa.fa-bell-slash'),
Icons.get('mute'),
Messages.contacts_manageMuted
]),
h('div.cp-app-contacts-category-content.cp-contacts-friends')
@ -128,7 +129,7 @@ define([
toolbar['chat'].find('button').addClass('cp-toolbar-notification');
}
if (!toolbar['chat'].hasClass('cp-leftside-active')) {
toolbar['chat'].find('span.fa').addClass('cp-team-chat-notification');
toolbar['chat'].find('span .lucide').addClass('cp-team-chat-notification');
}
};
@ -241,9 +242,10 @@ define([
$(getChat(id)).find('.cp-app-contacts-messages').html('');
};
markup.chatbox = function (id, data, curvePublic) {
var moreHistory = h('span.cp-app-contacts-more-history.fa.fa-history', {
title: Messages.contacts_fetchHistory,
var moreHistory = h('span', {
class: 'cp-app-contacts-more-history',
});
moreHistory.append(Icons.get('history', {title: Messages.contacts_fetchHistory}));
var chan = state.channels[id];
var displayName = UI.getDisplayName(chan.name || chan.displayName);
@ -305,9 +307,10 @@ define([
});
});
var removeHistory = h('span.cp-app-contacts-remove-history.fa.fa-eraser', {
title: Messages.contacts_removeHistoryTitle
var removeHistory = h('span', {
'class': 'cp-app-contacts-remove-history'
});
removeHistory.append(Icons.get('remove-history', {title: Messages.contacts_removeHistoryTitle}));
$(removeHistory).click(function () {
UI.confirm(Messages.contacts_confirmRemoveHistory, function (yes) {
@ -341,7 +344,7 @@ define([
var priv = metadataMgr.getPrivateData();
var closeTips = h('span.fa.fa-times.cp-app-contacts-tips-close');
var closeTips = h('span', Icons.get('close', { 'class': 'cp-app-contacts-tips-close'}));
var tips;
if (isApp && Util.find(priv.settings, ['general', 'hidetips', 'chat']) !== true) {
tips = h('div.cp-app-contacts-tips', [
@ -358,9 +361,9 @@ define([
var input = h('textarea', {
placeholder: Messages.contacts_typeHere
});
var sendButton = h('button.btn.btn-primary.fa.fa-paper-plane', {
var sendButton = h('button.btn.btn-primary', {
title: Messages.contacts_send,
});
}, Icons.get('send'));
var rightCol = h('span.cp-app-contacts-right-col', [
h('span.cp-app-contacts-name', displayName),
@ -540,21 +543,24 @@ define([
curve = __channel.curvePublic;
}
var unmute = h('span.cp-app-contacts-remove.fa.fa-bell.cp-unmute-icon', {
var unmute = h('span', Icons.get('notification'), {
class: 'cp-app-contacts-remove cp-unmute-icon',
title: Messages.contacts_unmute || 'unmute',
style: (curve && mutedUsers[curve]) ? undefined : 'display: none;'
});
var mute = h('span.cp-app-contacts-remove.fa.fa-bell-slash.cp-mute-icon', {
var mute = h('span', Icons.get('mute'), {
class: 'cp-app-contacts-remove cp-mute-icon',
title: Messages.contacts_mute || 'mute',
style: (curve && mutedUsers[curve]) ? 'display: none;' : undefined
});
var remove = h('span.cp-app-contacts-remove.fa.fa-user-times', {
var remove = h('span', Icons.get('unfriend', {
class: 'cp-app-contacts-remove',
title: Messages.contacts_remove
});
var leaveRoom = h('span.cp-app-contacts-remove.fa.fa-sign-out', {
}));
var leaveRoom = h('span', Icons.get('logout', {
class: 'cp-app-contacts-remove',
title: Messages.contacts_leaveRoom
});
}));
var status = h('span.cp-app-contacts-status', {
title: Messages.contacts_online
});
@ -904,7 +910,7 @@ define([
var button = h('button.btn', {
'data-user': curve
}, [
h('i.fa.fa-bell'),
Icons.get('notification'),
Messages.contacts_unmute || 'unmute'
]);
common.displayAvatar($(avatar), data.avatar, data.name, Util.noop, data.uid, data.badge);
@ -914,6 +920,8 @@ define([
if (e) { return void console.error(e); }
$(button).closest('div').remove();
if (!data) { $button.hide(); }
$('.cp-app-contacts-friend[data-user="'+curve+'"]')
.find('.cp-unmute-icon').hide();
$('.cp-app-contacts-friend[data-user="'+curve+'"]')
.find('.cp-mute-icon').show();
if ($('.cp-contacts-muted-table').find('.cp-contacts-muted-user').length === 0) {

View File

@ -12,8 +12,9 @@ define([
'/common/common-constants.js',
'/customize/messages.js',
'/customize/pages.js',
'/common/common-icons.js',
'tui-date-picker'
], function($, h, Hash, UI, UIElements, Util, Constants, Messages, Pages, DatePicker) {
], function($, h, Hash, UI, UIElements, Util, Constants, Messages, Pages, Icons, DatePicker) {
var handlers = {};
@ -458,7 +459,9 @@ define([
content.getFormatText = function () {
var msg = Pages.setHTML(h('span'), Messages.settings_safeLinkDefault);
var i = msg.querySelector('i');
if (i) { i.classList = 'fa fa-shhare-alt'; }
if (i) { i.remove(); }
const icon = Icons.get('share');
msg.appendChild(icon);
return msg.innerHTML;
};

View File

@ -31,9 +31,8 @@ body.cp-app-sheet, body.cp-app-doc, body.cp-app-presentation {
display: flex;
align-items: center;
justify-content: center;
.fa {
font-size: 30px;
margin-right: 10px;
svg {
animation: spin 10s linear infinite;
}
}

View File

@ -6,7 +6,9 @@ define([
'jquery',
'/common/common-interface.js',
'/common/hyperscript.js',
], function ($, UI, h) {
'/common/common-icons.js',
], function ($, UI, h, Icons) {
//var ChainPad = window.ChainPad;
var History = {};
@ -145,7 +147,8 @@ define([
$hist.html('').css('display', 'flex');
$bottom.hide();
UI.spinner($hist).get().show();
var spinner = UI.makeSpinner($hist);
spinner.spin();
var $fastPrev, $fastNext, $next;
@ -195,19 +198,19 @@ define([
$hist.html('');
var fastPrev = h('button.cp-toolbar-history-previous', { title: Messages.history_prev }, [
h('i.fa.fa-fast-backward'),
Icons.get('history-fast-prev'),
]);
var fastNext = h('button.cp-toolbar-history-next', { title: Messages.history_next }, [
h('i.fa.fa-fast-forward'),
Icons.get('history-fast-next'),
]);
var _next = h('button.cp-toolbar-history-next', { title: Messages.history_next }, [
h('i.fa.fa-step-forward')
Icons.get('history-next'),
]);
$fastPrev = $(fastPrev);
$fastNext = $(fastNext).prop('disabled', 'disabled');
$next = $(_next).prop('disabled', 'disabled');
var pos = h('span.cp-history-timeline-pos.fa.fa-caret-down');
var pos = Icons.get('chevron-down', {'class': 'cp-history-timeline-pos'});
var time = h('div.cp-history-timeline-time');
var version = h('div.cp-history-timeline-version');
$time = $(time);
@ -231,21 +234,22 @@ define([
]);
var snapshot = h('button', {
title: Messages.snapshots_new,
class: 'cp-history-create-snapshot'
}, [
h('i.fa.fa-camera')
Icons.get('snapshot')
]);
var share = h('button', { title: Messages.history_shareTitle }, [
h('i.fa.fa-shhare-alt'),
Icons.get('share'),
h('span', Messages.shareButton)
]);
var restore = h('button', {
title: Messages.history_restoreTitle,
}, [
h('i.fa.fa-check'),
Icons.get('history-restore'),
h('span', Messages.history_restore)
]);
var close = h('button', { title: Messages.history_closeTitle }, [
h('i.fa.fa-times'),
Icons.get('close'),
h('span', Messages.history_close)
]);
var actions = h('div.cp-toolbar-history-actions', [
@ -336,7 +340,7 @@ define([
keys: [27],
}, {
className: 'primary',
iconClass: '.fa.fa-camera',
iconClass: 'snapshot',
name: Messages.snapshots_new,
onClick: function () {
var val = $input.val();
@ -379,7 +383,6 @@ define([
display();
showVersion(true);
//return void loadMoreOOHistory();
};

View File

@ -26,10 +26,10 @@ define([
'/common/onlyoffice/current-version.js',
'/common/onlyoffice/broken-formats.js',
'/common/common-icons.js',
'/components/file-saver/FileSaver.min.js',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'less!/components/components-font-awesome/css/font-awesome.min.css',
'less!/common/onlyoffice/app-oo.less',
], function (
$,
@ -53,7 +53,8 @@ define([
EmptySlide,
Channel,
OOCurrentVersion,
BrokenFormats)
BrokenFormats,
Icons)
{
var saveAs = window.saveAs;
var Nacl = window.nacl;
@ -403,7 +404,7 @@ define([
// Add a lock
var isLockedModal = {
content: UI.dialog.customModal(h('div.cp-oo-x2tXls', [
h('span.fa.fa-spin.fa-spinner'),
Icons.get('loading'),
h('span', Messages.oo_isLocked)
]))
};
@ -745,7 +746,7 @@ define([
var refreshReadOnly = function () {
var cancel = h('button.cp-corner-cancel', Messages.cancel);
var reload = h('button.cp-corner-primary', [
h('i.fa.fa-refresh'),
Icons.get('refresh'),
Messages.oo_refresh
]);
@ -1958,7 +1959,7 @@ define([
var onMigrateRdy = Util.mkEvent();
onMigrateRdy.reg(function () {
var div = h('div.cp-oo-x2tXls', [
h('span.fa.fa-spin.fa-spinner'),
Icons.get('loading'),
h('span', Messages.oo_sheetMigration_loading)
]);
APP.migrateModal = UI.openCustomModal(UI.dialog.customModal(div, {buttons: []}));
@ -2648,7 +2649,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
}
var content = h('div.cp-oo-x2tXls', [
h('span.fa.fa-spin.fa-spinner'),
Icons.get('loading'),
h('span', Messages.oo_exportInProgress)
]);
UI.openCustomModal(UI.dialog.customModal(content, {buttons: []}));
@ -2780,7 +2781,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
return void UI.alert(Messages.oo_invalidFormat);
}
var div = h('div.cp-oo-x2tXls', [
h('span.fa.fa-spin.fa-spinner'),
Icons.get('loading'),
h('span', Messages.oo_importInProgress)
]);
UI.openCustomModal(UI.dialog.customModal(div, {buttons: []}));
@ -3100,7 +3101,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
var $dlMedias = common.createButton('', true, {
name: 'dlmedias',
icon: 'fa-download',
icon: 'download',
}, function () {
require(['/components/jszip/dist/jszip.min.js'], function (JsZip) {
var zip = new JsZip();
@ -3192,7 +3193,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
var $historyButton = common.createButton('', true, {
name: 'history',
icon: 'fa-history',
icon: 'history',
text: Messages.historyText,
tippy: Messages.historyButton
});
@ -3265,7 +3266,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
if (window.CP_DEV_MODE || DISPLAY_RESTORE_BUTTON) {
common.createButton('', true, {
name: 'delete',
icon: 'fa-trash',
icon: 'trash-full',
hiddenReadOnly: true
}).click(function () {
if (initializing) { return void console.error('initializing'); }
@ -3273,7 +3274,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
}).attr('title', 'Delete last checkpoint').appendTo(toolbar.$bottomM);
common.createButton('', true, {
name: 'restore',
icon: 'fa-history',
icon: 'history',
hiddenReadOnly: true
}).click(function () {
if (initializing) { return void console.error('initializing'); }

View File

@ -24,7 +24,6 @@ define([
'/components/file-saver/FileSaver.min.js',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'css!/components/components-font-awesome/css/font-awesome.min.css',
], function (
$,
Hyperjson,

View File

@ -14,7 +14,8 @@ define([
'/common/text-cursor.js',
'/components/chainpad/chainpad.dist.js',
'/common/hyperscript.js',
], function ($, Modes, Themes, Messages, UIElements, MT, Hash, Util, TextCursor, ChainPad, h) {
'/common/common-icons.js',
], function ($, Modes, Themes, Messages, UIElements, MT, Hash, Util, TextCursor, ChainPad, h, Icons) {
var module = {};
var cursorToPos = module.cursorToPos = function(cursor, oldText) {
@ -303,7 +304,7 @@ define([
name = name ? Messages.languageButton + ' ('+name+')' : Messages.languageButton;
exp.$language.setValue(mode, name);
exp.$language.find('span.cp-language-text').text(name);
exp.$language.find('span.cp-language-text').prepend('<i class="fa fa-chevron-right"></i>');
exp.$language.find('span.cp-language-text').prepend(Icons.get('chevron-right'));
}
if (mode === "orgmode") {
@ -349,7 +350,7 @@ define([
name = name ? Messages.themeButton + ' ('+theme+')' : Messages.themeButton;
$select.setValue(theme, name);
$select.find('span.cp-theme-text').text(name);
$select.find('span.cp-theme-text').prepend('<i class="fa fa-chevron-right"></i>');
$select.find('span.cp-theme-text').prepend(Icons.get('chevron-right'));
}
};
}());

View File

@ -17,9 +17,10 @@ define([
'/customize/pages.js',
'/components/nthen/index.js',
'/common/media-tag.js',
'/common/common-icons.js',
'/components/file-saver/FileSaver.min.js',
], function ($, ApiConfig, FileCrypto, MakeBackup, Thumb, UI, UIElements, Util, Hash, h, Messages, Pages, nThen, MT) {
], function ($, ApiConfig, FileCrypto, MakeBackup, Thumb, UI, UIElements, Util, Hash, h, Messages, Pages, nThen, MT, Icons) {
var module = {};
var blobToArrayBuffer = function (blob, cb) {
@ -70,7 +71,7 @@ define([
var tableHeader = h('div.cp-fileupload-header', [
h('div.cp-fileupload-header-title', h('span', Messages.fileTableHeader)),
h('div.cp-fileupload-header-close', h('span.fa.fa-times')),
h('div.cp-fileupload-header-close', Icons.get('close')),
]);
@ -140,7 +141,7 @@ define([
var $row = $table.find('tr[id="'+id+'"]');
$row.find('.cp-fileupload-table-cancel').addClass('success').html('').append(h('span.fa.fa-minus'));
$row.find('.cp-fileupload-table-cancel').addClass('success').html('').append(Icons.get('minus'));
var $pv = $row.find('.cp-fileupload-table-progress-value');
var $pb = $row.find('.cp-fileupload-table-progressbar');
var $link = $row.find('.cp-fileupload-table-link');
@ -172,7 +173,7 @@ define([
file.uid = Util.uid();
response.expect(file.uid, function (href) {
$link.prepend($('<span>', {'class': 'fa fa-external-link'}));
$link.prepend(Icons.get('external-link'));
$link.attr('href', href)
.click(function (e) {
e.preventDefault();
@ -277,10 +278,10 @@ define([
//$lines.slice(0, $lines.length - 5).remove();
}
var $cancel = $('<span>', {'class': 'cp-fileupload-table-cancel-button fa fa-times'}).click(function () {
var $cancel = $('<span>', {'class': 'cp-fileupload-table-cancel-button'}, Icons.get('close')).click(function () {
queue.queue = queue.queue.filter(function (el) { return el.id !== id; });
$cancel.remove();
$tr.find('.cp-fileupload-table-cancel').addClass('cancelled').html('').append(h('span.fa.fa-minus'));
$tr.find('.cp-fileupload-table-cancel').addClass('cancelled').html('').append(Icons.get('minus'));
$tr.find('.cp-fileupload-table-progress-value').text(Messages.upload_cancelled);
});
@ -290,8 +291,8 @@ define([
}).append(h('span.cp-fileupload-table-name', obj.dl ? obj.name : obj.metadata.name));
var typeIcon;
if (obj.dl) { typeIcon = h('span.fa.fa-arrow-down', { title: Messages.download_dl }); }
else { typeIcon = h('span.fa.fa-arrow-up', { title: Messages.upload_up }); }
if (obj.dl) { typeIcon = Icons.get('download', { title: Messages.download_dl }); }
else { typeIcon = Icons.get('upload', { title: Messages.upload_up }); }
// type (download / upload)
$('<td>', {'class': 'cp-fileupload-table-type'}).append(typeIcon).appendTo($tr);
@ -311,7 +312,6 @@ define([
if (diff && diff > 0) {
$table.css('margin-right', diff+'px');
}
queue.next();
};
@ -650,13 +650,13 @@ define([
var $link = $row.find('.cp-fileupload-table-link');
var done = function () {
$row.find('.cp-fileupload-table-cancel').addClass('success').html('').append(h('span.fa.fa-check'));
$row.find('.cp-fileupload-table-cancel').addClass('success').html('').append(Icons.get('check'));
queue.inProgress = false;
queue.next();
};
var cancelled = function () {
$row.find('.cp-fileupload-table-cancel').addClass('cancelled').html('').append(h('span.fa.fa-minus'));
$row.find('.cp-fileupload-table-cancel').addClass('cancelled').html('').append(Icons.get('minus'));
queue.inProgress = false;
queue.next();
};
@ -723,7 +723,7 @@ define([
};
var dl = downloadFunction(ctx, data, function (err, obj) {
$link.prepend($('<span>', {'class': 'fa fa-external-link'}))
$link.prepend(Icons.get('external-link'))
.attr('href', '#')
.click(function (e) {
e.preventDefault();
@ -741,8 +741,8 @@ define([
var $cancel = $row.find('.cp-fileupload-table-cancel').html('');
if (dl && dl.cancel) {
$('<span>', {
'class': 'cp-fileupload-table-cancel-button fa fa-times'
}).click(function () {
'class': 'cp-fileupload-table-cancel-button'
}, Icons.get('close')).click(function () {
dl.cancel();
$cancel.remove();
$row.find('.cp-fileupload-table-progress-value').text(Messages.upload_cancelled);

Some files were not shown because too many files have changed in this diff Show More