fine tune tooltips in 3rd-party lists pane

This commit is contained in:
gorhill 2017-04-26 12:21:01 -04:00
parent 599a8274d7
commit 669be3d45d
No known key found for this signature in database
GPG key ID: 25E1490B761470C2
3 changed files with 23 additions and 21 deletions

View file

@ -51,8 +51,8 @@
--><span class="counts dim"></span>&#8203;<!-- --><span class="counts dim"></span>&#8203;<!--
--><span class="fa status obsolete" title="3pExternalListObsolete">&#xf071;</span>&#8203;<!-- --><span class="fa status obsolete" title="3pExternalListObsolete">&#xf071;</span>&#8203;<!--
--><span class="fa status cache">&#xf017;</span>&#8203;<!-- --><span class="fa status cache">&#xf017;</span>&#8203;<!--
--><span class="fa status updating">&#xf110;</span>&#8203;<!-- --><span class="fa status updating" title="3pUpdating">&#xf110;</span>&#8203;<!--
--><span class="fa status failed">&#xf06a;</span> --><span class="fa status failed" title="3pNetworkError">&#xf127;</span>
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -335,25 +335,21 @@
"message":"One URL per line. Lines prefixed with &lsquo;!&rsquo; will be ignored. Invalid URLs will be silently ignored.", "message":"One URL per line. Lines prefixed with &lsquo;!&rsquo; will be ignored. Invalid URLs will be silently ignored.",
"description":"English: One URL per line. Lines prefixed with &lsquo;!&rsquo; will be ignored. Invalid URLs will be silently ignored." "description":"English: One URL per line. Lines prefixed with &lsquo;!&rsquo; will be ignored. Invalid URLs will be silently ignored."
}, },
"3pExternalListsApply":{
"message":"Parse",
"description":"English: Parse"
},
"3pExternalListPurge":{
"message":"purge cache",
"description":"English: purge cache"
},
"3pExternalListNew":{
"message":"new version available",
"description":"English: new version available"
},
"3pExternalListObsolete":{ "3pExternalListObsolete":{
"message":"out of date", "message":"Out of date.",
"description":"a filter list is 'out of date' (possibly needs to be updated)" "description":"used as a tooltip for the out-of-date icon beside a list"
}, },
"3pLastUpdate":{ "3pLastUpdate":{
"message":"Last update: {{ago}}", "message":"Last update: {{ago}}.\nClick to force an update.",
"description":"English: Last update: {{ago}}, where 'ago' will be replaced with something like '2 days ago'" "description":"used as a tooltip for the clock icon beside a list"
},
"3pUpdating":{
"message":"Updating...",
"description":"used as a tooltip for the spinner icon beside a list"
},
"3pNetworkError":{
"message":"A network error prevented the resource from being updated.",
"description":"used as a tooltip for error icon beside a list"
}, },
"1pFormatHint":{ "1pFormatHint":{
"message":"One filter per line. A filter can be a plain hostname, or an Adblock Plus-compatible filter. Lines prefixed with &lsquo;!&rsquo; will be ignored.", "message":"One filter per line. A filter can be a plain hostname, or an Adblock Plus-compatible filter. Lines prefixed with &lsquo;!&rsquo; will be ignored.",

View file

@ -43,6 +43,7 @@ var onMessage = function(msg) {
break; break;
case 'assetsUpdated': case 'assetsUpdated':
document.body.classList.remove('updating'); document.body.classList.remove('updating');
renderWidgets();
break; break;
case 'staticFilteringDataChanged': case 'staticFilteringDataChanged':
renderFilterLists(); renderFilterLists();
@ -137,12 +138,17 @@ var renderFilterLists = function(soft) {
); );
li.classList.toggle('failed', asset.error !== undefined); li.classList.toggle('failed', asset.error !== undefined);
li.classList.toggle('obsolete', asset.obsolete === true); li.classList.toggle('obsolete', asset.obsolete === true);
li.classList.toggle('cached', asset.cached === true && asset.writeTime > 0); if ( asset.cached === true ) {
if ( asset.cached ) { li.classList.add('cached');
li.querySelector('.status.cache').setAttribute( li.querySelector('.status.cache').setAttribute(
'title', 'title',
lastUpdateTemplateString.replace('{{ago}}', renderElapsedTimeToString(asset.writeTime)) lastUpdateTemplateString.replace(
'{{ago}}',
renderElapsedTimeToString(asset.writeTime)
)
); );
} else {
li.classList.remove('cached');
} }
li.classList.remove('discard'); li.classList.remove('discard');
return li; return li;