Files
scrypted/plugins/core/ui/src/interfaces/HttpRequestHandler.vue
Koushik Dutta 27151cc80a core: ui tweaks
2021-10-04 20:42:56 -07:00

41 lines
1.1 KiB
Vue

<template>
<span>
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn small text v-on="on" @click="viewPublic">
<font-awesome-icon size="lg" :icon="['fab', 'chrome']" :color="colors.blue.base" />
</v-btn>
</template>
<span>View the public endpoint of this plugin.</span>
</v-tooltip>
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn small text v-on="on" @click="viewPrivate">
<font-awesome-icon size="lg" icon="user-secret" :color="colors.red.base" />
</v-btn>
</template>
<span>View the private http endpoint of this plugin.</span>
</v-tooltip>
</span>
</template>
<script>
import RPCInterface from "./RPCInterface.vue";
import colors from "vuetify/es5/util/colors";
export default {
mixins: [RPCInterface],
data() {
return {
colors
};
},
methods: {
async viewPublic() {
window.open(`/endpoint/${this.id}/public/`, 'endpoint');
},
async viewPrivate() {
window.open(`/endpoint/${this.id}/`, 'endpoint');
}
}
};
</script>