mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
Merge pull request #30020 from nextcloud/feat/webpack-vendors-bundles
Feat/webpack vendors bundles
This commit is contained in:
commit
91c7efaeb6
425 changed files with 24259 additions and 46719 deletions
|
|
@ -1,7 +1,6 @@
|
|||
module.exports = {
|
||||
globals: {
|
||||
__webpack_nonce__: true,
|
||||
__webpack_public_path__: true,
|
||||
_: true,
|
||||
$: true,
|
||||
moment: true,
|
||||
|
|
@ -16,5 +15,9 @@ module.exports = {
|
|||
// TODO: make sure we fix this as this is bad vue coding style.
|
||||
// Use proper sync modifier
|
||||
'vue/no-mutating-props': 'warn',
|
||||
'vue/custom-event-name-casing': ['error', 'kebab-case', {
|
||||
// allows custom xxxx:xxx events formats
|
||||
ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+(?:-[a-z]+)*$/u'],
|
||||
}],
|
||||
},
|
||||
}
|
||||
|
|
|
|||
36
Makefile
36
Makefile
|
|
@ -28,39 +28,7 @@ lint-fix-watch:
|
|||
|
||||
# Cleaning
|
||||
clean:
|
||||
rm -rf apps/accessibility/js/
|
||||
rm -rf apps/comments/js/
|
||||
rm -rf apps/dashboard/js/
|
||||
rm -rf apps/dav/js/
|
||||
rm -rf apps/files/js/dist/
|
||||
rm -rf apps/files_sharing/js/dist/
|
||||
rm -rf apps/files_trashbin/js/
|
||||
rm -rf apps/files_versions/js/
|
||||
rm -rf apps/oauth2/js/
|
||||
rm -rf apps/settings/js/vue-*
|
||||
rm -rf apps/systemtags/js/systemtags.*
|
||||
rm -rf apps/twofactor_backupcodes/js
|
||||
rm -rf apps/updatenotification/js/updatenotification.*
|
||||
rm -rf apps/user_status/js/
|
||||
rm -rf apps/weather_status/js/
|
||||
rm -rf apps/workflowengine/js/
|
||||
rm -rf core/js/dist
|
||||
rm -rf dist
|
||||
|
||||
clean-git: clean
|
||||
git checkout -- apps/accessibility/js/
|
||||
git checkout -- apps/comments/js/
|
||||
git checkout -- apps/dashboard/js/
|
||||
git checkout -- apps/dav/js/
|
||||
git checkout -- apps/files/js/dist/
|
||||
git checkout -- apps/files_sharing/js/dist/
|
||||
git checkout -- apps/files_trashbin/js/
|
||||
git checkout -- apps/files_versions/js/
|
||||
git checkout -- apps/oauth2/js/
|
||||
git checkout -- apps/settings/js/vue-*
|
||||
git checkout -- apps/systemtags/js/systemtags.*
|
||||
git checkout -- apps/twofactor_backupcodes/js
|
||||
git checkout -- apps/updatenotification/js/updatenotification.*
|
||||
git checkout -- apps/user_status/js/
|
||||
git checkout -- apps/weather_status/js/
|
||||
git checkout -- apps/workflowengine/js/
|
||||
git checkout -- core/js/dist
|
||||
git checkout -- dist
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,24 +0,0 @@
|
|||
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/js/",n(n.s=659)}({659:function(e,n){
|
||||
/**
|
||||
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
let o=null;const r=new OCA.Files.Sidebar.Tab({id:"comments",name:t("comments","Comments"),icon:"icon-comment",async mount(e,t,n){o&&o.$destroy(),o=new OCA.Comments.View("files",{parent:n}),await o.update(t.id),o.$mount(e)},update(e){o.update(e.id)},destroy(){o.$destroy(),o=null},scrollBottomReached(){o.onScrollBottomReached()}});window.addEventListener("DOMContentLoaded",(function(){OCA.Files&&OCA.Files.Sidebar&&OCA.Files.Sidebar.registerTab(r)}))}});
|
||||
//# sourceMappingURL=comments-tab.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,48 +0,0 @@
|
|||
!function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(o,i,function(n){return e[n]}.bind(null,i));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/js/",t(t.s=368)}({368:function(e,n,t){"use strict";t.r(n);t(369),t(370),t(371),t(372);
|
||||
/**
|
||||
* @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
window.OCA.Comments=OCA.Comments},369:function(e,n){
|
||||
/**
|
||||
* Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author Vincent Petry <vincent@nextcloud.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
OCA.Comments||(OCA.Comments={})},370:function(e,n){var t;t=Handlebars.template,(OCA.Comments.Templates=OCA.Comments.Templates||{}).filesplugin=t({compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){var s,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression,m=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'<a class="action action-comment permanent" title="'+l("function"==typeof(s=null!=(s=m(t,"countMessage")||(null!=n?m(n,"countMessage"):n))?s:a)?s.call(r,{name:"countMessage",hash:{},data:i,loc:{start:{line:1,column:50},end:{line:1,column:66}}}):s)+'" href="#">\n\t<img class="svg" src="'+l("function"==typeof(s=null!=(s=m(t,"iconUrl")||(null!=n?m(n,"iconUrl"):n))?s:a)?s.call(r,{name:"iconUrl",hash:{},data:i,loc:{start:{line:2,column:23},end:{line:2,column:34}}}):s)+'"/>\n</a>\n'},useData:!0})},371:function(e,o){_.extend(OC.Files.Client,{PROPERTY_COMMENTS_UNREAD:"{"+OC.Files.Client.NS_OWNCLOUD+"}comments-unread"}),OCA.Comments=_.extend({},OCA.Comments),OCA.Comments||(OCA.Comments={}),OCA.Comments.FilesPlugin={ignoreLists:["trashbin","files.public"],_formatCommentCount:e=>OCA.Comments.Templates.filesplugin({count:e,countMessage:n("comments","%n unread comment","%n unread comments",e),iconUrl:OC.imagePath("core","actions/comment")}),attach(e){const o=this;if(this.ignoreLists.indexOf(e.id)>=0)return;const i=e._getWebdavProperties;e._getWebdavProperties=function(){const e=i.apply(this,arguments);return e.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD),e},e.filesClient.addFileInfoParser((function(e){const n={},t=e.propStat[0].properties[OC.Files.Client.PROPERTY_COMMENTS_UNREAD];return _.isUndefined(t)||""===t||(n.commentsUnread=parseInt(t,10)),n})),e.$el.addClass("has-comments");const s=e._createRow;e._createRow=function(e){const n=s.apply(this,arguments);return e.commentsUnread&&n.attr("data-comments-unread",e.commentsUnread),n},e.fileActions.registerAction({name:"Comment",displayName(e){if(e&&e.$file){const t=parseInt(e.$file.data("comments-unread"),10);if(t>=0)return n("comments","1 new comment","{unread} new comments",t,{unread:t})}return t("comments","Comment")},mime:"all",order:-140,iconClass:"icon-comment",permissions:OC.PERMISSION_READ,type:OCA.Files.FileActions.TYPE_INLINE,render(e,n,t){const i=t.$file.data("comments-unread");if(i){const e=$(o._formatCommentCount(i));return t.$file.find("a.name>span.fileactions").append(e),e}return""},actionHandler(e,n){n.$file.find(".action-comment").tooltip("hide"),OCA.Files.Sidebar.setActiveTab("comments"),OCA.Files.Sidebar.open(n.dir+"/"+e)}});const r=e.elementToFile;e.elementToFile=function(e){const n=r.apply(this,arguments),t=e.data("comments-unread");return t&&(n.commentsUnread=t),n}}},OC.Plugins.register("OCA.Files.FileList",OCA.Comments.FilesPlugin)},372:function(e,n){OCA.Comments.ActivityTabViewPlugin={prepareModelForDisplay(e,n,t){if("comments"===e.get("app")&&"comments"===e.get("type")&&"ActivityTabView"===t&&(n.addClass("comment"),e.get("message")&&this._isLong(e.get("message")))){n.addClass("collapsed");const e=$("<div>").addClass("message-overlay");n.find(".activitymessage").after(e),n.on("click",this._onClickCollapsedComment)}},_onClickCollapsedComment(e){let n=$(e.target);n.is(".comment")||(n=n.closest(".comment")),n.removeClass("collapsed")},_isLong:e=>e.length>250||(e.match(/\n/g)||[]).length>1},OC.Plugins.register("OCA.Activity.RenderingPlugins",OCA.Comments.ActivityTabViewPlugin)}});
|
||||
//# sourceMappingURL=comments.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -52,6 +52,6 @@ class LoadSidebarScripts implements IEventListener {
|
|||
// TODO: make sure to only include the sidebar script when
|
||||
// we properly split it between files list and sidebar
|
||||
Util::addScript(Application::APP_ID, 'comments');
|
||||
Util::addScript(Application::APP_ID, 'comments-tab');
|
||||
Util::addScript(Application::APP_ID, 'comments-tab', 'files');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Is the current user the author of this comment
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isOwnComment() {
|
||||
return getCurrentUser().uid === this.actorId
|
||||
|
|
@ -174,7 +175,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Rendered content as html string
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
renderedContent() {
|
||||
if (this.isEmptyMessage) {
|
||||
|
|
@ -208,6 +210,7 @@ export default {
|
|||
methods: {
|
||||
/**
|
||||
* Update local Message on outer change
|
||||
*
|
||||
* @param {string} message the message to set
|
||||
*/
|
||||
updateLocalMessage(message) {
|
||||
|
|
@ -243,6 +246,8 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "sass:math";
|
||||
|
||||
$comment-padding: 10px;
|
||||
|
||||
.comment {
|
||||
|
|
@ -253,7 +258,7 @@ $comment-padding: 10px;
|
|||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 44px;
|
||||
padding: $comment-padding / 2 0;
|
||||
padding: math.div($comment-padding, 2) 0;
|
||||
}
|
||||
|
||||
&__author,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export default class CommentInstance {
|
|||
* Initialize a new Comments instance for the desired type
|
||||
*
|
||||
* @param {string} commentsType the comments endpoint type
|
||||
* @param {Object} options the vue options (propsData, parent, el...)
|
||||
* @param {object} options the vue options (propsData, parent, el...)
|
||||
*/
|
||||
constructor(commentsType = 'files', options) {
|
||||
// Add comments type as a global mixin
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ export const DEFAULT_LIMIT = 20
|
|||
/**
|
||||
* Retrieve the comments list
|
||||
*
|
||||
* @param {Object} data destructuring object
|
||||
* @param {object} data destructuring object
|
||||
* @param {string} data.commentsType the ressource type
|
||||
* @param {number} data.ressourceId the ressource ID
|
||||
* @param {Object} [options] optional options for axios
|
||||
* @returns {Object[]} the comments list
|
||||
* @param {object} [options] optional options for axios
|
||||
* @return {object[]} the comments list
|
||||
*/
|
||||
export default async function({ commentsType, ressourceId }, options = {}) {
|
||||
let response = null
|
||||
|
|
@ -64,6 +64,10 @@ export default async function({ commentsType, ressourceId }, options = {}) {
|
|||
}
|
||||
|
||||
// https://github.com/perry-mitchell/webdav-client/blob/9de2da4a2599e06bd86c2778145b7ade39fe0b3c/source/interface/directoryContents.js#L32
|
||||
/**
|
||||
* @param result
|
||||
* @param isDetailed
|
||||
*/
|
||||
function processMultistatus(result, isDetailed = false) {
|
||||
// Extract the response items (directory contents)
|
||||
const {
|
||||
|
|
@ -86,6 +90,10 @@ function processMultistatus(result, isDetailed = false) {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value
|
||||
* @param passes
|
||||
*/
|
||||
function decodeHtmlEntities(value, passes = 1) {
|
||||
const parser = new DOMParser()
|
||||
let decoded = value
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import client from './DavClient'
|
|||
* @param {string} commentsType the ressource type
|
||||
* @param {number} ressourceId the ressource ID
|
||||
* @param {string} message the message
|
||||
* @returns {Object} the new comment
|
||||
* @return {object} the new comment
|
||||
*/
|
||||
export default async function(commentsType, ressourceId, message) {
|
||||
const ressourcePath = ['', commentsType, ressourceId].join('/')
|
||||
|
|
|
|||
|
|
@ -24,15 +24,16 @@ 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) {
|
||||
/**
|
||||
|
|
@ -44,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(
|
||||
|
|
|
|||
|
|
@ -126,7 +126,8 @@ export default {
|
|||
methods: {
|
||||
/**
|
||||
* Update current ressourceId and fetch new data
|
||||
* @param {Number} ressourceId the current ressourceId (fileId...)
|
||||
*
|
||||
* @param {number} ressourceId the current ressourceId (fileId...)
|
||||
*/
|
||||
async update(ressourceId) {
|
||||
this.ressourceId = ressourceId
|
||||
|
|
@ -152,8 +153,9 @@ export default {
|
|||
|
||||
/**
|
||||
* Make sure we have all mentions as Array of objects
|
||||
*
|
||||
* @param {Array} mentions the mentions list
|
||||
* @returns {Object[]}
|
||||
* @return {object[]}
|
||||
*/
|
||||
genMentionsData(mentions) {
|
||||
const list = Object.values(mentions).flat()
|
||||
|
|
@ -217,6 +219,7 @@ export default {
|
|||
|
||||
/**
|
||||
* Autocomplete @mentions
|
||||
*
|
||||
* @param {string} search the query
|
||||
* @param {Function} callback the callback to process the results with
|
||||
*/
|
||||
|
|
@ -235,7 +238,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Add newly created comment to the list
|
||||
* @param {Object} comment the new comment
|
||||
*
|
||||
* @param {object} comment the new comment
|
||||
*/
|
||||
onNewComment(comment) {
|
||||
this.comments.unshift(comment)
|
||||
|
|
@ -243,6 +247,7 @@ export default {
|
|||
|
||||
/**
|
||||
* Remove deleted comment from the list
|
||||
*
|
||||
* @param {number} id the deleted comment
|
||||
*/
|
||||
onDelete(id) {
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2016 John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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 path = require('path')
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
comments: path.join(__dirname, 'src', 'comments.js'),
|
||||
'comments-app': path.join(__dirname, 'src', 'comments-app.js'),
|
||||
'comments-tab': path.join(__dirname, 'src', 'comments-tab.js'),
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, './js'),
|
||||
publicPath: '/js/',
|
||||
filename: '[name].js',
|
||||
jsonpFunction: 'webpackJsonpComments',
|
||||
},
|
||||
externals: {
|
||||
jquery: 'jQuery',
|
||||
},
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -94,6 +94,8 @@ class DashboardController extends Controller {
|
|||
*/
|
||||
public function index(): TemplateResponse {
|
||||
\OCP\Util::addStyle('dashboard', 'dashboard');
|
||||
\OCP\Util::addScript('dashboard', 'main');
|
||||
|
||||
$this->eventDispatcher->dispatchTyped(new LoadSidebar());
|
||||
if (class_exists(LoadViewer::class)) {
|
||||
$this->eventDispatcher->dispatchTyped(new LoadViewer());
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ export default {
|
|||
* Method to register panels that will be called by the integrating apps
|
||||
*
|
||||
* @param {string} app The unique app id for the widget
|
||||
* @param {function} callback The callback function to register a panel which gets the DOM element passed as parameter
|
||||
* @param {Function} callback The callback function to register a panel which gets the DOM element passed as parameter
|
||||
*/
|
||||
register(app, callback) {
|
||||
Vue.set(this.callbacks, app, callback)
|
||||
|
|
|
|||
|
|
@ -25,18 +25,19 @@ import App from './App.vue'
|
|||
import { translate as t } from '@nextcloud/l10n'
|
||||
import VTooltip from '@nextcloud/vue/dist/Directives/Tooltip'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_public_path__ = generateFilePath('dashboard', '', 'js/')
|
||||
|
||||
Vue.directive('Tooltip', VTooltip)
|
||||
|
||||
Vue.prototype.t = t
|
||||
|
||||
// FIXME workaround to make the sidebar work
|
||||
if (!window.OCA.Files) {
|
||||
window.OCA.Files = {}
|
||||
}
|
||||
|
||||
Object.assign(window.OCA.Files, { App: { fileList: { filesClient: OC.Files.getClient() } } }, window.OCA.Files)
|
||||
|
||||
const Dashboard = Vue.extend(App)
|
||||
|
|
|
|||
|
|
@ -1,5 +1 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
\OCP\Util::addScript('dashboard', 'dashboard');
|
||||
?>
|
||||
<div id="app-content-vue"></div>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -25,6 +25,9 @@ import { parseXML } from 'webdav/dist/node/tools/dav'
|
|||
import { getZoneString } from 'icalzone'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export function getEmptySlots() {
|
||||
return {
|
||||
MO: [],
|
||||
|
|
@ -37,6 +40,9 @@ export function getEmptySlots() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export async function findScheduleInboxAvailability() {
|
||||
const client = getClient('calendars')
|
||||
|
||||
|
|
@ -101,6 +107,10 @@ export async function findScheduleInboxAvailability() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param slots
|
||||
* @param timezoneId
|
||||
*/
|
||||
export async function saveScheduleInboxAvailability(slots, timezoneId) {
|
||||
const all = [...Object.keys(slots).flatMap(dayId => slots[dayId].map(slot => ({
|
||||
...slot,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ describe('CalDavSettings', () => {
|
|||
global.OCP = originalOCP
|
||||
})
|
||||
|
||||
test('interactions', async() => {
|
||||
test('interactions', async () => {
|
||||
const TLUtils = render(
|
||||
CalDavSettings,
|
||||
{
|
||||
|
|
|
|||
405
apps/files/js/dist/main.js
vendored
405
apps/files/js/dist/main.js
vendored
File diff suppressed because one or more lines are too long
1
apps/files/js/dist/main.js.map
vendored
1
apps/files/js/dist/main.js.map
vendored
File diff suppressed because one or more lines are too long
368
apps/files/js/dist/personal-settings.js
vendored
368
apps/files/js/dist/personal-settings.js
vendored
File diff suppressed because one or more lines are too long
1
apps/files/js/dist/personal-settings.js.map
vendored
1
apps/files/js/dist/personal-settings.js.map
vendored
File diff suppressed because one or more lines are too long
334
apps/files/js/dist/sidebar.js
vendored
334
apps/files/js/dist/sidebar.js
vendored
File diff suppressed because one or more lines are too long
1
apps/files/js/dist/sidebar.js.map
vendored
1
apps/files/js/dist/sidebar.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -196,8 +196,8 @@ class ViewController extends Controller {
|
|||
|
||||
// Load the files we need
|
||||
\OCP\Util::addStyle('files', 'merged');
|
||||
\OCP\Util::addScript('files', 'merged-index');
|
||||
\OCP\Util::addScript('files', 'dist/main');
|
||||
\OCP\Util::addScript('files', 'merged-index', 'files');
|
||||
\OCP\Util::addScript('files', 'main');
|
||||
|
||||
// mostly for the home storage's free space
|
||||
// FIXME: Make non static
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class LoadSidebarListener implements IEventListener {
|
|||
return;
|
||||
}
|
||||
|
||||
Util::addScript(Application::APP_ID, 'dist/sidebar');
|
||||
Util::addScript(Application::APP_ID, 'sidebar');
|
||||
// needed by the Sidebar legacy tabs
|
||||
// TODO: remove when all tabs migrated to the new api
|
||||
Util::addScript('files', 'fileinfomodel');
|
||||
|
|
|
|||
|
|
@ -102,7 +102,8 @@ export default {
|
|||
computed: {
|
||||
/**
|
||||
* Strip away extension from name
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
nameWithoutExt() {
|
||||
return this.basename.indexOf('.') > -1 ? this.basename.split('.').slice(0, -1).join('.') : this.basename
|
||||
|
|
|
|||
|
|
@ -22,39 +22,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
// global t
|
||||
|
||||
/*
|
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
*
|
||||
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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 { getRequestToken } from '@nextcloud/auth'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
|
||||
import PersonalSettings from './components/PersonalSettings'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_public_path__ = generateFilePath('files', '', 'js/')
|
||||
|
||||
Vue.prototype.t = t
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default class Tab {
|
|||
/**
|
||||
* Create a new tab instance
|
||||
*
|
||||
* @param {Object} options destructuring object
|
||||
* @param {object} options destructuring object
|
||||
* @param {string} options.id the unique id of this tab
|
||||
* @param {string} options.name the translated tab name
|
||||
* @param {string} options.icon the vue component
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
import axios from '@nextcloud/axios'
|
||||
|
||||
/**
|
||||
* @param url
|
||||
*/
|
||||
export default async function(url) {
|
||||
const response = await axios({
|
||||
method: 'PROPFIND',
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default class Settings {
|
|||
*
|
||||
* @since 19.0.0
|
||||
* @param {OCA.Files.Settings.Setting} view element to add to settings
|
||||
* @returns {boolean} whether registering was successful
|
||||
* @return {boolean} whether registering was successful
|
||||
*/
|
||||
register(view) {
|
||||
if (this._settings.filter(e => e.name === view.name).length > 0) {
|
||||
|
|
@ -47,7 +47,8 @@ export default class Settings {
|
|||
|
||||
/**
|
||||
* All settings elements
|
||||
* @returns {OCA.Files.Settings.Setting[]} All currently registered settings
|
||||
*
|
||||
* @return {OCA.Files.Settings.Setting[]} All currently registered settings
|
||||
*/
|
||||
get settings() {
|
||||
return this._settings
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export default class Sidebar {
|
|||
*
|
||||
* @readonly
|
||||
* @memberof Sidebar
|
||||
* @returns {Object} the data state
|
||||
* @return {object} the data state
|
||||
*/
|
||||
get state() {
|
||||
return this._state
|
||||
|
|
@ -51,8 +51,8 @@ export default class Sidebar {
|
|||
* Register a new tab view
|
||||
*
|
||||
* @memberof Sidebar
|
||||
* @param {Object} tab a new unregistered tab
|
||||
* @returns {Boolean}
|
||||
* @param {object} tab a new unregistered tab
|
||||
* @return {boolean}
|
||||
*/
|
||||
registerTab(tab) {
|
||||
const hasDuplicate = this._state.tabs.findIndex(check => check.id === tab.id) > -1
|
||||
|
|
@ -78,7 +78,7 @@ export default class Sidebar {
|
|||
* Return current opened file
|
||||
*
|
||||
* @memberof Sidebar
|
||||
* @returns {String} the current opened file
|
||||
* @return {string} the current opened file
|
||||
*/
|
||||
get file() {
|
||||
return this._state.file
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ if (!window.OCA.Files) {
|
|||
Object.assign(window.OCA.Files, { Sidebar: new Sidebar() })
|
||||
Object.assign(window.OCA.Files.Sidebar, { Tab })
|
||||
|
||||
console.debug('OCA.Files.Sidebar initialized')
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
const contentElement = document.querySelector('body > .content')
|
||||
|| document.querySelector('body > #content')
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ export const getToken = function() {
|
|||
|
||||
/**
|
||||
* Return the current directory, fallback to root
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
export const getCurrentDirectory = function() {
|
||||
const currentDirInfo = OCA?.Files?.App?.currentFileList?.dirInfo
|
||||
|
|
|
|||
|
|
@ -34,8 +34,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('/')
|
||||
|
|
|
|||
|
|
@ -121,7 +121,8 @@ export default {
|
|||
* Current filename
|
||||
* This is bound to the Sidebar service and
|
||||
* is used to load a new file
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
file() {
|
||||
return this.Sidebar.file
|
||||
|
|
@ -129,7 +130,8 @@ export default {
|
|||
|
||||
/**
|
||||
* List of all the registered tabs
|
||||
* @returns {Array}
|
||||
*
|
||||
* @return {Array}
|
||||
*/
|
||||
tabs() {
|
||||
return this.Sidebar.tabs
|
||||
|
|
@ -137,7 +139,8 @@ export default {
|
|||
|
||||
/**
|
||||
* List of all the registered views
|
||||
* @returns {Array}
|
||||
*
|
||||
* @return {Array}
|
||||
*/
|
||||
views() {
|
||||
return this.Sidebar.views
|
||||
|
|
@ -145,7 +148,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Current user dav root path
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
davPath() {
|
||||
const user = OC.getCurrentUser().uid
|
||||
|
|
@ -154,8 +158,9 @@ export default {
|
|||
|
||||
/**
|
||||
* Current active tab handler
|
||||
*
|
||||
* @param {string} id the tab id to set as active
|
||||
* @returns {string} the current active tab
|
||||
* @return {string} the current active tab
|
||||
*/
|
||||
activeTab() {
|
||||
return this.Sidebar.activeTab
|
||||
|
|
@ -163,7 +168,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Sidebar subtitle
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
subtitle() {
|
||||
return `${this.size}, ${this.time}`
|
||||
|
|
@ -171,7 +177,8 @@ export default {
|
|||
|
||||
/**
|
||||
* File last modified formatted string
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
time() {
|
||||
return OC.Util.relativeModifiedDate(this.fileInfo.mtime)
|
||||
|
|
@ -179,7 +186,8 @@ export default {
|
|||
|
||||
/**
|
||||
* File last modified full string
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
fullTime() {
|
||||
return moment(this.fileInfo.mtime).format('LLL')
|
||||
|
|
@ -187,7 +195,8 @@ export default {
|
|||
|
||||
/**
|
||||
* File size formatted string
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
size() {
|
||||
return OC.Util.humanFileSize(this.fileInfo.size)
|
||||
|
|
@ -195,7 +204,8 @@ export default {
|
|||
|
||||
/**
|
||||
* File background/figure to illustrate the sidebar header
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
background() {
|
||||
return this.getPreviewIfAny(this.fileInfo)
|
||||
|
|
@ -204,7 +214,7 @@ export default {
|
|||
/**
|
||||
* App sidebar v-binding object
|
||||
*
|
||||
* @returns {Object}
|
||||
* @return {object}
|
||||
*/
|
||||
appSidebar() {
|
||||
if (this.fileInfo) {
|
||||
|
|
@ -243,7 +253,7 @@ export default {
|
|||
/**
|
||||
* Default action object for the current file
|
||||
*
|
||||
* @returns {Object}
|
||||
* @return {object}
|
||||
*/
|
||||
defaultAction() {
|
||||
return this.fileInfo
|
||||
|
|
@ -260,7 +270,7 @@ export default {
|
|||
* nothing is listening for a click if there
|
||||
* is no default action
|
||||
*
|
||||
* @returns {string|null}
|
||||
* @return {string|null}
|
||||
*/
|
||||
defaultActionListener() {
|
||||
return this.defaultAction ? 'figure-click' : null
|
||||
|
|
@ -275,8 +285,8 @@ export default {
|
|||
/**
|
||||
* Can this tab be displayed ?
|
||||
*
|
||||
* @param {Object} tab a registered tab
|
||||
* @returns {boolean}
|
||||
* @param {object} tab a registered tab
|
||||
* @return {boolean}
|
||||
*/
|
||||
canDisplay(tab) {
|
||||
return tab.enabled(this.fileInfo)
|
||||
|
|
@ -302,8 +312,8 @@ export default {
|
|||
* Copied from https://github.com/nextcloud/server/blob/16e0887ec63591113ee3f476e0c5129e20180cde/apps/files/js/filelist.js#L1377
|
||||
* TODO: We also need this as a standalone library
|
||||
*
|
||||
* @param {Object} fileInfo the fileinfo
|
||||
* @returns {string} Url to the icon for mimeType
|
||||
* @param {object} fileInfo the fileinfo
|
||||
* @return {string} Url to the icon for mimeType
|
||||
*/
|
||||
getIconUrl(fileInfo) {
|
||||
const mimeType = fileInfo.mimetype || 'application/octet-stream'
|
||||
|
|
@ -341,7 +351,7 @@ export default {
|
|||
* Toggle favourite state
|
||||
* TODO: better implementation
|
||||
*
|
||||
* @param {Boolean} state favourited or not
|
||||
* @param {boolean} state favourited or not
|
||||
*/
|
||||
async toggleStarred(state) {
|
||||
try {
|
||||
|
|
@ -397,7 +407,7 @@ export default {
|
|||
* Open the sidebar for the given file
|
||||
*
|
||||
* @param {string} path the file path to load
|
||||
* @returns {Promise}
|
||||
* @return {Promise}
|
||||
* @throws {Error} loading failure
|
||||
*/
|
||||
async open(path) {
|
||||
|
|
@ -446,6 +456,7 @@ export default {
|
|||
|
||||
/**
|
||||
* Allow to set the Sidebar as fullscreen from OCA.Files.Sidebar
|
||||
*
|
||||
* @param {boolean} isFullScreen - Wether or not to render the Sidebar in fullscreen.
|
||||
*/
|
||||
setFullScreenMode(isFullScreen) {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,8 @@ export default {
|
|||
computed: {
|
||||
/**
|
||||
* Strip away extension from name
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
nameWithoutExt() {
|
||||
return this.name.indexOf('.') > -1
|
||||
|
|
@ -133,7 +134,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Style css vars bin,d
|
||||
* @returns {Object}
|
||||
*
|
||||
* @return {object}
|
||||
*/
|
||||
style() {
|
||||
return {
|
||||
|
|
@ -149,6 +151,7 @@ export default {
|
|||
methods: {
|
||||
/**
|
||||
* Open the picker
|
||||
*
|
||||
* @param {string} name the file name to create
|
||||
* @param {object} provider the template provider picked
|
||||
*/
|
||||
|
|
@ -188,6 +191,7 @@ export default {
|
|||
|
||||
/**
|
||||
* Manages the radio template picker change
|
||||
*
|
||||
* @param {number} fileid the selected template file id
|
||||
*/
|
||||
onCheck(fileid) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
|
||||
script(\OCA\Files\AppInfo\Application::APP_ID, 'dist/personal-settings');
|
||||
script(\OCA\Files\AppInfo\Application::APP_ID, 'personal-settings');
|
||||
|
||||
?>
|
||||
<div id="files-personal-settings" class="section">
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2016 John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @author Gary Kim <gary@garykim.dev>
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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 path = require('path')
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
main: path.join(__dirname, 'src', 'main.js'),
|
||||
sidebar: path.join(__dirname, 'src', 'sidebar.js'),
|
||||
'personal-settings': path.join(__dirname, 'src', 'main-personal-settings.js'),
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, './js/dist/'),
|
||||
publicPath: '/js/',
|
||||
filename: '[name].js',
|
||||
chunkFilename: 'files.[id].js',
|
||||
},
|
||||
}
|
||||
80
apps/files_sharing/js/dist/additionalScripts.js
vendored
80
apps/files_sharing/js/dist/additionalScripts.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
25
apps/files_sharing/js/dist/collaboration.js
vendored
25
apps/files_sharing/js/dist/collaboration.js
vendored
|
|
@ -1,25 +0,0 @@
|
|||
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/js/",t(t.s=166)}({166:function(e,n,r){
|
||||
/**
|
||||
* @copyright Copyright (c) 2016 John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
r.p=OC.linkTo("files_sharing","js/dist/"),r.nc=btoa(OC.requestToken),window.OCP.Collaboration.registerType("file",{action:()=>new Promise((e,n)=>{OC.dialogs.filepicker(t("files_sharing","Link to a file"),(function(t){OC.Files.getClient().getFileInfo(t).then((n,t)=>{e(t.id)}).fail(()=>{n(new Error("Cannot get fileinfo"))})}),!1,null,!1,OC.dialogs.FILEPICKER_TYPE_CHOOSE,"",{allowDirectoryChooser:!0})}),typeString:t("files_sharing","Link to a file"),typeIconClass:"icon-files-dark"})}});
|
||||
//# sourceMappingURL=collaboration.js.map
|
||||
File diff suppressed because one or more lines are too long
25
apps/files_sharing/js/dist/files_sharing.js
vendored
25
apps/files_sharing/js/dist/files_sharing.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3612
apps/files_sharing/js/dist/files_sharing_tab.js
vendored
3612
apps/files_sharing/js/dist/files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
25
apps/files_sharing/js/dist/main.js
vendored
25
apps/files_sharing/js/dist/main.js
vendored
|
|
@ -1,25 +0,0 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/js/",r(r.s=522)}({522:function(e,t){
|
||||
/**
|
||||
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
Object.assign(OC,{Share:{SHARE_TYPE_USER:0,SHARE_TYPE_GROUP:1,SHARE_TYPE_LINK:3,SHARE_TYPE_EMAIL:4,SHARE_TYPE_REMOTE:6,SHARE_TYPE_CIRCLE:7,SHARE_TYPE_GUEST:8,SHARE_TYPE_REMOTE_GROUP:9,SHARE_TYPE_ROOM:10,SHARE_TYPE_DECK:12}})}});
|
||||
//# sourceMappingURL=main.js.map
|
||||
1
apps/files_sharing/js/dist/main.js.map
vendored
1
apps/files_sharing/js/dist/main.js.map
vendored
File diff suppressed because one or more lines are too long
51
apps/files_sharing/js/dist/personal-settings.js
vendored
51
apps/files_sharing/js/dist/personal-settings.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -113,7 +113,7 @@ class Application extends App implements IBootstrap {
|
|||
/**
|
||||
* Always add main sharing script
|
||||
*/
|
||||
Util::addScript(self::APP_ID, 'dist/main');
|
||||
Util::addScript(self::APP_ID, 'main');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ class Application extends App implements IBootstrap {
|
|||
$dispatcher->addServiceListener(LoadSidebar::class, LoadSidebarListener::class);
|
||||
$dispatcher->addServiceListener(ShareCreatedEvent::class, ShareInteractionListener::class);
|
||||
$dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () {
|
||||
\OCP\Util::addScript('files_sharing', 'dist/collaboration');
|
||||
\OCP\Util::addScript('files_sharing', 'collaboration');
|
||||
});
|
||||
$dispatcher->addServiceListener(ShareCreatedEvent::class, UserShareAcceptanceListener::class);
|
||||
$dispatcher->addServiceListener(UserAddedEvent::class, UserAddedToGroupListener::class);
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ class LoadAdditionalListener implements IEventListener {
|
|||
}
|
||||
|
||||
// After files for the files list shared content
|
||||
Util::addScript(Application::APP_ID, 'dist/files_sharing', 'files');
|
||||
Util::addScript(Application::APP_ID, 'files_sharing', 'files');
|
||||
// After files for the breadcrumb share indicator
|
||||
Util::addScript(Application::APP_ID, 'dist/additionalScripts', 'files');
|
||||
Util::addScript(Application::APP_ID, 'additionalScripts', 'files');
|
||||
Util::addStyle(Application::APP_ID, 'icons');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,6 @@ class LoadSidebarListener implements IEventListener {
|
|||
return;
|
||||
}
|
||||
|
||||
Util::addScript(Application::APP_ID, 'dist/files_sharing_tab', 'files');
|
||||
Util::addScript(Application::APP_ID, 'files_sharing_tab', 'files');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,13 +24,9 @@
|
|||
|
||||
import './share'
|
||||
import './sharebreadcrumbview'
|
||||
|
||||
import './style/sharebreadcrumb.scss'
|
||||
|
||||
import './collaborationresourceshandler.js'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(OC.requestToken)
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(OC.requestToken)
|
||||
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ export default {
|
|||
/**
|
||||
* Can the sharer set whether the sharee can edit the file ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
canSetEdit() {
|
||||
// If the owner revoked the permission after the resharer granted it
|
||||
|
|
@ -244,7 +244,7 @@ export default {
|
|||
/**
|
||||
* Can the sharer set whether the sharee can create the file ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
canSetCreate() {
|
||||
// If the owner revoked the permission after the resharer granted it
|
||||
|
|
@ -256,7 +256,7 @@ export default {
|
|||
/**
|
||||
* Can the sharer set whether the sharee can delete the file ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
canSetDelete() {
|
||||
// If the owner revoked the permission after the resharer granted it
|
||||
|
|
@ -268,7 +268,7 @@ export default {
|
|||
/**
|
||||
* Can the sharer set whether the sharee can reshare the file ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
canSetReshare() {
|
||||
// If the owner revoked the permission after the resharer granted it
|
||||
|
|
@ -337,7 +337,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Is the current share a folder ?
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isFolder() {
|
||||
return this.fileInfo.type === 'dir'
|
||||
|
|
@ -345,7 +346,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Does the current share have an expiration date
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
hasExpirationDate: {
|
||||
get() {
|
||||
|
|
@ -371,7 +373,7 @@ export default {
|
|||
},
|
||||
|
||||
/**
|
||||
* @returns {bool}
|
||||
* @return {bool}
|
||||
*/
|
||||
hasStatus() {
|
||||
if (this.share.type !== this.SHARE_TYPES.SHARE_TYPE_USER) {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ export default {
|
|||
computed: {
|
||||
/**
|
||||
* Get the internal link to this file id
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
internalLink() {
|
||||
return window.location.protocol + '//' + window.location.host + generateUrl('/f/') + this.fileInfo.id
|
||||
|
|
@ -57,7 +58,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Clipboard v-tooltip message
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
clipboardTooltip() {
|
||||
if (this.copied) {
|
||||
|
|
|
|||
|
|
@ -400,7 +400,8 @@ export default {
|
|||
* Return the current share permissions
|
||||
* We always ignore the SHARE permission as this is used for the
|
||||
* federated sharing.
|
||||
* @returns {number}
|
||||
*
|
||||
* @return {number}
|
||||
*/
|
||||
sharePermissions() {
|
||||
return this.share.permissions & ~OC.PERMISSION_SHARE
|
||||
|
|
@ -409,7 +410,8 @@ export default {
|
|||
* Generate a unique random id for this SharingEntryLink only
|
||||
* This allows ActionRadios to have the same name prop
|
||||
* but not to impact others SharingEntryLink
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
randomId() {
|
||||
return Math.random().toString(27).substr(2)
|
||||
|
|
@ -417,7 +419,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Link share label
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
title() {
|
||||
// if we have a valid existing share (not pending)
|
||||
|
|
@ -452,7 +455,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Show the email on a second line if a label is set for mail shares
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
subtitle() {
|
||||
if (this.isEmailShareType
|
||||
|
|
@ -464,7 +468,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Does the current share have an expiration date
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
hasExpirationDate: {
|
||||
get() {
|
||||
|
|
@ -490,7 +495,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Is the current share password protected ?
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isPasswordProtected: {
|
||||
get() {
|
||||
|
|
@ -506,7 +512,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Is Talk enabled?
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isTalkEnabled() {
|
||||
return OC.appswebroots.spreed !== undefined
|
||||
|
|
@ -514,7 +521,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Is it possible to protect the password by Talk?
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isPasswordProtectedByTalkAvailable() {
|
||||
return this.isPasswordProtected && this.isTalkEnabled
|
||||
|
|
@ -522,7 +530,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Is the current share password protected by Talk?
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isPasswordProtectedByTalk: {
|
||||
get() {
|
||||
|
|
@ -535,7 +544,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Is the current share an email share ?
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isEmailShareType() {
|
||||
return this.share
|
||||
|
|
@ -561,7 +571,8 @@ export default {
|
|||
* Pending data.
|
||||
* If the share still doesn't have an id, it is not synced
|
||||
* Therefore this is still not valid and requires user input
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
pendingPassword() {
|
||||
return this.config.enforcePasswordForPublicLink && this.share && !this.share.id
|
||||
|
|
@ -572,7 +583,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Can the recipient edit the file ?
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
canUpdate: {
|
||||
get() {
|
||||
|
|
@ -594,7 +606,8 @@ export default {
|
|||
/**
|
||||
* Is the current share a folder ?
|
||||
* TODO: move to a proper FileInfo model?
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isFolder() {
|
||||
return this.fileInfo.type === 'dir'
|
||||
|
|
@ -603,7 +616,8 @@ export default {
|
|||
/**
|
||||
* Does the current file/folder have create permissions
|
||||
* TODO: move to a proper FileInfo model?
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
fileHasCreatePermission() {
|
||||
return !!(this.fileInfo.permissions & OC.PERMISSION_CREATE)
|
||||
|
|
@ -611,7 +625,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Return the public share link
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
shareLink() {
|
||||
return window.location.protocol + '//' + window.location.host + generateUrl('/s/') + this.share.token
|
||||
|
|
@ -619,7 +634,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Clipboard v-tooltip message
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
clipboardTooltip() {
|
||||
if (this.copied) {
|
||||
|
|
@ -632,8 +648,9 @@ export default {
|
|||
|
||||
/**
|
||||
* External additionnai actions for the menu
|
||||
*
|
||||
* @deprecated use OCA.Sharing.ExternalShareActions
|
||||
* @returns {Array}
|
||||
* @return {Array}
|
||||
*/
|
||||
externalLegacyLinkActions() {
|
||||
return this.ExternalLegacyLinkActions.actions
|
||||
|
|
@ -641,7 +658,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Additional actions for the menu
|
||||
* @returns {Array}
|
||||
*
|
||||
* @return {Array}
|
||||
*/
|
||||
externalLinkActions() {
|
||||
// filter only the registered actions for said link
|
||||
|
|
@ -794,6 +812,7 @@ export default {
|
|||
|
||||
/**
|
||||
* On permissions change
|
||||
*
|
||||
* @param {Event} event js event
|
||||
*/
|
||||
togglePermissions(event) {
|
||||
|
|
@ -804,7 +823,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Label changed, let's save it to a different key
|
||||
* @param {String} label the share label
|
||||
*
|
||||
* @param {string} label the share label
|
||||
*/
|
||||
onLabelChange(label) {
|
||||
this.$set(this.share, 'newLabel', label.trim())
|
||||
|
|
@ -846,6 +866,7 @@ export default {
|
|||
* If both co-exists, the password have changed and
|
||||
* we show it in plain text.
|
||||
* Then on submit (or menu close), we sync it.
|
||||
*
|
||||
* @param {string} password the changed password
|
||||
*/
|
||||
onPasswordChange(password) {
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ export default {
|
|||
* results into the autocomplete dropdown
|
||||
* Used for the guests app
|
||||
*
|
||||
* @returns {Array}
|
||||
* @return {Array}
|
||||
*/
|
||||
externalResults() {
|
||||
return this.ShareSearch.results
|
||||
|
|
@ -321,8 +321,8 @@ export default {
|
|||
* Filter out existing shares from
|
||||
* the provided shares search results
|
||||
*
|
||||
* @param {Object[]} shares the array of shares object
|
||||
* @returns {Object[]}
|
||||
* @param {object[]} shares the array of shares object
|
||||
* @return {object[]}
|
||||
*/
|
||||
filterOutExistingShares(shares) {
|
||||
return shares.reduce((arr, share) => {
|
||||
|
|
@ -376,8 +376,9 @@ export default {
|
|||
|
||||
/**
|
||||
* Get the icon based on the share type
|
||||
*
|
||||
* @param {number} type the share type
|
||||
* @returns {string} the icon class
|
||||
* @return {string} the icon class
|
||||
*/
|
||||
shareTypeToIcon(type) {
|
||||
switch (type) {
|
||||
|
|
@ -406,8 +407,9 @@ export default {
|
|||
|
||||
/**
|
||||
* Format shares for the multiselect options
|
||||
* @param {Object} result select entry item
|
||||
* @returns {Object}
|
||||
*
|
||||
* @param {object} result select entry item
|
||||
* @return {object}
|
||||
*/
|
||||
formatForMultiselect(result) {
|
||||
let subtitle
|
||||
|
|
@ -438,7 +440,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Process the new share request
|
||||
* @param {Object} value the multiselect option
|
||||
*
|
||||
* @param {object} value the multiselect option
|
||||
*/
|
||||
async addShare(value) {
|
||||
if (value.lookup) {
|
||||
|
|
|
|||
|
|
@ -23,9 +23,3 @@
|
|||
|
||||
import '../js/app'
|
||||
import '../js/sharedfilelist'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(OC.requestToken)
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export default {
|
|||
/**
|
||||
* Create a new share
|
||||
*
|
||||
* @param {Object} data destructuring object
|
||||
* @param {object} data destructuring object
|
||||
* @param {string} data.path path to the file/folder which should be shared
|
||||
* @param {number} data.shareType 0 = user; 1 = group; 3 = public link; 6 = federated cloud share
|
||||
* @param {string} data.shareWith user/group id with which the file should be shared (optional for shareType > 1)
|
||||
|
|
@ -50,7 +50,7 @@ export default {
|
|||
* @param {boolean} [data.sendPasswordByTalk=false] send the password via a talk conversation
|
||||
* @param {string} [data.expireDate=''] expire the shareautomatically after
|
||||
* @param {string} [data.label=''] custom label
|
||||
* @returns {Share} the new share
|
||||
* @return {Share} the new share
|
||||
* @throws {Error}
|
||||
*/
|
||||
async createShare({ path, permissions, shareType, shareWith, publicUpload, password, sendPasswordByTalk, expireDate, label }) {
|
||||
|
|
@ -99,7 +99,7 @@ export default {
|
|||
* Update a share
|
||||
*
|
||||
* @param {number} id share id
|
||||
* @param {Object} properties key-value object of the properties to update
|
||||
* @param {object} properties key-value object of the properties to update
|
||||
*/
|
||||
async updateShare(id, properties) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import PQueue from 'p-queue/dist/index'
|
||||
// eslint-disable-next-line import/no-unresolved, node/no-missing-import
|
||||
import PQueue from 'p-queue'
|
||||
// import PQueue from 'p-queue/dist/index'
|
||||
import debounce from 'debounce'
|
||||
|
||||
import Share from '../models/Share'
|
||||
|
|
@ -93,7 +95,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Does the current share have a note
|
||||
* @returns {boolean}
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
hasNote: {
|
||||
get() {
|
||||
|
|
@ -143,7 +146,7 @@ export default {
|
|||
* firing the request
|
||||
*
|
||||
* @param {Share} share the share to check
|
||||
* @returns {Boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
checkShare(share) {
|
||||
if (share.password) {
|
||||
|
|
@ -187,7 +190,8 @@ export default {
|
|||
|
||||
/**
|
||||
* Note changed, let's save it to a different key
|
||||
* @param {String} note the share note
|
||||
*
|
||||
* @param {string} note the share note
|
||||
*/
|
||||
onNoteChange(note) {
|
||||
this.$set(this.share, 'newNote', note.trim())
|
||||
|
|
@ -241,7 +245,7 @@ export default {
|
|||
// share api controller accepts
|
||||
propertyNames.map(p => (properties[p] = this.share[p].toString()))
|
||||
|
||||
this.updateQueue.add(async() => {
|
||||
this.updateQueue.add(async () => {
|
||||
this.saving = true
|
||||
this.errors = {}
|
||||
try {
|
||||
|
|
@ -270,6 +274,7 @@ export default {
|
|||
|
||||
/**
|
||||
* Manage sync errors
|
||||
*
|
||||
* @param {string} property the errored property, e.g. 'password'
|
||||
* @param {string} message the error message
|
||||
*/
|
||||
|
|
@ -321,8 +326,9 @@ export default {
|
|||
|
||||
/**
|
||||
* Returns which dates are disabled for the datepicker
|
||||
*
|
||||
* @param {Date} date date to check
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
disabledDate(date) {
|
||||
const dateMoment = moment(date)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export default class Share {
|
|||
/**
|
||||
* Create the share object
|
||||
*
|
||||
* @param {Object} ocsData ocs request response
|
||||
* @param {object} ocsData ocs request response
|
||||
*/
|
||||
constructor(ocsData) {
|
||||
if (ocsData.ocs && ocsData.ocs.data && ocsData.ocs.data[0]) {
|
||||
|
|
@ -54,7 +54,7 @@ export default class Share {
|
|||
* inject its watchers into the #share
|
||||
* state and make the whole class reactive
|
||||
*
|
||||
* @returns {Object} the share raw state
|
||||
* @return {object} the share raw state
|
||||
* @readonly
|
||||
* @memberof Sidebar
|
||||
*/
|
||||
|
|
@ -65,7 +65,7 @@ export default class Share {
|
|||
/**
|
||||
* get the share id
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -76,7 +76,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the share type
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -88,7 +88,7 @@ export default class Share {
|
|||
* Get the share permissions
|
||||
* See OC.PERMISSION_* variables
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -111,7 +111,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the share owner uid
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -122,7 +122,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the share owner's display name
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -134,7 +134,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the share with entity uid
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -146,7 +146,7 @@ export default class Share {
|
|||
* Get the share with entity display name
|
||||
* fallback to its uid if none
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -159,7 +159,7 @@ export default class Share {
|
|||
* Unique display name in case of multiple
|
||||
* duplicates results with the same name.
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -171,7 +171,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the share with entity link
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -182,7 +182,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the share with avatar if any
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -194,7 +194,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the shared item owner uid
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -206,7 +206,7 @@ export default class Share {
|
|||
* Get the shared item display name
|
||||
* fallback to its uid if none
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -219,7 +219,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the share creation timestamp
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -230,7 +230,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the expiration date as a string format
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -253,7 +253,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the public share token
|
||||
*
|
||||
* @returns {string} the token
|
||||
* @return {string} the token
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -264,7 +264,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the share note if any
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -286,7 +286,7 @@ export default class Share {
|
|||
* Get the share label if any
|
||||
* Should only exist on link shares
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -308,7 +308,7 @@ export default class Share {
|
|||
/**
|
||||
* Have a mail been sent
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -319,7 +319,7 @@ export default class Share {
|
|||
/**
|
||||
* Hide the download button on public page
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -340,7 +340,7 @@ export default class Share {
|
|||
/**
|
||||
* Password protection of the share
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -361,7 +361,7 @@ export default class Share {
|
|||
/**
|
||||
* Password protection by Talk of the share
|
||||
*
|
||||
* @returns {Boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -372,7 +372,7 @@ export default class Share {
|
|||
/**
|
||||
* Password protection by Talk of the share
|
||||
*
|
||||
* @param {Boolean} sendPasswordByTalk whether to send the password by Talk
|
||||
* @param {boolean} sendPasswordByTalk whether to send the password by Talk
|
||||
* or not
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -384,7 +384,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the shared item absolute full path
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -395,7 +395,7 @@ export default class Share {
|
|||
/**
|
||||
* Return the item type: file or folder
|
||||
*
|
||||
* @returns {string} 'folder' or 'file'
|
||||
* @return {string} 'folder' or 'file'
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -406,7 +406,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the shared item mimetype
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -417,7 +417,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the shared item id
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -430,7 +430,7 @@ export default class Share {
|
|||
* e.g the file /xxx/aaa will be shared in
|
||||
* the receiving root as /aaa, the fileTarget is /aaa
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -441,7 +441,7 @@ export default class Share {
|
|||
/**
|
||||
* Get the parent folder id if any
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -454,7 +454,7 @@ export default class Share {
|
|||
/**
|
||||
* Does this share have READ permissions
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -465,7 +465,7 @@ export default class Share {
|
|||
/**
|
||||
* Does this share have CREATE permissions
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -476,7 +476,7 @@ export default class Share {
|
|||
/**
|
||||
* Does this share have DELETE permissions
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -487,7 +487,7 @@ export default class Share {
|
|||
/**
|
||||
* Does this share have UPDATE permissions
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -498,7 +498,7 @@ export default class Share {
|
|||
/**
|
||||
* Does this share have SHARE permissions
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -512,7 +512,7 @@ export default class Share {
|
|||
/**
|
||||
* Can the current user EDIT this share ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -523,7 +523,7 @@ export default class Share {
|
|||
/**
|
||||
* Can the current user DELETE this share ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -533,7 +533,8 @@ export default class Share {
|
|||
|
||||
/**
|
||||
* Top level accessible shared folder fileid for the current user
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
@ -543,7 +544,8 @@ export default class Share {
|
|||
|
||||
/**
|
||||
* Top level accessible shared folder path for the current user
|
||||
* @returns {string}
|
||||
*
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Share
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,39 +21,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
// global t
|
||||
|
||||
/*
|
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
*
|
||||
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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 { getRequestToken } from '@nextcloud/auth'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
|
||||
import PersonalSettings from './components/PersonalSettings'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_public_path__ = generateFilePath('files', '', 'js/')
|
||||
|
||||
Vue.prototype.t = t
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export default class Config {
|
|||
/**
|
||||
* Is public upload allowed on link shares ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -39,7 +39,7 @@ export default class Config {
|
|||
/**
|
||||
* Are link share allowed ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -51,7 +51,7 @@ export default class Config {
|
|||
/**
|
||||
* Get the federated sharing documentation link
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -62,7 +62,7 @@ export default class Config {
|
|||
/**
|
||||
* Get the default link share expiration date as string
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -80,7 +80,7 @@ export default class Config {
|
|||
/**
|
||||
* Get the default internal expiration date as string
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -98,7 +98,7 @@ export default class Config {
|
|||
/**
|
||||
* Get the default remote expiration date as string
|
||||
*
|
||||
* @returns {string}
|
||||
* @return {string}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -116,7 +116,7 @@ export default class Config {
|
|||
/**
|
||||
* Are link shares password-enforced ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -127,7 +127,7 @@ export default class Config {
|
|||
/**
|
||||
* Is password asked by default on link shares ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -138,7 +138,7 @@ export default class Config {
|
|||
/**
|
||||
* Is link shares expiration enforced ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -149,7 +149,7 @@ export default class Config {
|
|||
/**
|
||||
* Is there a default expiration date for new link shares ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -160,7 +160,7 @@ export default class Config {
|
|||
/**
|
||||
* Is internal shares expiration enforced ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -171,7 +171,7 @@ export default class Config {
|
|||
/**
|
||||
* Is remote shares expiration enforced ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -182,7 +182,7 @@ export default class Config {
|
|||
/**
|
||||
* Is there a default expiration date for new internal shares ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -193,7 +193,7 @@ export default class Config {
|
|||
/**
|
||||
* Are users on this server allowed to send shares to other servers ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -204,7 +204,7 @@ export default class Config {
|
|||
/**
|
||||
* Is sharing my mail (link share) enabled ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -219,7 +219,7 @@ export default class Config {
|
|||
/**
|
||||
* Get the default days to link shares expiration
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -230,7 +230,7 @@ export default class Config {
|
|||
/**
|
||||
* Get the default days to internal shares expiration
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -241,7 +241,7 @@ export default class Config {
|
|||
/**
|
||||
* Get the default days to remote shares expiration
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -252,7 +252,7 @@ export default class Config {
|
|||
/**
|
||||
* Is resharing allowed ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -263,7 +263,7 @@ export default class Config {
|
|||
/**
|
||||
* Is password enforced for mail shares ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -272,7 +272,7 @@ export default class Config {
|
|||
}
|
||||
|
||||
/**
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -283,7 +283,7 @@ export default class Config {
|
|||
/**
|
||||
* Is sharing with groups allowed ?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -294,7 +294,7 @@ export default class Config {
|
|||
/**
|
||||
* Get the maximum results of a share search
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -306,7 +306,7 @@ export default class Config {
|
|||
* Get the minimal string length
|
||||
* to initiate a share search
|
||||
*
|
||||
* @returns {int}
|
||||
* @return {int}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
@ -317,7 +317,7 @@ export default class Config {
|
|||
/**
|
||||
* Get the password policy config
|
||||
*
|
||||
* @returns {Object}
|
||||
* @return {object}
|
||||
* @readonly
|
||||
* @memberof Config
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default class ExternalLinkActions {
|
|||
*
|
||||
* @readonly
|
||||
* @memberof ExternalLinkActions
|
||||
* @returns {Object} the data state
|
||||
* @return {object} the data state
|
||||
*/
|
||||
get state() {
|
||||
return this._state
|
||||
|
|
@ -48,8 +48,8 @@ export default class ExternalLinkActions {
|
|||
* Register a new action for the link share
|
||||
* Mostly used by the social sharing app.
|
||||
*
|
||||
* @param {Object} action new action component to register
|
||||
* @returns {boolean}
|
||||
* @param {object} action new action component to register
|
||||
* @return {boolean}
|
||||
*/
|
||||
registerAction(action) {
|
||||
console.warn('OCA.Sharing.ExternalLinkActions is deprecated, use OCA.Sharing.ExternalShareAction instead')
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default class ExternalShareActions {
|
|||
*
|
||||
* @readonly
|
||||
* @memberof ExternalLinkActions
|
||||
* @returns {Object} the data state
|
||||
* @return {object} the data state
|
||||
*/
|
||||
get state() {
|
||||
return this._state
|
||||
|
|
@ -47,12 +47,12 @@ export default class ExternalShareActions {
|
|||
/**
|
||||
* Register a new option/entry for the a given share type
|
||||
*
|
||||
* @param {Object} action new action component to register
|
||||
* @param {object} action new action component to register
|
||||
* @param {string} action.id unique action id
|
||||
* @param {Function} action.data data to bind the component to
|
||||
* @param {Array} action.shareType list of OC.Share.SHARE_XXX to be mounted on
|
||||
* @param {Object} action.handlers list of listeners
|
||||
* @returns {boolean}
|
||||
* @param {object} action.handlers list of listeners
|
||||
* @return {boolean}
|
||||
*/
|
||||
registerAction(action) {
|
||||
// Validate action
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default class ShareSearch {
|
|||
*
|
||||
* @readonly
|
||||
* @memberof ShareSearch
|
||||
* @returns {Object} the data state
|
||||
* @return {object} the data state
|
||||
*/
|
||||
get state() {
|
||||
return this._state
|
||||
|
|
@ -49,14 +49,14 @@ export default class ShareSearch {
|
|||
* Mostly used by the guests app.
|
||||
* We should consider deprecation and add results via php ?
|
||||
*
|
||||
* @param {Object} result entry to append
|
||||
* @param {object} result entry to append
|
||||
* @param {string} [result.user] entry user
|
||||
* @param {string} result.displayName entry first line
|
||||
* @param {string} [result.desc] entry second line
|
||||
* @param {string} [result.icon] entry icon
|
||||
* @param {function} result.handler function to run on entry selection
|
||||
* @param {function} [result.condition] condition to add entry or not
|
||||
* @returns {boolean}
|
||||
* @param {Function} result.handler function to run on entry selection
|
||||
* @param {Function} [result.condition] condition to add entry or not
|
||||
* @return {boolean}
|
||||
*/
|
||||
addNewResult(result) {
|
||||
if (result.displayName.trim() !== ''
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const passwordSet = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789'
|
|||
* request a valid password if password_policy
|
||||
* is enabled
|
||||
*
|
||||
* @returns {string} a valid password
|
||||
* @return {string} a valid password
|
||||
*/
|
||||
export default async function() {
|
||||
// password policy is enabled, let's request a pass
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ export default {
|
|||
* Using this to still show the `new link share`
|
||||
* button regardless of mail shares
|
||||
*
|
||||
* @returns {Array}
|
||||
* @return {Array}
|
||||
*/
|
||||
hasLinkShares() {
|
||||
return this.shares.filter(share => share.type === this.SHARE_TYPES.SHARE_TYPE_LINK).length > 0
|
||||
|
|
@ -96,7 +96,7 @@ export default {
|
|||
/**
|
||||
* Do we have any link or email shares?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
hasShares() {
|
||||
return this.shares.length > 0
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ export default {
|
|||
/**
|
||||
* Is this share shared with me?
|
||||
*
|
||||
* @returns {boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
isSharedWithMe() {
|
||||
return Object.keys(this.sharedWithMe).length > 0
|
||||
|
|
@ -159,7 +159,8 @@ export default {
|
|||
methods: {
|
||||
/**
|
||||
* Update current fileInfo and fetch new data
|
||||
* @param {Object} fileInfo the current file FileInfo
|
||||
*
|
||||
* @param {object} fileInfo the current file FileInfo
|
||||
*/
|
||||
async update(fileInfo) {
|
||||
this.fileInfo = fileInfo
|
||||
|
|
@ -246,8 +247,8 @@ export default {
|
|||
* Process the current shares data
|
||||
* and init shares[]
|
||||
*
|
||||
* @param {Object} share the share ocs api request data
|
||||
* @param {Object} share.data the request data
|
||||
* @param {object} share the share ocs api request data
|
||||
* @param {object} share.data the request data
|
||||
*/
|
||||
processShares({ data }) {
|
||||
if (data.ocs && data.ocs.data && data.ocs.data.length > 0) {
|
||||
|
|
@ -268,8 +269,8 @@ export default {
|
|||
* Process the sharedWithMe share data
|
||||
* and init sharedWithMe
|
||||
*
|
||||
* @param {Object} share the share ocs api request data
|
||||
* @param {Object} share.data the request data
|
||||
* @param {object} share the share ocs api request data
|
||||
* @param {object} share.data the request data
|
||||
*/
|
||||
processSharedWithMe({ data }) {
|
||||
if (data.ocs && data.ocs.data && data.ocs.data[0]) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ declare(strict_types=1);
|
|||
*
|
||||
*/
|
||||
|
||||
script(\OCA\Files_Sharing\AppInfo\Application::APP_ID, 'dist/personal-settings');
|
||||
script(\OCA\Files_Sharing\AppInfo\Application::APP_ID, 'personal-settings');
|
||||
|
||||
?>
|
||||
<div id="files-sharing-personal-settings" class="section">
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2016 John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* 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 path = require('path')
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
additionalScripts: path.join(__dirname, 'src', 'additionalScripts.js'),
|
||||
collaboration: path.join(__dirname, 'src', 'collaborationresourceshandler.js'),
|
||||
files_sharing_tab: path.join(__dirname, 'src', 'files_sharing_tab.js'),
|
||||
files_sharing: path.join(__dirname, 'src', 'files_sharing.js'),
|
||||
main: path.join(__dirname, 'src', 'index.js'),
|
||||
'personal-settings': path.join(__dirname, 'src', 'personal-settings.js'),
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, './js/dist/'),
|
||||
publicPath: '/js/',
|
||||
filename: '[name].js',
|
||||
chunkFilename: 'files_sharing.[id].js?v=[chunkhash]',
|
||||
jsonpFunction: 'webpackJsonpFilesSharing',
|
||||
},
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -31,7 +31,7 @@
|
|||
sync: OC.Backbone.davSync,
|
||||
|
||||
/**
|
||||
* @var OCA.Files.FileInfoModel
|
||||
* @member OCA.Files.FileInfoModel
|
||||
*/
|
||||
_fileInfo: null,
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
/**
|
||||
* Restores the original file to this revision
|
||||
*
|
||||
* @param {Object} [options] options
|
||||
* @returns {Promise}
|
||||
* @param {object} [options] options
|
||||
* @return {Promise}
|
||||
*/
|
||||
revert(options) {
|
||||
options = options ? _.clone(options) : {}
|
||||
|
|
|
|||
|
|
@ -213,8 +213,9 @@ import Template from './templates/template.handlebars';
|
|||
|
||||
/**
|
||||
* Returns true for files, false for folders.
|
||||
*
|
||||
* @param {FileInfo} fileInfo fileInfo
|
||||
* @returns {bool} true for files, false for folders
|
||||
* @return {bool} true for files, false for folders
|
||||
*/
|
||||
canDisplay(fileInfo) {
|
||||
if (!fileInfo) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue