Skip to content

Commit

Permalink
Merge pull request #1120 from nextcloud-libraries/fix/cropImagePrevie…
Browse files Browse the repository at this point in the history
…ws-not-defined

fix(FilePicker): `cropImagePreviews` is now provided as a prop in FilePreview
  • Loading branch information
Pytal committed Nov 23, 2023
2 parents dcea7eb + 83af02d commit 741a6ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/components/FilePicker/FileListRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const props = defineProps<{
/** The current node */
node: Node
/** Whether the preview should be cropped */
cropImagePreviews: Boolean
cropImagePreviews: boolean
}>()
const emit = defineEmits<{
Expand Down
4 changes: 2 additions & 2 deletions lib/components/FilePicker/FilePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const fileListIconStyles = ref(fileListIconStylesModule)
const props = defineProps<{
node: Node
cropImagePreviews: Boolean
cropImagePreviews: boolean
}>()
const previewURL = computed(() => getPreviewURL(props.node, { cropPreview: cropImagePreviews.value }))
const previewURL = computed(() => getPreviewURL(props.node, { cropPreview: props.cropImagePreviews }))
const isFile = computed(() => props.node.type === FileType.File)
const canLoadPreview = ref(false)
Expand Down
8 changes: 5 additions & 3 deletions lib/composables/filesSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import type { ComputedRef, Ref } from 'vue'

import { loadState } from '@nextcloud/initial-state'
import { computed, ref, type ComputedRef, type Ref } from 'vue'
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { toValue } from '@vueuse/core'
import { onMounted } from 'vue'
import { computed, onMounted, ref } from 'vue'

import axios from '@nextcloud/axios'

interface OCAFilesUserConfig {
show_hidden: boolean
Expand Down

0 comments on commit 741a6ee

Please sign in to comment.