Skip to content

Commit

Permalink
Merge pull request #2514 from nextcloud/artonge/fix/smoke_test_fixes
Browse files Browse the repository at this point in the history
Various fixes in preparation of 30
  • Loading branch information
artonge committed Jul 4, 2024
2 parents 69649bf + f71a76e commit c51449a
Show file tree
Hide file tree
Showing 39 changed files with 131 additions and 101 deletions.
4 changes: 2 additions & 2 deletions js/photos-dashboard.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-dashboard.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-public.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-sidebar.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_components_Albums_AlbumForm_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_components_Albums_AlbumForm_vue.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_Albums_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_views_Albums_vue.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_Folders_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_views_Folders_vue.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_SharedAlbumContent_vue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/photos-src_views_SharedAlbumContent_vue.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@nextcloud/logger": "^2.5.0",
"@nextcloud/moment": "^1.2.1",
"@nextcloud/paths": "^2.1.0",
"@nextcloud/router": "^3.0.0",
"@nextcloud/router": "^3.0.1",
"@nextcloud/sharing": "^0.1.0",
"@nextcloud/upload": "^1.0.4",
"@nextcloud/vue": "^8.8.1",
Expand Down
6 changes: 6 additions & 0 deletions src/components/Albums/AlbumForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ import Send from 'vue-material-design-icons/Send.vue'
import { NcButton, NcLoadingIcon, NcTextField } from '@nextcloud/vue'
import moment from '@nextcloud/moment'
import { translate } from '@nextcloud/l10n'
import { generateRemoteUrl } from '@nextcloud/router'
import CollaboratorsSelectionForm from './CollaboratorsSelectionForm.vue'
Expand Down Expand Up @@ -184,9 +185,14 @@ export default {
lastPhoto: -1,
date: moment().format('MMMM YYYY'),
collaborators,
source: generateRemoteUrl(`dav/${this.albumFileName}`),
},
})
if (album === undefined) {
return
}
if (this.albumLocation !== '' || collaborators.length !== 0) {
album = await this.updateCollection(
{
Expand Down
4 changes: 1 addition & 3 deletions src/components/Albums/CollaboratorsSelectionForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
{{ t('photos', 'Add collaborators') }}
</h2>

<label class="manage-collaborators__subtitle" for="sharing-search-input">
{{ t('photos', 'Add people or groups who can edit your album') }}
</label>
<form class="manage-collaborators__form" @submit.prevent>
<NcSelect v-model="searchText"
input-id="sharing-search-input"
:input-label="t('photos', 'Add people or groups who can edit your album')"
:loading="loadingCollaborators"
label="label"
:filterable="false"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Collection/CollectionContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<slot v-if="sortedCollectionFileIds.length === 0 && !loading" name="empty-content" />

<!-- Media list -->
<FilesListViewer v-if="collection !== undefined"
<FilesListViewer v-if="collection !== undefined && sortedCollectionFileIds.length > 0 "
:container-element="appContent"
class="collection__media"
:file-ids="sortedCollectionFileIds"
Expand Down
28 changes: 17 additions & 11 deletions src/components/File.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,26 +146,19 @@ export default {
},
watch: {
file() {
async file() {
this.initialized = false
this.loadedSmall = false
this.errorSmall = false
this.loadedLarge = false
this.errorLarge = false
await this.init()
},
},
async mounted() {
[this.loadedSmall, this.loadedLarge] = await Promise.all([
await isCachedPreview(this.srcSmall),
await isCachedPreview(this.srcLarge),
])
this.initialized = true
await this.$nextTick() // Wait for next tick to have the canvas in the DOM
this.drawBlurhash()
await this.init()
},
beforeDestroy() {
Expand All @@ -179,6 +172,19 @@ export default {
},
methods: {
async init() {
[this.loadedSmall, this.loadedLarge] = await Promise.all([
await isCachedPreview(this.srcSmall),
await isCachedPreview(this.srcLarge),
])
this.initialized = true
await this.$nextTick() // Wait for next tick to have the canvas in the DOM
this.drawBlurhash()
},
emitClick() {
this.$emit('click', this.file.fileid)
},
Expand Down
7 changes: 4 additions & 3 deletions src/components/PhotosPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ export default defineComponent({
...mapGetters([
'files',
]),
photosLocationFolder() {
return this.$store.state.userConfig.photosLocationFolder
},
},
watch: {
Expand Down Expand Up @@ -223,9 +227,6 @@ export default defineComponent({
}
return moment(date, 'YYYYMM').format('MMMM YYYY')
},
photosLocationFolder() {
return this.$store.state.userConfig.photosLocationFolder
},
},
})
</script>
Expand Down
6 changes: 3 additions & 3 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const router = new Router({
{
path: '/albums/:albumName*',
component: AlbumContent,
name: 'albums',
name: 'albumsContent',
props: route => ({
albumName: route.params.albumName,
}),
Expand All @@ -133,7 +133,7 @@ const router = new Router({
{
path: '/sharedalbums/:albumName*',
component: SharedAlbumContent,
name: 'sharedAlbums',
name: 'sharedAlbumsContent',
props: route => ({
albumName: route.params.albumName,
}),
Expand Down Expand Up @@ -164,7 +164,7 @@ const router = new Router({
{
path: '/places/:placeName*',
component: PlaceContent,
name: 'places',
name: 'placesContent',
props: route => ({
placeName: route.params.placeName,
}),
Expand Down
2 changes: 1 addition & 1 deletion src/store/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const getters = {
collectionsFiles: state => state.collectionsFiles,
collectionsWithPrefix: state => function(prefix) {
return Object.values(state.collections)
.filter(collections => collections.filename.startsWith(prefix))
.filter(collection => collection.filename.startsWith(prefix))
.reduce((collections, collection) => ({ ...collections, [collection.filename]: collection }), {})
},
}
Expand Down
Loading

0 comments on commit c51449a

Please sign in to comment.