gallery: make it reverse proxy friendly
This commit is contained in:
parent
6d75ec60bf
commit
d27d8655bb
|
@ -10,7 +10,7 @@ function call(method, params) {
|
||||||
callActive++
|
callActive++
|
||||||
return m.request({
|
return m.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `/api/${method}`,
|
url: `api/${method}`,
|
||||||
body: params,
|
body: params,
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
callActive--
|
callActive--
|
||||||
|
@ -98,7 +98,7 @@ let Thumbnail = {
|
||||||
if (!e.thumbW || !e.thumbH)
|
if (!e.thumbW || !e.thumbH)
|
||||||
return m('.thumbnail.missing', {...vnode.attrs, info: null})
|
return m('.thumbnail.missing', {...vnode.attrs, info: null})
|
||||||
return m('img.thumbnail', {...vnode.attrs, info: null,
|
return m('img.thumbnail', {...vnode.attrs, info: null,
|
||||||
src: `/thumb/${e.sha1}`, width: e.thumbW, height: e.thumbH,
|
src: `thumb/${e.sha1}`, width: e.thumbW, height: e.thumbH,
|
||||||
loading})
|
loading})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -494,7 +494,7 @@ let View = {
|
||||||
view(vnode) {
|
view(vnode) {
|
||||||
const view = m('.view', [
|
const view = m('.view', [
|
||||||
ViewModel.sha1 !== undefined
|
ViewModel.sha1 !== undefined
|
||||||
? m('img', {src: `/image/${ViewModel.sha1}`,
|
? m('img', {src: `image/${ViewModel.sha1}`,
|
||||||
width: ViewModel.width, height: ViewModel.height})
|
width: ViewModel.width, height: ViewModel.height})
|
||||||
: "No image.",
|
: "No image.",
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue