From 5206b81e324f6813c69da1882f8a7defddbc0646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Val=C3=A9rio?= Date: Thu, 18 Jun 2020 23:30:17 +0100 Subject: [PATCH] add web key directory search --- src/App.vue | 24 ++++++++++++-- src/components/DirSearch.vue | 59 +++++++++++++++++++++++++++++++++++ src/components/KeyInspect.vue | 25 ++++++++++----- vue.config.js | 5 +++ 4 files changed, 103 insertions(+), 10 deletions(-) create mode 100644 src/components/DirSearch.vue create mode 100644 vue.config.js diff --git a/src/App.vue b/src/App.vue index 4aee4fa..02c5e8d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,6 +6,9 @@ Check the details of any PGP key + + Search Key + Swicth to {{darkTheme ? "light theme" : "dark theme"}} @@ -15,7 +18,12 @@ - + + @@ -31,14 +39,18 @@ diff --git a/src/components/KeyInspect.vue b/src/components/KeyInspect.vue index c302626..88a4a6c 100644 --- a/src/components/KeyInspect.vue +++ b/src/components/KeyInspect.vue @@ -68,13 +68,20 @@ export default { SubKey, UserId }, - data: () => ({ - pubkey: "", - key: null, - error: "", - alert: localStorage.getItem("keyAlertDismissed") == "true" ? false : true, - previousPubKeys: JSON.parse(localStorage.getItem("previousPubKeys")) || [] - }), + props: { + initialKey: { + default: "" + } + }, + data: function() { + return { + pubkey: this.initialKey ? this.initialKey : "", + key: null, + error: "", + alert: localStorage.getItem("keyAlertDismissed") == "true" ? false : true, + previousPubKeys: JSON.parse(localStorage.getItem("previousPubKeys")) || [] + }; + }, methods: { inspect: async function() { try { @@ -121,6 +128,10 @@ export default { watch: { alert: function() { localStorage.setItem("keyAlertDismissed", true); + }, + initialKey: function(newValue) { + this.pubkey = newValue; + this.inspect(); } } }; diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..5f4ee75 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,5 @@ +module.exports = { + devServer: { + https: true, + }, +};