-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
54 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<object class="pdf-viewer oc-width-1-1 oc-height-1-1" :data="url" type="application/pdf" /> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
export default defineComponent({ | ||
props: { | ||
url: { | ||
type: String, | ||
required: true | ||
} | ||
} | ||
}) | ||
</script> |
13 changes: 0 additions & 13 deletions
13
packages/web-app-pdf-viewer/src/components/ErrorScreen.vue
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
packages/web-app-pdf-viewer/src/components/LoadingScreen.vue
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/web-pkg/src/components/AppTemplates/AppWrapperRoute.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { defineComponent, h } from 'vue' | ||
import AppWrapper, { AppWrapperSlotArgs } from './AppWrapper.vue' | ||
import { UrlForResourceOptions } from 'web-pkg/src/composables' | ||
|
||
export function AppWrapperRoute( | ||
fileEditor: ReturnType<typeof defineComponent>, | ||
options: { applicationId: string; urlForResourceOptions?: UrlForResourceOptions } | ||
) { | ||
return defineComponent({ | ||
render() { | ||
return h(AppWrapper, options, { | ||
default: (slotArgs: AppWrapperSlotArgs) => { | ||
const { currentContent, ...restArgs } = slotArgs | ||
return h(fileEditor, { | ||
currentContent: currentContent.value, | ||
'onUpdate:currentContent': (value) => { | ||
currentContent.value = value | ||
}, | ||
...restArgs | ||
}) | ||
} | ||
}) | ||
} | ||
}) | ||
} |