Tell user when not loading history due to offline

This commit is contained in:
miruka 2020-07-10 12:13:11 -04:00
parent 8d93433a8e
commit 27b914b0bf
6 changed files with 37 additions and 84 deletions

View File

@ -212,12 +212,24 @@ Rectangle {
Behavior on opacity { HNumberAnimation {} } Behavior on opacity { HNumberAnimation {} }
HButton { HButton {
readonly property bool offline:
chat.userInfo.presence === "offline"
id: button id: button
width: Math.min(parent.width, implicitWidth) width: Math.min(parent.width, implicitWidth)
anchors.centerIn: parent anchors.centerIn: parent
loading: parent.visible loading: parent.visible && ! offline
text: qsTr("Loading previous messages...") icon.name: offline ? "feature-unavailable-offline" : ""
icon.color:
offline ?
theme.colors.negativeBackground :
theme.icons.colorize
text:
offline ?
qsTr("Cannot load history offline") :
qsTr("Loading previous messages...")
enableRadius: true enableRadius: true
iconItem.small: true iconItem.small: true
} }

View File

@ -0,0 +1,3 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="m16 0-3 9h9l-1.866 2h-14.4zm2.267 13h-14.4l-1.867 2h9l-3 9z"/>
</svg>

After

Width:  |  Height:  |  Size: 167 B

View File

@ -1 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M8.602 3.7c-1.154 1.937-.635 5.227 1.424 9.025.93 1.712.697 3.02.338 3.815-.982 2.178-3.675 2.799-6.525 3.456-1.964.454-1.839.87-1.839 4.004h-1.995l-.005-1.241c0-2.52.199-3.975 3.178-4.663 3.365-.777 6.688-1.473 5.09-4.418-4.733-8.729-1.35-13.678 3.732-13.678 3.321 0 5.97 2.117 5.97 6.167 0 3.555-1.949 6.833-2.383 7.833h-2.115c.392-1.536 2.499-4.366 2.499-7.842 0-5.153-5.867-4.985-7.369-2.458zm15.398 15.8c0 2.485-2.017 4.5-4.5 4.5s-4.5-2.015-4.5-4.5 2.017-4.5 4.5-4.5 4.5 2.015 4.5 4.5zm-2-.5h-5v1h5v-1z"/></svg> <svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="m8.602 3.7c-1.154 1.937-.635 5.227 1.424 9.025.93 1.712.697 3.02.338 3.815-.982 2.178-3.675 2.799-6.525 3.456-1.964.454-1.839.87-1.839 4.004h-1.995l-.005-1.241c0-2.52.199-3.975 3.178-4.663 3.365-.777 6.688-1.473 5.09-4.418-4.733-8.729-1.35-13.678 3.732-13.678 3.321 0 5.97 2.117 5.97 6.167 0 3.555-1.949 6.833-2.383 7.833h-2.115c.392-1.536 2.499-4.366 2.499-7.842 0-5.153-5.867-4.985-7.369-2.458zm15.398 15.8c0 2.485-2.017 4.5-4.5 4.5s-4.5-2.015-4.5-4.5 2.017-4.5 4.5-4.5 4.5 2.015 4.5 4.5zm-2-.5h-5v1h5z"/>
</svg>

Before

Width:  |  Height:  |  Size: 608 B

After

Width:  |  Height:  |  Size: 612 B

View File

@ -1,13 +1,10 @@
<svg width="23.999999999999996" height="23.999999999999996" xmlns="http://www.w3.org/2000/svg"> <svg height="24" width="24" xmlns="http://www.w3.org/2000/svg">
<g fill="none">
<g> <path d="m-1-1h582v402h-582z"/>
<title>background</title> <g stroke="#303c42" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2">
<rect fill="none" id="canvas_background" height="402" width="582" y="-1" x="-1"/> <path d="m2.5 22.984425c1.19 0 1.19-.955166 2.38-.955166s1.19.955166 2.38.955166c1.188 0 1.188-.955166 2.376-.955166s1.188.955166 2.375.955166 1.187-.955166 2.375-.955166c1.186 0 1.186.955166 2.372.955166 1.184 0 1.184-.955166 2.369-.955166 1.187 0 1.187.955166 2.374.955166l-.638-4.266728c-.241-1.61041-.362-3.236103-.362-4.862751v-4.441523c0-4.324038-3.416-8.09981-7.934-8.379673-4.952-.306608-9.067 3.438598-9.067 8.10172v4.720432c0 1.626648-.121 3.252341-.362 4.862751l-.638 4.265772z"/>
<ellipse cx="9" cy="9" rx=".5" ry="1.5"/>
<ellipse cx="15" cy="9" rx=".5" ry="1.5"/>
</g> </g>
<g>
<title>Layer 1</title>
<path stroke="#303C42" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" id="XMLID_1348_" d="m2.5,22.984425c1.19,0 1.19,-0.955166 2.38,-0.955166s1.19,0.955166 2.38,0.955166c1.188,0 1.188,-0.955166 2.376,-0.955166s1.188,0.955166 2.375,0.955166s1.187,-0.955166 2.375,-0.955166c1.186,0 1.186,0.955166 2.372,0.955166c1.184,0 1.184,-0.955166 2.369,-0.955166c1.187,0 1.187,0.955166 2.374,0.955166l-0.638,-4.266728c-0.241,-1.61041 -0.362,-3.236103 -0.362,-4.862751l0,-4.441523c0,-4.324038 -3.416,-8.09981 -7.934,-8.379673c-4.952,-0.306608 -9.067,3.438598 -9.067,8.10172l0,4.720432c0,1.626648 -0.121,3.252341 -0.362,4.862751l-0.638,4.265772z"/>
<ellipse stroke-width="2" fill="none" stroke="#303C42" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" ry="1.5" rx="0.5" id="XMLID_1349_" cy="9" cx="9"/>
<ellipse stroke-width="2" fill="none" stroke="#303C42" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" ry="1.5" rx="0.5" id="XMLID_1350_" cy="9" cx="15"/>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 882 B

View File

@ -1,68 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<svg <path d="m8.602 3.7c-1.154 1.937-.635 5.227 1.424 9.025.93 1.712.697 3.02.338 3.815-.982 2.178-3.675 2.799-6.525 3.456-1.964.454-1.839.87-1.839 4.004h-1.995l-.005-1.241c0-2.52.199-3.975 3.178-4.663 3.365-.777 6.688-1.473 5.09-4.418-4.733-8.729-1.35-13.678 3.732-13.678 3.321 0 5.97 2.117 5.97 6.167 0 3.555-1.949 6.833-2.383 7.833h-2.115c.392-1.536 2.499-4.366 2.499-7.842 0-5.153-5.867-4.985-7.369-2.458z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/" <path d="m26.919304-4.513985h1.339685v9.063538h-1.339685z" transform="matrix(.70710678 .70710678 -.70710678 .70710678 0 0)"/>
xmlns:cc="http://creativecommons.org/ns#" <path d="m-.652058-32.120914h1.339685v9.063538h-1.339685z" transform="matrix(-.70710678 .70710678 -.70710678 -.70710678 0 0)"/>
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (unknown)"
sodipodi:docname="off.svg"
id="svg4"
version="1.1"
viewBox="0 0 24 24"
height="24"
width="24">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
inkscape:current-layer="svg4"
inkscape:cy="-35.293553"
inkscape:cx="-165.29293"
inkscape:zoom="1.4657734"
showgrid="false"
id="namedview6"
inkscape:window-height="480"
inkscape:window-width="640"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<path
sodipodi:nodetypes="cccccccccssccsc"
id="path2"
d="m 8.602,3.7 c -1.154,1.937 -0.635,5.227 1.424,9.025 0.93,1.712 0.697,3.02 0.338,3.815 C 9.382,18.718 6.689,19.339 3.839,19.996 1.875,20.45 2,20.866 2,24 H 0.005 L 0,22.759 C 0,20.239 0.199,18.784 3.178,18.096 6.543,17.319 9.866,16.623 8.268,13.678 3.535,4.949 6.918,0 12,0 15.321,0 17.97,2.117 17.97,6.167 17.97,9.722 16.021,13 15.587,14 h -2.115 c 0.392,-1.536 2.499,-4.366 2.499,-7.842 0,-5.153 -5.867,-4.985 -7.369,-2.458 z" />
<rect
transform="rotate(45)"
y="-4.5139847"
x="26.919304"
height="9.0635376"
width="1.3396848"
id="rect859"
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
<rect
transform="rotate(135)"
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
id="rect861"
width="1.3396848"
height="9.0635376"
x="-0.65205783"
y="-32.120914" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 766 B

View File

@ -1 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.822 18.096c-3.439-.794-6.641-1.49-5.09-4.418 4.719-8.912 1.251-13.678-3.732-13.678-5.082 0-8.465 4.949-3.732 13.678 1.598 2.945-1.725 3.641-5.09 4.418-2.979.688-3.178 2.143-3.178 4.663l.005 1.241h1.995c0-3.134-.125-3.55 1.838-4.003 2.851-.657 5.543-1.278 6.525-3.456.359-.795.592-2.103-.338-3.815-2.058-3.799-2.578-7.089-1.423-9.026 1.354-2.275 5.426-2.264 6.767-.034 1.15 1.911.639 5.219-1.403 9.076-.91 1.719-.671 3.023-.31 3.814.99 2.167 3.707 2.794 6.584 3.458 1.879.436 1.76.882 1.76 3.986h1.995l.005-1.241c0-2.52-.199-3.975-3.178-4.663z"/></svg> <svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="m20.822 18.096c-3.439-.794-6.641-1.49-5.09-4.418 4.719-8.912 1.251-13.678-3.732-13.678-5.082 0-8.465 4.949-3.732 13.678 1.598 2.945-1.725 3.641-5.09 4.418-2.979.688-3.178 2.143-3.178 4.663l.005 1.241h1.995c0-3.134-.125-3.55 1.838-4.003 2.851-.657 5.543-1.278 6.525-3.456.359-.795.592-2.103-.338-3.815-2.058-3.799-2.578-7.089-1.423-9.026 1.354-2.275 5.426-2.264 6.767-.034 1.15 1.911.639 5.219-1.403 9.076-.91 1.719-.671 3.023-.31 3.814.99 2.167 3.707 2.794 6.584 3.458 1.879.436 1.76.882 1.76 3.986h1.995l.005-1.241c0-2.52-.199-3.975-3.178-4.663z"/>
</svg>

Before

Width:  |  Height:  |  Size: 647 B

After

Width:  |  Height:  |  Size: 654 B