зеркало из https://github.com/nextcloud/text.git
Merge pull request #708 from nextcloud/enh/noid/use-files-settings-api
Use New OCA.Files.Settings API
This commit is contained in:
Коммит
a83fa31e24
|
@ -91,5 +91,5 @@ var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new Type
|
|||
* 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/>.
|
||||
*
|
||||
*/(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.nc=btoa(OC.requestToken),n.p=OC.linkTo("text","js/");var w=Object(y.loadState)("text","workspace_available"),x=Object(y.loadState)("text","workspace_enabled");Object(p.d)(),document.addEventListener("DOMContentLoaded",(function(){if(void 0===OCA.Viewer?(console.error("Viewer app is not installed"),Object(p.c)()):OCA.Viewer.registerHandler({id:"text",mimes:[].concat(b(d.b),b(d.c)),component:a,group:null}),OC.Plugins.register("OCA.Files.SidebarPreviewManager",new f),w){var e=document.createElement("div");document.getElementById("files-setting-showhidden").insertAdjacentElement("afterend",e),r.default.prototype.t=window.t,r.default.prototype.n=window.n,r.default.prototype.OCA=window.OCA,new r.default({render:function(e){return e(m,{})}}).$mount(e)}})),w&&OC.Plugins.register("OCA.Files.FileList",p.a),OCA.Text={Editor:a,RichWorkspaceEnabled:x}}]);
|
||||
*/(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.nc=btoa(OC.requestToken),n.p=OC.linkTo("text","js/");var w=Object(y.loadState)("text","workspace_available"),x=Object(y.loadState)("text","workspace_enabled");Object(p.d)(),document.addEventListener("DOMContentLoaded",(function(){if(void 0===OCA.Viewer?(console.error("Viewer app is not installed"),Object(p.c)()):OCA.Viewer.registerHandler({id:"text",mimes:[].concat(b(d.b),b(d.c)),component:a,group:null}),OC.Plugins.register("OCA.Files.SidebarPreviewManager",new f),w&&OCA&&OCA.Files&&OCA.Files.Settings){r.default.prototype.t=window.t,r.default.prototype.n=window.n,r.default.prototype.OCA=window.OCA;var e=new r.default({render:function(e){return e(m,{})}}).$mount().$el;OCA.Files.Settings.register(new OCA.Files.Settings.Setting("text",{el:function(){return e}}))}})),w&&OC.Plugins.register("OCA.Files.FileList",p.a),OCA.Text={Editor:a,RichWorkspaceEnabled:x}}]);
|
||||
//# sourceMappingURL=files.js.map
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -50,16 +50,17 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
}
|
||||
OC.Plugins.register('OCA.Files.SidebarPreviewManager', new PreviewPlugin())
|
||||
|
||||
if (workspaceAvailable) {
|
||||
const settings = document.createElement('div')
|
||||
document.getElementById('files-setting-showhidden').insertAdjacentElement('afterend', settings)
|
||||
if (workspaceAvailable && OCA && OCA.Files && OCA.Files.Settings) {
|
||||
Vue.prototype.t = window.t
|
||||
Vue.prototype.n = window.n
|
||||
Vue.prototype.OCA = window.OCA
|
||||
const vm = new Vue({
|
||||
render: h => h(FilesSettings, {}),
|
||||
})
|
||||
vm.$mount(settings)
|
||||
const el = vm.$mount().$el
|
||||
OCA.Files.Settings.register(new OCA.Files.Settings.Setting('text', {
|
||||
el: () => { return el },
|
||||
}))
|
||||
}
|
||||
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче