Use local icons instead of CDN, clean unused deps & fix issue with
vue-property-decorator Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -73,6 +73,10 @@ export default class App extends Vue {
|
||||
/* Buefy imports */
|
||||
@import "~buefy/src/scss/buefy";
|
||||
|
||||
/* Icons */
|
||||
$mdi-font-path: "~@mdi/font/fonts";
|
||||
@import "~@mdi/font/scss/materialdesignicons";
|
||||
|
||||
.fade-enter-active, .fade-leave-active {
|
||||
transition: opacity .5s;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
<div class="date-component" v-if="!mergedOptions.hideDate">
|
||||
<date-calendar-icon :date="participation.event.beginsOn" />
|
||||
</div>
|
||||
<h2 class="title" ref="title">{{ participation.event.title }}</h2>
|
||||
<h2 class="title">{{ participation.event.title }}</h2>
|
||||
</div>
|
||||
<div>
|
||||
<span v-if="participation.event.physicalAddress && participation.event.physicalAddress.locality">{{ participation.event.physicalAddress.locality }} - </span>
|
||||
@@ -129,7 +129,6 @@ import EventMixin from '@/mixins/event';
|
||||
import { RouteName } from '@/router';
|
||||
import { ICurrentUser } from '@/types/current-user.model';
|
||||
import { IEventCardOptions } from './EventCard.vue';
|
||||
const lineClamp = require('line-clamp');
|
||||
|
||||
const defaultOptions: IEventCardOptions = {
|
||||
hideDate: true,
|
||||
@@ -142,9 +141,6 @@ const defaultOptions: IEventCardOptions = {
|
||||
components: {
|
||||
DateCalendarIcon,
|
||||
},
|
||||
mounted() {
|
||||
lineClamp(this.$refs.title, 3);
|
||||
},
|
||||
apollo: {
|
||||
currentActor: {
|
||||
query: CURRENT_ACTOR_CLIENT,
|
||||
@@ -219,6 +215,10 @@ export default class EventListCard extends mixins(ActorMixin, EventMixin) {
|
||||
}
|
||||
|
||||
.title {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
font-weight: 400;
|
||||
line-height: 1em;
|
||||
font-size: 1.6em;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import Vue from 'vue';
|
||||
import Buefy from 'buefy';
|
||||
import VueI18n from 'vue-i18n';
|
||||
import Component from 'vue-class-component';
|
||||
import App from '@/App.vue';
|
||||
import router from '@/router';
|
||||
import { apolloProvider } from './vue-apollo';
|
||||
@@ -25,6 +26,13 @@ const i18n = new VueI18n({
|
||||
messages, // set locale messages
|
||||
});
|
||||
|
||||
// Register the router hooks with their names
|
||||
Component.registerHooks([
|
||||
'beforeRouteEnter',
|
||||
'beforeRouteLeave',
|
||||
'beforeRouteUpdate', // for vue-router 2.2+
|
||||
]);
|
||||
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
router,
|
||||
|
||||
@@ -254,7 +254,6 @@ import { ITag } from '@/types/tag.model';
|
||||
import AddressAutoComplete from '@/components/Event/AddressAutoComplete.vue';
|
||||
import { buildFileFromIPicture, buildFileVariable } from '@/utils/image';
|
||||
import IdentityPickerWrapper from '@/views/Account/IdentityPickerWrapper.vue';
|
||||
import { ICurrentUser } from '@/types/current-user.model';
|
||||
|
||||
@Component({
|
||||
components: { IdentityPickerWrapper, AddressAutoComplete, TagInput, DateTimePicker, PictureUpload, Editor },
|
||||
@@ -266,9 +265,6 @@ import { ICurrentUser } from '@/types/current-user.model';
|
||||
query: TAGS,
|
||||
},
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
this.confirmGoElsewhere(() => next());
|
||||
},
|
||||
})
|
||||
export default class EditEvent extends Vue {
|
||||
@Prop({ type: Boolean, default: false }) isUpdate!: boolean;
|
||||
@@ -533,6 +529,10 @@ export default class EditEvent extends Vue {
|
||||
this.confirmGoElsewhere(() => this.$router.go(-1));
|
||||
}
|
||||
|
||||
beforeRouteLeave(to, from, next) {
|
||||
this.confirmGoElsewhere(() => next());
|
||||
}
|
||||
|
||||
get isEventModified(): boolean {
|
||||
return JSON.stringify(this.event.toEditJSON()) !== JSON.stringify(this.unmodifiedEvent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user