Add font awesome icons to models

So it looks a bit more like the official UI.
This commit is contained in:
Martchus 2019-02-27 20:41:50 +01:00
parent 107fad90f0
commit 2ab88c5766
38 changed files with 219 additions and 33 deletions

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"/></svg>

After

Width:  |  Height:  |  Size: 304 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z"/></svg>

After

Width:  |  Height:  |  Size: 307 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M567.403 235.642L462.323 84.589A48 48 0 0 0 422.919 64H153.081a48 48 0 0 0-39.404 20.589L8.597 235.642A48.001 48.001 0 0 0 0 263.054V400c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V263.054c0-9.801-3-19.366-8.597-27.412zM153.081 112h269.838l77.913 112H75.168l77.913-112zM528 400H48V272h480v128zm-32-64c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32zm-96 0c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32z"/></svg>

After

Width:  |  Height:  |  Size: 542 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M458.622 255.92l45.985-45.005c13.708-12.977 7.316-36.039-10.664-40.339l-62.65-15.99 17.661-62.015c4.991-17.838-11.829-34.663-29.661-29.671l-61.994 17.667-15.984-62.671C337.085.197 313.765-6.276 300.99 7.228L256 53.57 211.011 7.229c-12.63-13.351-36.047-7.234-40.325 10.668l-15.984 62.671-61.995-17.667C74.87 57.907 58.056 74.738 63.046 92.572l17.661 62.015-62.65 15.99C.069 174.878-6.31 197.944 7.392 210.915l45.985 45.005-45.985 45.004c-13.708 12.977-7.316 36.039 10.664 40.339l62.65 15.99-17.661 62.015c-4.991 17.838 11.829 34.663 29.661 29.671l61.994-17.667 15.984 62.671c4.439 18.575 27.696 24.018 40.325 10.668L256 458.61l44.989 46.001c12.5 13.488 35.987 7.486 40.325-10.668l15.984-62.671 61.994 17.667c17.836 4.994 34.651-11.837 29.661-29.671l-17.661-62.015 62.65-15.99c17.987-4.302 24.366-27.367 10.664-40.339l-45.984-45.004z"/></svg>

After

Width:  |  Height:  |  Size: 911 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm57.1 350.1L224.9 294c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v137.7l63.5 46.2c5.4 3.9 6.5 11.4 2.6 16.8l-28.2 38.8c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>

After

Width:  |  Height:  |  Size: 321 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zm-132.9 88.7L299.3 420.7c-6.2 6.2-16.4 6.2-22.6 0L171.3 315.3c-10.1-10.1-2.9-27.3 11.3-27.3H248V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v112h65.4c14.2 0 21.4 17.2 11.3 27.3z"/></svg>

After

Width:  |  Height:  |  Size: 511 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z"/></svg>

After

