diff --git a/apps/files/js/templates.js b/apps/files/js/templates.js index e353778430..006057f133 100644 --- a/apps/files/js/templates.js +++ b/apps/files/js/templates.js @@ -1,124 +1,124 @@ (function() { var template = Handlebars.template, templates = OCA.Files.Templates = OCA.Files.Templates || {}; templates['detailsview'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1; + var stack1, alias1=container.propertyIsEnumerable; return "\n"; },"2":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
  • \n " - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.tabIcon : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.tabIcon : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "\n " - + alias4(((helper = (helper = helpers.label || (depth0 != null ? depth0.label : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"label","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.label || (depth0 != null ? depth0.label : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"label","hash":{},"data":data}) : helper))) + "\n
  • \n"; },"3":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return ""; },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}); + var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}); return "
    \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.tabHeaders : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.tabHeaders : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "
    \n" - + container.escapeExpression(((helper = (helper = helpers.closeLabel || (depth0 != null ? depth0.closeLabel : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"closeLabel","hash":{},"data":data}) : helper))) + + container.escapeExpression(((helper = (helper = helpers.closeLabel || (depth0 != null ? depth0.closeLabel : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(alias2,{"name":"closeLabel","hash":{},"data":data}) : helper))) + "\n"; },"useData":true}); templates['favorite_mark'] = template({"1":function(container,depth0,helpers,partials,data) { return "permanent"; },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, buffer = + var stack1, helper, options, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression, buffer = "
    \n \n " - + alias4(((helper = (helper = helpers.altText || (depth0 != null ? depth0.altText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"altText","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.altText || (depth0 != null ? depth0.altText : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"altText","hash":{},"data":data}) : helper))) + "\n
    \n"; },"useData":true}); templates['file_action_trigger'] = template({"1":function(container,depth0,helpers,partials,data) { - var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return " \""\n"; },"3":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); + var stack1, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}); - return ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.iconClass : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.hasDisplayName : depth0),{"name":"unless","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); + return ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.iconClass : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasDisplayName : depth0),{"name":"unless","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); },"4":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return " \n"; },"6":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return " " + container.escapeExpression(((helper = (helper = helpers.altText || (depth0 != null ? depth0.altText : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"altText","hash":{},"data":data}) : helper))) + "\n"; },"8":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return " " + container.escapeExpression(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"displayName","hash":{},"data":data}) : helper))) + ""; },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + " " - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.displayName : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.displayName : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "\n\n"; },"useData":true}); templates['fileactionsmenu'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
  • \n \n " - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") + " " - + 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))) + + alias5(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"displayName","hash":{},"data":data}) : helper))) + "\n \n
  • \n"; },"2":function(container,depth0,helpers,partials,data) { return "hidden"; },"4":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return "\n"; },"6":function(container,depth0,helpers,partials,data) { - var stack1; + var stack1, alias1=container.propertyIsEnumerable; return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.iconClass : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : ""); },"7":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return " \n"; },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1; + var stack1, alias1=container.propertyIsEnumerable; return "\n"; },"useData":true}); templates['filemultiselectmenu'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
  • \n \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 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.iconClass : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") + " " - + 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))) + + alias5(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"displayName","hash":{},"data":data}) : helper))) + "\n \n
  • \n"; },"2":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return " \n"; },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1; + var stack1, alias1=container.propertyIsEnumerable; return "\n"; },"useData":true}); templates['filesummary'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return "\n \n " + container.escapeExpression(((helper = (helper = helpers.connectorLabel || (depth0 != null ? depth0.connectorLabel : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"connectorLabel","hash":{},"data":data}) : helper))) + "\n \n \n \n\n"; },"useData":true}); templates['mainfileinfodetailsview'] = template({"1":function(container,depth0,helpers,partials,data) { - var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return " \n \n \n"; },"3":function(container,depth0,helpers,partials,data) { - var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "" - + alias4(((helper = (helper = helpers.size || (depth0 != null ? depth0.size : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"size","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.size || (depth0 != null ? depth0.size : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"size","hash":{},"data":data}) : helper))) + ", "; },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
    \n
    \n
    \n

    " - + 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))) + + alias5(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"name","hash":{},"data":data}) : helper))) + "

    \n \n \n " - + alias4(((helper = (helper = helpers.permalinkTitle || (depth0 != null ? depth0.permalinkTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"permalinkTitle","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.permalinkTitle || (depth0 != null ? depth0.permalinkTitle : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"permalinkTitle","hash":{},"data":data}) : helper))) + "\n \n
    \n
    \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.hasFavoriteAction : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasFavoriteAction : 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.hasSize : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasSize : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "" - + 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))) + + alias5(((helper = (helper = helpers.date || (depth0 != null ? depth0.date : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"date","hash":{},"data":data}) : helper))) + "\n
    \n
    \n
    \n \n
    \n"; },"useData":true}); templates['newfilemenu'] = template({"1":function(container,depth0,helpers,partials,data) { - var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
  • \n " - + 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))) + + alias5(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"displayName","hash":{},"data":data}) : helper))) + "\n
  • \n"; },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "\n"; },"useData":true}); templates['newfilemenu_filename_form'] = 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; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
    \n \n \n
    \n"; },"useData":true}); templates['operationprogressbar'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return "
    \n \n
    \n\n"; },"useData":true}); templates['operationprogressbarlabel'] = 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; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "\n " - + alias4(((helper = (helper = helpers.textDesktop || (depth0 != null ? depth0.textDesktop : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"textDesktop","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.textDesktop || (depth0 != null ? depth0.textDesktop : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"textDesktop","hash":{},"data":data}) : helper))) + "\n " - + alias4(((helper = (helper = helpers.textMobile || (depth0 != null ? depth0.textMobile : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"textMobile","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.textMobile || (depth0 != null ? depth0.textMobile : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"textMobile","hash":{},"data":data}) : helper))) + "\n\n"; },"useData":true}); templates['template_addbutton'] = 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; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "\n \n " - + alias4(((helper = (helper = helpers.addText || (depth0 != null ? depth0.addText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"addText","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.addText || (depth0 != null ? depth0.addText : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"addText","hash":{},"data":data}) : helper))) + "\n\n"; },"useData":true}); })(); \ No newline at end of file diff --git a/apps/files_external/js/templates.js b/apps/files_external/js/templates.js index a64f5d288f..f077455b63 100644 --- a/apps/files_external/js/templates.js +++ b/apps/files_external/js/templates.js @@ -1,37 +1,37 @@ (function() { var template = Handlebars.template, templates = OCA.Files_External.Templates = OCA.Files_External.Templates || {}; templates['credentialsDialog'] = 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; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
    \n
    " - + alias4(((helper = (helper = helpers.credentials_text || (depth0 != null ? depth0.credentials_text : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"credentials_text","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.credentials_text || (depth0 != null ? depth0.credentials_text : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"credentials_text","hash":{},"data":data}) : helper))) + "
    \n
    \n \n \n
    \n
    \n
    \n"; },"useData":true}); templates['mountOptionsDropDown'] = 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; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
    \n
      \n
    • \n \n \n \n \n
    • \n
    • \n \n \n \n \n
    • \n
    • \n \n \n \n \n
    • \n
    • \n \n \n \n \n
    • \n
    • \n \n \n \n \n
    • \n
    • \n \n \n \n \n
    • \n
    • \n \n " - + alias4(((helper = (helper = helpers.deleteLabel || (depth0 != null ? depth0.deleteLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"deleteLabel","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.deleteLabel || (depth0 != null ? depth0.deleteLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"deleteLabel","hash":{},"data":data}) : helper))) + "\n \n
    • \n
    \n
    \n"; },"useData":true}); })(); \ No newline at end of file diff --git a/apps/files_sharing/js/templates.js b/apps/files_sharing/js/templates.js index f7e66204aa..8f773e4d98 100644 --- a/apps/files_sharing/js/templates.js +++ b/apps/files_sharing/js/templates.js @@ -1,28 +1,28 @@ (function() { var template = Handlebars.template, templates = OCA.Sharing.Templates = OCA.Sharing.Templates || {}; templates['files_drop'] = template({"1":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return " " + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data}) : helper))) + "\n"; },"3":function(container,depth0,helpers,partials,data) { - var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return " " - + 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))) + + alias5(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"name","hash":{},"data":data}) : helper))) + "\n"; },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
  • \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isUploading : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isUploading : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + "
  • \n"; },"useData":true}); })(); \ No newline at end of file diff --git a/apps/files_versions/js/files_versions.js b/apps/files_versions/js/files_versions.js index d026f74e34..0da35fb8d3 100644 Binary files a/apps/files_versions/js/files_versions.js and b/apps/files_versions/js/files_versions.js differ diff --git a/apps/files_versions/js/files_versions.js.map b/apps/files_versions/js/files_versions.js.map index 5896c30fd4..bd8cd955c2 100644 Binary files a/apps/files_versions/js/files_versions.js.map and b/apps/files_versions/js/files_versions.js.map differ diff --git a/apps/oauth2/appinfo/routes.php b/apps/oauth2/appinfo/routes.php index c9ff6c9782..10eb34d014 100644 --- a/apps/oauth2/appinfo/routes.php +++ b/apps/oauth2/appinfo/routes.php @@ -26,11 +26,6 @@ return [ 'url' => '/clients', 'verb' => 'POST', ], - [ - 'name' => 'Settings#getClients', - 'url' => '/clients', - 'verb' => 'GET', - ], [ 'name' => 'Settings#deleteClient', 'url' => '/clients/{id}', diff --git a/apps/oauth2/js/oauth2.js b/apps/oauth2/js/oauth2.js index 77c03b6052..84a45ba909 100644 Binary files a/apps/oauth2/js/oauth2.js and b/apps/oauth2/js/oauth2.js differ diff --git a/apps/oauth2/js/oauth2.js.map b/apps/oauth2/js/oauth2.js.map index b99728cb33..45190261b9 100644 Binary files a/apps/oauth2/js/oauth2.js.map and b/apps/oauth2/js/oauth2.js.map differ diff --git a/apps/oauth2/lib/Controller/SettingsController.php b/apps/oauth2/lib/Controller/SettingsController.php index ecf3179e1b..3b79c7de59 100644 --- a/apps/oauth2/lib/Controller/SettingsController.php +++ b/apps/oauth2/lib/Controller/SettingsController.php @@ -103,22 +103,4 @@ class SettingsController extends Controller { $this->clientMapper->delete($client); return new JSONResponse([]); } - - public function getClients(): JSONResponse { - $clients = $this->clientMapper->getClients(); - - $result = []; - - foreach ($clients as $client) { - $result[] = [ - 'id' => $client->getId(), - 'name' => $client->getName(), - 'redirectUri' => $client->getRedirectUri(), - 'clientId' => $client->getClientIdentifier(), - 'clientSecret' => $client->getSecret(), - ]; - } - - return new JSONResponse($result); - } } diff --git a/apps/oauth2/lib/Settings/Admin.php b/apps/oauth2/lib/Settings/Admin.php index 948306f885..9c7ffb9e18 100644 --- a/apps/oauth2/lib/Settings/Admin.php +++ b/apps/oauth2/lib/Settings/Admin.php @@ -22,12 +22,40 @@ declare(strict_types=1); namespace OCA\OAuth2\Settings; +use OCA\OAuth2\Db\ClientMapper; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IInitialStateService; use OCP\Settings\ISettings; class Admin implements ISettings { + /** @var IInitialStateService */ + private $initialStateService; + + /** @var ClientMapper */ + private $clientMapper; + + public function __construct(IInitialStateService $initialStateService, + ClientMapper $clientMapper) { + $this->initialStateService = $initialStateService; + $this->clientMapper = $clientMapper; + } + public function getForm(): TemplateResponse { + $clients = $this->clientMapper->getClients(); + $result = []; + + foreach ($clients as $client) { + $result[] = [ + 'id' => $client->getId(), + 'name' => $client->getName(), + 'redirectUri' => $client->getRedirectUri(), + 'clientId' => $client->getClientIdentifier(), + 'clientSecret' => $client->getSecret(), + ]; + } + $this->initialStateService->provideInitialState('oauth2', 'clients', $result); + return new TemplateResponse( 'oauth2', 'admin', diff --git a/apps/oauth2/src/App.vue b/apps/oauth2/src/App.vue index 58ea4b819a..1d6998ce30 100644 --- a/apps/oauth2/src/App.vue +++ b/apps/oauth2/src/App.vue @@ -59,12 +59,17 @@ import OAuthItem from './components/OAuthItem'; export default { name: 'App', + props: { + clients: { + type: Array, + required: true + } + }, components: { OAuthItem }, data: function() { return { - clients: [], newClient: { name: '', redirectUri: '', @@ -73,12 +78,6 @@ export default { } }; }, - beforeMount: function() { - Axios.get(OC.generateUrl('apps/oauth2/clients')) - .then((response) => { - this.clients = response.data; - }); - }, methods: { deleteClient(id) { Axios.delete(OC.generateUrl('apps/oauth2/clients/{id}', {id: id})) diff --git a/apps/oauth2/src/main.js b/apps/oauth2/src/main.js index b200347d90..c5714497f3 100644 --- a/apps/oauth2/src/main.js +++ b/apps/oauth2/src/main.js @@ -22,13 +22,16 @@ import Vue from 'vue'; import App from './App.vue'; +import { loadState } from 'nextcloud-initial-state' Vue.prototype.t = t; Vue.prototype.OC = OC; -const app = new Vue({ - render: h => h(App) +const clients = loadState('oauth2', 'clients'); + +const View = Vue.extend(App) +new View({ + propsData: { + clients + } }).$mount('#oauth2'); - -export { app }; - diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php index 4e4a69c940..a14d7aad78 100644 --- a/apps/oauth2/tests/Controller/SettingsControllerTest.php +++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php @@ -144,47 +144,6 @@ class SettingsControllerTest extends TestCase { $this->assertEquals([], $result->getData()); } - public function testGetClients() { - $client1 = new Client(); - $client1->setId(123); - $client1->setName('My Client Name'); - $client1->setRedirectUri('https://example.com/'); - $client1->setSecret('MySecret'); - $client1->setClientIdentifier('MyClientIdentifier'); - - $client2 = new Client(); - $client2->setId(42); - $client2->setName('My Client Name2'); - $client2->setRedirectUri('https://example.com/2'); - $client2->setSecret('MySecret2'); - $client2->setClientIdentifier('MyClientIdentifier2'); - - $this->clientMapper->method('getClients') - ->willReturn([$client1, $client2]); - - $result = $this->settingsController->getClients(); - $this->assertInstanceOf(JSONResponse::class, $result); - - $data = $result->getData(); - - $this->assertSame([ - [ - 'id' => 123, - 'name' => 'My Client Name', - 'redirectUri' => 'https://example.com/', - 'clientId' => 'MyClientIdentifier', - 'clientSecret' => 'MySecret', - ], - [ - 'id' => 42, - 'name' => 'My Client Name2', - 'redirectUri' => 'https://example.com/2', - 'clientId' => 'MyClientIdentifier2', - 'clientSecret' => 'MySecret2', - ], - ], $data); - } - public function testInvalidRedirectUri() { $result = $this->settingsController->addClient('test', 'invalidurl'); diff --git a/apps/oauth2/tests/Settings/AdminTest.php b/apps/oauth2/tests/Settings/AdminTest.php index 022ae913e1..c09a7b3420 100644 --- a/apps/oauth2/tests/Settings/AdminTest.php +++ b/apps/oauth2/tests/Settings/AdminTest.php @@ -1,4 +1,5 @@ * @@ -21,26 +22,38 @@ namespace OCA\OAuth2\Tests\Settings; +use OCA\OAuth2\Db\ClientMapper; use OCA\OAuth2\Settings\Admin; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IInitialStateService; use Test\TestCase; +use PHPUnit\Framework\MockObject\MockObject; class AdminTest extends TestCase { - /** @var Admin|\PHPUnit_Framework_MockObject_MockObject */ + + /** @var Admin|MockObject */ private $admin; + /** @var IInitialStateService|MockObject */ + private $initialStateService; + + /** @var ClientMapper|MockObject */ + private $clientMapper; + public function setUp() { parent::setUp(); - $this->admin = new Admin(); + $this->initialStateService = $this->createMock(IInitialStateService::class); + $this->clientMapper = $this->createMock(ClientMapper::class); + + $this->admin = new Admin($this->initialStateService, $this->clientMapper); } public function testGetForm() { $expected = new TemplateResponse( 'oauth2', 'admin', - [ - ], + [], '' ); $this->assertEquals($expected, $this->admin->getForm()); diff --git a/apps/settings/js/templates.js b/apps/settings/js/templates.js index 94e44eebf5..1eb05adfbd 100644 --- a/apps/settings/js/templates.js +++ b/apps/settings/js/templates.js @@ -1,25 +1,25 @@ (function() { var template = Handlebars.template, templates = OC.Settings.Templates = OC.Settings.Templates || {}; templates['federationscopemenu'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression; + var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression; return "
  • \n \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.iconClass : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.iconClass : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") + "

    \n " - + 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))) + + alias5(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"displayName","hash":{},"data":data}) : helper))) + "
    \n " - + alias4(((helper = (helper = helpers.tooltip || (depth0 != null ? depth0.tooltip : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"tooltip","hash":{},"data":data}) : helper))) + + alias5(((helper = (helper = helpers.tooltip || (depth0 != null ? depth0.tooltip : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"tooltip","hash":{},"data":data}) : helper))) + "\n

    \n
    \n
  • \n"; },"2":function(container,depth0,helpers,partials,data) { return "active"; },"4":function(container,depth0,helpers,partials,data) { - var helper; + var helper, alias1=container.propertyIsEnumerable; return " \n"; },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1; + var stack1, alias1=container.propertyIsEnumerable; return "