From 876a9351ac12543f21c81c7e6ea438572b0e28d9 Mon Sep 17 00:00:00 2001 From: Jeremy Mahieu Date: Thu, 19 Dec 2019 22:37:32 +0100 Subject: [PATCH] Validate token field --- index.html | 4 ++-- js/glowingbear.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index e66f13c..b66a6ae 100644 --- a/index.html +++ b/index.html @@ -120,7 +120,7 @@
- +
@@ -152,7 +152,7 @@
- + diff --git a/js/glowingbear.js b/js/glowingbear.js index d85114c..ee8540e 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -694,6 +694,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', } }); + $scope.parseTotp = function() { + $scope.totpInvalid = !/^\d{6}$/.test($scope.totp); + }; + $scope.connect = function() { notifications.requestNotificationPermission(); $rootScope.sslError = false;