Width:  |  Height:  |  Size: 511 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M512.1 191l-8.2 14.3c-3 5.3-9.4 7.5-15.1 5.4-11.8-4.4-22.6-10.7-32.1-18.6-4.6-3.8-5.8-10.5-2.8-15.7l8.2-14.3c-6.9-8-12.3-17.3-15.9-27.4h-16.5c-6 0-11.2-4.3-12.2-10.3-2-12-2.1-24.6 0-37.1 1-6 6.2-10.4 12.2-10.4h16.5c3.6-10.1 9-19.4 15.9-27.4l-8.2-14.3c-3-5.2-1.9-11.9 2.8-15.7 9.5-7.9 20.4-14.2 32.1-18.6 5.7-2.1 12.1.1 15.1 5.4l8.2 14.3c10.5-1.9 21.2-1.9 31.7 0L552 6.3c3-5.3 9.4-7.5 15.1-5.4 11.8 4.4 22.6 10.7 32.1 18.6 4.6 3.8 5.8 10.5 2.8 15.7l-8.2 14.3c6.9 8 12.3 17.3 15.9 27.4h16.5c6 0 11.2 4.3 12.2 10.3 2 12 2.1 24.6 0 37.1-1 6-6.2 10.4-12.2 10.4h-16.5c-3.6 10.1-9 19.4-15.9 27.4l8.2 14.3c3 5.2 1.9 11.9-2.8 15.7-9.5 7.9-20.4 14.2-32.1 18.6-5.7 2.1-12.1-.1-15.1-5.4l-8.2-14.3c-10.4 1.9-21.2 1.9-31.7 0zm-10.5-58.8c38.5 29.6 82.4-14.3 52.8-52.8-38.5-29.7-82.4 14.3-52.8 52.8zM386.3 286.1l33.7 16.8c10.1 5.8 14.5 18.1 10.5 29.1-8.9 24.2-26.4 46.4-42.6 65.8-7.4 8.9-20.2 11.1-30.3 5.3l-29.1-16.8c-16 13.7-34.6 24.6-54.9 31.7v33.6c0 11.6-8.3 21.6-19.7 23.6-24.6 4.2-50.4 4.4-75.9 0-11.5-2-20-11.9-20-23.6V418c-20.3-7.2-38.9-18-54.9-31.7L74 403c-10 5.8-22.9 3.6-30.3-5.3-16.2-19.4-33.3-41.6-42.2-65.7-4-10.9.4-23.2 10.5-29.1l33.3-16.8c-3.9-20.9-3.9-42.4 0-63.4L12 205.8c-10.1-5.8-14.6-18.1-10.5-29 8.9-24.2 26-46.4 42.2-65.8 7.4-8.9 20.2-11.1 30.3-5.3l29.1 16.8c16-13.7 34.6-24.6 54.9-31.7V57.1c0-11.5 8.2-21.5 19.6-23.5 24.6-4.2 50.5-4.4 76-.1 11.5 2 20 11.9 20 23.6v33.6c20.3 7.2 38.9 18 54.9 31.7l29.1-16.8c10-5.8 22.9-3.6 30.3 5.3 16.2 19.4 33.2 41.6 42.1 65.8 4 10.9.1 23.2-10 29.1l-33.7 16.8c3.9 21 3.9 42.5 0 63.5zm-117.6 21.1c59.2-77-28.7-164.9-105.7-105.7-59.2 77 28.7 164.9 105.7 105.7zm243.4 182.7l-8.2 14.3c-3 5.3-9.4 7.5-15.1 5.4-11.8-4.4-22.6-10.7-32.1-18.6-4.6-3.8-5.8-10.5-2.8-15.7l8.2-14.3c-6.9-8-12.3-17.3-15.9-27.4h-16.5c-6 0-11.2-4.3-12.2-10.3-2-12-2.1-24.6 0-37.1 1-6 6.2-10.4 12.2-10.4h16.5c3.6-10.1 9-19.4 15.9-27.4l-8.2-14.3c-3-5.2-1.9-11.9 2.8-15.7 9.5-7.9 20.4-14.2 32.1-18.6 5.7-2.1 12.1.1 15.1 5.4l8.2 14.3c10.5-1.9 21.2-1.9 31.7 0l8.2-14.3c3-5.3 9.4-7.5 15.1-5.4 11.8 4.4 22.6 10.7 32.1 18.6 4.6 3.8 5.8 10.5 2.8 15.7l-8.2 14.3c6.9 8 12.3 17.3 15.9 27.4h16.5c6 0 11.2 4.3 12.2 10.3 2 12 2.1 24.6 0 37.1-1 6-6.2 10.4-12.2 10.4h-16.5c-3.6 10.1-9 19.4-15.9 27.4l8.2 14.3c3 5.2 1.9 11.9-2.8 15.7-9.5 7.9-20.4 14.2-32.1 18.6-5.7 2.1-12.1-.1-15.1-5.4l-8.2-14.3c-10.4 1.9-21.2 1.9-31.7 0zM501.6 431c38.5 29.6 82.4-14.3 52.8-52.8-38.5-29.6-82.4 14.3-52.8 52.8z"/></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z"/></svg>

After

Width:  |  Height:  |  Size: 475 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/></svg>

After

Width:  |  Height:  |  Size: 528 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"/></svg>

