backups: Show lock icon for encrypted repositories

- Remove unused CSS.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-08-29 13:28:45 -07:00 committed by James Valleroy
parent 786b1efcf3
commit 00da744a94
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 10 additions and 7 deletions

View File

@ -154,6 +154,7 @@ class BaseBorgRepository(abc.ABC):
'uuid': self.uuid,
'name': self.name,
'storage_type': self.storage_type,
'is_encrypted': bool(self._get_encryption_data(self.credentials)),
'flags': self.flags,
'error': None,
}

View File

@ -22,20 +22,18 @@
{% block page_head %}
<style type="text/css">
.share-operations form {
display: inline-block;
}
.share-operations {
text-align: right;
.mount-error, .mount-success, .encrypted {
padding: 0px 5px;
}
.mount-error {
padding: 0px 10px 0px 10px;
color: orange;
}
.mount-success {
padding: 0px 10px 0px 10px;
color: black;
}
.encrypted {
color: green;
}
.inline-block {
display: inline-block;
}

View File

@ -29,6 +29,10 @@
<span class="fa fa-exclamation-triangle mount-error"
aria-hidden="true" title="{{ repository.error }}">
</span>
{% elif repository.is_encrypted %}
<span class="fa fa-lock encrypted"
aria-hidden="true" title="{% trans "This repository is encrypted" %}">
</span>
{% endif %}
{{ repository.name }}