72 lines
2.0 KiB
Vue
72 lines
2.0 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="modal")
|
|
.dropdown(v-show="dropdown")
|
|
.title Actions
|
|
.action(@click="$parent.$emit('edit', id)")
|
|
i.fa.fa-fw.fa-pencil
|
|
| Edit
|
|
.action(@click="$parent.$emit('delete', id)")
|
|
i.fa.fa-fw.fa-trash
|
|
| 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 Created
|
|
span.value {{ new Date(created_at).toString() }}
|
|
.section
|
|
span.key Owner
|
|
span.value {{ user.display_name }}
|
|
</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'],
|
|
data: function () {
|
|
return {
|
|
dropdown: false,
|
|
secretShown: false
|
|
}
|
|
},
|
|
directives: {
|
|
onClickaway: onClickaway,
|
|
},
|
|
methods: {
|
|
away: function () {
|
|
this.dropdown = false
|
|
}
|
|
}
|
|
}
|
|
</script>
|