Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icon to userpage #225

Merged
merged 5 commits into from
Nov 2, 2019
Merged

icon to userpage #225

merged 5 commits into from
Nov 2, 2019

Conversation

series2
Copy link
Contributor

@series2 series2 commented Oct 22, 2019

あっているかわかりませんが、動いたのでこれでいきます

@series2
Copy link
Contributor Author

series2 commented Oct 22, 2019

支援課のアイコンは東工大のマークにとりあえずしておきます。公式HPのロゴのページでは余白がなくていい感じにならなかったので公式twitterのプロフィール画像からとっています。それとコンフリクトが怖かったのでissue-174もこっちにまとめてます。

Copy link
Contributor

@nagatea nagatea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レビューしました

Comment on lines 2 to 6
<v-btn
dark
icon
:to="`/users/${user.name}`"
>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なんかめっちゃインデントずれてる

<v-avatar :size="size">
<v-img :src="'https://q.trap.jp/api/1.0/public/icon/' + user.name" width="100%" alt=""/>
<v-img :src="user.name!=='sienka'?'https://q.trap.jp/api/1.0/public/icon/' + user.name:'https://pbs.twimg.com/profile_images/877073041351622657/n31PKuuM.jpg'" width="100%" alt=""/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

東工大のアイコンは直リンクじゃなくてこっちで保持しようか
アイコンダウンロードしてclient/public/img/~~.jpgに保存してここから呼ぶようにしてください

@@ -8,7 +8,7 @@
</div>
<div>
<v-avatar size="200">
<img :src="`https://q.trap.jp/api/1.0/public/icon/${$route.params.name}`" />
<img :src="$route.params.name!=='sienka'?`https://q.trap.jp/api/1.0/public/icon/${$route.params.name}`:'https://pbs.twimg.com/profile_images/877073041351622657/n31PKuuM.jpg'" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

支援課かどうかの判定のロジックはcomputedに書いてほしいです(伝わるかな)

Copy link
Contributor

@nagatea nagatea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

遅くなりましたがコメント返しました

}
},
watch: {
'$route' (to, from) {
this.mount()
}
},
computed: {
checkSienka () {
return this.$route.params.name !== 'sienka'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URLまでここで返して大丈夫です
computedに移す目的としては上のになるべくjavascriptの構文を書かないという目的があるので(ほかのとこめっちゃ書いてるけど)

Copy link
Contributor

@nagatea nagatea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントしました(あとちょっと!)

}
},
watch: {
'$route' (to, from) {
this.mount()
}
},
computed: {
navigateImagePath () {
return this.$route.params.name !== 'sienka' ? `https://q.trap.jp/api/1.0/public/icon/${this.$route.params.name}` : this.sienka
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sienkaのiconPathが変わることはないからthis.sienkaってせずに'./../img/sienka-icon.jpg'でいいかも

},
computed: {
navigateImagePath () {
return this.user.name !== 'sienka' ? `https://q.trap.jp/api/1.0/public/icon/${this.user.name}` : this.sienka
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここも同じ
dataの行が減ってスマートになるね

@nagatea
Copy link
Contributor

nagatea commented Oct 28, 2019

@series2 修正お願いします!

Copy link
Contributor

@nagatea nagatea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM:+1:
コンフリクトはたぶん大丈夫だと思います

@nagatea nagatea merged commit a63de9e into master Nov 2, 2019
@ryoha000 ryoha000 deleted the issue-174 branch February 22, 2020 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants