Skip to content

Commit

Permalink
⚡ feat: 신규 v3 API로 코드 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
kms0219kms committed Jan 1, 2024
1 parent f5fbb8e commit 4e17a0e
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 46 deletions.
4 changes: 2 additions & 2 deletions pages/auth/callback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ export default {
staging: Boolean(window.location.origin == 'https://console-v2stg.nguard.dev'),
})
localStorage.setItem('access_token', login.access_token)
localStorage.setItem('access_token', login.data.access_token)
setTimeout(() => {
this.$router.push(`/${this.$route.query.state || this.$i18n.locale || 'ko'}/servers`)
}, 1000)
} catch (e) {
if (e.response.status != 400 && e.response.status != 429) {
alert(e.response.data.error.error_description || e)
alert(e.response.data.message || e)
}
this.$router.push(`/${this.$route.query.state || this.$i18n.locale || 'ko'}/auth/login`)
Expand Down
2 changes: 1 addition & 1 deletion pages/bot/callback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
}
try {
opener.load_servers()
opener.location.reload(true)
window.close()
} catch (e) {
this.$router.push('/servers')
Expand Down
2 changes: 1 addition & 1 deletion pages/dashboard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export default {
async mounted() {
window.addEventListener('resize', this.resizeAlerts)
const socket = io('https://api.nguard.xyz/')
const socket = io('https://ws-api.nguard.xyz/')
socket.on('push:load', pushs => {
this.alerts.contents = pushs
Expand Down
80 changes: 40 additions & 40 deletions pages/dashboard/invite.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,51 +81,51 @@
</form>
</div>

<div class="mb-6">
<h2>
<!-- <div class="mb-6"> -->
<!-- <h2> -->
<!-- 커스텀 초대링크 -->
{{ $t('invite.category2.title') }}
</h2>
<p>
<!-- {{ $t('invite.category2.title') }} -->
<!-- </h2> -->
<!-- <p> -->
<!-- 소유하고 계신 도메인에 NGuard 초대링크를 설정할 수 있습니다. -->
{{ $t('invite.category2.description') }}
</p>
<form>
<div>
<label>
<!-- {{ $t('invite.category2.description') }} -->
<!-- </p> -->
<!-- <form> -->
<!-- <div> -->
<!-- <label> -->
<!-- 커스텀 초대링크 -->
{{ $t('invite.category2.toggle') }}
</label>
<div @click="inputSwitch('domain')" :class="{ switch_on: switch_.domain }" class="switch"></div>
</div>
<!-- {{ $t('invite.category2.toggle') }} -->
<!-- </label> -->
<!-- <div @click="inputSwitch('domain')" :class="{ switch_on: switch_.domain }" class="switch"></div> -->
<!-- </div> -->

<div class="vert" v-if="switch_.domain">
<p>
<!-- <div class="vert" v-if="switch_.domain"> -->
<!-- <p> -->
<!-- 도메인 설정 -->
{{ $t('invite.category2.link') }}
</p>
<div class="flex items-center">
<input
class="input-m"
id="inviteDomain_input"
type="text"
placeholder="도메인 입력"
v-model="select.domain"
v-bind:readonly="!isEnterprise"
@click="clickCustomDomain()"
/>
</div>
</div>

<div class="flex" v-if="switch_.domain">
<label>
<!-- {{ $t('invite.category2.link') }} -->
<!-- </p> -->
<!-- <div class="flex items-center"> -->
<!-- <input -->
<!-- class="input-m" -->
<!-- id="inviteDomain_input" -->
<!-- type="text" -->
<!-- placeholder="도메인 입력" -->
<!-- v-model="select.domain" -->
<!-- v-bind:readonly="!isEnterprise" -->
<!-- @click="clickCustomDomain()" -->
<!-- /> -->
<!-- </div> -->
<!-- </div> -->

<!-- <div class="flex" v-if="switch_.domain"> -->
<!-- <label> -->
<!-- SSL 설정 -->
{{ $t('invite.category2.ssl') }}
</label>
<div @click="inputSwitch('domain_ssl')" :class="{ switch_on: switch_.domain_ssl }" class="switch"></div>
</div>
</form>
</div>
<!-- {{ $t('invite.category2.ssl') }} -->
<!-- </label> -->
<!-- <div @click="inputSwitch('domain_ssl')" :class="{ switch_on: switch_.domain_ssl }" class="switch"></div> -->
<!-- </div> -->
<!-- </form> -->
<!-- </div> -->

<button class="btn-save" @click="checkSaveSettings()">
<!-- 저장하기 -->
Expand Down Expand Up @@ -349,7 +349,7 @@ export default {
})
).data
this.isPermission = settings.koreanbots.data.voted
this.isPermission = settings.koreanbots.voted
this.isEnterprise = settings.payData?.type === 'ENTERPRISE' && new Date().getTime() < settings.payData?.expire
if (settings.settings) {
Expand Down
6 changes: 4 additions & 2 deletions pages/dashboard/verify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@
<!-- 성공적으로 저장했습니다! -->
</h2>
<div class="flex flex-col text-gray-400 pt-3 gap-2">
<span v-if="switch_.confirm" v-html="$t('verify.modal.applied')">
<span v-if="switch_.confirm">
<!-- 새로운 유저가 <code>/verify</code> 명령어로 인증할 수 있습니다. -->
{{ $t('verify.modal.applied') }}
</span>
<span v-else v-html="$t('verify.modal.deleted')">
<span v-else>
<!-- 새로운 유저는 더 이상 <code>/verify</code> 명령어로 인증할 수 없습니다. -->
{{ $t('verify.modal.deleted') }}
</span>

<br />
Expand Down

0 comments on commit 4e17a0e

Please sign in to comment.