Skip to content
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
6 changes: 4 additions & 2 deletions frontend/app/view/preview/preview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
display: flex;
flex-direction: row;
height: 100%;
flex-grow: 1;
overflow: hidden;
align-items: center;
justify-content: center;
padding: 0 5px;

&.view-preview-markdown {
align-items: start;
Expand Down Expand Up @@ -43,6 +41,10 @@
flex-direction: column;
align-items: start;
}
&.view-preview-pdf,
&.view-preview-directory {
padding: 5px;
}
}

.full-preview {
Expand Down
5 changes: 4 additions & 1 deletion frontend/app/view/preview/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export class PreviewModel implements ViewModel {
viewType: string;
blockId: string;
nodeModel: BlockNodeModel;
noPadding?: Atom<boolean>;
blockAtom: Atom<Block>;
viewIcon: Atom<string | IconButtonDecl>;
viewName: Atom<string>;
Expand Down Expand Up @@ -433,6 +434,8 @@ export class PreviewModel implements ViewModel {
const connAtom = getConnStatusAtom(connName);
return get(connAtom);
});

this.noPadding = atom(true);
}

markdownShowTocToggle() {
Expand Down Expand Up @@ -825,7 +828,7 @@ function StreamingPreview({ model }: SpecializedViewProps) {
if (fileInfo.mimetype == "application/pdf") {
return (
<div className="view-preview view-preview-pdf">
<iframe src={streamingUrl} width="95%" height="95%" name="pdfview" />
<iframe src={streamingUrl} width="100%" height="100%" name="pdfview" />
</div>
);
}
Expand Down
2 changes: 2 additions & 0 deletions frontend/app/view/webview/webview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function getWebviewPreloadUrl() {
export class WebViewModel implements ViewModel {
viewType: string;
blockId: string;
noPadding?: Atom<boolean>;
blockAtom: Atom<Block>;
viewIcon: Atom<string | IconButtonDecl>;
viewName: Atom<string>;
Expand All @@ -58,6 +59,7 @@ export class WebViewModel implements ViewModel {
this.nodeModel = nodeModel;
this.viewType = "web";
this.blockId = blockId;
this.noPadding = atom(true);
this.blockAtom = WOS.getWaveObjectAtom<Block>(`block:${blockId}`);
this.url = atom();
const defaultUrlAtom = getSettingsKeyAtom("web:defaulturl");
Expand Down