Skip to content
This repository was archived by the owner on Mar 26, 2023. It is now read-only.

Commit 88e64a3

Browse files
authored
fixed vue warning, icons, load ring (#62)
1 parent f8eb8d6 commit 88e64a3

7 files changed

Lines changed: 48 additions & 32 deletions

File tree

src/components/GroupRow.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
22
<li class="event-item noselect" v-for="item in 2" :key="item.id">
3-
<div class="event-item-icon" v-if="item == 1">
4-
<span class="material-symbols-sharp">schedule</span>
5-
</div>
6-
<div class="event-item-icon" v-else>
3+
<div class="event-item-icon noselect" v-if="item == 1">
74
<span class="material-symbols-sharp">group</span>
85
</div>
6+
<div class="event-item-icon noselect" v-else>
7+
<span class="material-symbols-sharp">schedule</span>
8+
</div>
99
<div class="event-item-information">
1010
<div v-if="item == 1">
1111
<div>Группа</div>

src/components/LecturerRow.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</div>
77
</div>
88
<div class="event-item-icon" v-else>
9-
<div>
9+
<div class="noselect">
1010
<span class="material-symbols-sharp">person</span>
1111
</div>
1212
</div>

src/components/RoomRow.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<li class="event-item noselect">
3-
<div class="event-item-icon">
3+
<div class="event-item-icon noselect">
44
<span class="material-symbols-sharp">location_on</span>
55
</div>
66
<div class="event-item-information">

src/components/row.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.event-item {
22
width: 100%;
33
padding: 0;
4+
padding-right: 16px;
45
margin: 0;
56
list-style-type: none;
67
height: 78px;

src/views/Event.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="event-wrapper">
33
<div v-if="!loaded" class="lds-dual-ring"></div>
4-
<div v-else>
4+
<div v-else class="wrapper">
55
<div class="lesson-event">
66
<b>{{ eventInfo.name }}</b>
77
</div>
@@ -84,8 +84,8 @@ export default {
8484
});
8585
},
8686
formatDate(date) {
87-
this.date = new Date(this.eventInfo.start_ts.slice(0, 10));
88-
if (this.date) {
87+
date = new Date(this.eventInfo.start_ts.slice(0, 10));
88+
if (date) {
8989
var options = {
9090
month: "long",
9191
day: "numeric",
@@ -210,14 +210,14 @@ ul {
210210
}
211211
.event-wrapper {
212212
padding: 32px 24px 64px 24px;
213-
height: calc(100% - 56px);
213+
height: calc(100vh - 56px);
214214
display: flex;
215-
flex-direction: column;
215+
align-items: center;
216216
justify-content: center;
217217
}
218218
219-
.lds-dual-ring {
220-
align-self: center;
219+
.wrapper {
220+
align-self: flex-start;
221221
}
222222
223223
.lesson-event {

src/views/Lecturer.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</div>
3838
<div class="frame-wrapper">
3939
<router-link :to="feedbackLink" class="frame-link"
40-
>Сообщить о проблеме</router-link
40+
>Написать жалобу</router-link
4141
>
4242
</div>
4343
</div>
@@ -101,12 +101,14 @@ export default {
101101
.lecturer-wrapper {
102102
padding: 32px 24px 0px;
103103
display: flex;
104+
height: calc(100vh - 56px);
104105
justify-content: center;
105106
align-items: center;
106107
margin: 0 auto;
107108
}
108109
109110
.wrapper {
111+
align-self: flex-start;
110112
width: 100%;
111113
max-width: 640px;
112114
}

src/views/Room.vue

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
<template>
22
<div class="room-wrapper">
3-
<div class="location-wrapper">
4-
<div class="room-location" v-if="roomInfo.building">
5-
<span class="material-symbols-sharp">location_on</span>
6-
<span class="room-info">{{ roomInfo.building }}</span>
3+
<div v-if="!this.loaded" class="lds-dual-ring"></div>
4+
<div v-else class="wrapper">
5+
<div class="location-wrapper">
6+
<div class="room-location" v-if="roomInfo.building">
7+
<span class="material-symbols-sharp noselect">location_on</span>
8+
<span class="room-info">{{ roomInfo.building }}</span>
9+
</div>
10+
<div class="room-location" v-if="roomInfo.direction">
11+
<span class="material-symbols-sharp noselect">explore</span>
12+
<span class="room-info">{{
13+
this.roomDirection(roomInfo.direction)
14+
}}</span>
15+
</div>
716
</div>
8-
<div class="room-location" v-if="roomInfo.direction">
9-
<span class="material-symbols-sharp">explore</span>
10-
<span class="room-info">{{
11-
this.roomDirection(roomInfo.direction)
12-
}}</span>
17+
<h4 class="room-header"><b>Карта этажа</b></h4>
18+
<div class="map">
19+
<router-link :to="mapLink" class="map-link">
20+
<div class="map-text">Посмотреть на карте</div>
21+
</router-link>
1322
</div>
14-
</div>
15-
<h4 class="room-header"><b>Карта этажа</b></h4>
16-
<div class="map">
17-
<router-link :to="mapLink" class="map-link">
18-
<div class="map-text">Посмотреть на карте</div>
23+
<router-link :to="feedbackLink" class="frame-link">
24+
Сообщить о неисправности
1925
</router-link>
2026
</div>
21-
<router-link :to="feedbackLink" class="frame-link">
22-
Сообщить о неисправности
23-
</router-link>
2427
</div>
2528
</template>
2629

@@ -30,6 +33,7 @@ export default {
3033
return {
3134
roomId: this.$route.params.roomId,
3235
roomInfo: {},
36+
loaded: false,
3337
};
3438
},
3539
methods: {
@@ -41,6 +45,7 @@ export default {
4145
.then((response) => response.json())
4246
.then((json) => {
4347
this.roomInfo = json;
48+
this.loaded = true;
4449
});
4550
},
4651
roomDirection(direction) {
@@ -84,12 +89,20 @@ export default {
8489
.room-wrapper {
8590
padding: 32px 24px 0px;
8691
display: flex;
87-
flex-direction: column;
92+
height: calc(100vh - 56px);
8893
align-items: center;
94+
justify-content: center;
8995
max-width: 640px;
9096
margin: 0 auto;
9197
}
9298
99+
.wrapper {
100+
align-self: flex-start;
101+
display: flex;
102+
flex-direction: column;
103+
width: 100%;
104+
}
105+
93106
.room-header {
94107
align-self: flex-start;
95108
}

0 commit comments

Comments
 (0)