diff --git a/src/api.js b/src/api.js
index d416a6d1..201d55b3 100644
--- a/src/api.js
+++ b/src/api.js
@@ -149,25 +149,27 @@ export async function apiGet(endpoint) {
export function getMediaUrl(handle) {
const jwt = localStorage.getItem('access_token');
if (jwt === null) { return '' }
- return `${__APIHOST__}/media/${handle}/file?jwt=${jwt}`
+ return `${__APIHOST__}/api/media/${handle}/file?jwt=${jwt}`
}
export function getMediaUrlCropped(handle, rect) {
- const jwt = localStorage.getItem('access_token');
- if (jwt === null) { return '' }
- [x1, y1, x2, y2] = rect
- return `${__APIHOST__}/media/${handle}/cropped/${x1}/${y1}/${x2}/${y2}?jwt=${jwt}`
+ const jwt = localStorage.getItem('access_token')
+ if (jwt === null) {
+ return ''
+ }
+ const [x1, y1, x2, y2] = rect
+ return `${__APIHOST__}/api/media/${handle}/cropped/${x1}/${y1}/${x2}/${y2}?jwt=${jwt}`
}
-export function getThumbnailUrl(handle, size) {
- const jet = localStorage.getItem('access_token');
- if (jwt === null) { return '' }
- return `${__APIHOST__}/media/${handle}/thumbnail/${size}?jwt=${jwt}`
-}
-
-export function getThumbnailUrlCropped(handle, rect, size) {
+export function getThumbnailUrl(handle, size, square=false) {
const jwt = localStorage.getItem('access_token');
if (jwt === null) { return '' }
- [x1, y1, x2, y2] = rect
- return `${__APIHOST__}/media/${handle}/cropped/${x1}/${y1}/${x2}/${y2}/thumbnail/${size}?jwt=${jwt}`
+ return `${__APIHOST__}/api/media/${handle}/thumbnail/${size}?jwt=${jwt}&square=${square}`
+}
+
+export function getThumbnailUrlCropped(handle, rect, size, square=false) {
+ const jwt = localStorage.getItem('access_token');
+ if (jwt === null) { return '' }
+ const [x1, y1, x2, y2] = rect
+ return `${__APIHOST__}/api/media/${handle}/cropped/${x1}/${y1}/${x2}/${y2}/thumbnail/${size}?jwt=${jwt}&square=${square}`
}
diff --git a/src/components/GrampsJsImage.js b/src/components/GrampsJsImage.js
index 73ac7c6d..9c382715 100644
--- a/src/components/GrampsJsImage.js
+++ b/src/components/GrampsJsImage.js
@@ -50,10 +50,10 @@ class GrampsjsImg extends LitElement {
_renderImage() {
return html`
`
@@ -62,10 +62,10 @@ class GrampsjsImg extends LitElement {
_renderImageCropped() {
return html`
`
diff --git a/src/components/GrampsjsObject.js b/src/components/GrampsjsObject.js
index 325ce3c8..0663b6d7 100644
--- a/src/components/GrampsjsObject.js
+++ b/src/components/GrampsjsObject.js
@@ -43,12 +43,22 @@ export class GrampsjsObject extends LitElement {
margin-top: 25px;
}
+ #tabs {
+ clear: both;
+ }
+
mwc-tab-bar {
border-top: solid #6D4C4133 1px;
border-bottom: solid #6D4C4133 1px;
margin-top: 15px;
--mdc-tab-horizontal-padding: 16px;
}
+
+ #picture {
+ float: right;
+ margin-bottom: 20px;
+ margin-left: 40px;
+ }
`
];
}
@@ -75,11 +85,17 @@ export class GrampsjsObject extends LitElement {
return html``
}
return html`
+