remotes/origin/editis_13-01-19
gzbender 7 years ago
parent 511123f518
commit 5b603b69bf
  1. 11
      apps/user/templates/user/edit_gallery.html
  2. 51
      web/src/js/app.js

@ -1,8 +1,15 @@
{% extends "templates/lilcity/index.html" %}
{% block pre_app_js %}
window.LIL_STORE.components['block-images'] = '../components/BlockImages';
<script>
window.LIL_STORE.components['block-images'] = '../components/BlockImages.vue';
window.LIL_STORE._user_gallery_images = [{% for img in user.gallery.gallery_images.all %}{
image_thumbnail_url: '{{ img.image_thumbnail_url }}',
image_id: {{ img.id }},
},{% endfor %}];
</script>
{% endblock pre_app_js %}
{% block content %}
<block-images :images="$root.store._user_gallery_images" :access-token="$root.store.accessToken"/>
{% endblock %}

@ -46,28 +46,33 @@ const components = {
Object.assign(components, window.LIL_STORE.components);
for(let k in components){
if(typeof components[k] === 'string'){
components[k] = await import(components[k]);
}
}
const promises = [];
const app = new Vue({
el: '#lilcity-vue-app',
data() {
return {
store: window.LIL_STORE,
}
},
mounted(){
if(this.urlIs('userProfileEdit') || this.urlIs('userBonuses')){
profileMain(this);
}
},
methods: {
urlIs(urlPatternName){
return window.location.pathname.search(this.store.urls[urlPatternName]) > -1;
(async () => {
for(let k in components){
if(typeof components[k] === 'string'){
components[k] = await import(components[k]);
}
}
const app = new Vue({
el: '#lilcity-vue-app',
data() {
return {
store: window.LIL_STORE,
}
},
mounted(){
if(this.urlIs('userProfileEdit') || this.urlIs('userBonuses')){
profileMain(this);
}
},
},
components: components
});
methods: {
urlIs(urlPatternName){
return window.location.pathname.search(this.store.urls[urlPatternName]) > -1;
},
},
components: components
});
})();

Loading…
Cancel
Save