Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
d7f1b6e
Fix how the pdf-viewer-interface retreive the identificator of the as…
carlosgonzalezpdn Jan 22, 2025
8f1bb6f
Merge branch 'main' into Bugfix/fix-pdf-preview-extension
carlosgonzalezpdn Jan 28, 2025
3501e6d
Merge branch 'main' into Bugfix/fix-pdf-preview-extension
carlosgonzalezpdn Jan 31, 2025
7e8b96e
Fix the position of the button to the top of the view
carlosgonzalezpdn Jan 31, 2025
1bfe42e
Merge branch 'directus-labs:main' into Bugfix/fix-pdf-preview-extension
carlosgonzalezpdn Feb 7, 2025
326205d
Merge branch 'main' of github.com:carlosgonzalezpdn/directus-extensio…
carlosgonzalezpdn Feb 10, 2025
8525ed6
Merge branch 'main' of github.com:carlosgonzalezpdn/directus-extensio…
carlosgonzalezpdn Feb 21, 2025
4b2f81f
Adapt the fixed code to the changes provided in main repository
carlosgonzalezpdn Feb 21, 2025
4fd57ee
Merge branch 'main' into Bugfix/fix-pdf-preview-extension
ukmadlz Feb 21, 2025
237cbc1
Merge branch 'main' of github.com:carlosgonzalezpdn/directus-extensio…
carlosgonzalezpdn Feb 26, 2025
44dd944
Merge branch 'Bugfix/fix-pdf-preview-extension' of github.com:carlosg…
carlosgonzalezpdn Feb 26, 2025
1acac23
Merge branch 'main' into Bugfix/fix-pdf-preview-extension
ukmadlz Mar 12, 2025
9c0dbf0
Merge branch 'directus-labs:main' into Bugfix/fix-pdf-preview-extension
carlosgonzalezpdn Apr 1, 2025
098a915
Merge branch 'main' into Bugfix/fix-pdf-preview-extension
carlosgonzalezpdn Apr 25, 2025
270398e
Merge branch 'main' into Bugfix/fix-pdf-preview-extension
ukmadlz Apr 25, 2025
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
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
- timio23
- Dominic-Marcelino
- ukmadlz
- carlosgonzalezpdn

Check failure on line 9 in contributors.yml

View workflow job for this annotation

GitHub Actions / Lint

Newline required at end of file but not found
18 changes: 9 additions & 9 deletions packages/pdf-viewer-interface/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
},
},
},
{
field: 'button_label',
name: 'Button Label',
meta: {
width: 'half',
interface: 'system-input-translated-string',
options: { placeholder: defaultButtonLabel },
},
},
{

Check failure on line 32 in packages/pdf-viewer-interface/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 3 tabs but found 12 spaces
field: "button_label",

Check failure on line 33 in packages/pdf-viewer-interface/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Strings must use singlequote

Check failure on line 33 in packages/pdf-viewer-interface/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 4 tabs but found 16 spaces
name: "Button Label",

Check failure on line 34 in packages/pdf-viewer-interface/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Strings must use singlequote

Check failure on line 34 in packages/pdf-viewer-interface/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 4 tabs but found 16 spaces
meta: {

Check failure on line 35 in packages/pdf-viewer-interface/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 4 tabs but found 16 spaces
width: "full",

Check failure on line 36 in packages/pdf-viewer-interface/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Strings must use singlequote

Check failure on line 36 in packages/pdf-viewer-interface/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 5 tabs but found 20 spaces
interface: "system-input-translated-string",

Check failure on line 37 in packages/pdf-viewer-interface/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 5 tabs but found 20 spaces
options: { placeholder: defaultButtonLabel },
},
},
];
},
});
5 changes: 3 additions & 2 deletions packages/pdf-viewer-interface/src/interface.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const { fileURL, fileIsValid } = useSelectedFile();
function useSelectedFile() {
const fieldValues = inject('values', ref<Record<string, any>>({}));

const fileID = computed(() => {
const fileID = computed(() => {
if (!props.file_field)
return null;
return fieldValues.value[props.file_field] ?? null;
Expand All @@ -31,7 +31,8 @@ function useSelectedFile() {
const fileURL = computed(() => {
if (!fileID.value)
return null;
return getAssetUrl(fileID.value);

return getAssetUrl(fileID.value.id ?? fileID.value);
});

const fileIsValid = computed(() => !!fileID.value);
Expand Down
Loading