mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
show sign state with colors
This commit is contained in:
parent
680a7071e5
commit
0bbe1f7687
@ -165,6 +165,7 @@ class IntegrationPlugin(MixinBase, plugin.InvenTreePlugin):
|
||||
def __init__(self):
|
||||
self.add_mixin('base')
|
||||
self.commit = self.get_plugin_commit()
|
||||
self.sign_state = 0
|
||||
|
||||
def mixin(self, key):
|
||||
return key in self._mixins
|
||||
|
@ -37,12 +37,17 @@
|
||||
<td><span class='fas fa-envelope'></span></td>
|
||||
<td>{% trans "Commit Message" %}</td><td>{{ plugin.commit.message }}{% include "clip.html" %}</td>
|
||||
</tr>
|
||||
{% if plugin.sign_state == 0 %}
|
||||
{% define 'text-success' as sign_color %}
|
||||
{% else %}
|
||||
{% define 'text-danger' as sign_color %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td><span class='fas fa-check'></span></td>
|
||||
<td><span class='{{sign_color}} fas fa-check'></span></td>
|
||||
<td>{% trans "Commit verified" %}</td><td>{{ plugin.commit.verified }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-key'></span></td>
|
||||
<td><span class='{{sign_color}} fas fa-key'></span></td>
|
||||
<td>{% trans "Commit Sign Key" %}</td><td>{{ plugin.commit.key }}{% include "clip.html" %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user