2019-10-12 14:33:05 +00:00
|
|
|
<template>
|
|
|
|
|
<b-modal
|
|
|
|
|
id="create-party-modal"
|
|
|
|
|
size="lg"
|
|
|
|
|
hide-footer="hide-footer"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
slot="modal-header"
|
|
|
|
|
class="header-wrap"
|
|
|
|
|
>
|
2019-10-12 15:05:15 +00:00
|
|
|
<div class="quest_screen"></div>
|
|
|
|
|
<div class="row heading">
|
2019-10-12 14:33:05 +00:00
|
|
|
<div class="col-12 text-center pr-5 pl-5">
|
2023-05-02 14:51:33 +00:00
|
|
|
<h1
|
|
|
|
|
v-once
|
|
|
|
|
class="mb-2"
|
|
|
|
|
>
|
2019-10-12 14:33:05 +00:00
|
|
|
{{ $t('playInPartyTitle') }}
|
2023-05-02 14:51:33 +00:00
|
|
|
</h1>
|
2019-10-12 15:05:15 +00:00
|
|
|
<p
|
2019-10-12 14:33:05 +00:00
|
|
|
v-once
|
|
|
|
|
class="mb-4"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('playInPartyDescription') }}
|
2019-10-12 15:05:15 +00:00
|
|
|
</p>
|
|
|
|
|
<button
|
2019-10-12 14:33:05 +00:00
|
|
|
v-once
|
2023-05-02 14:51:33 +00:00
|
|
|
class="btn btn-primary px-4 mb-2"
|
2019-10-12 14:33:05 +00:00
|
|
|
@click="createParty()"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('createParty') }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-05-02 14:51:33 +00:00
|
|
|
<close-x
|
|
|
|
|
@close="close()"
|
|
|
|
|
/>
|
2019-10-12 15:05:15 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="row grey-row">
|
2023-05-02 14:51:33 +00:00
|
|
|
<div class="col-12 text-center px-0">
|
2019-10-12 15:05:15 +00:00
|
|
|
<div class="join-party"></div>
|
2023-05-02 14:51:33 +00:00
|
|
|
<h1
|
|
|
|
|
v-once
|
|
|
|
|
class="mb-2"
|
|
|
|
|
>
|
2019-10-12 14:33:05 +00:00
|
|
|
{{ $t('wantToJoinPartyTitle') }}
|
2023-05-02 14:51:33 +00:00
|
|
|
</h1>
|
|
|
|
|
<p
|
|
|
|
|
v-once
|
|
|
|
|
class="mb-4"
|
|
|
|
|
v-html="$t('partyFinderDescription')"
|
|
|
|
|
>
|
|
|
|
|
</p>
|
2019-10-12 15:05:15 +00:00
|
|
|
<div
|
2023-05-02 14:51:33 +00:00
|
|
|
v-if="seeking"
|
2019-10-12 14:33:05 +00:00
|
|
|
>
|
2023-05-02 14:51:33 +00:00
|
|
|
<div
|
|
|
|
|
class="green-bar mb-3"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('currentlyLookingForParty') }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="d-flex justify-content-center">
|
|
|
|
|
<div
|
|
|
|
|
class="red-link"
|
|
|
|
|
@click="seekParty()"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('leave') }}
|
2019-10-12 14:33:05 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-05-02 14:51:33 +00:00
|
|
|
<button
|
|
|
|
|
v-else
|
|
|
|
|
class="btn btn-primary px-4 mt-2 mb-1"
|
|
|
|
|
@click="seekParty()"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('lookForParty') }}
|
|
|
|
|
</button>
|
2019-10-12 14:33:05 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</b-modal>
|
2017-06-27 20:02:55 +00:00
|
|
|
</template>
|
|
|
|
|
|
2023-05-02 14:51:33 +00:00
|
|
|
<style lang="scss">
|
|
|
|
|
#create-party-modal {
|
|
|
|
|
display: flex !important;
|
|
|
|
|
overflow-y: hidden;
|
2018-12-11 20:47:50 +00:00
|
|
|
|
2023-05-02 14:51:33 +00:00
|
|
|
@media (max-height: 770px) {
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
2017-08-21 15:36:31 +00:00
|
|
|
|
2023-05-02 14:51:33 +00:00
|
|
|
.modal-body {
|
|
|
|
|
padding: 0rem 0.75rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.modal-content {
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.modal-dialog {
|
|
|
|
|
width: 566px;
|
|
|
|
|
margin: auto;
|
|
|
|
|
|
|
|
|
|
@media (max-height: 826px) {
|
|
|
|
|
margin-top: 56px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.modal-header {
|
|
|
|
|
padding: 0;
|
|
|
|
|
border-bottom: 0px;
|
|
|
|
|
}
|
2017-08-21 15:36:31 +00:00
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
2018-12-11 20:47:50 +00:00
|
|
|
<style lang="scss" scoped>
|
2025-06-12 00:20:11 +00:00
|
|
|
@import '@/assets/scss/colors.scss';
|
2017-06-27 20:02:55 +00:00
|
|
|
|
2018-12-11 20:47:50 +00:00
|
|
|
.copy-icon {
|
|
|
|
|
width: 1rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-control[readonly] {
|
|
|
|
|
background-color: $white;
|
|
|
|
|
color: $gray-50;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-group {
|
|
|
|
|
background-color: $gray-600;
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
border: solid 1px $gray-500;
|
|
|
|
|
width: 90%;
|
|
|
|
|
margin: auto;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-02 14:51:33 +00:00
|
|
|
.green-bar {
|
|
|
|
|
height: 32px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
line-height: 1.71;
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: $green-1;
|
|
|
|
|
background-color: $green-100;
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
padding: 4px 0px 4px 0px;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-11 20:47:50 +00:00
|
|
|
.grey-row {
|
|
|
|
|
background-color: $gray-700;
|
|
|
|
|
color: #4e4a57;
|
|
|
|
|
padding: 2em;
|
2023-05-02 14:51:33 +00:00
|
|
|
border-radius: 0px 0px 8px 8px;
|
2018-12-11 20:47:50 +00:00
|
|
|
}
|
|
|
|
|
|
2023-05-02 14:51:33 +00:00
|
|
|
h1 {
|
|
|
|
|
color: $purple-300;
|
2017-08-21 15:36:31 +00:00
|
|
|
}
|
|
|
|
|
|
2017-07-31 19:54:52 +00:00
|
|
|
.header-wrap {
|
2017-08-21 15:36:31 +00:00
|
|
|
padding: 0;
|
2017-07-31 19:54:52 +00:00
|
|
|
color: #4e4a57;
|
2017-12-20 16:33:21 +00:00
|
|
|
width: 100%;
|
2017-07-31 19:54:52 +00:00
|
|
|
|
2017-08-21 15:36:31 +00:00
|
|
|
.quest_screen {
|
2025-06-12 00:20:11 +00:00
|
|
|
background-image: url('@/assets/images/group@3x.png');
|
2017-08-21 15:36:31 +00:00
|
|
|
background-size: cover;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 246px;
|
2018-12-11 20:47:50 +00:00
|
|
|
margin-bottom: 1.5rem;
|
2017-08-21 15:36:31 +00:00
|
|
|
border-radius: 2px 2px 0 0;
|
2018-12-11 20:47:50 +00:00
|
|
|
image-rendering: optimizequality;
|
2017-08-21 15:36:31 +00:00
|
|
|
}
|
2017-07-31 19:54:52 +00:00
|
|
|
}
|
|
|
|
|
|
2018-12-11 20:47:50 +00:00
|
|
|
.heading {
|
|
|
|
|
margin-top: 1rem;
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input.form-control {
|
|
|
|
|
border: 0px;
|
|
|
|
|
padding-left: 0.25rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.input-group-prepend {
|
|
|
|
|
margin-right: 0px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.input-group-text {
|
|
|
|
|
background-color: $white;
|
|
|
|
|
border: 0px;
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
color: $gray-300;
|
|
|
|
|
padding: 0rem 0.1rem 0rem 0.75rem;
|
2017-08-21 15:36:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.join-party {
|
2025-06-12 00:20:11 +00:00
|
|
|
background-image: url('@/assets/images/party.png');
|
2017-08-21 15:36:31 +00:00
|
|
|
background-size: cover;
|
|
|
|
|
width: 203px;
|
|
|
|
|
height: 66px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
margin-bottom: 1em;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-11 20:47:50 +00:00
|
|
|
label {
|
|
|
|
|
color: $gray-100;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
margin-bottom: 0rem;
|
|
|
|
|
margin-left: 1rem;
|
|
|
|
|
cursor: pointer;
|
2017-06-27 20:02:55 +00:00
|
|
|
}
|
|
|
|
|
|
2018-12-11 20:47:50 +00:00
|
|
|
.modal-dialog .text {
|
|
|
|
|
min-height: 1rem;
|
|
|
|
|
margin: 0.75rem auto 0.75rem 0.25rem;
|
2017-06-27 20:02:55 +00:00
|
|
|
}
|
|
|
|
|
|
2023-05-02 14:51:33 +00:00
|
|
|
p {
|
|
|
|
|
line-height: 1.71;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.red-link {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
line-height: 1.71;
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: $maroon-50;
|
|
|
|
|
&:hover {
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-11 20:47:50 +00:00
|
|
|
.small {
|
|
|
|
|
color: $gray-200;
|
|
|
|
|
margin: auto 0.5rem auto 0.25rem;
|
2017-06-27 20:02:55 +00:00
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<script>
|
2019-10-09 18:08:36 +00:00
|
|
|
import { mapState } from '@/libs/store';
|
|
|
|
|
import * as Analytics from '@/libs/analytics';
|
|
|
|
|
import notifications from '@/mixins/notifications';
|
2023-05-02 14:51:33 +00:00
|
|
|
import closeX from '../ui/closeX';
|
2019-10-09 18:08:36 +00:00
|
|
|
|
2025-06-12 00:20:11 +00:00
|
|
|
import copyIcon from '@/assets/svg/copy.svg?raw';
|
2023-10-03 18:30:44 +00:00
|
|
|
import copyToClipboard from '@/mixins/copyToClipboard';
|
2019-10-09 18:08:36 +00:00
|
|
|
|
|
|
|
|
export default {
|
2023-05-02 14:51:33 +00:00
|
|
|
components: {
|
|
|
|
|
closeX,
|
|
|
|
|
},
|
2023-10-03 18:30:44 +00:00
|
|
|
mixins: [notifications, copyToClipboard],
|
2019-10-09 18:08:36 +00:00
|
|
|
data () {
|
|
|
|
|
return {
|
|
|
|
|
icons: Object.freeze({
|
|
|
|
|
copy: copyIcon,
|
|
|
|
|
}),
|
2023-05-02 14:51:33 +00:00
|
|
|
seeking: false,
|
2019-10-09 18:08:36 +00:00
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...mapState({ user: 'user.data' }),
|
|
|
|
|
},
|
2023-05-02 14:51:33 +00:00
|
|
|
mounted () {
|
|
|
|
|
this.seeking = Boolean(this.user.party.seeking);
|
|
|
|
|
},
|
2019-10-09 18:08:36 +00:00
|
|
|
methods: {
|
|
|
|
|
async createParty () {
|
|
|
|
|
const group = {
|
|
|
|
|
type: 'party',
|
2017-07-31 19:54:52 +00:00
|
|
|
};
|
2019-10-09 18:08:36 +00:00
|
|
|
group.name = this.$t('possessiveParty', { name: this.user.profile.name });
|
|
|
|
|
const party = await this.$store.dispatch('guilds:create', { group });
|
|
|
|
|
this.$store.state.party.data = party;
|
|
|
|
|
this.user.party._id = party._id;
|
|
|
|
|
|
|
|
|
|
Analytics.updateUser({
|
|
|
|
|
partyID: party._id,
|
|
|
|
|
partySize: 1,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.$root.$emit('bv::hide::modal', 'create-party-modal');
|
2023-05-02 14:51:33 +00:00
|
|
|
await this.$router.push('/party');
|
|
|
|
|
},
|
|
|
|
|
close () {
|
|
|
|
|
this.$root.$emit('bv::hide::modal', 'create-party-modal');
|
2017-06-27 20:02:55 +00:00
|
|
|
},
|
2019-10-09 18:08:36 +00:00
|
|
|
copyUsername () {
|
2023-10-03 18:30:44 +00:00
|
|
|
this.mixinCopyToClipboard(
|
|
|
|
|
this.user.auth.local.username,
|
|
|
|
|
this.$t('usernameCopied'),
|
|
|
|
|
);
|
2018-12-11 20:47:50 +00:00
|
|
|
},
|
2023-05-02 14:51:33 +00:00
|
|
|
seekParty () {
|
|
|
|
|
this.$store.dispatch('user:set', {
|
|
|
|
|
'party.seeking': !this.user.party.seeking ? new Date() : null,
|
|
|
|
|
});
|
|
|
|
|
this.seeking = !this.seeking;
|
|
|
|
|
},
|
2019-10-09 18:08:36 +00:00
|
|
|
},
|
|
|
|
|
};
|
2017-06-27 20:02:55 +00:00
|
|
|
</script>
|