Skip to content

Commit

Permalink
Small fixes and polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Apr 27, 2022
1 parent ae25b61 commit f887105
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
3 changes: 1 addition & 2 deletions packages/web-app-files/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</template>
<script lang="ts">
import Mixins from './mixins'
import { mapActions, mapGetters, mapState } from 'vuex'
import { mapActions, mapState } from 'vuex'
import SideBar from './components/SideBar/SideBar.vue'
import { defineComponent } from '@vue/composition-api'
Expand All @@ -30,7 +30,6 @@ export default defineComponent({
},
mixins: [Mixins],
computed: {
...mapGetters('Files', ['dropzone']),
...mapState('Files/sidebar', {
sidebarClosed: 'closed',
sidebarActivePanel: 'activePanel'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ function createStore(state = { currentFolder: {} }, fileHandlers = []) {
...state
},
getters: {
currentFolder: () => state.currentFolder,
dropzone: () => {}
currentFolder: () => state.currentFolder
}
}
}
Expand Down
25 changes: 15 additions & 10 deletions packages/web-runtime/src/components/UploadInfo.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<template>
<div
id="upload-info"
class="oc-p-m oc-rounded oc-box-shadow-medium"
:class="{ 'oc-hidden': !showInfo }"
>
<div class="upload-info-title oc-flex oc-flex-between oc-flex-middle oc-mb-m">
<div id="upload-info" class="oc-rounded oc-box-shadow-medium" :class="{ 'oc-hidden': !showInfo }">
<div class="upload-info-title oc-flex oc-flex-between oc-flex-middle oc-px-m oc-pt-m">
<span class="oc-flex oc-flex-middle">
<oc-icon
v-if="!filesUploading && !uploadCancelled"
Expand All @@ -16,12 +12,17 @@
<span v-text="uploadInfoTitle" />
</span>

<oc-button id="close-upload-info-btn" appearance="raw" @click="closeInfo">
<oc-button
id="close-upload-info-btn"
v-oc-tooltip="$gettext('Close')"
appearance="raw"
@click="closeInfo"
>
<oc-icon name="close" />
</oc-button>
</div>
<div class="upload-info-status-bar" />
<div class="upload-info-successful-uploads">
<div class="upload-info-status-bar oc-px-m" />
<div class="upload-info-successful-uploads oc-p-m">
<ul id="files-collaborators-list" class="oc-list">
<li
v-for="(item, idx) in successfulUploads"
Expand Down Expand Up @@ -184,8 +185,12 @@ export default {
#upload-info {
position: absolute;
right: 20px;
background: #fff;
background-color: var(--oc-color-background-secondary);
bottom: 20px;
width: 300px;
}
.upload-info-successful-uploads {
max-height: 50vh;
overflow-y: auto;
}
</style>
3 changes: 2 additions & 1 deletion packages/web-runtime/src/composables/upload/useUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export function useUpload(options: UploadOptions): UploadResult {
watch(
uppyOptions,
() => {
if (unref(uppyOptions).isTusSupported) {
// @TODO use Tus once the backend supports it on password protected links
if (unref(uppyOptions).isTusSupported && !unref(publicLinkPassword)) {
options.uppyService.useTus(unref(uppyOptions) as any)
return
}
Expand Down

0 comments on commit f887105

Please sign in to comment.