doc-based view keys are _id + _rev

This commit is contained in:
Timothy Farrell 2017-11-18 00:22:06 -06:00
parent 0fba33499d
commit d14bfdeee2

View File

@ -1,8 +1,8 @@
import { defineView } from 'domvm';
import * as image from '../data/image.js';
import * as index from '../data/indexType.js';
import { FileType } from '../data/file.js';
import * as imageTag from '../context/manageImageTags.js';
import { defineView as vw } from 'domvm';
import { ThumbnailView } from './thumbnail.js';
import { AlbumView } from './album.js';
import { router, routeChanged } from '../services/router.js';
@ -55,7 +55,7 @@ export function GalleryView(vm, model) {
el('h1', title),
...(title === 'Images'
? data().map(i => {
return defineView(
return vw(
ThumbnailView,
{
doc: i,
@ -64,11 +64,11 @@ export function GalleryView(vm, model) {
remove: image.remove,
removeTag: imageTag.remove
},
i._id
i._id + i._rev
);
})
: data().map(a => {
return defineView(
return vw(
AlbumView,
{
doc: a,
@ -76,7 +76,7 @@ export function GalleryView(vm, model) {
addTag: imageTag.add,
remove: imageTag.remove
},
a._id
a._id + a._rev
);
}))
])