mirror of
https://github.com/robonen/metr.git
synced 2026-03-20 10:54:41 +00:00
Compare commits
9 Commits
Backend_1.
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| f8758a9b56 | |||
| 4e39df490a | |||
| 9e1b0b5da1 | |||
|
|
2496867d21 | ||
|
|
c887a05c0b | ||
|
|
99ef740a03 | ||
|
|
a067507f59 | ||
|
|
d916977fc8 | ||
|
|
4bfe25d887 |
@@ -1,18 +1,13 @@
|
|||||||
# Metr
|
# Metr
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://forma-web.ru">
|
<img alt="Logo" src="metr/logo.svg" width="300" title="Logo">
|
||||||
<img alt="Logo" src="metr/logo.svg" width="300" title="Logo">
|
|
||||||
</a>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/robonen/metr-frontend/actions">
|
<a href="https://github.com/robonen/metr-frontend/actions">
|
||||||
<img src="https://github.com/robonen/metr-frontend/actions/workflows/release.yml/badge.svg" title="Release status">
|
<img src="https://github.com/robonen/metr-frontend/actions/workflows/release.yml/badge.svg" title="Release status">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/robonen/metr-frontend/actions">
|
|
||||||
<img src="https://github.com/robonen/metr-frontend/actions/workflows/test.yml/badge.svg" title="Lint status">
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/robonen/metr-frontend/releases">
|
<a href="https://github.com/robonen/metr-frontend/releases">
|
||||||
<img src="https://img.shields.io/github/v/release/robonen/metr-frontend?display_name=tag&label=Last%20Version&color=brightgreen" title="Last version">
|
<img src="https://img.shields.io/github/v/release/robonen/metr-frontend?display_name=tag&label=Last%20Version&color=brightgreen" title="Last version">
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ h1, h2, h3, h4, h5, h6 {
|
|||||||
/* Intro */
|
/* Intro */
|
||||||
.intro {
|
.intro {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content:center;
|
justify-content:center;
|
||||||
|
|||||||
@@ -242,7 +242,15 @@ h1, h2, h3, h4, h5, h6 {
|
|||||||
margin: 1% 0;
|
margin: 1% 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rewiew__comment{
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.review__stars {
|
.review__stars {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user__stat{
|
||||||
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
@@ -22,8 +22,8 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters({ user: 'user' }),
|
...mapGetters({ user: 'user' }),
|
||||||
name() {
|
name() {
|
||||||
return this.user.last_name && this.user.first_name && this.user.middle_name
|
return this.user.last_name && this.user.first_name
|
||||||
? `${this.user.last_name} ${this.user.first_name} ${this.user.middle_name}`
|
? `${this.user.last_name} ${this.user.first_name} ${this.user.middle_name ?? ''}`
|
||||||
: 'Не указано';
|
: 'Не указано';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<div class="about__describtions">
|
<div class="about__describtions">
|
||||||
<div class="descriptions__name">
|
<div class="descriptions__name">
|
||||||
<h4>Название для объявления:</h4>
|
<h4>Название для объявления:</h4>
|
||||||
<input type="text" size="40" v-model.trim="offer.name">
|
<input type="text" size="40" placeholder="Пример: Просторная квартира на Елисеевке" v-model.trim="offer.name">
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptions__name">
|
<div class="descriptions__name">
|
||||||
<h4>Тип:</h4>
|
<h4>Тип:</h4>
|
||||||
@@ -32,11 +32,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="descriptions__address">
|
<div class="descriptions__address">
|
||||||
<h4>Адрес:</h4>
|
<h4>Адрес:</h4>
|
||||||
<input type="text" size="40" v-model.trim="offer.location">
|
<input type="text" size="40" placeholder="Пример: Комарино 12, д. 3" v-model.trim="offer.location">
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptions__price">
|
<div class="descriptions__price">
|
||||||
<h4>Цена:</h4>
|
<h4>Цена:</h4>
|
||||||
<input type="text" size="40" v-model.number="offer.price">
|
<input type="text" size="40" placeholder="Пример: '1200000'" v-model.number="offer.price">
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptions__flats">
|
<div class="descriptions__flats">
|
||||||
<h4>Кол-во комнат:</h4>
|
<h4>Кол-во комнат:</h4>
|
||||||
@@ -49,11 +49,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="descriptions__square">
|
<div class="descriptions__square">
|
||||||
<h4>Площадь:</h4>
|
<h4>Площадь:</h4>
|
||||||
<input type="text" size="40" v-model.number="offer.space">
|
<input type="text" size="40" placeholder="Пример: '45'" v-model.number="offer.space">
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptions__text">
|
<div class="descriptions__text">
|
||||||
<h4>Описание:</h4>
|
<h4>Описание:</h4>
|
||||||
<input type="text" size="40" v-model.trim="offer.description">
|
<!-- <input type="text" size="40" v-model.trim="offer.description">-->
|
||||||
|
<textarea placeholder="Описание" class="descriptions__textarea" v-model.trim="offer.description"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button @click="action">Отправить</button>
|
<button @click="action">Отправить</button>
|
||||||
@@ -263,12 +264,28 @@ export default {
|
|||||||
margin-top: 1%;
|
margin-top: 1%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.descriptions__textarea{
|
||||||
|
background-color: rgb(201, 233, 252);
|
||||||
|
border-radius: 5px;
|
||||||
|
border-color: white;
|
||||||
|
box-shadow: none;
|
||||||
|
border: 1px solid rgb(83, 110, 136);
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
height: 100px;
|
||||||
|
|
||||||
|
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
|
||||||
.about__describtions input {
|
.about__describtions input {
|
||||||
background-color: rgb(201, 233, 252);
|
background-color: rgb(201, 233, 252);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border-color: white;
|
border-color: white;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border: 1px solid rgb(83, 110, 136);
|
border: 1px solid rgb(83, 110, 136);
|
||||||
|
|
||||||
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.about__describtions h4 {
|
.about__describtions h4 {
|
||||||
@@ -278,5 +295,6 @@ export default {
|
|||||||
.descriptions__text input {
|
.descriptions__text input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -30,10 +30,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="header__search">
|
<div class="header__search">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="search__block">
|
<input text="" class="search__block" placeholder="Поиск" v-model.trim="query" @keydown.enter="search">
|
||||||
|
<div class="search__img" @click.prevent="search">
|
||||||
</div>
|
|
||||||
<div class="search__img">
|
|
||||||
<a class="nav__link" href="#">
|
<a class="nav__link" href="#">
|
||||||
<img src="@/assets/images/search.jpg" alt="">
|
<img src="@/assets/images/search.jpg" alt="">
|
||||||
</a>
|
</a>
|
||||||
@@ -59,10 +57,24 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "TheHeader"
|
name: "TheHeader",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
query: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
search() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/catalog',
|
||||||
|
query: { q: this.query },
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* Container */
|
/* Container */
|
||||||
.container {
|
.container {
|
||||||
@@ -137,7 +149,8 @@ export default {
|
|||||||
width: 300px;
|
width: 300px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-top: 20px;
|
|
||||||
|
font-size: 1em;
|
||||||
|
|
||||||
background: white;
|
background: white;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
|
|||||||
@@ -133,11 +133,28 @@ export default {
|
|||||||
const offers = await offerService.filter(this.sortParams);
|
const offers = await offerService.filter(this.sortParams);
|
||||||
this.offers = offers.data.data;
|
this.offers = offers.data.data;
|
||||||
},
|
},
|
||||||
|
async addSearchParam(value) {
|
||||||
|
if (!value || !value.q) {
|
||||||
|
this.sortParams = this.sortParams.filter((e) => e.name !== 'search');
|
||||||
|
this.reloadOffers();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.addSortParam('search', value.q);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
const offers = await offerService.all();
|
if (this.$store.getters.userAuthenticated) {
|
||||||
this.offers = offers.data.data;
|
this.$router.push('/profile');
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
await this.addSearchParam(this.$route.query);
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$route.query'(value) {
|
||||||
|
this.addSearchParam(value);
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -75,9 +75,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="reviews__blocks">
|
<div class="reviews__blocks">
|
||||||
<div v-if="offer?.user?.feedback" class="review" v-for="(review, i) in offer.user.feedback" :key="i">
|
<div v-if="offer?.user?.feedback" class="review" v-for="(review, i) in offer.user.feedback" :key="i">
|
||||||
<div class="review__avatar">
|
<!-- <div class="review__avatar">-->
|
||||||
<img src="@/assets/images/forcomment.png" alt="">
|
<!-- <img src="@/assets/images/forcomment.png" alt="">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="rewiew__comment">
|
<div class="rewiew__comment">
|
||||||
<h5>{{ review.comment }}</h5>
|
<h5>{{ review.comment }}</h5>
|
||||||
</div>
|
</div>
|
||||||
@@ -150,6 +150,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
if (this.$store.getters.userAuthenticated) {
|
||||||
|
this.$router.push('/profile');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const id = this.$route.params.id;
|
const id = this.$route.params.id;
|
||||||
|
|
||||||
if (id === undefined)
|
if (id === undefined)
|
||||||
|
|||||||
@@ -81,6 +81,12 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.$store.getters.userAuthenticated) {
|
||||||
|
this.$router.push('/profile');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>>
|
</script>>
|
||||||
|
|
||||||
|
|||||||
30
frontend/src/views/RecoveryNewPassword.vue
Normal file
30
frontend/src/views/RecoveryNewPassword.vue
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="logo">
|
||||||
|
<div class="logoMetr">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<h2>Восстановление пароля</h2>
|
||||||
|
</div>
|
||||||
|
<form action="" method="get" class="form__example">
|
||||||
|
<div class="form__example">
|
||||||
|
<label for="name"></label>
|
||||||
|
<input class="login" type="text" name="name" id="name" placeholder="Новый пароль" required>
|
||||||
|
</div>
|
||||||
|
<div class="form__example">
|
||||||
|
<label for="email"></label>
|
||||||
|
<input class="login" type="email" name="email" id="email" placeholder="Подтвердите пароль" required>
|
||||||
|
</div>
|
||||||
|
<div class="form__example">
|
||||||
|
<input class="form__input" type="submit" value="Сохранить пароль">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
26
frontend/src/views/RecoveryPasswordAccept.vue
Normal file
26
frontend/src/views/RecoveryPasswordAccept.vue
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="logo">
|
||||||
|
<div class="logoMetr">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<h2>Восстановление пароля</h2>
|
||||||
|
</div>
|
||||||
|
<form action="" method="get" class="form__example">
|
||||||
|
<div class="form__example">
|
||||||
|
<label for="name"></label>
|
||||||
|
<input class="login" type="text" name="name" id="name" placeholder="Введите код подтверждения" required>
|
||||||
|
</div>
|
||||||
|
<div class="form__example">
|
||||||
|
<input class="form__input" type="submit" value="Принять">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user