After

Width:  |  Height:  |  Size: 410 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zM128.4 336c-17.9 0-32.4 12.1-32.4 27 0 15 14.6 27 32.5 27s32.4-12.1 32.4-27-14.6-27-32.5-27zM224 136V0h-63.6v32h-32V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM95.9 32h32v32h-32zm32.3 384c-33.2 0-58-30.4-51.4-62.9L96.4 256v-32h32v-32h-32v-32h32v-32h-32V96h32V64h32v32h-32v32h32v32h-32v32h32v32h-32v32h22.1c5.7 0 10.7 4.1 11.8 9.7l17.3 87.7c6.4 32.4-18.4 62.6-51.4 62.6z"/></svg>

After

Width:  |  Height:  |  Size: 587 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"/></svg>

After

Width:  |  Height:  |  Size: 402 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"/></svg>

After

Width:  |  Height:  |  Size: 207 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"/></svg>

After

Width:  |  Height:  |  Size: 818 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M440.667 182.109l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l14.623-81.891C377.123 38.754 371.468 32 363.997 32h-40.632a12 12 0 0 0-11.813 9.891L296.175 128H197.54l14.623-81.891C213.477 38.754 207.822 32 200.35 32h-40.632a12 12 0 0 0-11.813 9.891L132.528 128H53.432a12 12 0 0 0-11.813 9.891l-7.143 40C33.163 185.246 38.818 192 46.289 192h74.81L98.242 320H19.146a12 12 0 0 0-11.813 9.891l-7.143 40C-1.123 377.246 4.532 384 12.003 384h74.81L72.19 465.891C70.877 473.246 76.532 480 84.003 480h40.632a12 12 0 0 0 11.813-9.891L151.826 384h98.634l-14.623 81.891C234.523 473.246 240.178 480 247.65 480h40.632a12 12 0 0 0 11.813-9.891L315.472 384h79.096a12 12 0 0 0 11.813-9.891l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l22.857-128h79.096a12 12 0 0 0 11.813-9.891zM261.889 320h-98.634l22.857-128h98.634l-22.857 128z"/></svg>

After

Width:  |  Height:  |  Size: 911 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"/></svg>

After

Width:  |  Height:  |  Size: 565 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M640 264v-16c0-8.84-7.16-16-16-16H344v-40h72c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32H224c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h72v40H16c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h104v40H64c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h160c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32h-56v-40h304v40h-56c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h160c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32h-56v-40h104c8.84 0 16-7.16 16-16zM256 128V64h128v64H256zm-64 320H96v-64h96v64zm352 0h-96v-64h96v64z"/></svg>

After

Width:  |  Height:  |  Size: 622 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512.333 512"><path d="M500.333 0h-47.411c-6.853 0-12.314 5.729-11.986 12.574l3.966 82.759C399.416 41.899 331.672 8 256.001 8 119.34 8 7.899 119.526 8 256.187 8.101 393.068 119.096 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-33.971-33.971c-4.466-4.466-11.64-4.717-16.38-.543C341.308 415.448 300.606 432 256 432c-97.267 0-176-78.716-176-176 0-97.267 78.716-176 176-176 60.892 0 114.506 30.858 146.099 77.8l-101.525-4.865c-6.845-.328-12.574 5.133-12.574 11.986v47.411c0 6.627 5.373 12 12 12h200.333c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12z"/></svg>

After

Width:  |  Height:  |  Size: 651 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"/></svg>

After

Width:  |  Height:  |  Size: 536 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"/></svg>

After

Width:  |  Height:  |  Size: 370 B

View File

