Show status text only

This commit is contained in:
eight 2019-10-03 18:36:57 +08:00
parent 484c7e3e1e
commit f32c68bbed
3 changed files with 12 additions and 6 deletions

View File

@ -142,15 +142,12 @@
<h1>Sync to cloud</h1> <h1>Sync to cloud</h1>
<div class="items"> <div class="items">
<label> <label>
<span>Cloud drive</span> <span class="sync-status"></span>
<select class="cloud-name"> <select class="cloud-name">
<option value="none">None</option> <option value="none">None</option>
<option value="dropbox">Dropbox</option> <option value="dropbox">Dropbox</option>
</select> </select>
</label> </label>
<div class="sync-status-wrapper">
Status: <span class="sync-status"></span>
</div>
<div class="actions"> <div class="actions">
<button type="button" class="connect">Connect</button> <button type="button" class="connect">Connect</button>
<button type="button" class="disconnect">Disconnect</button> <button type="button" class="disconnect">Disconnect</button>

View File

@ -311,3 +311,12 @@ html:not(.firefox):not(.opera) #updates {
hyphens: auto; hyphens: auto;
} }
} }
.sync-status {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sync-status::first-letter {
text-transform: uppercase;
}

View File

@ -117,8 +117,8 @@ document.onclick = e => {
function getStatusText() { function getStatusText() {
// FIXME: i18n // FIXME: i18n
if (status.syncing) { if (status.syncing) {
if (status.target) { if (status.syncTarget) {
const [type, change] = status.target; const [type, change] = status.syncTarget;
if (type === 'syncPull') { if (type === 'syncPull') {
return `pulling data ${change._id}`; return `pulling data ${change._id}`;
} }