From d3b54187cb30848c76644d67f6c56c60973abc9b Mon Sep 17 00:00:00 2001
From: Tankred Hase
Date: Thu, 15 Jan 2015 16:19:22 +0100
Subject: [PATCH] Seperate PGP fingerprint w/ spaces to make it more readable
---
src/js/directive/common.js | 10 ++++++++++
src/tpl/contacts.html | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/js/directive/common.js b/src/js/directive/common.js
index 483c39e..11ed6a4 100644
--- a/src/js/directive/common.js
+++ b/src/js/directive/common.js
@@ -173,6 +173,16 @@ ngModule.directive('woClickFileInput', function() {
};
});
+ngModule.directive('woFingerprint', function($timeout) {
+ return function(scope, elm) {
+ return $timeout(function() {
+ // add space after every fourth char to make pgp fingerprint more readable
+ var fingerprint = elm.text().replace(/(\w{4})/g, '$1 ').trim();
+ elm.text(fingerprint);
+ });
+ };
+});
+
ngModule.directive('woInputCode', function() {
var BLOCK_SIZE = 4;
var NUM_BLOCKS = 6;
diff --git a/src/tpl/contacts.html b/src/tpl/contacts.html
index fe611a6..0932eb4 100644
--- a/src/tpl/contacts.html
+++ b/src/tpl/contacts.html
@@ -31,7 +31,7 @@
- Fingerprint
- - {{key.fingerprint}}
+ - {{key.fingerprint}}
- Size
- {{key.bitSize}} bit