@ -11,5 +11,27 @@
<file>icons/hicolor/scalable/status/syncthing-error-sync.svg</file>
<file>icons/hicolor/scalable/status/syncthing-sync-complete.svg</file>
<file>icons/hicolor/scalable/status/syncthing-new.svg</file>
<file>icons/hicolor/scalable/fa/certificate.svg</file>
<file>icons/hicolor/scalable/fa/clock.svg</file>
<file>icons/hicolor/scalable/fa/cloud-download-alt.svg</file>
<file>icons/hicolor/scalable/fa/cloud-upload-alt.svg</file>
<file>icons/hicolor/scalable/fa/cogs.svg</file>
<file>icons/hicolor/scalable/fa/exchange-alt.svg</file>
<file>icons/hicolor/scalable/fa/exclamation-triangle.svg</file>
<file>icons/hicolor/scalable/fa/eye.svg</file>
<file>icons/hicolor/scalable/fa/file-archive.svg</file>
<file>icons/hicolor/scalable/fa/folder-open.svg</file>
<file>icons/hicolor/scalable/fa/folder.svg</file>
<file>icons/hicolor/scalable/fa/globe.svg</file>
<file>icons/hicolor/scalable/fa/hashtag.svg</file>
<file>icons/hicolor/scalable/fa/home.svg</file>
<file>icons/hicolor/scalable/fa/link.svg</file>
<file>icons/hicolor/scalable/fa/network-wired.svg</file>
<file>icons/hicolor/scalable/fa/redo.svg</file>
<file>icons/hicolor/scalable/fa/share-alt.svg</file>
<file>icons/hicolor/scalable/fa/tag.svg</file>
<file>icons/hicolor/scalable/fa-non-solid/file.svg</file>
<file>icons/hicolor/scalable/fa-non-solid/folder.svg</file>
<file>icons/hicolor/scalable/fa-non-solid/hdd.svg</file>
</qresource>
</RCC>

View File

@ -31,13 +31,14 @@ QHash<int, QByteArray> SyncthingDeviceModel::roleNames() const
{ DeviceStatusColor, "statusColor" },
{ DeviceId, "devId" },
{ DeviceDetail, "detail" },
{ DeviceDetailIcon, "detailIcon" },
};
return roles;
}
const QVector<int> &SyncthingDeviceModel::colorRoles() const
{
static const QVector<int> colorRoles({ Qt::ForegroundRole, DeviceStatusColor });
static const QVector<int> colorRoles({ Qt::DecorationRole, Qt::ForegroundRole, DeviceStatusColor, DeviceDetailIcon });
return colorRoles;
}
@ -157,6 +158,33 @@ QVariant SyncthingDeviceModel::data(const QModelIndex &index, int role) const
}
}
break;
case Qt::DecorationRole:
case DeviceDetailIcon:
if (index.column() == 0) {
// attribute icons
const auto &icons = m_brightColors ? fontAwesomeIconsForDarkTheme() : fontAwesomeIconsForLightTheme();
switch (index.row()) {
case 0:
return icons.hashtag;
case 1:
return icons.link;
case 2:
return icons.eye;
case 3:
return icons.fileArchive;
case 4:
return icons.certificate;
case 5:
return icons.networkWired;
case 6:
return icons.cloudDownloadAlt;
case 7:
return icons.cloudUploadAlt;
case 8:
return icons.tag;
}
}
break;
case Qt::ForegroundRole:
switch (index.column()) {
case 1:

View File

@ -21,7 +21,8 @@ public:
DeviceStatusString,
DeviceStatusColor,
DeviceId,
DeviceDetail
DeviceDetail,
DeviceDetailIcon,
};
explicit SyncthingDeviceModel(SyncthingConnection &connection, QObject *parent = nullptr);

View File

