|
@@ -49,7 +49,7 @@
|
|
|
<PreventDialog />
|
|
|
<MeasurePop />
|
|
|
<div v-if="loading && loadingPercent < 100" class="loading-state">{{ $t('loading') }}...</div>
|
|
|
- <div v-show="!load && loadingPercent <= 0 && activePanelTab !== 'COMPARISON' && ['compare', 'view'].includes(toolMode)" class="upload-container">
|
|
|
+ <div v-show="!load && loadingPercent <= 0 && showUploadButton && activePanelTab !== 'COMPARISON' && ['compare', 'view'].includes(toolMode)" class="upload-container">
|
|
|
<input id="fileInput" type="file" accept=".pdf" @change="handleUpload" />
|
|
|
<label for="fileInput">{{ $t('upload') }}</label>
|
|
|
</div>
|
|
@@ -85,6 +85,7 @@ const topSpace = computed(() => {
|
|
|
})
|
|
|
const loading = computed(() => useViewer.getUploadLoading && useViewer.getUpload)
|
|
|
const activePanelTab = computed(() => useViewer.getActiveElementTab('leftPanelTab'))
|
|
|
+const showUploadButton = computed(() => useViewer.getShowUploadButton)
|
|
|
const load = computed(() => useViewer.getUpload)
|
|
|
|
|
|
async function handleUpload(evt) {
|
|
@@ -173,6 +174,9 @@ window.instance.initOptions = async (options) => {
|
|
|
// const res = await initConfig({
|
|
|
// license: 'NjY0ZGE0N2ZhYTBiZQ=='
|
|
|
// })
|
|
|
+ if (showUploadButton in options) {
|
|
|
+ useViewer.setShowUploadButton(options.showUploadButton)
|
|
|
+ }
|
|
|
const webviewerMode = !!(options && options.webviewerServer) ? options.webviewerServer : 'Standalone'
|
|
|
useViewer.setWebviewerMode(webviewerMode)
|
|
|
if (!res) return
|