Skip to content

Commit

Permalink
feat: hide buttons when file is chose
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos authored and backportbot-libresign[bot] committed Apr 12, 2024
1 parent 74eb72b commit f57b0a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/Components/RightSidebar/RightSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ export default {
},
closeSidebar() {
this.sidebarStore.hideSidebar()
// this.filesStore.selectFile()
// this.signStore.reset()
},
},
}
Expand Down
10 changes: 7 additions & 3 deletions src/views/Request.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,30 @@
<div class="container-request">
<header>
<h1>{{ t('libresign', 'Request Signatures') }}</h1>
<p>{{ t('libresign', 'Choose the file to request signatures.') }}</p>
<p v-if="!sidebarStore.isVisible()">{{ t('libresign', 'Choose the file to request signatures.') }}</p>

Check warning on line 6 in src/views/Request.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Expected 1 line break after opening tag (`<p>`), but no line breaks found

Check warning on line 6 in src/views/Request.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Expected 1 line break before closing tag (`</p>`), but no line breaks found
</header>
<div class="content-request">
<File v-show="filesStore.selectedNodeId > 0"
status="0"
status-text="none" />
<NcButton :wide="true"
v-if="!sidebarStore.isVisible()"

Check warning on line 13 in src/views/Request.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Attribute "v-if" should go before ":wide"
@click="showModalUploadFromUrl()">
{{ t('libresign', 'Upload from URL') }}
<template #icon>
<LinkIcon :size="20" />
</template>
</NcButton>
<NcButton :wide="true"
v-if="!sidebarStore.isVisible()"

Check warning on line 21 in src/views/Request.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Attribute "v-if" should go before ":wide"
@click="showFilePicker = true">
{{ t('libresign', 'Choose from Files') }}
<template #icon>
<FolderIcon :size="20" />
</template>
</NcButton>
<NcButton :wide="true"
v-if="!sidebarStore.isVisible()"

Check warning on line 29 in src/views/Request.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Attribute "v-if" should go before ":wide"
@click="uploadFile">
{{ t('libresign', 'Upload') }}
<template #icon>
Expand Down Expand Up @@ -85,6 +88,7 @@ import File from '../Components/File/File.vue'
import { filesService } from '../domains/files/index.js'
import { onError } from '../helpers/errors.js'
import { useFilesStore } from '../store/files.js'
import { useSidebarStore } from '../store/sidebar.js'
const PDF_MIME_TYPE = 'application/pdf'
Expand Down Expand Up @@ -113,7 +117,8 @@ export default {
},
setup() {
const filesStore = useFilesStore()
return { filesStore }
const sidebarStore = useSidebarStore()
return { filesStore, sidebarStore }
},
data() {
return {
Expand Down Expand Up @@ -187,7 +192,6 @@ export default {
onError(err)
return
}
await this.closeModalUploadFromUrl()
this.closeModalUploadFromUrl()
this.loading = false
},
Expand Down

0 comments on commit f57b0a1

Please sign in to comment.