@ -41,13 +41,14 @@ QHash<int, QByteArray> SyncthingDirectoryModel::roleNames() const
{ DirectoryPath, "path" },
{ DirectoryPullErrorCount, "pullErrorCount" },
{ DirectoryDetail, "detail" },
{ DirectoryDetailIcon, "detailIcon" },
};
return roles;
}
const QVector<int> &SyncthingDirectoryModel::colorRoles() const
{
static const QVector<int> colorRoles({ Qt::ForegroundRole, DirectoryStatusColor });
static const QVector<int> colorRoles({ Qt::DecorationRole, Qt::ForegroundRole, DirectoryStatusColor, DirectoryDetailIcon });
return colorRoles;
}
@ -187,6 +188,35 @@ QVariant SyncthingDirectoryModel::data(const QModelIndex &index, int role) const
}
}
break;
case Qt::DecorationRole:
case DirectoryDetailIcon:
if (index.column() == 0) {
// attribute icons
const auto &icons = m_brightColors ? fontAwesomeIconsForDarkTheme() : fontAwesomeIconsForLightTheme();
switch (row) {
case 0:
return icons.hashtag;
case 1:
return icons.folderOpen;
case 2:
return icons.globe;
case 3:
return icons.home;
case 4:
return icons.shareAlt;
case 5:
return icons.cogs;
case 6:
return icons.refresh;
case 7:
return icons.clock;
case 8:
return icons.exchangeAlt;
case 9:
return icons.exclamationTriangle;
}
}
break;
case Qt::ForegroundRole:
switch (index.column()) {
case 1:

View File

@ -23,6 +23,7 @@ public:
DirectoryPath,
DirectoryPullErrorCount,
DirectoryDetail,
DirectoryDetailIcon,
};
explicit SyncthingDirectoryModel(SyncthingConnection &connection, QObject *parent = nullptr);

View File

@ -55,15 +55,19 @@ QPixmap renderSvgImage(const QByteArray &contents, const QSize &size, int margin
/*!
* \brief Returns the font awesome icon with the specified \a iconName and \a color.
*/
QByteArray loadFontAwesomeIcon(const QString &iconName, const QColor &color)
QByteArray loadFontAwesomeIcon(const QString &iconName, const QColor &color, bool solid)
{
QByteArray result;
QFile icon(QStringLiteral(":/icons/hicolor/scalable/fa/") % iconName % QStringLiteral(".svg"));
QFile icon((solid ? QStringLiteral(":/icons/hicolor/scalable/fa/") : QStringLiteral(":/icons/hicolor/scalable/fa-non-solid/")) % iconName
% QStringLiteral(".svg"));
if (!icon.open(QFile::ReadOnly)) {
return result;
}
result = icon.readAll();
result.replace("currentColor", color.name(QColor::HexRgb).toUtf8());
const auto pathBegin = result.indexOf("<path ");
if (pathBegin > 0) {
result.insert(pathBegin + 6, QStringLiteral("fill=\"") % color.name(QColor::HexRgb) % QStringLiteral("\" "));
}
return result;
}
@ -81,10 +85,45 @@ StatusIcons::StatusIcons()
{
}
const StatusIcons LIB_SYNCTHING_MODEL_EXPORT &statusIcons()
FontAwesomeIcons::FontAwesomeIcons(const QColor &color, const QSize &size, int margin)
: hashtag(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("hashtag"), color), size, margin))
, folderOpen(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("folder-open"), color), size, margin))
, globe(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("globe"), color), size, margin))
, home(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("home"), color), size, margin))
, shareAlt(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("share-alt"), color), size, margin))
, refresh(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("redo"), color), size, margin))
, clock(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("clock"), color), size, margin))
, exchangeAlt(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("exchange-alt"), color), size, margin))
, exclamationTriangle(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("exclamation-triangle"), color), size, margin))
, cogs(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("cogs"), color), size, margin))
, link(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("link"), color), size, margin))
, eye(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("eye"), color), size, margin))
, fileArchive(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("file-archive"), color), size, margin))
, folder(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("folder"), color), size, margin))
, certificate(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("certificate"), color), size, margin))
, networkWired(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("network-wired"), color), size, margin))
, cloudDownloadAlt(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("cloud-download-alt"), color), size, margin))
, cloudUploadAlt(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("cloud-upload-alt"), color), size, margin))
, tag(renderSvgImage(loadFontAwesomeIcon(QStringLiteral("tag"), color), size, margin))
{
}
const StatusIcons &statusIcons()
{
static const StatusIcons icons;
return icons;
}
const FontAwesomeIcons &fontAwesomeIconsForLightTheme()
{
static const FontAwesomeIcons icons(QColor(10, 10, 10), QSize(64, 64), 8);
return icons;
}
const FontAwesomeIcons &fontAwesomeIconsForDarkTheme()
{
static const FontAwesomeIcons icons(Qt::white, QSize(64, 64), 8);
return icons;
}
} // namespace Data

