Commit 3fbf8e4b authored by gick's avatar gick
Browse files

Fix issue in history, use light version of images

parent 044cad8f
......@@ -66,6 +66,9 @@ export default {
}
},
userID() {
if(!this.userID)
return
Pusher.logToConsole = true;
var pusher = new Pusher("f204a3eb6cfeb87e594b", {
......
......@@ -23,7 +23,7 @@
v-show="releve.modifierName"
>{{ $t('lastModif') }} : {{releve.modifierName}}</ons-list-item>
</ons-list>
<img v-show="releve.image" :src="releve.image" style="width: 100%">
<img v-if="releve.hasImage" :src="'/api/image/'+ releve._id + '?' + new Date().getTime()" style="width: 100%">
<section style="margin: 16px">
<p class="center">
......@@ -70,6 +70,7 @@
v-show="oldreleve.authorName"
>{{ $t('recordAuthor') }} : {{oldreleve.authorName}}</ons-list-item>
<ons-list-item v-show="oldreleve.specie">{{ $t('specie') }} : {{oldreleve.specie}}</ons-list-item>
<ons-list-item v-show="oldreleve.genus">{{ $t('genus') }} : {{oldreleve.genus}}</ons-list-item>
<ons-list-item v-show="oldreleve.common">{{ $t('common') }} : {{oldreleve.common}}</ons-list-item>
<ons-list-item
......@@ -78,8 +79,8 @@
<ons-list-item
v-show="oldreleve.modifierName"
>{{ $t('modificationBy') }} : {{oldreleve.modifierName}}</ons-list-item>
<v-ons-list-item v-if="oldreleve.image">
<img :src="oldreleve.image" style="width: 100%">
<v-ons-list-item v-if="oldreleve.hasImage">
<img :src="'/api/image/' + oldreleve._id + '/hist/' +index" style="width: 100%">
</v-ons-list-item>
</ons-list>
</div>
......
......@@ -2,6 +2,7 @@ import {
cpus
} from "os";
import { EventBus } from '../js/eventBus.js';
import Vue from 'vue'
var osmAuth = require("osm-auth");
var removeTree = require('../js/osmRemoveTree')
var addTree = require('../js/osmPost')
......@@ -176,7 +177,7 @@ export default {
if (index != -1) {
// state.releves[index].test='truc'
state.releves.splice(index, 1, newReleve)
state.releves[index].prev = newReleve.prev
state.releves[index].prev.push(newReleve.prev[newReleve.prev.length -1])
}
},
modifyFromOutside(state, newReleve) {
......@@ -184,7 +185,7 @@ export default {
if (index != -1) {
// state.releves[index].test='truc'
state.releves.splice(index, 1, newReleve)
state.releves[index].prev = newReleve.prev
state.releves[index].prev.push(newReleve.prev[newReleve.prev.length -1])
}
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment