Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-11-14 20:56:47 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-11-14 20:56:47 +0300
commit1bb391191118e1cf0f118108efad7f7d58c22f50 (patch)
tree7b3a2680b6c766dd9c35712954246c9591525668 /src
parente6e6b217ded9ebcae3475eda0c00a7c82fd173e3 (diff)
Removed perfs debug
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/components/Folder.vue1
-rw-r--r--src/router/index.js4
-rw-r--r--src/services/AlbumContent.js1
-rw-r--r--src/store/files.js3
-rw-r--r--src/store/folders.js3
-rw-r--r--src/views/Albums.vue12
-rw-r--r--src/views/Tags.vue4
7 files changed, 4 insertions, 24 deletions
diff --git a/src/components/Folder.vue b/src/components/Folder.vue
index 1ac705bc..7a283acd 100644
--- a/src/components/Folder.vue
+++ b/src/components/Folder.vue
@@ -147,7 +147,6 @@ export default {
try {
// get data
const { folder, folders, files } = await request(this.filename, {shared: this.showShared})
- console.info(folder, folders, files);
this.$store.dispatch('updateFolders', { fileid: folder.fileid, files, folders })
this.$store.dispatch('updateFiles', { folder, files, folders })
} catch (error) {
diff --git a/src/router/index.js b/src/router/index.js
index 53ac5601..6cc95084 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -52,7 +52,7 @@ export default new Router({
children: [
{
path: ':path*',
- name: 'albumspath',
+ name: 'albums',
component: Albums,
},
],
@@ -69,7 +69,7 @@ export default new Router({
children: [
{
path: ':path*',
- name: 'sharedpath',
+ name: 'shared',
component: Albums,
},
],
diff --git a/src/services/AlbumContent.js b/src/services/AlbumContent.js
index bfe7e193..f753163f 100644
--- a/src/services/AlbumContent.js
+++ b/src/services/AlbumContent.js
@@ -34,7 +34,6 @@ import { genFileInfo } from '../utils/fileUtils'
*/
export default async function(path = '/', options = {}) {
const prefixPath = generateUrl(`/apps/photos/api/v1/${options.shared ? 'shared' : 'albums'}`)
- console.info(prefixPath);
// fetch listing
const response = await axios.get(prefixPath + path, options)
diff --git a/src/store/files.js b/src/store/files.js
index 5c1b4c18..a199b01f 100644
--- a/src/store/files.js
+++ b/src/store/files.js
@@ -73,12 +73,9 @@ const actions = {
* @param {Array} data.folders list of folders within current folder
*/
updateFiles(context, { folder, files, folders }) {
- const t0 = performance.now()
// we want all the FileInfo! Folders included!
context.commit('updateFiles', [folder, ...files, ...folders])
context.commit('setSubFolders', { fileid: folder.fileid, folders })
- const t1 = performance.now()
- console.debug('perf: updateFiles', `${t1 - t0}ms`)
},
}
diff --git a/src/store/folders.js b/src/store/folders.js
index a4dd85d8..74a8192c 100644
--- a/src/store/folders.js
+++ b/src/store/folders.js
@@ -38,7 +38,6 @@ const mutations = {
*/
updateFolders(state, { fileid, files }) {
if (files.length > 0) {
- const t0 = performance.now()
// sort by last modified
const list = files
.sort((a, b) => sortCompare(a, b, 'lastmod'))
@@ -46,8 +45,6 @@ const mutations = {
// Set folder list
Vue.set(state.folders, fileid, list.map(file => file.fileid))
- const t1 = performance.now()
- console.debug('perf: updateFolders', `${t1 - t0}ms`)
} else {
Vue.set(state.folders, fileid, [])
}
diff --git a/src/views/Albums.vue b/src/views/Albums.vue
index 0fa418e3..95f64bd3 100644
--- a/src/views/Albums.vue
+++ b/src/views/Albums.vue
@@ -104,13 +104,10 @@ export default {
return this.folders[this.folderId]
},
fileList() {
- const t0 = performance.now()
const list = this.folderContent
&& this.folderContent
.map(id => this.files[id])
.filter(file => !!file)
- const t1 = performance.now()
- console.debug('perf: fileList', `${t1 - t0}ms`)
return list
},
@@ -121,13 +118,10 @@ export default {
&& this.files[this.folderId].folders
},
folderList() {
- const t0 = performance.now()
const list = this.subFolders
&& this.subFolders
.map(id => this.files[id])
.filter(file => !!file)
- const t1 = performance.now()
- console.debug('perf: folderList', `${t1 - t0}ms`)
return list
},
@@ -153,13 +147,11 @@ export default {
},
async beforeMount() {
- console.debug('beforemount: GRID')
this.fetchFolderContent()
},
methods: {
async fetchFolderContent() {
- console.debug('start: fetchFolderContent', this.path)
// cancel any pending requests
this.cancelRequest('Changed folder')
@@ -182,7 +174,6 @@ export default {
this.$store.dispatch('addPath', { path: this.path, fileid: folder.fileid })
this.$store.dispatch('updateFolders', { fileid: folder.fileid, files, folders })
this.$store.dispatch('updateFiles', { folder, files, folders })
- console.debug('end: fetchFolderContent', this.path)
} catch (error) {
if (error.response && error.response.status) {
if (error.response.status === 404) {
@@ -195,8 +186,7 @@ export default {
}
}
// cancelled request, moving on...
- console.error(error)
- console.debug('cancelled: fetchFolderContent', this.path)
+ console.error('Error fetching album data', error)
} finally {
// done loading even with errors
this.$emit('update:loading', false)
diff --git a/src/views/Tags.vue b/src/views/Tags.vue
index 069b99f4..e9e37215 100644
--- a/src/views/Tags.vue
+++ b/src/views/Tags.vue
@@ -42,6 +42,7 @@
<Folder v-for="id in tagsNames"
:key="id"
v-bind="tags[id]"
+ :fileid="id"
:basename="tags[id].displayName"
icon="icon-tag" />
</Grid>
@@ -123,19 +124,16 @@ export default {
watch: {
tagname(name) {
- console.debug('changed:', name)
this.fetchRootContent()
},
},
async beforeMount() {
- console.debug('beforemount: GRID')
this.fetchRootContent()
},
methods: {
async fetchRootContent() {
- console.debug('start: fetchRootContent', this.path)
// cancel any pending requests
this.cancelRequest()