View File

@ -10,8 +10,6 @@ QT_FORWARD_DECLARE_CLASS(QColor)
namespace Data {
QByteArray LIB_SYNCTHING_MODEL_EXPORT loadFontAwesomeIcon(const QString &iconName, const QColor &color);
struct StatusIcons {
StatusIcons();
QIcon disconnected;
@ -26,9 +24,35 @@ struct StatusIcons {
QIcon newItem;
};
struct FontAwesomeIcons {
FontAwesomeIcons(const QColor &color, const QSize &size, int margin);
QIcon hashtag;
QIcon folderOpen;
QIcon globe;
QIcon home;
QIcon shareAlt;
QIcon refresh;
QIcon clock;
QIcon exchangeAlt;
QIcon exclamationTriangle;
QIcon cogs;
QIcon link;
QIcon eye;
QIcon fileArchive;
QIcon folder;
QIcon certificate;
QIcon networkWired;
QIcon cloudDownloadAlt;
QIcon cloudUploadAlt;
QIcon tag;
};
QPixmap LIB_SYNCTHING_MODEL_EXPORT renderSvgImage(const QString &path, const QSize &size = QSize(128, 128), int margin = 0);
QPixmap LIB_SYNCTHING_MODEL_EXPORT renderSvgImage(const QByteArray &contents, const QSize &size = QSize(128, 128), int margin = 0);
QByteArray LIB_SYNCTHING_MODEL_EXPORT loadFontAwesomeIcon(const QString &iconName, const QColor &color, bool solid = true);
const StatusIcons LIB_SYNCTHING_MODEL_EXPORT &statusIcons();
const FontAwesomeIcons LIB_SYNCTHING_MODEL_EXPORT &fontAwesomeIconsForLightTheme();
const FontAwesomeIcons LIB_SYNCTHING_MODEL_EXPORT &fontAwesomeIconsForDarkTheme();
} // namespace Data

View File

@ -21,11 +21,26 @@ const QVector<int> &SyncthingModel::colorRoles() const
void SyncthingModel::setBrightColors(bool brightColors)
{
if (m_brightColors != brightColors) {
m_brightColors = brightColors;
const QVector<int> &affectedRoles = colorRoles();
if (!affectedRoles.isEmpty()) {
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1), affectedRoles);
if (m_brightColors == brightColors) {
return;
}
m_brightColors = brightColors;
const QVector<int> &affectedRoles = colorRoles();
if (affectedRoles.isEmpty()) {
return;
}
// update top-level indices
const auto rows = rowCount();
emit dataChanged(index(0, 0), index(rows - 1, columnCount() - 1), affectedRoles);
// update nested indices
for (auto i = 0; i != rows; ++i) {
const auto parentIndex = index(i, 0);
const auto childRows = rowCount(parentIndex);
if (childRows > 0) {
emit dataChanged(index(0, 0, parentIndex), index(childRows - 1, columnCount(parentIndex) - 1), affectedRoles);
}
}
}

View File

@ -1,5 +1,6 @@
import QtQuick 2.7
import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
Item {
@ -13,21 +14,26 @@ Item {
RowLayout {
id: detailRow
spacing: theme.defaultFont.pointSize * 0.8
width: parent.width
PlasmaComponents.Label {
Layout.preferredWidth: 100
Layout.leftMargin: units.iconSizes.smallMedium
text: detailName + ":"
font.pointSize: theme.defaultFont.pointSize * 0.8
font.weight: Font.DemiBold
horizontalAlignment: Qt.AlignRight
PlasmaCore.IconItem {
source: detailIcon
Layout.leftMargin: units.iconSizes.small * 1.1
Layout.preferredWidth: units.iconSizes.small
Layout.preferredHeight: units.iconSizes.small
opacity: 0.8
}
PlasmaComponents.Label {
Layout.preferredWidth: 100
text: detailName
font.weight: Font.DemiBold
}
PlasmaComponents.Label {
Layout.leftMargin: theme.defaultFont.pointSize * 0.9
Layout.fillWidth: true
text: detailValue
font.pointSize: theme.defaultFont.pointSize * 0.8
elide: Text.ElideRight
horizontalAlignment: Qt.AlignRight
}
}

View File

@ -71,6 +71,7 @@ Item {
id: detailsView
visible: item.expanded
Layout.fillWidth: true
Layout.topMargin: 3
model: DelegateModel {
model: plasmoid.nativeInterface.devModel

View File

@ -114,6 +114,7 @@ ColumnLayout {
id: detailsView
visible: item.expanded
Layout.fillWidth: true
Layout.topMargin: 3
model: DelegateModel {
model: plasmoid.nativeInterface.dirModel

View File

@ -450,7 +450,7 @@ ColumnLayout {
Layout.preferredHeight: 16
Layout.leftMargin: 10
source: plasmoid.nativeInterface.loadFontAwesomeIcon(
"cloud-download-alt-solid")
"cloud-download-alt")
opacity: plasmoid.nativeInterface.hasIncomingTraffic ? 1.0 : 0.5
}
PlasmaComponents.Label {
@ -471,7 +471,7 @@ ColumnLayout {
Layout.preferredHeight: 16
Layout.leftMargin: 10
source: plasmoid.nativeInterface.loadFontAwesomeIcon(
"cloud-upload-alt-solid")
"cloud-upload-alt")
opacity: plasmoid.nativeInterface.hasOutgoingTraffic ? 1.0 : 0.5
}
PlasmaComponents.Label {

View File

@ -520,10 +520,10 @@ void TrayWidget::updateTraffic()
QPixmap downloadIconActive;
QPixmap downloadIconInactive;
} icons;
icons.uploadIconActive = renderIcon(QStringLiteral("cloud-upload-alt-solid"), colorActive);
icons.uploadIconInactive = renderIcon(QStringLiteral("cloud-upload-alt-solid"), colorInactive);
icons.downloadIconActive = renderIcon(QStringLiteral("cloud-download-alt-solid"), colorActive);
icons.downloadIconInactive = renderIcon(QStringLiteral("cloud-download-alt-solid"), colorInactive);
icons.uploadIconActive = renderIcon(QStringLiteral("cloud-upload-alt"), colorActive);
icons.uploadIconInactive = renderIcon(QStringLiteral("cloud-upload-alt"), colorInactive);
icons.downloadIconActive = renderIcon(QStringLiteral("cloud-download-alt"), colorActive);
icons.downloadIconInactive = renderIcon(QStringLiteral("cloud-download-alt"), colorInactive);
return icons;
}();

View File

@ -1 +0,0 @@
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="cloud-download-alt" class="svg-inline--fa fa-cloud-download-alt fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zm-132.9 88.7L299.3 420.7c-6.2 6.2-16.4 6.2-22.6 0L171.3 315.3c-10.1-10.1-2.9-27.3 11.3-27.3H248V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v112h65.4c14.2 0 21.4 17.2 11.3 27.3z"></path></svg>

Before

Width:  |  Height:  |  Size: 687 B

View File

@ -1 +0,0 @@
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="cloud-upload-alt" class="svg-inline--fa fa-cloud-upload-alt fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z"></path></svg>

Before

Width:  |  Height:  |  Size: 683 B

View File

@ -9,8 +9,6 @@
<file>icons/hicolor/scalable/actions/list-remove.svg</file>
<file>icons/hicolor/scalable/actions/edit-paste.svg</file>
<file>icons/hicolor/scalable/app/syncthingtray.svg</file>
<file>icons/hicolor/scalable/fa/cloud-download-alt-solid.svg</file>
<file>icons/hicolor/scalable/fa/cloud-upload-alt-solid.svg</file>
<file>icons/hicolor/scalable/actions/globe.svg</file>
<file>icons/hicolor/scalable/places/user-home.svg</file>
<file>icons/hicolor/scalable/emblems/emblem-important-old.svg</file>