This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default{ | |
name:"data-loader", | |
extends:ApolloQuery, | |
render(h){ | |
if(isLoading){ | |
return h('v-spinner') | |
}else if(hasError){ | |
return h('v-alert',{},error) | |
}else{ | |
// same logic as in ApolloQuery |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import allTravelsGql from '../../GQL/travel/allTravels.gql' | |
import {pagination, getSkipFirst} from '../../../generated-cms/util/pagination' | |
import {getTravelQuery, setCategoryOnQuery} from '../../util/getTravelQuery' | |
const buildQuery = variables => { | |
return { | |
query: allTravelsGql, | |
variables, | |
manual: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<h3 class="subheading" v-if="!hideLabel">{{label}}</h3> | |
<v-list v-if="mediaList"> | |
<v-list-tile v-for="(item,i) in mediaList" :key="i"> | |
<v-list-tile-avatar @click="onItemClick(item.url)"> | |
<img :src="item.url" :alt="item.name" :title="item.name"/> | |
</v-list-tile-avatar> | |
<v-list-tile-content @click="onItemClick(item.url)"> | |
<v-list-tile-title>{{item.contentType}}</v-list-tile-title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import throttle from 'lodash.throttle' | |
export default { | |
name: 'in-viewport', | |
props: { | |
value: Boolean, | |
offset: { | |
type: Number, | |
default: 124 // might depends on the toolbar fixed... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<v-form ref="form" v-model="valid"> | |
<slot></slot> | |
</v-form> | |
</template> | |
<script> | |
export default { | |
props: { | |
customElements: { | |
type: Array, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<v-select | |
v-model="state" | |
label="Select" | |
:items="states" | |
@input.native="loadStates" | |
autocomplete | |
></v-select> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
methods: { | |
/** | |
* | |
* @returns {Promise.<void>} | |
*/ | |
async onFormSubmit (model) { | |
if (model.id) { | |
await this.mutateApollo(this.gql.updateMutation, model, 'UPDATED') | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<file-input v-model="filename" @formData="formData"> | |
<v-btn @click.native="uploadFiles"> | |
</template> | |
<script> | |
import fileInput from './file-input.vue' | |
export default{ | |
components:{fileInput} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="eventCalendar" ui-calendar="eventCtrl.calendarConfig" ng-model="eventCtrl.eventSources" calendar="eventCalendar"></div> |