Merge pull request #26160 from nextcloud/enh/eslint
This commit is contained in:
commit
f1fefd91df
|
@ -0,0 +1,11 @@
|
|||
# Ignoring folders for eslint
|
||||
node_modules/
|
||||
3rdparty/
|
||||
**/vendor/
|
||||
**/l10n/
|
||||
**/js/*
|
||||
*.config.js
|
||||
tests/lib/
|
||||
|
||||
# TODO: remove when comments files is not using handlebar templates anymore
|
||||
apps/comments/src/templates.js
|
|
@ -38,3 +38,25 @@ jobs:
|
|||
composer run cs:check -- --format=checkstyle | cs2pr
|
||||
composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
|
||||
shell: bash
|
||||
|
||||
node:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
name: eslint node${{ matrix.node-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up node ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
|
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,2 +1,24 @@
|
|||
!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=751)}({751:function(e,n){function r(e,n,t,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void t(e)}c.done?n(a):Promise.resolve(a).then(r,o)}var o=null,i=new OCA.Files.Sidebar.Tab({id:"comments",name:t("comments","Comments"),icon:"icon-comment",mount:function(e,n,t){return(i=regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o&&o.$destroy(),o=new OCA.Comments.View("files",{parent:t}),r.next=4,o.update(n.id);case 4:o.$mount(e);case 5:case"end":return r.stop()}}),r)})),function(){var e=this,n=arguments;return new Promise((function(t,o){var u=i.apply(e,n);function c(e){r(u,t,o,c,a,"next",e)}function a(e){r(u,t,o,c,a,"throw",e)}c(void 0)}))})();var i},update:function(e){o.update(e.id)},destroy:function(){o.$destroy(),o=null},scrollBottomReached:function(){o.onScrollBottomReached()}});window.addEventListener("DOMContentLoaded",(function(){OCA.Files&&OCA.Files.Sidebar&&OCA.Files.Sidebar.registerTab(i)}))}});
|
||||
!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=751)}({751:function(e,n){function r(e,n,t,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void t(e)}c.done?n(a):Promise.resolve(a).then(r,o)}
|
||||
/**
|
||||
* @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/>.
|
||||
*
|
||||
*/
|
||||
var o=null,i=new OCA.Files.Sidebar.Tab({id:"comments",name:t("comments","Comments"),icon:"icon-comment",mount:function(e,n,t){return(i=regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o&&o.$destroy(),o=new OCA.Comments.View("files",{parent:t}),r.next=4,o.update(n.id);case 4:o.$mount(e);case 5:case"end":return r.stop()}}),r)})),function(){var e=this,n=arguments;return new Promise((function(t,o){var u=i.apply(e,n);function c(e){r(u,t,o,c,a,"next",e)}function a(e){r(u,t,o,c,a,"throw",e)}c(void 0)}))})();var i},update:function(e){o.update(e.id)},destroy:function(){o.$destroy(),o=null},scrollBottomReached:function(){o.onScrollBottomReached()}});window.addEventListener("DOMContentLoaded",(function(){OCA.Files&&OCA.Files.Sidebar&&OCA.Files.Sidebar.registerTab(i)}))}});
|
||||
//# sourceMappingURL=comments-tab.js.map
|
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,123 +1,17 @@
|
|||
(function() {
|
||||
var template = Handlebars.template, templates = OCA.Comments.Templates = OCA.Comments.Templates || {};
|
||||
templates['comment'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
return " unread";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
return " collapsed";
|
||||
},"5":function(container,depth0,helpers,partials,data) {
|
||||
return " currentUser";
|
||||
},"7":function(container,depth0,helpers,partials,data) {
|
||||
var helper;
|
||||
|
||||
return "data-username=\""
|
||||
+ container.escapeExpression(((helper = (helper = helpers.actorId || (depth0 != null ? depth0.actorId : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"actorId","hash":{},"data":data}) : helper)))
|
||||
+ "\"";
|
||||
},"9":function(container,depth0,helpers,partials,data) {
|
||||
return " <a href=\"#\" class=\"action more icon icon-more has-tooltip\"></a>\n <div class=\"deleteLoading icon-loading-small hidden\"></div>\n";
|
||||
},"11":function(container,depth0,helpers,partials,data) {
|
||||
return " <div class=\"message-overlay\"></div>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
|
||||
|
||||
return "<li class=\"comment"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isUnread : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLong : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\" data-id=\""
|
||||
+ alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ "\">\n <div class=\"authorRow\">\n <div class=\"avatar"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\" "
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.actorId : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "> </div>\n <div class=\"author"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\">"
|
||||
+ alias4(((helper = (helper = helpers.actorDisplayName || (depth0 != null ? depth0.actorDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"actorDisplayName","hash":{},"data":data}) : helper)))
|
||||
+ "</div>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " <div class=\"date has-tooltip live-relative-timestamp\" data-timestamp=\""
|
||||
+ alias4(((helper = (helper = helpers.timestamp || (depth0 != null ? depth0.timestamp : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"timestamp","hash":{},"data":data}) : helper)))
|
||||
+ "\" title=\""
|
||||
+ alias4(((helper = (helper = helpers.altDate || (depth0 != null ? depth0.altDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"altDate","hash":{},"data":data}) : helper)))
|
||||
+ "\">"
|
||||
+ alias4(((helper = (helper = helpers.date || (depth0 != null ? depth0.date : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"date","hash":{},"data":data}) : helper)))
|
||||
+ "</div>\n </div>\n <div class=\"message\">"
|
||||
+ ((stack1 = ((helper = (helper = helpers.formattedMessage || (depth0 != null ? depth0.formattedMessage : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"formattedMessage","hash":{},"data":data}) : helper))) != null ? stack1 : "")
|
||||
+ "</div>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLong : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "</li>\n";
|
||||
},"useData":true});
|
||||
templates['commentsmodifymenu'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
|
||||
|
||||
return " <li>\n <a href=\"#\" class=\"menuitem action "
|
||||
+ alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper)))
|
||||
+ " permanent\" data-action=\""
|
||||
+ alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper)))
|
||||
+ "\">\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.iconClass : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ " <span>"
|
||||
+ alias4(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"displayName","hash":{},"data":data}) : helper)))
|
||||
+ "</span>\n </a>\n </li>\n";
|
||||
},"2":function(container,depth0,helpers,partials,data) {
|
||||
var helper;
|
||||
|
||||
return " <span class=\"icon "
|
||||
+ container.escapeExpression(((helper = (helper = helpers.iconClass || (depth0 != null ? depth0.iconClass : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"iconClass","hash":{},"data":data}) : helper)))
|
||||
+ "\"></span>\n";
|
||||
},"4":function(container,depth0,helpers,partials,data) {
|
||||
return " <span class=\"no-icon\"></span>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return "<ul>\n"
|
||||
+ ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.items : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "</ul>\n";
|
||||
},"useData":true});
|
||||
templates['edit_comment'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var helper;
|
||||
|
||||
return " <div class=\"action-container\">\n <a href=\"#\" class=\"action cancel icon icon-close has-tooltip\" title=\""
|
||||
+ container.escapeExpression(((helper = (helper = helpers.cancelText || (depth0 != null ? depth0.cancelText : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"cancelText","hash":{},"data":data}) : helper)))
|
||||
+ "\"></a>\n </div>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
|
||||
|
||||
return "<"
|
||||
+ alias4(((helper = (helper = helpers.tag || (depth0 != null ? depth0.tag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"tag","hash":{},"data":data}) : helper)))
|
||||
+ " class=\"newCommentRow comment\" data-id=\""
|
||||
+ alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ "\">\n <div class=\"authorRow\">\n <div class=\"avatar currentUser\" data-username=\""
|
||||
+ alias4(((helper = (helper = helpers.actorId || (depth0 != null ? depth0.actorId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"actorId","hash":{},"data":data}) : helper)))
|
||||
+ "\"></div>\n <div class=\"author currentUser\">"
|
||||
+ alias4(((helper = (helper = helpers.actorDisplayName || (depth0 != null ? depth0.actorDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"actorDisplayName","hash":{},"data":data}) : helper)))
|
||||
+ "</div>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isEditMode : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </div>\n <form class=\"newCommentForm\">\n <div contentEditable=\"true\" class=\"message\" data-placeholder=\""
|
||||
+ alias4(((helper = (helper = helpers.newMessagePlaceholder || (depth0 != null ? depth0.newMessagePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"newMessagePlaceholder","hash":{},"data":data}) : helper)))
|
||||
+ "\">"
|
||||
+ alias4(((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"message","hash":{},"data":data}) : helper)))
|
||||
+ "</div>\n <input class=\"submit icon-confirm has-tooltip\" type=\"submit\" value=\"\" title=\""
|
||||
+ alias4(((helper = (helper = helpers.submitText || (depth0 != null ? depth0.submitText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"submitText","hash":{},"data":data}) : helper)))
|
||||
+ "\"/>\n <div class=\"submitLoading icon-loading-small hidden\"></div>\n </form>\n</"
|
||||
+ alias4(((helper = (helper = helpers.tag || (depth0 != null ? depth0.tag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"tag","hash":{},"data":data}) : helper)))
|
||||
+ ">\n";
|
||||
},"useData":true});
|
||||
templates['filesplugin'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
|
||||
templates['filesplugin'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
||||
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
||||
return parent[propertyName];
|
||||
}
|
||||
return undefined
|
||||
};
|
||||
|
||||
return "<a class=\"action action-comment permanent\" title=\""
|
||||
+ alias4(((helper = (helper = helpers.countMessage || (depth0 != null ? depth0.countMessage : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"countMessage","hash":{},"data":data}) : helper)))
|
||||
+ alias4(((helper = (helper = lookupProperty(helpers,"countMessage") || (depth0 != null ? lookupProperty(depth0,"countMessage") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"countMessage","hash":{},"data":data,"loc":{"start":{"line":1,"column":50},"end":{"line":1,"column":66}}}) : helper)))
|
||||
+ "\" href=\"#\">\n <img class=\"svg\" src=\""
|
||||
+ alias4(((helper = (helper = helpers.iconUrl || (depth0 != null ? depth0.iconUrl : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"iconUrl","hash":{},"data":data}) : helper)))
|
||||
+ alias4(((helper = (helper = lookupProperty(helpers,"iconUrl") || (depth0 != null ? lookupProperty(depth0,"iconUrl") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"iconUrl","hash":{},"data":data,"loc":{"start":{"line":2,"column":23},"end":{"line":2,"column":34}}}) : helper)))
|
||||
+ "\"/>\n</a>\n";
|
||||
},"useData":true});
|
||||
templates['view'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
|
||||
|
||||
return "<ul class=\"comments\">\n</ul>\n<div class=\"emptycontent hidden\"><div class=\"icon-comment\"></div>\n <p>"
|
||||
+ alias4(((helper = (helper = helpers.emptyResultLabel || (depth0 != null ? depth0.emptyResultLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"emptyResultLabel","hash":{},"data":data}) : helper)))
|
||||
+ "</p></div>\n<input type=\"button\" class=\"showMore hidden\" value=\""
|
||||
+ alias4(((helper = (helper = helpers.moreLabel || (depth0 != null ? depth0.moreLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"moreLabel","hash":{},"data":data}) : helper)))
|
||||
+ "\" name=\"show-more\" id=\"show-more\" />\n<div class=\"loading hidden\" style=\"height: 50px\"></div>\n";
|
||||
},"useData":true});
|
||||
})();
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,6 @@ module.exports = {
|
|||
path: path.resolve(__dirname, './js'),
|
||||
publicPath: '/js/',
|
||||
filename: 'dashboard.js',
|
||||
jsonpFunction: 'webpackJsonpDashboard'
|
||||
}
|
||||
jsonpFunction: 'webpackJsonpDashboard',
|
||||
},
|
||||
}
|
||||
|
|
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,6 @@ import axios from '@nextcloud/axios'
|
|||
import Vue from 'vue'
|
||||
|
||||
import TemplatePickerView from './views/TemplatePicker'
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
|
||||
// Set up logger
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const path = require('path');
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
|
@ -11,6 +11,6 @@ module.exports = {
|
|||
path: path.resolve(__dirname, './js/dist/'),
|
||||
publicPath: '/js/',
|
||||
filename: '[name].js',
|
||||
chunkFilename: 'files.[id].js'
|
||||
}
|
||||
chunkFilename: 'files.[id].js',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -20,80 +20,80 @@
|
|||
*/
|
||||
|
||||
describe('OCA.Files_External.App tests', function() {
|
||||
var App = OCA.Files_External.App;
|
||||
var fileList;
|
||||
const App = OCA.Files_External.App
|
||||
let fileList
|
||||
|
||||
beforeEach(function() {
|
||||
$('#testArea').append(
|
||||
'<div id="app-navigation">' +
|
||||
'<ul><li data-id="files"><a>Files</a></li>' +
|
||||
'<li data-id="sharingin"><a></a></li>' +
|
||||
'<li data-id="sharingout"><a></a></li>' +
|
||||
'</ul></div>' +
|
||||
'<div id="app-content">' +
|
||||
'<div id="app-content-files" class="hidden">' +
|
||||
'</div>' +
|
||||
'<div id="app-content-extstoragemounts" class="hidden">' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>'
|
||||
);
|
||||
fileList = App.initList($('#app-content-extstoragemounts'));
|
||||
});
|
||||
'<div id="app-navigation">'
|
||||
+ '<ul><li data-id="files"><a>Files</a></li>'
|
||||
+ '<li data-id="sharingin"><a></a></li>'
|
||||
+ '<li data-id="sharingout"><a></a></li>'
|
||||
+ '</ul></div>'
|
||||
+ '<div id="app-content">'
|
||||
+ '<div id="app-content-files" class="hidden">'
|
||||
+ '</div>'
|
||||
+ '<div id="app-content-extstoragemounts" class="hidden">'
|
||||
+ '</div>'
|
||||
+ '</div>'
|
||||
+ '</div>'
|
||||
)
|
||||
fileList = App.initList($('#app-content-extstoragemounts'))
|
||||
})
|
||||
afterEach(function() {
|
||||
App.fileList = null;
|
||||
fileList.destroy();
|
||||
fileList = null;
|
||||
});
|
||||
App.fileList = null
|
||||
fileList.destroy()
|
||||
fileList = null
|
||||
})
|
||||
|
||||
describe('initialization', function() {
|
||||
it('inits external mounts list on show', function() {
|
||||
expect(App.fileList).toBeDefined();
|
||||
});
|
||||
});
|
||||
expect(App.fileList).toBeDefined()
|
||||
})
|
||||
})
|
||||
describe('file actions', function() {
|
||||
it('provides default file actions', function() {
|
||||
var fileActions = fileList.fileActions;
|
||||
const fileActions = fileList.fileActions
|
||||
|
||||
expect(fileActions.actions.all).toBeDefined();
|
||||
expect(fileActions.actions.all.Delete).toBeDefined();
|
||||
expect(fileActions.actions.all.Rename).toBeDefined();
|
||||
expect(fileActions.actions.all.Download).toBeDefined();
|
||||
expect(fileActions.actions.all).toBeDefined()
|
||||
expect(fileActions.actions.all.Delete).toBeDefined()
|
||||
expect(fileActions.actions.all.Rename).toBeDefined()
|
||||
expect(fileActions.actions.all.Download).toBeDefined()
|
||||
|
||||
expect(fileActions.defaults.dir).toEqual('Open');
|
||||
});
|
||||
expect(fileActions.defaults.dir).toEqual('Open')
|
||||
})
|
||||
it('redirects to files app when opening a directory', function() {
|
||||
var oldList = OCA.Files.App.fileList;
|
||||
const oldList = OCA.Files.App.fileList
|
||||
// dummy new list to make sure it exists
|
||||
OCA.Files.App.fileList = new OCA.Files.FileList($('<table><thead></thead><tbody></tbody></table>'));
|
||||
OCA.Files.App.fileList = new OCA.Files.FileList($('<table><thead></thead><tbody></tbody></table>'))
|
||||
|
||||
var setActiveViewStub = sinon.stub(OCA.Files.App, 'setActiveView');
|
||||
const setActiveViewStub = sinon.stub(OCA.Files.App, 'setActiveView')
|
||||
// create dummy table so we can click the dom
|
||||
var $table = '<table><thead></thead><tbody id="fileList"></tbody></table>';
|
||||
$('#app-content-extstoragemounts').append($table);
|
||||
const $table = '<table><thead></thead><tbody id="fileList"></tbody></table>'
|
||||
$('#app-content-extstoragemounts').append($table)
|
||||
|
||||
App._inFileList = null;
|
||||
fileList = App.initList($('#app-content-extstoragemounts'));
|
||||
App._inFileList = null
|
||||
fileList = App.initList($('#app-content-extstoragemounts'))
|
||||
|
||||
fileList.setFiles([{
|
||||
name: 'testdir',
|
||||
type: 'dir',
|
||||
path: '/somewhere/inside/subdir',
|
||||
counterParts: ['user2'],
|
||||
shareOwner: 'user2'
|
||||
}]);
|
||||
shareOwner: 'user2',
|
||||
}])
|
||||
|
||||
fileList.findFileEl('testdir').find('td a.name').click();
|
||||
fileList.findFileEl('testdir').find('td a.name').click()
|
||||
|
||||
expect(OCA.Files.App.fileList.getCurrentDirectory()).toEqual('/somewhere/inside/subdir/testdir');
|
||||
expect(OCA.Files.App.fileList.getCurrentDirectory()).toEqual('/somewhere/inside/subdir/testdir')
|
||||
|
||||
expect(setActiveViewStub.calledOnce).toEqual(true);
|
||||
expect(setActiveViewStub.calledWith('files')).toEqual(true);
|
||||
expect(setActiveViewStub.calledOnce).toEqual(true)
|
||||
expect(setActiveViewStub.calledWith('files')).toEqual(true)
|
||||
|
||||
setActiveViewStub.restore();
|
||||
setActiveViewStub.restore()
|
||||
|
||||
// restore old list
|
||||
OCA.Files.App.fileList = oldList;
|
||||
});
|
||||
});
|
||||
});
|
||||
OCA.Files.App.fileList = oldList
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
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,2 +1,24 @@
|
|||
!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=353)}({353:function(e,t){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}})}});
|
||||
!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=353)}({353:function(e,t){
|
||||
/**
|
||||
* @copyright Copyright (c) 2019 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/>.
|
||||
*
|
||||
*/
|
||||
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
|
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
|
@ -39,5 +39,5 @@ Vue.use(Vuex)
|
|||
|
||||
export {
|
||||
Vue,
|
||||
View
|
||||
View,
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
:menu-position="'left'"
|
||||
:url="share.shareWithAvatar" />
|
||||
<component :is="share.shareWithLink ? 'a' : 'div'"
|
||||
:href="share.shareWithLink"
|
||||
v-tooltip.auto="tooltip"
|
||||
:href="share.shareWithLink"
|
||||
class="sharing-entry__desc">
|
||||
<h5>{{ title }}<span v-if="!isUnique" class="sharing-entry__desc-unique"> ({{ share.shareWithDisplayNameUnique }})</span></h5>
|
||||
<p v-if="hasStatus">
|
||||
|
|
|
@ -33,7 +33,7 @@ import { CollectionList } from 'nextcloud-vue-collections'
|
|||
export default {
|
||||
name: 'CollaborationView',
|
||||
components: {
|
||||
CollectionList
|
||||
CollectionList,
|
||||
},
|
||||
computed: {
|
||||
fileId() {
|
||||
|
@ -47,7 +47,7 @@ export default {
|
|||
return '' + this.$root.model.name
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
const path = require('path');
|
||||
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'),
|
||||
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: {
|
||||
|
@ -14,6 +14,6 @@ module.exports = {
|
|||
publicPath: '/js/',
|
||||
filename: '[name].js',
|
||||
chunkFilename: 'files_sharing.[id].js?v=[chunkhash]',
|
||||
jsonpFunction: 'webpackJsonpFilesSharing'
|
||||
}
|
||||
jsonpFunction: 'webpackJsonpFilesSharing',
|
||||
},
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,6 @@ module.exports = {
|
|||
path: path.resolve(__dirname, './js'),
|
||||
publicPath: '/js/',
|
||||
filename: 'files_trashbin.js',
|
||||
jsonpFunction: 'webpackJsonpFilesTrashbin'
|
||||
}
|
||||
jsonpFunction: 'webpackJsonpFilesTrashbin',
|
||||
},
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,6 @@ module.exports = {
|
|||
path: path.resolve(__dirname, 'js'),
|
||||
publicPath: '/js/',
|
||||
filename: 'files_versions.js',
|
||||
jsonpFunction: 'webpackJsonpFilesVersions'
|
||||
}
|
||||
jsonpFunction: 'webpackJsonpFilesVersions',
|
||||
},
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -28,9 +28,7 @@
|
|||
<table v-if="clients.length > 0" class="grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="headerContent">
|
||||
|
||||
</th>
|
||||
<th id="headerContent" />
|
||||
<th id="headerRemove">
|
||||
|
||||
</th>
|
||||
|
|
|
@ -6,6 +6,6 @@ module.exports = {
|
|||
path: path.resolve(__dirname, './js'),
|
||||
publicPath: '/js',
|
||||
filename: 'oauth2.js',
|
||||
jsonpFunction: 'webpackJsonpOauth'
|
||||
}
|
||||
jsonpFunction: 'webpackJsonpOauth',
|
||||
},
|
||||
}
|
||||
|
|
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
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
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
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
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,40 +0,0 @@
|
|||
<!--
|
||||
- @copyright Copyright (c) 2018 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/>.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<ul>
|
||||
<popover-item v-for="(item, key) in menu" :item="item" :key="key" />
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import popoverItem from './popoverMenu/popoverItem';
|
||||
|
||||
export default {
|
||||
name: 'popoverMenu',
|
||||
props: ['menu'],
|
||||
components: {
|
||||
popoverItem
|
||||
}
|
||||
}
|
||||
</script>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,6 @@ module.exports = {
|
|||
path: path.resolve(__dirname, './js'),
|
||||
publicPath: '/js/',
|
||||
filename: 'systemtags.js',
|
||||
jsonpFunction: 'webpackJsonpSystemtags'
|
||||
}
|
||||
jsonpFunction: 'webpackJsonpSystemtags',
|
||||
},
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,6 @@ module.exports = {
|
|||
path: path.resolve(__dirname, 'js'),
|
||||
publicPath: '/js',
|
||||
filename: 'settings.js',
|
||||
jsonpFunction: 'webpackJsonpTwofactorBackupcodes'
|
||||
}
|
||||
jsonpFunction: 'webpackJsonpTwofactorBackupcodes',
|
||||
},
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -93,7 +93,7 @@
|
|||
<span id="channel_save_msg" class="msg" /><br>
|
||||
<p>
|
||||
<em>{{ t('updatenotification', 'You can always update to a newer version. But you can never downgrade to a more stable version.') }}</em><br>
|
||||
<em v-html="noteDelayedStableString"></em>
|
||||
<em v-html="noteDelayedStableString" />
|
||||
</p>
|
||||
|
||||
<p id="oca_updatenotification_groups">
|
||||
|
|
|
@ -6,6 +6,6 @@ module.exports = {
|
|||
path: path.resolve(__dirname, './js'),
|
||||
publicPath: '/js/',
|
||||
filename: 'updatenotification.js',
|
||||
jsonpFunction: 'webpackJsonpUpdatenotification'
|
||||
}
|
||||
jsonpFunction: 'webpackJsonpUpdatenotification',
|
||||
},
|
||||
}
|
||||
|
|
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
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 New Issue