Browse Source

Fix comments filesplugin

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
John Molakvoæ (skjnldsv) 3 years ago
parent
commit
87d39375d8

+ 3 - 0
.eslintignore

@@ -6,3 +6,6 @@ node_modules/
 **/js/*
 *.config.js
 tests/lib/
+
+# TODO: remove when comments files is not using handlebar templates anymore
+apps/comments/src/templates.js

File diff suppressed because it is too large
+ 0 - 0
apps/comments/js/comments-app.js


File diff suppressed because it is too large
+ 0 - 0
apps/comments/js/comments-app.js.map


+ 1 - 1
apps/comments/js/comments-tab.js

@@ -1,4 +1,4 @@
-!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=750)}({750: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)}
+!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>
  *

File diff suppressed because it is too large
+ 0 - 0
apps/comments/js/comments-tab.js.map


File diff suppressed because it is too large
+ 0 - 0
apps/comments/js/comments.js


File diff suppressed because it is too large
+ 0 - 0
apps/comments/js/comments.js.map


+ 1 - 0
apps/comments/src/comments.js

@@ -1,4 +1,5 @@
 import './app'
+import './templates'
 import './filesplugin'
 import './activitytabviewplugin'
 

+ 17 - 0
apps/comments/src/templates.js

@@ -0,0 +1,17 @@
+(function() {
+  var template = Handlebars.template, templates = OCA.Comments.Templates = OCA.Comments.Templates || {};
+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 = 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 = 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});
+})();

+ 3 - 0
build/compile-handlebars-templates.sh

@@ -4,6 +4,9 @@ REPODIR=`git rev-parse --show-toplevel`
 
 cd $REPODIR
 
+# Comments files plugin
+node node_modules/handlebars/bin/handlebars -n OCA.Comments.Templates  apps/comments/src/templates -f apps/comments/src/templates.js
+
 # Settings
 node node_modules/handlebars/bin/handlebars -n OC.Settings.Templates  apps/settings/js/templates -f apps/settings/js/templates.js
 

Some files were not shown because too many files changed in this diff