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

76 lines
2.0 KiB
Vue

<template lang="pug">
.application.list-item.row
.col-2
.picture
img(v-if="icon" :src="'/usercontent/images/' + icon")
.noicon(v-else)
i.fa.fa-fw.fa-gears
.info.col
.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 }}
.row
.col-2 Scopes
.col {{ scope }}
.row
.col-2 Redirect
.col {{ redirect_url }}
.row
.col-2 Client ID
.col {{ id }}
.row
.col-2 Secret
.col Client Secret:
#showbutton(@click="secretShown = !secretShown")
span(v-show="!secretShown") Click here to reveal secret
#hiddensecret(v-show="secretShown") {{ secret }}
.row
.col-2 Grants
.col {{ grants }}
.row
.col-2 Owner
.col {{ user.display_name }}
.row
.col-2 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>