kinspect/src/App.vue

72 lines
1.8 KiB
Vue
Raw Normal View History

2019-09-14 21:14:31 +02:00
<template>
2019-09-14 21:57:46 +02:00
<v-app>
<v-app-bar app>
<v-toolbar-title class="headline text-uppercase">
2019-09-21 16:02:33 +02:00
<span>kinspect</span> -
2019-09-14 21:57:46 +02:00
<span class="font-weight-light">Check the details of any PGP key</span>
</v-toolbar-title>
<v-spacer></v-spacer>
2020-06-19 00:30:17 +02:00
<v-btn text @click.stop="searchDialog = true">
<span class="mr-2">Search Key</span>
</v-btn>
2019-09-20 00:03:56 +02:00
<v-btn text v-on:click="changeTheme">
<span class="mr-2">Swicth to {{darkTheme ? "light theme" : "dark theme"}}</span>
</v-btn>
2019-09-21 16:02:33 +02:00
<v-btn text href="https://github.com/dethos/kinspect" target="_blank">
2019-09-20 00:03:56 +02:00
<span class="mr-2">Check source code</span>
2019-09-14 21:57:46 +02:00
</v-btn>
</v-app-bar>
<v-content>
2020-06-19 00:30:17 +02:00
<KeyInspect v-bind:initialKey="searchKey" />
<DirSearch
v-bind:dialog="searchDialog"
v-on:dialogClosed="closeDialog"
v-on:keyFound="setSearchKey"
/>
2019-09-14 21:57:46 +02:00
</v-content>
2019-09-20 00:03:56 +02:00
<v-footer>
<div class="flex-grow-1"></div>
<div>
Developed by
<a href="https://ovalerio.net>">Gonçalo Valério</a> | License:
2019-09-21 16:02:33 +02:00
<a href="https://github.com/dethos/kinspect/blob/master/LICENSE">AGPL</a>
2019-09-20 00:03:56 +02:00
</div>
</v-footer>
2019-09-14 21:57:46 +02:00
</v-app>
2019-09-14 21:14:31 +02:00
</template>
<script>
import KeyInspect from "./components/KeyInspect";
2020-06-19 00:30:17 +02:00
import DirSearch from "./components/DirSearch";
2019-09-14 21:14:31 +02:00
export default {
2019-09-14 21:57:46 +02:00
name: "App",
2019-09-14 21:14:31 +02:00
components: {
2020-06-19 00:30:17 +02:00
KeyInspect,
DirSearch,
2019-09-14 21:57:46 +02:00
},
2019-09-20 00:03:56 +02:00
data: () => ({
2020-06-19 00:30:17 +02:00
darkTheme: true,
searchDialog: false,
searchKey: "",
2019-09-20 00:03:56 +02:00
}),
created: function () {
2019-09-20 00:03:56 +02:00
this.$vuetify.theme.dark = this.darkTheme;
},
methods: {
changeTheme: function () {
2019-09-20 00:03:56 +02:00
this.darkTheme = !this.darkTheme;
this.$vuetify.theme.dark = this.darkTheme;
2020-06-19 00:30:17 +02:00
},
closeDialog: function () {
2020-06-19 00:30:17 +02:00
this.searchDialog = false;
},
setSearchKey: function (armoredKey) {
2020-06-19 00:30:17 +02:00
this.searchKey = armoredKey;
},
},
2019-09-14 21:57:46 +02:00
};
2019-09-14 21:14:31 +02:00
</script>