Skip to content

Commit

Permalink
[MS] File viewers minor improvements
Browse files Browse the repository at this point in the history
- fix the viewer wrapper height on firefox
- reset the zoom level when the text viewer is mounted
  • Loading branch information
NicoTuxx committed Jan 31, 2025
1 parent eafbb3b commit 533a85d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion client/src/views/viewers/FileViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ async function onClick(event: MouseEvent): Promise<void> {
.container {
height: 100%;
height: -webkit-fill-available;
height: -moz-available;
height: stretch;
margin: 0 1em 1em 1em;
padding: 1.5em;
Expand Down
1 change: 0 additions & 1 deletion client/src/views/viewers/FileViewerWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ defineProps<{
.file-viewer-wrapper {
height: 100%;
height: -webkit-fill-available;
height: -moz-available;
height: stretch;
display: flex;
justify-content: center;
Expand Down
1 change: 1 addition & 0 deletions client/src/views/viewers/TextViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const zoomControl = ref();
const zoomLevel = ref(1);

onMounted(async () => {
zoomLevel.value = 1;
const text = new TextDecoder().decode(props.contentInfo.data);
editor.value = monaco.editor.create(container.value, {
value: text,
Expand Down
1 change: 1 addition & 0 deletions newsfragments/8854.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add file viewers for some common file types (audio, image, pdf & docx)

0 comments on commit 533a85d

Please sign in to comment.