Merge pull request #357 from ente-io/master
This commit is contained in:
commit
726cee3da1
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bada-frame",
|
"name": "bada-frame",
|
||||||
"version": "0.4.4",
|
"version": "0.5.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|
|
@ -22,6 +22,13 @@ Sentry.init({
|
||||||
attachStacktrace: true,
|
attachStacktrace: true,
|
||||||
autoSessionTracking: false,
|
autoSessionTracking: false,
|
||||||
tunnel: getSentryTunnelURL(),
|
tunnel: getSentryTunnelURL(),
|
||||||
|
beforeSend(event) {
|
||||||
|
event.request = event.request || {};
|
||||||
|
const currentURL = new URL(document.location.href);
|
||||||
|
currentURL.hash = '';
|
||||||
|
event.request.url = currentURL;
|
||||||
|
return event;
|
||||||
|
},
|
||||||
// ...
|
// ...
|
||||||
// Note: if you want to override the automatic release value, do not set a
|
// Note: if you want to override the automatic release value, do not set a
|
||||||
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
|
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
|
||||||
|
|
|
@ -17,6 +17,7 @@ import { getVariantColor, ButtonVariant } from './pages/gallery/LinkButton';
|
||||||
|
|
||||||
const A_DAY = 24 * 60 * 60 * 1000;
|
const A_DAY = 24 * 60 * 60 * 1000;
|
||||||
const NO_OF_PAGES = 2;
|
const NO_OF_PAGES = 2;
|
||||||
|
const FOOTER_HEIGHT = 90;
|
||||||
|
|
||||||
enum ITEM_TYPE {
|
enum ITEM_TYPE {
|
||||||
TIME = 'TIME',
|
TIME = 'TIME',
|
||||||
|
@ -84,7 +85,11 @@ const DateContainer = styled.div<{ span: number }>`
|
||||||
height: ${DATE_CONTAINER_HEIGHT}px;
|
height: ${DATE_CONTAINER_HEIGHT}px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const BannerContainer = styled.div<{ span: number }>`
|
const FooterContainer = styled.div<{ span: number }>`
|
||||||
|
font-size: 14px;
|
||||||
|
@media (max-width: 540px) {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
color: #979797;
|
color: #979797;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
grid-column: span ${(props) => props.span};
|
grid-column: span ${(props) => props.span};
|
||||||
|
@ -94,10 +99,6 @@ const BannerContainer = styled.div<{ span: number }>`
|
||||||
& > p {
|
& > p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
margin: 1rem 0;
|
|
||||||
`;
|
|
||||||
|
|
||||||
const AlbumsFooterContainer = styled(BannerContainer)`
|
|
||||||
margin: calc(2rem + 20px) 0 1rem 0;
|
margin: calc(2rem + 20px) 0 1rem 0;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -254,7 +255,7 @@ export function PhotoList({
|
||||||
const getCurrentItemSize = getItemSize(timeStampList);
|
const getCurrentItemSize = getItemSize(timeStampList);
|
||||||
for (let i = 0; i < timeStampList.length; i++) {
|
for (let i = 0; i < timeStampList.length; i++) {
|
||||||
sum += getCurrentItemSize(i);
|
sum += getCurrentItemSize(i);
|
||||||
if (height - sum <= 70) {
|
if (height - sum <= FOOTER_HEIGHT) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,16 +264,17 @@ export function PhotoList({
|
||||||
return {
|
return {
|
||||||
itemType: ITEM_TYPE.OTHER,
|
itemType: ITEM_TYPE.OTHER,
|
||||||
item: <></>,
|
item: <></>,
|
||||||
height: Math.max(height - photoFrameHeight - 70, 0),
|
height: Math.max(height - photoFrameHeight - FOOTER_HEIGHT, 0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
const getAppDownloadFooter = () => {
|
const getAppDownloadFooter = () => {
|
||||||
return {
|
return {
|
||||||
itemType: ITEM_TYPE.OTHER,
|
itemType: ITEM_TYPE.OTHER,
|
||||||
|
height: FOOTER_HEIGHT,
|
||||||
item: (
|
item: (
|
||||||
<BannerContainer span={columns}>
|
<FooterContainer span={columns}>
|
||||||
<p>{constants.INSTALL_MOBILE_APP()}</p>
|
<p>{constants.INSTALL_MOBILE_APP()}</p>
|
||||||
</BannerContainer>
|
</FooterContainer>
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -280,8 +282,9 @@ export function PhotoList({
|
||||||
const getAlbumsFooter = () => {
|
const getAlbumsFooter = () => {
|
||||||
return {
|
return {
|
||||||
itemType: ITEM_TYPE.OTHER,
|
itemType: ITEM_TYPE.OTHER,
|
||||||
|
height: FOOTER_HEIGHT,
|
||||||
item: (
|
item: (
|
||||||
<AlbumsFooterContainer span={columns}>
|
<FooterContainer span={columns}>
|
||||||
<p>
|
<p>
|
||||||
{constants.PRESERVED_BY}{' '}
|
{constants.PRESERVED_BY}{' '}
|
||||||
<a
|
<a
|
||||||
|
@ -294,7 +297,7 @@ export function PhotoList({
|
||||||
{constants.ENTE_IO}
|
{constants.ENTE_IO}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</AlbumsFooterContainer>
|
</FooterContainer>
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export const getSentryDSN = () =>
|
export const getSentryDSN = () =>
|
||||||
process.env.NEXT_PUBLIC_SENTRY_DSN ??
|
process.env.NEXT_PUBLIC_SENTRY_DSN ??
|
||||||
'https://860186db60c54c7fbacfe255124958e8@errors.ente.io/4';
|
'https://60abb33b597c42f6a3fb27cd82c55101@sentry.ente.io/2';
|
||||||
|
|
||||||
export const getSentryENV = () =>
|
export const getSentryENV = () =>
|
||||||
process.env.NEXT_PUBLIC_SENTRY_ENV ?? 'development';
|
process.env.NEXT_PUBLIC_SENTRY_ENV ?? 'development';
|
||||||
|
|
|
@ -659,6 +659,15 @@ export default function App({ Component, err }) {
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{constants.TITLE}</title>
|
<title>{constants.TITLE}</title>
|
||||||
|
{typeof window !== 'undefined' &&
|
||||||
|
window.location.host === getAlbumSiteHost() ? (
|
||||||
|
<meta name="description" content="album shared over ente" />
|
||||||
|
) : (
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="ente is a privacy focussed photo storage service that offers end-to-end encryption."
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Head>
|
</Head>
|
||||||
<GlobalStyles />
|
<GlobalStyles />
|
||||||
{showNavbar && (
|
{showNavbar && (
|
||||||
|
|
|
@ -33,10 +33,6 @@ export default class MyDocument extends Document {
|
||||||
return (
|
return (
|
||||||
<Html lang="en">
|
<Html lang="en">
|
||||||
<Head>
|
<Head>
|
||||||
<meta
|
|
||||||
name="description"
|
|
||||||
content="ente is a privacy focussed photo storage service that offers end-to-end encryption."
|
|
||||||
/>
|
|
||||||
<link
|
<link
|
||||||
rel="icon"
|
rel="icon"
|
||||||
href="/images/favicon.png"
|
href="/images/favicon.png"
|
||||||
|
|
|
@ -37,6 +37,7 @@ class PublicCollectionDownloadManager {
|
||||||
const cacheResp: Response = await thumbnailCache?.match(
|
const cacheResp: Response = await thumbnailCache?.match(
|
||||||
file.id.toString()
|
file.id.toString()
|
||||||
);
|
);
|
||||||
|
console.log(cacheResp);
|
||||||
if (cacheResp) {
|
if (cacheResp) {
|
||||||
return URL.createObjectURL(await cacheResp.blob());
|
return URL.createObjectURL(await cacheResp.blob());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue