Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS-670 rendition factory #450

Merged
merged 28 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ UPLOADER_STORAGE_USE_PATH_STYLE_ENDPOINT=true
UPLOADER_REQUEST_SIGNATURE_TTL=600
UPLOADER_DELETE_ASSET_GRACEFUL_TIME=30
UPLOADER_RABBITMQ_VHOST=uploader
UPLOADER_ALLOWED_FILE_TYPES='image/*(.jpg,.jpeg,.bmp,.tif,.gif,.png,.heic),application/*(.pdf,.doc,.docx,.xls,.xlsx,.odt),video/*(.mpg,.mpeg,.mov,.avi,.mp3,.mp2,.mp4,.m4v,.m4a,.mkv,.hevc)audio/*(.aac,.aiff,.wav)'
UPLOADER_ALLOWED_FILE_TYPES='image/*(.jpg,.jpeg,.bmp,.tif,.gif,.png,.heic,.webp,.svg),application/*(.pdf,.doc,.docx,.xls,.xlsx,.odt),video/*(.mpg,.mpeg,.mov,.avi,.mp3,.mp2,.mp4,.m4v,.m4a,.mkv,.hevc)audio/*(.aac,.aiff,.wav)'

# For admin OAuth clients
EXPOSE_ADMIN_CLIENT_ID=expose-admin
Expand Down
1 change: 1 addition & 0 deletions bin/dev/cs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

. bin/vars.sh

bin/dev/lib-all.sh composer cs
bin/dev/js-all.sh pnpm format
bin/dev/js-all.sh pnpm lint:fix
bin/dev/sf-all.sh composer cs
2 changes: 2 additions & 0 deletions bin/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ lib/php/test-bundle
lib/php/webhook-bundle
lib/php/workflow
lib/php/workflow-bundle
lib/php/rendition-factory
lib/php/rendition-factory-bundle
"

JS_LIBS="
Expand Down
15 changes: 15 additions & 0 deletions dashboard/client/src/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default function Dashboard({}: Props) {
} = config.env;

const roles = user?.roles ?? [];
const isInIframe = inIframe();

return (
<Container>
Expand Down Expand Up @@ -163,6 +164,12 @@ export default function Dashboard({}: Props) {
]}
/>
)}
{isInIframe ? <Service
mainUrl={`/`}
title={`Dashboard`}
description={`Phrasea entrypoint`}
logo={notifyImg}
/> : ''}
</Grid>
{roles.includes('tech') && (
<Grid container spacing={2} marginTop={1}>
Expand Down Expand Up @@ -270,3 +277,11 @@ export default function Dashboard({}: Props) {
</Container>
);
}

function inIframe(): boolean {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}
2 changes: 2 additions & 0 deletions databox/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN apk add --no-cache \
libjpeg-turbo \
libpng \
libwebp \
ffmpeg \
libreoffice \
&& apk add --no-cache --virtual build-essentials \
g++ \
make \
Expand Down
18 changes: 17 additions & 1 deletion databox/api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@
"symlink": true
}
},
{
"type": "path",
"url": "../../lib/php/rendition-factory",
"options": {
"symlink": true
}
},
{
"type": "path",
"url": "../../lib/php/rendition-factory-bundle",
"options": {
"symlink": true
}
},
{
"type": "path",
"url": "../../lib/php/storage-bundle",
Expand Down Expand Up @@ -121,6 +135,8 @@
"alchemy/es-bundle": "@dev",
"alchemy/messenger-bundle": "@dev",
"alchemy/metadata-manipulator-bundle": "@dev",
"alchemy/rendition-factory": "@dev",
"alchemy/rendition-factory-bundle": "@dev",
"alchemy/storage-bundle": "*",
"alchemy/test-bundle": "*",
"alchemy/webhook-bundle": "@dev",
Expand All @@ -141,8 +157,8 @@
"hautelook/alice-bundle": "^2.10",
"intervention/image": "^2.7",
"kornrunner/blurhash": "^1.2",
"lcobucci/jwt": "^5",
"lcobucci/clock": "^3.2",
"lcobucci/jwt": "^5",
"nelmio/cors-bundle": "^2.1",
"phpdocumentor/reflection-docblock": "^5.2",
"predis/predis": "^1.1",
Expand Down
Loading
Loading