This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
IcyNet.eu/src/script/component/OAuthClient.vue

75 lines
2.1 KiB
Vue

<template lang="pug">
.application.list-item
.picture
img(v-if="icon" :src="'/usercontent/images/' + icon")
.noicon(v-else)
i.fa.fa-fw.fa-gears
.info
.stamps
.verified.stamp(v-if="verified")
i.fa.fa-fw.fa-check
.dropdown-wrapper.stamp(@click="dropdown = !dropdown" v-on-clickaway='away')
i.fa.fa-fw.fa-ellipsis-v
transition(name="pop")
.dropdown(v-show="dropdown")
.title Actions
.action(@click="$parent.$emit('edit', id)")
i.fa.fa-fw.fa-pencil
|&nbsp;Edit
.action(@click="$parent.$emit('delete', id)")
i.fa.fa-fw.fa-trash
|&nbsp;Delete
.name {{ title }}
.description {{ description }}
a.url(:href='url', target='_blank', rel='nofollow') {{ url }}
.section
span.key Scopes
span.value {{ scope }}
.section
span.key Redirect
span.value {{ redirect_url }}
.section
span.key Client ID
span.value {{ id }}
.section
span.key Secret
span.value Client Secret:
#showbutton(@click="secretShown = !secretShown")
span(v-show="!secretShown") Click here to reveal secret
#hiddensecret(v-show="secretShown") {{ secret }}
.section
span.key Grants
span.value {{ grants }}
.section
span.key Owner
span.value {{ user.display_name }}
.section
span.key Created
span.value {{ new Date(created_at).toString() }}
</template>
<script type="text/javascript">
import { directive as onClickaway } from 'vue-clickaway'
export default {
props: ['icon', 'verified', 'title', 'description', 'url', 'scope', 'redirect_url', 'id', 'secret', 'created_at', 'user', 'grants'],
data: function () {
return {
dropdown: false,
secretShown: false
}
},
directives: {
onClickaway: onClickaway,
},
methods: {
away: function () {
this.dropdown = false
}
}
}
</script>