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, + }, +};