Skip to content

Commit

Permalink
fix: Fix mobile list touch issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lavi27 committed Jan 7, 2024
1 parent bd9a658 commit 0254241
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 82 deletions.
133 changes: 68 additions & 65 deletions pages/dashboard/invite.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,33 @@
<!-- 보안 초대 방식 -->
{{ $t('invite.category1.type.title') }}
</p>
<div
class="select select-l"
:class="{ active: select.method.isActive }"
@click="
list.method.show = true
select.method.isActive = true
"
v-click-outside="onClickOutside"
>
{{ list.method.list[select.method.index] }}
</div>

<ul class="list-l" v-if="list.method.show">
<li
v-for="(name, index) in list.method.list"
v-bind:key="index"
<div class="flex-col w-full" v-click-outside="onClickOutside">
<div
class="select select-l"
:class="{ active: select.method.isActive }"
@click="
select.method.index = index
select.method.isActive = false
list.method.show = true
select.method.isActive = true
"
>
{{ name }}
</li>
</ul>
{{ list.method.list[select.method.index] }}
</div>

<ul class="list-l" v-if="list.method.show">
<li
v-for="(name, index) in list.method.list"
v-bind:key="index"
@click="
select.method.index = index
select.method.isActive = false
list.method.show = false
"
>
{{ name }}
</li>
</ul>
</div>
</div>

<div class="vert" v-if="switch_.invite">
Expand All @@ -82,49 +85,49 @@
</div>

<!-- <div class="mb-6"> -->
<!-- <h2> -->
<!-- 커스텀 초대링크 -->
<!-- {{ $t('invite.category2.title') }} -->
<!-- </h2> -->
<!-- <p> -->
<!-- 소유하고 계신 도메인에 NGuard 초대링크를 설정할 수 있습니다. -->
<!-- {{ $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> -->

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

<!-- <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> -->
<!-- SSL 설정 -->
<!-- {{ $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 @@ -344,7 +347,7 @@ export default {
const settings = (
await this.$axios.$get('/dashboard/invite?id=' + this.$route.query.id, {
headers: {
Authorization: "Bearer " + localStorage.getItem('access_token'),
Authorization: 'Bearer ' + localStorage.getItem('access_token'),
},
})
).data
Expand Down Expand Up @@ -439,7 +442,7 @@ export default {
},
{
headers: {
Authorization: "Bearer " + localStorage.getItem('access_token'),
Authorization: 'Bearer ' + localStorage.getItem('access_token'),
},
},
)
Expand Down
39 changes: 22 additions & 17 deletions pages/dashboard/verify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,22 @@
{{ $t('verify.category1.role') }}
<!-- 인증 시 지급될 역할 -->
</p>
<input
class="input-l"
id="role_input"
:value="input.role?.name"
@click="list.role.show = true"
readonly
v-click-outside="onClickOutside"
type="text"
:placeholder="$t('verify.category1.rolePlaceholder')"
/>
<ul class="list-l" v-if="list.role.show">
<li v-for="(role, index) in list.role.list" @click="input.role = role" v-bind:key="index">
{{ role?.name }}
</li>
</ul>
<div class="flex-col" v-click-outside="onClickOutside">
<input
class="input-l"
id="role_input"
:value="input.role?.name"
@click="list.role.show = true"
readonly
type="text"
:placeholder="$t('verify.category1.rolePlaceholder')"
/>
<ul class="list-l" v-if="list.role.show">
<li v-for="(role, index) in list.role.list" @click="onClickRole(role)" v-bind:key="index">
{{ role?.name }}
</li>
</ul>
</div>
</div>
</form>

Expand Down Expand Up @@ -141,7 +142,7 @@ export default {
const settings = (
await this.$axios.$get('/dashboard/verify?id=' + this.$route.query.id, {
headers: {
Authorization: "Bearer " + localStorage.getItem('access_token'),
Authorization: 'Bearer ' + localStorage.getItem('access_token'),
},
})
).data
Expand Down Expand Up @@ -182,6 +183,10 @@ export default {
onClickOutside() {
this.list.role.show = false
},
onClickRole(roleName) {
this.input.role = roleName
this.list.role.show = false
},
async saveSettings() {
try {
await this.$axios.$post(
Expand All @@ -192,7 +197,7 @@ export default {
},
{
headers: {
Authorization: "Bearer " + localStorage.getItem('access_token'),
Authorization: 'Bearer ' + localStorage.getItem('access_token'),
},
},
)
Expand Down

0 comments on commit 0254241

Please sign in to comment.