2018-02-20 05:50:01 -06:00
|
|
|
|
<template>
|
|
|
|
|
<div class="form">
|
|
|
|
|
<header>
|
|
|
|
|
<h1><i>{{ app.name }}</i>があなたのアカウントにアクセスすることを<b>許可</b>しますか?</h1>
|
2018-03-30 07:37:01 -05:00
|
|
|
|
<img :src="`${app.iconUrl}?thumbnail&size=64`"/>
|
2018-02-20 05:50:01 -06:00
|
|
|
|
</header>
|
|
|
|
|
<div class="app">
|
|
|
|
|
<section>
|
|
|
|
|
<h2>{{ app.name }}</h2>
|
2018-03-29 00:48:47 -05:00
|
|
|
|
<p class="nid">{{ app.nameId }}</p>
|
2018-02-20 05:50:01 -06:00
|
|
|
|
<p class="description">{{ app.description }}</p>
|
|
|
|
|
</section>
|
|
|
|
|
<section>
|
|
|
|
|
<h2>このアプリは次の権限を要求しています:</h2>
|
|
|
|
|
<ul>
|
|
|
|
|
<template v-for="p in app.permission">
|
|
|
|
|
<li v-if="p == 'account-read'">アカウントの情報を見る。</li>
|
|
|
|
|
<li v-if="p == 'account-write'">アカウントの情報を操作する。</li>
|
2018-04-07 12:30:37 -05:00
|
|
|
|
<li v-if="p == 'note-write'">投稿する。</li>
|
2018-02-20 05:50:01 -06:00
|
|
|
|
<li v-if="p == 'like-write'">いいねしたりいいね解除する。</li>
|
|
|
|
|
<li v-if="p == 'following-write'">フォローしたりフォロー解除する。</li>
|
|
|
|
|
<li v-if="p == 'drive-read'">ドライブを見る。</li>
|
|
|
|
|
<li v-if="p == 'drive-write'">ドライブを操作する。</li>
|
|
|
|
|
<li v-if="p == 'notification-read'">通知を見る。</li>
|
|
|
|
|
<li v-if="p == 'notification-write'">通知を操作する。</li>
|
|
|
|
|
</template>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action">
|
|
|
|
|
<button @click="cancel">キャンセル</button>
|
|
|
|
|
<button @click="accept">アクセスを許可</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
export default Vue.extend({
|
|
|
|
|
props: ['session'],
|
|
|
|
|
computed: {
|
|
|
|
|
app(): any {
|
|
|
|
|
return this.session.app;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
cancel() {
|
|
|
|
|
(this as any).api('auth/deny', {
|
|
|
|
|
token: this.session.token
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.$emit('denied');
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
accept() {
|
|
|
|
|
(this as any).api('auth/accept', {
|
|
|
|
|
token: this.session.token
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.$emit('accepted');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
.form
|
|
|
|
|
|
|
|
|
|
> header
|
|
|
|
|
> h1
|
|
|
|
|
margin 0
|
|
|
|
|
padding 32px 32px 20px 32px
|
|
|
|
|
font-size 24px
|
|
|
|
|
font-weight normal
|
|
|
|
|
color #777
|
|
|
|
|
|
|
|
|
|
i
|
|
|
|
|
color #77aeca
|
|
|
|
|
|
|
|
|
|
&:before
|
|
|
|
|
content '「'
|
|
|
|
|
|
|
|
|
|
&:after
|
|
|
|
|
content '」'
|
|
|
|
|
|
|
|
|
|
b
|
|
|
|
|
color #666
|
|
|
|
|
|
|
|
|
|
> img
|
|
|
|
|
display block
|
|
|
|
|
z-index 1
|
|
|
|
|
width 84px
|
|
|
|
|
height 84px
|
|
|
|
|
margin 0 auto -38px auto
|
|
|
|
|
border solid 5px #fff
|
|
|
|
|
border-radius 100%
|
2018-04-28 18:51:17 -05:00
|
|
|
|
box-shadow 0 2px 2px rgba(#000, 0.1)
|
2018-02-20 05:50:01 -06:00
|
|
|
|
|
|
|
|
|
> .app
|
|
|
|
|
padding 44px 16px 0 16px
|
|
|
|
|
color #555
|
|
|
|
|
background #eee
|
2018-04-28 18:51:17 -05:00
|
|
|
|
box-shadow 0 2px 2px rgba(#000, 0.1) inset
|
2018-02-20 05:50:01 -06:00
|
|
|
|
|
|
|
|
|
&:after
|
|
|
|
|
content ''
|
|
|
|
|
display block
|
|
|
|
|
clear both
|
|
|
|
|
|
|
|
|
|
> section
|
|
|
|
|
float left
|
|
|
|
|
width 50%
|
|
|
|
|
padding 8px
|
|
|
|
|
text-align left
|
|
|
|
|
|
|
|
|
|
> h2
|
|
|
|
|
margin 0
|
|
|
|
|
font-size 16px
|
|
|
|
|
color #777
|
|
|
|
|
|
|
|
|
|
> .action
|
|
|
|
|
padding 16px
|
|
|
|
|
|
|
|
|
|
> button
|
|
|
|
|
margin 0 8px
|
2018-03-02 23:25:36 -06:00
|
|
|
|
padding 0
|
2018-02-20 05:50:01 -06:00
|
|
|
|
|
|
|
|
|
@media (max-width 600px)
|
|
|
|
|
> header
|
|
|
|
|
> img
|
|
|
|
|
box-shadow none
|
|
|
|
|
|
|
|
|
|
> .app
|
|
|
|
|
box-shadow none
|
|
|
|
|
|
|
|
|
|
@media (max-width 500px)
|
|
|
|
|
> header
|
|
|
|
|
> h1
|
|
|
|
|
font-size 16px
|
|
|
|
|
|
|
|
|
|
</style>
|