Skip to content

Commit

Permalink
Merge pull request #430 from sparcs-kaist/bug/footer
Browse files Browse the repository at this point in the history
Bug/footer
  • Loading branch information
injoonH authored Mar 18, 2024
2 parents 1d5f674 + 43e86d8 commit e2b1a78
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
9 changes: 8 additions & 1 deletion src/components/TermsPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@

<script>
import { changeLocale } from '@/i18n'
import store from '@/store'
export default {
name: 'TermsPopup',
Expand Down Expand Up @@ -115,7 +116,11 @@ export default {
this.termsPopup = false
},
openTermsPopup () {
this.termsPopup = true
if (!store.getters.isLoggedIn) {
alert(this.$t('login-required'))
} else {
this.termsPopup = true
}
},
changeLocale
}
Expand All @@ -125,6 +130,7 @@ export default {
<i18n>
ko:
language: 'English'
login-required: '로그인이 필요합니다.'
title: '이용 약관'
agreed: '동의하셨습니다'
already-agreed: '이미 동의하셨습니다.'
Expand Down Expand Up @@ -210,6 +216,7 @@ ko:
en:
language: '한국어'
title: 'Terms of service'
login-required: 'Login required'
agreed: "You've agreed to the Terms of Service"
already-agreed: "You've already agreed."
exit-confirm: 'If you do not agree to the terms of service, you will not be able to use the service. Would you like to leave?'
Expand Down
24 changes: 8 additions & 16 deletions src/components/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@
<div class="footer-items">
<div class="footer-item">
<router-link to="/makers">
{{ $t('credit') }}
{{ $t('contributors') }}
</router-link>
</div>

<div class="footer-item">
<a href="https://sparcs.org">
{{ $t('license') }}
</a>
</div>

<div class="footer-item">
<a @click="$refs.terms.openTermsPopup()">
{{ $t('rules') }}
Expand All @@ -34,15 +28,15 @@

<div class="footer-item">
<a @click="openChannelService()">
{{ $t('ask') }}
{{ $t('inquiry') }}
</a>
</div>
</div>

<div class="footer-contact is-hidden-mobile">
{{ $t('contact') }}:
<a href="mailto:new-ara@sparcs.org">
new-ara@sparcs.org
<a href="mailto:ara@sparcs.org">
ara@sparcs.org
</a>
</div>
</div>
Expand Down Expand Up @@ -87,17 +81,15 @@ export default {
<i18n>
ko:
credit: '만든 사람들'
license: '라이센스'
contributors: '만든 사람들'
rules: '이용 약관'
contact: '문의'
ask: '채널톡 문의하기'
inquiry: '문의하기'
en:
credit: 'Credit'
license: 'License'
contributors: 'Contributors'
rules: 'Terms of Service'
contact: 'Contact'
ask: 'Ask ChannelTalk'
inquiry: 'Inquiry'
</i18n>
<style lang="scss" scoped>
Expand Down
3 changes: 3 additions & 0 deletions src/router/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import { acquireFCMToken, releaseFCMToken } from '@/firebase'
export const authGuard = async (to, from, next) => {
await store.dispatch('fetchMe')
if (!store.getters.isLoggedIn) {
if (to.path !== '/') {
alert('로그인이 필요합니다.(Login required)')
}
const urlRef = (to.path && to.path !== '/') ? `?next=${location.protocol}//${location.host}${to.fullPath}` : `?next=${location.protocol}//${location.host}/`
next(`/login${urlRef}`)
} else {
Expand Down

0 comments on commit e2b1a78

Please sign in to comment.