mirror of https://github.com/nextcloud/photos
Lint fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
This commit is contained in:
parent
a025f47ef9
commit
4c682bb9c5
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -6,7 +6,7 @@ declare(strict_types=1);
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -6,7 +6,7 @@ declare(strict_types=1);
|
|||
*
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -6,7 +6,7 @@ declare(strict_types=1);
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -6,7 +6,7 @@ declare(strict_types=1);
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-
|
||||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// for now we want to keep the same gap everywhere
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-
|
||||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
@ -50,7 +50,7 @@ export default {
|
|||
/**
|
||||
* Does this component have an illustration
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
haveIllustration() {
|
||||
return this.illustrationName !== ''
|
||||
|
@ -59,7 +59,7 @@ export default {
|
|||
/**
|
||||
* Is the illustration loaded
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
isLoaded() {
|
||||
if (!this.haveIllustration) {
|
||||
|
@ -72,7 +72,7 @@ export default {
|
|||
* The component is ready if the illustration
|
||||
* is done loading or if there is none
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
isReady() {
|
||||
return !this.haveIllustration || (this.haveIllustration && this.isLoaded)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
- @copyright Copyright (c) 2020 Corentin Mors
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- @author Corentin Mors <medias@pixelswap.fr>
|
||||
-
|
||||
|
@ -109,7 +109,7 @@ export default {
|
|||
OCA.Viewer.open({
|
||||
path: this.item.injected.filename,
|
||||
list: this.item.injected.list,
|
||||
loadMore: this.item.injected.loadMore ? async() => await this.item.injected.loadMore(true) : () => [],
|
||||
loadMore: this.item.injected.loadMore ? async () => await this.item.injected.loadMore(true) : () => [],
|
||||
canLoop: this.item.injected.canLoop,
|
||||
})
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
- @author Corentin Mors <medias@pixelswap.fr>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-
|
||||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
@ -105,7 +105,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Previews list without the failed ones
|
||||
* @returns {Object[]} the previews fileinfo
|
||||
*
|
||||
* @return {object[]} the previews fileinfo
|
||||
*/
|
||||
previewList() {
|
||||
return this.fileList
|
||||
|
@ -118,7 +119,8 @@ export default {
|
|||
* current named route, get the final url back, decode it
|
||||
* and use it as a direct string.
|
||||
* Which vue-router does not encode afterwards!
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
to() {
|
||||
// always remove first slash, the router
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
- @copyright Copyright (c) 2020 Corentin Mors
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- @author Corentin Mors <medias@pixelswap.fr>
|
||||
-
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-
|
||||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
@ -106,7 +106,8 @@ export default {
|
|||
* so we generate a new valid route object, get the final url back
|
||||
* decode it and use it as a direct string, which vue-router
|
||||
* does not encode afterwards
|
||||
* @returns {string|object}
|
||||
*
|
||||
* @return {string|object}
|
||||
*/
|
||||
to() {
|
||||
// always remove first slash, the router
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
- @copyright Copyright (c) 2020 Corentin Mors
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- @author Corentin Mors <medias@pixelswap.fr>
|
||||
-
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-
|
||||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
- @author Corentin Mors <medias@pixelswap.fr>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import getGridConfig from '../services/GridConfig'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
const request = require('webdav/dist/node/request')
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
|
@ -42,8 +41,9 @@ if (!isMapsInstalled) {
|
|||
/**
|
||||
* Parse the path of a route : join the elements of the array and return a single string with slashes
|
||||
* + always lead current path with a slash
|
||||
* @param {string|array} path path arguments to parse
|
||||
* @returns {string}
|
||||
*
|
||||
* @param {string | Array} path path arguments to parse
|
||||
* @return {string}
|
||||
*/
|
||||
const parsePathParams = (path) => {
|
||||
return `/${Array.isArray(path) ? path.join('/') : path || ''}`
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import axios from '@nextcloud/axios'
|
||||
|
@ -28,10 +27,10 @@ import allowedMimes from './AllowedMimes'
|
|||
/**
|
||||
* List files from a folder and filter out unwanted mimes
|
||||
*
|
||||
* @param {String} path the path relative to the user root
|
||||
* @param {Object} [options] optional options for axios
|
||||
* @param {boolean} [shared] fetch shared albums ?
|
||||
* @returns {Array} the file list
|
||||
* @param {string} path the path relative to the user root
|
||||
* @param {object} [options] optional options for axios
|
||||
* @param {boolean} [options.shared] fetch shared albums ?
|
||||
* @return {Array} the file list
|
||||
*/
|
||||
export default async function(path = '/', options = {}) {
|
||||
const prefixPath = generateUrl(`/apps/photos/api/v1/${options.shared ? 'shared' : 'albums'}`)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author Jakob Röhrl <jakob.roehrl@web.de>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import webdav from 'webdav'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
const props = `
|
||||
<oc:fileid />
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
|
@ -32,9 +31,9 @@ import { genFileInfo } from '../utils/fileUtils'
|
|||
/**
|
||||
* List files from a folder and filter out unwanted mimes
|
||||
*
|
||||
* @param {String} path the path relative to the user root
|
||||
* @param {Object} [options] optional options for axios
|
||||
* @returns {Array} the file list
|
||||
* @param {string} path the path relative to the user root
|
||||
* @param {object} [options] optional options for axios
|
||||
* @return {Array} the file list
|
||||
*/
|
||||
export default async function(path, options = {}) {
|
||||
|
||||
|
@ -96,10 +95,10 @@ export default async function(path, options = {}) {
|
|||
* ! See webdav library
|
||||
* Into the returned data
|
||||
*
|
||||
* @param {Object} result the request result
|
||||
* @param {object} result the request result
|
||||
* @param {string} serverBasePath server base path
|
||||
* @param {boolean} isDetailed detailed request
|
||||
* @returns {Array}
|
||||
* @return {Array}
|
||||
*/
|
||||
function getDirectoryFiles(result, serverBasePath, isDetailed = false) {
|
||||
const serverBase = pathPosix.join(serverBasePath, '/')
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
|
@ -28,8 +27,8 @@ import { genFileInfo } from '../utils/fileUtils'
|
|||
/**
|
||||
* List files from a folder and filter out unwanted mimes
|
||||
*
|
||||
* @param {String} path the path relative to the user root
|
||||
* @returns {Array} the file list
|
||||
* @param {string} path the path relative to the user root
|
||||
* @return {Array} the file list
|
||||
*/
|
||||
export default async function(path) {
|
||||
// getDirectoryContents doesn't accept / for root
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { genFileInfo } from '../utils/fileUtils'
|
||||
|
@ -31,11 +30,11 @@ import { sizes } from '../assets/grid-sizes'
|
|||
* List files from a folder and filter out unwanted mimes
|
||||
*
|
||||
* @param {boolean} [onlyFavorites=false] not used
|
||||
* @param {Object} [options] used for the cancellable requests
|
||||
* @param {object} [options] used for the cancellable requests
|
||||
* @param {number} [options.page=0] which page to start (starts at 0)
|
||||
* @param {number} [options.perPage] how many to display per page default is 5 times the max number per line from the grid-sizes config file
|
||||
* @param {boolean} [options.full=false] get full data of the files
|
||||
* @returns {Array} the file list
|
||||
* @return {Array} the file list
|
||||
*/
|
||||
export default async function(onlyFavorites = false, options = {}) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import client from './DavClient'
|
||||
|
@ -26,9 +25,9 @@ import { genFileInfo } from '../utils/fileUtils'
|
|||
/**
|
||||
* List system tags
|
||||
*
|
||||
* @param {String} path the path relative to the user root
|
||||
* @param {Object} [options] optional options for axios
|
||||
* @returns {Array} the file list
|
||||
* @param {string} path the path relative to the user root
|
||||
* @param {object} [options] optional options for axios
|
||||
* @return {Array} the file list
|
||||
*/
|
||||
export default async function(path, options = {}) {
|
||||
const response = await client.getDirectoryContents('/systemtags/', Object.assign({}, {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { genFileInfo } from '../utils/fileUtils'
|
||||
|
@ -30,8 +29,8 @@ import client from './DavClient'
|
|||
* Get tagged files based on provided tag id
|
||||
*
|
||||
* @param {number} id the tag id to filter
|
||||
* @param {Object} [options] optional options for axios
|
||||
* @returns {Array} the file list
|
||||
* @param {object} [options] optional options for axios
|
||||
* @return {Array} the file list
|
||||
*/
|
||||
export default async function(id, options = {}) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
|
||||
|
@ -29,7 +28,7 @@ const mutations = {
|
|||
/**
|
||||
* Append or update given files
|
||||
*
|
||||
* @param {Object} state the store mutations
|
||||
* @param {object} state the store mutations
|
||||
* @param {Array} files the store mutations
|
||||
*/
|
||||
updateFiles(state, files) {
|
||||
|
@ -43,8 +42,8 @@ const mutations = {
|
|||
/**
|
||||
* Set a folder subfolders
|
||||
*
|
||||
* @param {Object} state the store mutations
|
||||
* @param {Object} data destructuring object
|
||||
* @param {object} state the store mutations
|
||||
* @param {object} data destructuring object
|
||||
* @param {number} data.fileid current folder id
|
||||
* @param {Array} data.folders list of folders
|
||||
*/
|
||||
|
@ -67,9 +66,9 @@ const actions = {
|
|||
/**
|
||||
* Update files, folders and their respective subfolders
|
||||
*
|
||||
* @param {Object} context the store mutations
|
||||
* @param {Object} data destructuring object
|
||||
* @param {Object} data.folder current folder fileinfo
|
||||
* @param {object} context the store mutations
|
||||
* @param {object} data destructuring object
|
||||
* @param {object} data.folder current folder fileinfo
|
||||
* @param {Array} data.files list of files
|
||||
* @param {Array} data.folders list of folders within current folder
|
||||
*/
|
||||
|
@ -82,7 +81,7 @@ const actions = {
|
|||
/**
|
||||
* Append or update given files
|
||||
*
|
||||
* @param {Object} context the store mutations
|
||||
* @param {object} context the store mutations
|
||||
* @param {Array} files list of files
|
||||
*/
|
||||
appendFiles(context, files = []) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import { sortCompare } from '../utils/fileUtils'
|
||||
|
@ -31,8 +30,8 @@ const mutations = {
|
|||
/**
|
||||
* Index folders paths and ids
|
||||
*
|
||||
* @param {Object} state vuex state
|
||||
* @param {Object} data destructuring object
|
||||
* @param {object} state vuex state
|
||||
* @param {object} data destructuring object
|
||||
* @param {number} data.fileid current folder id
|
||||
* @param {Array} data.files list of files
|
||||
*/
|
||||
|
@ -53,8 +52,8 @@ const mutations = {
|
|||
/**
|
||||
* Index folders paths and ids
|
||||
*
|
||||
* @param {Object} state vuex state
|
||||
* @param {Object} data destructuring object
|
||||
* @param {object} state vuex state
|
||||
* @param {object} data destructuring object
|
||||
* @param {string} data.path path of this folder
|
||||
* @param {number} data.fileid id of this folder
|
||||
*/
|
||||
|
@ -75,8 +74,8 @@ const actions = {
|
|||
/**
|
||||
* Update files and folders
|
||||
*
|
||||
* @param {Object} context vuex context
|
||||
* @param {Object} data destructuring object
|
||||
* @param {object} context vuex context
|
||||
* @param {object} data destructuring object
|
||||
* @param {number} data.fileid current folder id
|
||||
* @param {Array} data.files list of files
|
||||
* @param {Array} data.folders list of folders
|
||||
|
@ -91,8 +90,8 @@ const actions = {
|
|||
/**
|
||||
* Index folders paths and ids
|
||||
*
|
||||
* @param {Object} context vuex context
|
||||
* @param {Object} data destructuring object
|
||||
* @param {object} context vuex context
|
||||
* @param {object} data destructuring object
|
||||
* @param {string} data.path path of this folder
|
||||
* @param {number} data.fileid id of this folder
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import { sortCompare } from '../utils/fileUtils'
|
||||
|
@ -31,7 +30,7 @@ const mutations = {
|
|||
/**
|
||||
* Order and save tags
|
||||
*
|
||||
* @param {Object} state vuex state
|
||||
* @param {object} state vuex state
|
||||
* @param {Array} tags the tags list
|
||||
*/
|
||||
updateTags(state, tags) {
|
||||
|
@ -51,10 +50,10 @@ const mutations = {
|
|||
/**
|
||||
* Update tag files list
|
||||
*
|
||||
* @param {Object} state vuex state
|
||||
* @param {Object} data destructuring object
|
||||
* @param {object} state vuex state
|
||||
* @param {object} data destructuring object
|
||||
* @param {number} data.id current tag id
|
||||
* @param {Object[]} data.files list of files
|
||||
* @param {object[]} data.files list of files
|
||||
*/
|
||||
updateTag(state, { id, files }) {
|
||||
// sort by last modified
|
||||
|
@ -77,7 +76,7 @@ const actions = {
|
|||
/**
|
||||
* Update files and folders
|
||||
*
|
||||
* @param {Object} context vuex context
|
||||
* @param {object} context vuex context
|
||||
* @param {Array} tags the tag list
|
||||
*/
|
||||
updateTags(context, tags) {
|
||||
|
@ -87,10 +86,10 @@ const actions = {
|
|||
/**
|
||||
* Update tag files list
|
||||
*
|
||||
* @param {Object} context vuex context
|
||||
* @param {Object} data destructuring object
|
||||
* @param {object} context vuex context
|
||||
* @param {object} data destructuring object
|
||||
* @param {number} data.id current tag id
|
||||
* @param {Object[]} data.files list of files
|
||||
* @param {object[]} data.files list of files
|
||||
*/
|
||||
updateTag(context, { id, files }) {
|
||||
context.commit('updateTag', { id, files })
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
const state = {
|
||||
|
@ -28,7 +27,7 @@ const mutations = {
|
|||
/**
|
||||
* Update timeline files list
|
||||
*
|
||||
* @param {Object} state the store mutations
|
||||
* @param {object} state the store mutations
|
||||
* @param {Array} files the store mutations
|
||||
*/
|
||||
updateTimeline(state, files) {
|
||||
|
@ -50,8 +49,8 @@ const actions = {
|
|||
/**
|
||||
* Update timeline files list
|
||||
*
|
||||
* @param {Object} context the store mutations
|
||||
* @param {Number[]} files list of files ids
|
||||
* @param {object} context the store mutations
|
||||
* @param {number[]} files list of files ids
|
||||
*/
|
||||
updateTimeline(context, files = []) {
|
||||
// we want all the FileInfo! Folders included!
|
||||
|
@ -61,7 +60,7 @@ const actions = {
|
|||
/**
|
||||
* Reset the timeline files list
|
||||
*
|
||||
* @param {Object} context the store mutations
|
||||
* @param {object} context the store mutations
|
||||
*/
|
||||
resetTimeline(context) {
|
||||
context.commit('resetTimeline')
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
* @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@pm.me>
|
||||
*
|
||||
* @author Marco Ambrosini <marcoambrosini@pm.me>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -18,22 +19,21 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import axios from '@nextcloud/axios'
|
||||
|
||||
/**
|
||||
* Create a cancel token
|
||||
* @returns {CancelTokenSource}
|
||||
*
|
||||
* @return {CancelTokenSource}
|
||||
*/
|
||||
const createCancelToken = () => axios.CancelToken.source()
|
||||
|
||||
/**
|
||||
* Creates a cancelable axios 'request object'.
|
||||
*
|
||||
* @param {function} request the axios promise request
|
||||
* @returns {Object}
|
||||
* @param {Function} request the axios promise request
|
||||
* @return {object}
|
||||
*/
|
||||
const CancelableRequest = function(request) {
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ const CancelableRequest = function(request) {
|
|||
* Execute the request
|
||||
*
|
||||
* @param {string} url the url to send the request to
|
||||
* @param {Object} [options] optional config for the request
|
||||
* @param {object} [options] optional config for the request
|
||||
*/
|
||||
const fetch = async function(url, options) {
|
||||
return request(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// sass plugin to implement js configs into scss
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import camelcase from 'camelcase'
|
||||
import { isNumber } from './numberUtils'
|
||||
|
@ -25,8 +24,8 @@ import { isNumber } from './numberUtils'
|
|||
/**
|
||||
* Get an url encoded path
|
||||
*
|
||||
* @param {String} path the full path
|
||||
* @returns {string} url encoded file path
|
||||
* @param {string} path the full path
|
||||
* @return {string} url encoded file path
|
||||
*/
|
||||
const encodeFilePath = function(path) {
|
||||
const pathSections = (path.startsWith('/') ? path : `/${path}`).split('/')
|
||||
|
@ -42,8 +41,8 @@ const encodeFilePath = function(path) {
|
|||
/**
|
||||
* Extract dir and name from file path
|
||||
*
|
||||
* @param {String} path the full path
|
||||
* @returns {String[]} [dirPath, fileName]
|
||||
* @param {string} path the full path
|
||||
* @return {string[]} [dirPath, fileName]
|
||||
*/
|
||||
const extractFilePaths = function(path) {
|
||||
const pathSections = path.split('/')
|
||||
|
@ -55,11 +54,11 @@ const extractFilePaths = function(path) {
|
|||
/**
|
||||
* Sorting comparison function
|
||||
*
|
||||
* @param {Object} fileInfo1 file 1 fileinfo
|
||||
* @param {Object} fileInfo2 file 2 fileinfo
|
||||
* @param {object} fileInfo1 file 1 fileinfo
|
||||
* @param {object} fileInfo2 file 2 fileinfo
|
||||
* @param {string} key key to sort with
|
||||
* @param {boolean} [asc=true] sort ascending?
|
||||
* @returns {number}
|
||||
* @return {number}
|
||||
*/
|
||||
const sortCompare = function(fileInfo1, fileInfo2, key, asc = true) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -17,7 +17,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
const isNumber = function(num) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
- @author Corentin Mors <medias@pixelswap.fr>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
- @author Corentin Mors <medias@pixelswap.fr>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
- @author Corentin Mors <medias@pixelswap.fr>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
- @license AGPL-3.0-or-later
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
|
@ -203,8 +203,9 @@ export default {
|
|||
|
||||
methods: {
|
||||
/** Return next batch of data depending on global offset
|
||||
*
|
||||
* @param {boolean} doReturn Returns a Promise with the list instead of a boolean
|
||||
* @returns {Promise<boolean>} Returns a Promise with a boolean that stops infinite loading
|
||||
* @return {Promise<boolean>} Returns a Promise with a boolean that stops infinite loading
|
||||
*/
|
||||
async getContent(doReturn) {
|
||||
if (this.done) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
|
Loading…
Reference in New Issue