76 lines
2.1 KiB
Vue
76 lines
2.1 KiB
Vue
<template lang="pug">
|
|
.application.list-item.row
|
|
div
|
|
.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
|
|
| 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 }}
|
|
|
|
.row
|
|
.col-sm-2.col-3 Scopes
|
|
.col {{ scope }}
|
|
.row
|
|
.col-sm-2.col-3 Redirect
|
|
.col {{ redirect_url }}
|
|
.row
|
|
.col-sm-2.col-3 Client ID
|
|
.col {{ id }}
|
|
.row
|
|
.col-sm-2.col-3 Secret
|
|
.col Client Secret:
|
|
#showbutton(@click="secretShown = !secretShown")
|
|
span(v-show="!secretShown") Click here to reveal secret
|
|
#hiddensecret(v-show="secretShown") {{ secret }}
|
|
.row
|
|
.col-sm-2.col-3 Grants
|
|
.col {{ grants }}
|
|
.row
|
|
.col-sm-2.col-3 Owner
|
|
.col {{ user.display_name }}
|
|
.row
|
|
.col-sm-2.col-3 Created
|
|
.col {{ 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>
|