From e88c193334af1208fc880f11b00d3a0546cce0df Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Thu, 11 Aug 2016 02:34:09 +0300 Subject: [PATCH] *.jsx -> *.js --- dev/App/{Abstract.jsx => Abstract.js} | 0 dev/App/{Admin.jsx => Admin.js} | 0 dev/App/{User.jsx => User.js} | 0 dev/Common/{Audio.jsx => Audio.js} | 0 dev/Common/{Base64.jsx => Base64.js} | 0 dev/Common/{Booter.jsx => Booter.js} | 0 dev/Common/{Cache.jsx => Cache.js} | 0 .../{Cookie.jsx => Cookie.js} | 0 .../{LocalStorage.jsx => LocalStorage.js} | 0 dev/Common/{Cmd.jsx => Cmd.js} | 0 dev/Common/{Consts.jsx => Consts.js} | 0 dev/Common/{Enums.jsx => Enums.js} | 0 dev/Common/{Events.jsx => Events.js} | 0 dev/Common/{Globals.jsx => Globals.js} | 0 dev/Common/{HtmlEditor.jsx => HtmlEditor.js} | 0 dev/Common/{Links.jsx => Links.js} | 0 dev/Common/{Mime.jsx => Mime.js} | 0 dev/Common/{Momentor.jsx => Momentor.js} | 0 dev/Common/{Plugins.jsx => Plugins.js} | 0 dev/Common/{Selector.jsx => Selector.js} | 0 dev/Common/{Translator.jsx => Translator.js} | 0 dev/Common/{Utils.jsx => Utils.js} | 0 ...AbstracCheckbox.jsx => AbstracCheckbox.js} | 0 .../{AbstracRadio.jsx => AbstracRadio.js} | 0 dev/Component/{Abstract.jsx => Abstract.js} | 0 .../{AbstractInput.jsx => AbstractInput.js} | 0 dev/Component/{Checkbox.jsx => Checkbox.js} | 0 .../Classic/{Checkbox.jsx => Checkbox.js} | 0 dev/Component/{Date.jsx => Date.js} | 0 dev/Component/{Input.jsx => Input.js} | 0 .../{Checkbox.jsx => Checkbox.js} | 0 dev/Component/{Radio.jsx => Radio.js} | 0 .../{SaveTrigger.jsx => SaveTrigger.js} | 0 dev/Component/{Script.jsx => Script.js} | 0 dev/Component/{Select.jsx => Select.js} | 0 dev/Component/{SvgIcon.jsx => SvgIcon.js} | 0 dev/Component/{TextArea.jsx => TextArea.js} | 0 dev/Helper/{Message.jsx => Message.js} | 0 .../{AbstractBoot.jsx => AbstractBoot.js} | 0 .../{AbstractModel.jsx => AbstractModel.js} | 0 .../{AbstractScreen.jsx => AbstractScreen.js} | 0 dev/Knoin/{Knoin.jsx => Knoin.js} | 0 dev/Model/{Account.jsx => Account.js} | 0 dev/Model/{Attachment.jsx => Attachment.js} | 0 ...oseAttachment.jsx => ComposeAttachment.js} | 0 dev/Model/{Contact.jsx => Contact.js} | 0 ...ContactProperty.jsx => ContactProperty.js} | 0 dev/Model/{Email.jsx => Email.js} | 0 dev/Model/{Filter.jsx => Filter.js} | 0 ...FilterCondition.jsx => FilterCondition.js} | 0 dev/Model/{Folder.jsx => Folder.js} | 0 dev/Model/{Identity.jsx => Identity.js} | 0 dev/Model/{Message.jsx => Message.js} | 0 dev/Model/{OpenPgpKey.jsx => OpenPgpKey.js} | 0 dev/Model/{Template.jsx => Template.js} | 0 ...stractSettings.jsx => AbstractSettings.js} | 0 dev/Screen/Admin/{Login.jsx => Login.js} | 0 .../Admin/{Settings.jsx => Settings.js} | 0 dev/Screen/User/{About.jsx => About.js} | 0 dev/Screen/User/{Login.jsx => Login.js} | 0 dev/Screen/User/{MailBox.jsx => MailBox.js} | 0 dev/Screen/User/{Settings.jsx => Settings.js} | 0 dev/Settings/Admin/{About.jsx => About.js} | 0 .../Admin/{Branding.jsx => Branding.js} | 0 .../Admin/{Contacts.jsx => Contacts.js} | 0 .../Admin/{Domains.jsx => Domains.js} | 0 .../Admin/{General.jsx => General.js} | 0 dev/Settings/Admin/{Login.jsx => Login.js} | 0 .../Admin/{Packages.jsx => Packages.js} | 0 .../Admin/{Plugins.jsx => Plugins.js} | 0 .../Admin/{Security.jsx => Security.js} | 0 dev/Settings/Admin/{Social.jsx => Social.js} | 0 .../User/{Accounts.jsx => Accounts.js} | 0 .../{ChangePassword.jsx => ChangePassword.js} | 0 .../User/{Contacts.jsx => Contacts.js} | 0 dev/Settings/User/{Filters.jsx => Filters.js} | 0 dev/Settings/User/{Folders.jsx => Folders.js} | 0 dev/Settings/User/{General.jsx => General.js} | 0 dev/Settings/User/{OpenPgp.jsx => OpenPgp.js} | 0 .../User/{Security.jsx => Security.js} | 0 dev/Settings/User/{Social.jsx => Social.js} | 0 .../User/{Templates.jsx => Templates.js} | 0 dev/Settings/User/{Themes.jsx => Themes.js} | 0 dev/Storage/{Client.jsx => Client.js} | 0 dev/Storage/{RainLoop.jsx => RainLoop.js} | 0 dev/Storage/{Settings.jsx => Settings.js} | 0 .../{AbstractApp.jsx => AbstractApp.js} | 0 dev/Stores/Admin/{App.jsx => App.js} | 0 dev/Stores/User/{App.jsx => App.js} | 0 dev/Stores/User/{Identity.jsx => Identity.js} | 0 dev/{admin.jsx => admin.js} | 0 dev/{app.jsx => app.js} | 0 dev/{boot.jsx => boot.js} | 2 +- dev/{bootstrap.jsx => bootstrap.js} | 0 gulpfile.js | 12 +- .../0.0.0/app/libraries/RainLoop/Actions.php | 7 +- .../0.0.0/app/libraries/RainLoop/Service.php | 646 +++++++++--------- webpack.config.builder.js | 14 +- 98 files changed, 341 insertions(+), 340 deletions(-) rename dev/App/{Abstract.jsx => Abstract.js} (100%) rename dev/App/{Admin.jsx => Admin.js} (100%) rename dev/App/{User.jsx => User.js} (100%) rename dev/Common/{Audio.jsx => Audio.js} (100%) rename dev/Common/{Base64.jsx => Base64.js} (100%) rename dev/Common/{Booter.jsx => Booter.js} (100%) rename dev/Common/{Cache.jsx => Cache.js} (100%) rename dev/Common/ClientStorageDriver/{Cookie.jsx => Cookie.js} (100%) rename dev/Common/ClientStorageDriver/{LocalStorage.jsx => LocalStorage.js} (100%) rename dev/Common/{Cmd.jsx => Cmd.js} (100%) rename dev/Common/{Consts.jsx => Consts.js} (100%) rename dev/Common/{Enums.jsx => Enums.js} (100%) rename dev/Common/{Events.jsx => Events.js} (100%) rename dev/Common/{Globals.jsx => Globals.js} (100%) rename dev/Common/{HtmlEditor.jsx => HtmlEditor.js} (100%) rename dev/Common/{Links.jsx => Links.js} (100%) rename dev/Common/{Mime.jsx => Mime.js} (100%) rename dev/Common/{Momentor.jsx => Momentor.js} (100%) rename dev/Common/{Plugins.jsx => Plugins.js} (100%) rename dev/Common/{Selector.jsx => Selector.js} (100%) rename dev/Common/{Translator.jsx => Translator.js} (100%) rename dev/Common/{Utils.jsx => Utils.js} (100%) rename dev/Component/{AbstracCheckbox.jsx => AbstracCheckbox.js} (100%) rename dev/Component/{AbstracRadio.jsx => AbstracRadio.js} (100%) rename dev/Component/{Abstract.jsx => Abstract.js} (100%) rename dev/Component/{AbstractInput.jsx => AbstractInput.js} (100%) rename dev/Component/{Checkbox.jsx => Checkbox.js} (100%) rename dev/Component/Classic/{Checkbox.jsx => Checkbox.js} (100%) rename dev/Component/{Date.jsx => Date.js} (100%) rename dev/Component/{Input.jsx => Input.js} (100%) rename dev/Component/MaterialDesign/{Checkbox.jsx => Checkbox.js} (100%) rename dev/Component/{Radio.jsx => Radio.js} (100%) rename dev/Component/{SaveTrigger.jsx => SaveTrigger.js} (100%) rename dev/Component/{Script.jsx => Script.js} (100%) rename dev/Component/{Select.jsx => Select.js} (100%) rename dev/Component/{SvgIcon.jsx => SvgIcon.js} (100%) rename dev/Component/{TextArea.jsx => TextArea.js} (100%) rename dev/Helper/{Message.jsx => Message.js} (100%) rename dev/Knoin/{AbstractBoot.jsx => AbstractBoot.js} (100%) rename dev/Knoin/{AbstractModel.jsx => AbstractModel.js} (100%) rename dev/Knoin/{AbstractScreen.jsx => AbstractScreen.js} (100%) rename dev/Knoin/{Knoin.jsx => Knoin.js} (100%) rename dev/Model/{Account.jsx => Account.js} (100%) rename dev/Model/{Attachment.jsx => Attachment.js} (100%) rename dev/Model/{ComposeAttachment.jsx => ComposeAttachment.js} (100%) rename dev/Model/{Contact.jsx => Contact.js} (100%) rename dev/Model/{ContactProperty.jsx => ContactProperty.js} (100%) rename dev/Model/{Email.jsx => Email.js} (100%) rename dev/Model/{Filter.jsx => Filter.js} (100%) rename dev/Model/{FilterCondition.jsx => FilterCondition.js} (100%) rename dev/Model/{Folder.jsx => Folder.js} (100%) rename dev/Model/{Identity.jsx => Identity.js} (100%) rename dev/Model/{Message.jsx => Message.js} (100%) rename dev/Model/{OpenPgpKey.jsx => OpenPgpKey.js} (100%) rename dev/Model/{Template.jsx => Template.js} (100%) rename dev/Screen/{AbstractSettings.jsx => AbstractSettings.js} (100%) rename dev/Screen/Admin/{Login.jsx => Login.js} (100%) rename dev/Screen/Admin/{Settings.jsx => Settings.js} (100%) rename dev/Screen/User/{About.jsx => About.js} (100%) rename dev/Screen/User/{Login.jsx => Login.js} (100%) rename dev/Screen/User/{MailBox.jsx => MailBox.js} (100%) rename dev/Screen/User/{Settings.jsx => Settings.js} (100%) rename dev/Settings/Admin/{About.jsx => About.js} (100%) rename dev/Settings/Admin/{Branding.jsx => Branding.js} (100%) rename dev/Settings/Admin/{Contacts.jsx => Contacts.js} (100%) rename dev/Settings/Admin/{Domains.jsx => Domains.js} (100%) rename dev/Settings/Admin/{General.jsx => General.js} (100%) rename dev/Settings/Admin/{Login.jsx => Login.js} (100%) rename dev/Settings/Admin/{Packages.jsx => Packages.js} (100%) rename dev/Settings/Admin/{Plugins.jsx => Plugins.js} (100%) rename dev/Settings/Admin/{Security.jsx => Security.js} (100%) rename dev/Settings/Admin/{Social.jsx => Social.js} (100%) rename dev/Settings/User/{Accounts.jsx => Accounts.js} (100%) rename dev/Settings/User/{ChangePassword.jsx => ChangePassword.js} (100%) rename dev/Settings/User/{Contacts.jsx => Contacts.js} (100%) rename dev/Settings/User/{Filters.jsx => Filters.js} (100%) rename dev/Settings/User/{Folders.jsx => Folders.js} (100%) rename dev/Settings/User/{General.jsx => General.js} (100%) rename dev/Settings/User/{OpenPgp.jsx => OpenPgp.js} (100%) rename dev/Settings/User/{Security.jsx => Security.js} (100%) rename dev/Settings/User/{Social.jsx => Social.js} (100%) rename dev/Settings/User/{Templates.jsx => Templates.js} (100%) rename dev/Settings/User/{Themes.jsx => Themes.js} (100%) rename dev/Storage/{Client.jsx => Client.js} (100%) rename dev/Storage/{RainLoop.jsx => RainLoop.js} (100%) rename dev/Storage/{Settings.jsx => Settings.js} (100%) rename dev/Stores/{AbstractApp.jsx => AbstractApp.js} (100%) rename dev/Stores/Admin/{App.jsx => App.js} (100%) rename dev/Stores/User/{App.jsx => App.js} (100%) rename dev/Stores/User/{Identity.jsx => Identity.js} (100%) rename dev/{admin.jsx => admin.js} (100%) rename dev/{app.jsx => app.js} (100%) rename dev/{boot.jsx => boot.js} (96%) rename dev/{bootstrap.jsx => bootstrap.js} (100%) diff --git a/dev/App/Abstract.jsx b/dev/App/Abstract.js similarity index 100% rename from dev/App/Abstract.jsx rename to dev/App/Abstract.js diff --git a/dev/App/Admin.jsx b/dev/App/Admin.js similarity index 100% rename from dev/App/Admin.jsx rename to dev/App/Admin.js diff --git a/dev/App/User.jsx b/dev/App/User.js similarity index 100% rename from dev/App/User.jsx rename to dev/App/User.js diff --git a/dev/Common/Audio.jsx b/dev/Common/Audio.js similarity index 100% rename from dev/Common/Audio.jsx rename to dev/Common/Audio.js diff --git a/dev/Common/Base64.jsx b/dev/Common/Base64.js similarity index 100% rename from dev/Common/Base64.jsx rename to dev/Common/Base64.js diff --git a/dev/Common/Booter.jsx b/dev/Common/Booter.js similarity index 100% rename from dev/Common/Booter.jsx rename to dev/Common/Booter.js diff --git a/dev/Common/Cache.jsx b/dev/Common/Cache.js similarity index 100% rename from dev/Common/Cache.jsx rename to dev/Common/Cache.js diff --git a/dev/Common/ClientStorageDriver/Cookie.jsx b/dev/Common/ClientStorageDriver/Cookie.js similarity index 100% rename from dev/Common/ClientStorageDriver/Cookie.jsx rename to dev/Common/ClientStorageDriver/Cookie.js diff --git a/dev/Common/ClientStorageDriver/LocalStorage.jsx b/dev/Common/ClientStorageDriver/LocalStorage.js similarity index 100% rename from dev/Common/ClientStorageDriver/LocalStorage.jsx rename to dev/Common/ClientStorageDriver/LocalStorage.js diff --git a/dev/Common/Cmd.jsx b/dev/Common/Cmd.js similarity index 100% rename from dev/Common/Cmd.jsx rename to dev/Common/Cmd.js diff --git a/dev/Common/Consts.jsx b/dev/Common/Consts.js similarity index 100% rename from dev/Common/Consts.jsx rename to dev/Common/Consts.js diff --git a/dev/Common/Enums.jsx b/dev/Common/Enums.js similarity index 100% rename from dev/Common/Enums.jsx rename to dev/Common/Enums.js diff --git a/dev/Common/Events.jsx b/dev/Common/Events.js similarity index 100% rename from dev/Common/Events.jsx rename to dev/Common/Events.js diff --git a/dev/Common/Globals.jsx b/dev/Common/Globals.js similarity index 100% rename from dev/Common/Globals.jsx rename to dev/Common/Globals.js diff --git a/dev/Common/HtmlEditor.jsx b/dev/Common/HtmlEditor.js similarity index 100% rename from dev/Common/HtmlEditor.jsx rename to dev/Common/HtmlEditor.js diff --git a/dev/Common/Links.jsx b/dev/Common/Links.js similarity index 100% rename from dev/Common/Links.jsx rename to dev/Common/Links.js diff --git a/dev/Common/Mime.jsx b/dev/Common/Mime.js similarity index 100% rename from dev/Common/Mime.jsx rename to dev/Common/Mime.js diff --git a/dev/Common/Momentor.jsx b/dev/Common/Momentor.js similarity index 100% rename from dev/Common/Momentor.jsx rename to dev/Common/Momentor.js diff --git a/dev/Common/Plugins.jsx b/dev/Common/Plugins.js similarity index 100% rename from dev/Common/Plugins.jsx rename to dev/Common/Plugins.js diff --git a/dev/Common/Selector.jsx b/dev/Common/Selector.js similarity index 100% rename from dev/Common/Selector.jsx rename to dev/Common/Selector.js diff --git a/dev/Common/Translator.jsx b/dev/Common/Translator.js similarity index 100% rename from dev/Common/Translator.jsx rename to dev/Common/Translator.js diff --git a/dev/Common/Utils.jsx b/dev/Common/Utils.js similarity index 100% rename from dev/Common/Utils.jsx rename to dev/Common/Utils.js diff --git a/dev/Component/AbstracCheckbox.jsx b/dev/Component/AbstracCheckbox.js similarity index 100% rename from dev/Component/AbstracCheckbox.jsx rename to dev/Component/AbstracCheckbox.js diff --git a/dev/Component/AbstracRadio.jsx b/dev/Component/AbstracRadio.js similarity index 100% rename from dev/Component/AbstracRadio.jsx rename to dev/Component/AbstracRadio.js diff --git a/dev/Component/Abstract.jsx b/dev/Component/Abstract.js similarity index 100% rename from dev/Component/Abstract.jsx rename to dev/Component/Abstract.js diff --git a/dev/Component/AbstractInput.jsx b/dev/Component/AbstractInput.js similarity index 100% rename from dev/Component/AbstractInput.jsx rename to dev/Component/AbstractInput.js diff --git a/dev/Component/Checkbox.jsx b/dev/Component/Checkbox.js similarity index 100% rename from dev/Component/Checkbox.jsx rename to dev/Component/Checkbox.js diff --git a/dev/Component/Classic/Checkbox.jsx b/dev/Component/Classic/Checkbox.js similarity index 100% rename from dev/Component/Classic/Checkbox.jsx rename to dev/Component/Classic/Checkbox.js diff --git a/dev/Component/Date.jsx b/dev/Component/Date.js similarity index 100% rename from dev/Component/Date.jsx rename to dev/Component/Date.js diff --git a/dev/Component/Input.jsx b/dev/Component/Input.js similarity index 100% rename from dev/Component/Input.jsx rename to dev/Component/Input.js diff --git a/dev/Component/MaterialDesign/Checkbox.jsx b/dev/Component/MaterialDesign/Checkbox.js similarity index 100% rename from dev/Component/MaterialDesign/Checkbox.jsx rename to dev/Component/MaterialDesign/Checkbox.js diff --git a/dev/Component/Radio.jsx b/dev/Component/Radio.js similarity index 100% rename from dev/Component/Radio.jsx rename to dev/Component/Radio.js diff --git a/dev/Component/SaveTrigger.jsx b/dev/Component/SaveTrigger.js similarity index 100% rename from dev/Component/SaveTrigger.jsx rename to dev/Component/SaveTrigger.js diff --git a/dev/Component/Script.jsx b/dev/Component/Script.js similarity index 100% rename from dev/Component/Script.jsx rename to dev/Component/Script.js diff --git a/dev/Component/Select.jsx b/dev/Component/Select.js similarity index 100% rename from dev/Component/Select.jsx rename to dev/Component/Select.js diff --git a/dev/Component/SvgIcon.jsx b/dev/Component/SvgIcon.js similarity index 100% rename from dev/Component/SvgIcon.jsx rename to dev/Component/SvgIcon.js diff --git a/dev/Component/TextArea.jsx b/dev/Component/TextArea.js similarity index 100% rename from dev/Component/TextArea.jsx rename to dev/Component/TextArea.js diff --git a/dev/Helper/Message.jsx b/dev/Helper/Message.js similarity index 100% rename from dev/Helper/Message.jsx rename to dev/Helper/Message.js diff --git a/dev/Knoin/AbstractBoot.jsx b/dev/Knoin/AbstractBoot.js similarity index 100% rename from dev/Knoin/AbstractBoot.jsx rename to dev/Knoin/AbstractBoot.js diff --git a/dev/Knoin/AbstractModel.jsx b/dev/Knoin/AbstractModel.js similarity index 100% rename from dev/Knoin/AbstractModel.jsx rename to dev/Knoin/AbstractModel.js diff --git a/dev/Knoin/AbstractScreen.jsx b/dev/Knoin/AbstractScreen.js similarity index 100% rename from dev/Knoin/AbstractScreen.jsx rename to dev/Knoin/AbstractScreen.js diff --git a/dev/Knoin/Knoin.jsx b/dev/Knoin/Knoin.js similarity index 100% rename from dev/Knoin/Knoin.jsx rename to dev/Knoin/Knoin.js diff --git a/dev/Model/Account.jsx b/dev/Model/Account.js similarity index 100% rename from dev/Model/Account.jsx rename to dev/Model/Account.js diff --git a/dev/Model/Attachment.jsx b/dev/Model/Attachment.js similarity index 100% rename from dev/Model/Attachment.jsx rename to dev/Model/Attachment.js diff --git a/dev/Model/ComposeAttachment.jsx b/dev/Model/ComposeAttachment.js similarity index 100% rename from dev/Model/ComposeAttachment.jsx rename to dev/Model/ComposeAttachment.js diff --git a/dev/Model/Contact.jsx b/dev/Model/Contact.js similarity index 100% rename from dev/Model/Contact.jsx rename to dev/Model/Contact.js diff --git a/dev/Model/ContactProperty.jsx b/dev/Model/ContactProperty.js similarity index 100% rename from dev/Model/ContactProperty.jsx rename to dev/Model/ContactProperty.js diff --git a/dev/Model/Email.jsx b/dev/Model/Email.js similarity index 100% rename from dev/Model/Email.jsx rename to dev/Model/Email.js diff --git a/dev/Model/Filter.jsx b/dev/Model/Filter.js similarity index 100% rename from dev/Model/Filter.jsx rename to dev/Model/Filter.js diff --git a/dev/Model/FilterCondition.jsx b/dev/Model/FilterCondition.js similarity index 100% rename from dev/Model/FilterCondition.jsx rename to dev/Model/FilterCondition.js diff --git a/dev/Model/Folder.jsx b/dev/Model/Folder.js similarity index 100% rename from dev/Model/Folder.jsx rename to dev/Model/Folder.js diff --git a/dev/Model/Identity.jsx b/dev/Model/Identity.js similarity index 100% rename from dev/Model/Identity.jsx rename to dev/Model/Identity.js diff --git a/dev/Model/Message.jsx b/dev/Model/Message.js similarity index 100% rename from dev/Model/Message.jsx rename to dev/Model/Message.js diff --git a/dev/Model/OpenPgpKey.jsx b/dev/Model/OpenPgpKey.js similarity index 100% rename from dev/Model/OpenPgpKey.jsx rename to dev/Model/OpenPgpKey.js diff --git a/dev/Model/Template.jsx b/dev/Model/Template.js similarity index 100% rename from dev/Model/Template.jsx rename to dev/Model/Template.js diff --git a/dev/Screen/AbstractSettings.jsx b/dev/Screen/AbstractSettings.js similarity index 100% rename from dev/Screen/AbstractSettings.jsx rename to dev/Screen/AbstractSettings.js diff --git a/dev/Screen/Admin/Login.jsx b/dev/Screen/Admin/Login.js similarity index 100% rename from dev/Screen/Admin/Login.jsx rename to dev/Screen/Admin/Login.js diff --git a/dev/Screen/Admin/Settings.jsx b/dev/Screen/Admin/Settings.js similarity index 100% rename from dev/Screen/Admin/Settings.jsx rename to dev/Screen/Admin/Settings.js diff --git a/dev/Screen/User/About.jsx b/dev/Screen/User/About.js similarity index 100% rename from dev/Screen/User/About.jsx rename to dev/Screen/User/About.js diff --git a/dev/Screen/User/Login.jsx b/dev/Screen/User/Login.js similarity index 100% rename from dev/Screen/User/Login.jsx rename to dev/Screen/User/Login.js diff --git a/dev/Screen/User/MailBox.jsx b/dev/Screen/User/MailBox.js similarity index 100% rename from dev/Screen/User/MailBox.jsx rename to dev/Screen/User/MailBox.js diff --git a/dev/Screen/User/Settings.jsx b/dev/Screen/User/Settings.js similarity index 100% rename from dev/Screen/User/Settings.jsx rename to dev/Screen/User/Settings.js diff --git a/dev/Settings/Admin/About.jsx b/dev/Settings/Admin/About.js similarity index 100% rename from dev/Settings/Admin/About.jsx rename to dev/Settings/Admin/About.js diff --git a/dev/Settings/Admin/Branding.jsx b/dev/Settings/Admin/Branding.js similarity index 100% rename from dev/Settings/Admin/Branding.jsx rename to dev/Settings/Admin/Branding.js diff --git a/dev/Settings/Admin/Contacts.jsx b/dev/Settings/Admin/Contacts.js similarity index 100% rename from dev/Settings/Admin/Contacts.jsx rename to dev/Settings/Admin/Contacts.js diff --git a/dev/Settings/Admin/Domains.jsx b/dev/Settings/Admin/Domains.js similarity index 100% rename from dev/Settings/Admin/Domains.jsx rename to dev/Settings/Admin/Domains.js diff --git a/dev/Settings/Admin/General.jsx b/dev/Settings/Admin/General.js similarity index 100% rename from dev/Settings/Admin/General.jsx rename to dev/Settings/Admin/General.js diff --git a/dev/Settings/Admin/Login.jsx b/dev/Settings/Admin/Login.js similarity index 100% rename from dev/Settings/Admin/Login.jsx rename to dev/Settings/Admin/Login.js diff --git a/dev/Settings/Admin/Packages.jsx b/dev/Settings/Admin/Packages.js similarity index 100% rename from dev/Settings/Admin/Packages.jsx rename to dev/Settings/Admin/Packages.js diff --git a/dev/Settings/Admin/Plugins.jsx b/dev/Settings/Admin/Plugins.js similarity index 100% rename from dev/Settings/Admin/Plugins.jsx rename to dev/Settings/Admin/Plugins.js diff --git a/dev/Settings/Admin/Security.jsx b/dev/Settings/Admin/Security.js similarity index 100% rename from dev/Settings/Admin/Security.jsx rename to dev/Settings/Admin/Security.js diff --git a/dev/Settings/Admin/Social.jsx b/dev/Settings/Admin/Social.js similarity index 100% rename from dev/Settings/Admin/Social.jsx rename to dev/Settings/Admin/Social.js diff --git a/dev/Settings/User/Accounts.jsx b/dev/Settings/User/Accounts.js similarity index 100% rename from dev/Settings/User/Accounts.jsx rename to dev/Settings/User/Accounts.js diff --git a/dev/Settings/User/ChangePassword.jsx b/dev/Settings/User/ChangePassword.js similarity index 100% rename from dev/Settings/User/ChangePassword.jsx rename to dev/Settings/User/ChangePassword.js diff --git a/dev/Settings/User/Contacts.jsx b/dev/Settings/User/Contacts.js similarity index 100% rename from dev/Settings/User/Contacts.jsx rename to dev/Settings/User/Contacts.js diff --git a/dev/Settings/User/Filters.jsx b/dev/Settings/User/Filters.js similarity index 100% rename from dev/Settings/User/Filters.jsx rename to dev/Settings/User/Filters.js diff --git a/dev/Settings/User/Folders.jsx b/dev/Settings/User/Folders.js similarity index 100% rename from dev/Settings/User/Folders.jsx rename to dev/Settings/User/Folders.js diff --git a/dev/Settings/User/General.jsx b/dev/Settings/User/General.js similarity index 100% rename from dev/Settings/User/General.jsx rename to dev/Settings/User/General.js diff --git a/dev/Settings/User/OpenPgp.jsx b/dev/Settings/User/OpenPgp.js similarity index 100% rename from dev/Settings/User/OpenPgp.jsx rename to dev/Settings/User/OpenPgp.js diff --git a/dev/Settings/User/Security.jsx b/dev/Settings/User/Security.js similarity index 100% rename from dev/Settings/User/Security.jsx rename to dev/Settings/User/Security.js diff --git a/dev/Settings/User/Social.jsx b/dev/Settings/User/Social.js similarity index 100% rename from dev/Settings/User/Social.jsx rename to dev/Settings/User/Social.js diff --git a/dev/Settings/User/Templates.jsx b/dev/Settings/User/Templates.js similarity index 100% rename from dev/Settings/User/Templates.jsx rename to dev/Settings/User/Templates.js diff --git a/dev/Settings/User/Themes.jsx b/dev/Settings/User/Themes.js similarity index 100% rename from dev/Settings/User/Themes.jsx rename to dev/Settings/User/Themes.js diff --git a/dev/Storage/Client.jsx b/dev/Storage/Client.js similarity index 100% rename from dev/Storage/Client.jsx rename to dev/Storage/Client.js diff --git a/dev/Storage/RainLoop.jsx b/dev/Storage/RainLoop.js similarity index 100% rename from dev/Storage/RainLoop.jsx rename to dev/Storage/RainLoop.js diff --git a/dev/Storage/Settings.jsx b/dev/Storage/Settings.js similarity index 100% rename from dev/Storage/Settings.jsx rename to dev/Storage/Settings.js diff --git a/dev/Stores/AbstractApp.jsx b/dev/Stores/AbstractApp.js similarity index 100% rename from dev/Stores/AbstractApp.jsx rename to dev/Stores/AbstractApp.js diff --git a/dev/Stores/Admin/App.jsx b/dev/Stores/Admin/App.js similarity index 100% rename from dev/Stores/Admin/App.jsx rename to dev/Stores/Admin/App.js diff --git a/dev/Stores/User/App.jsx b/dev/Stores/User/App.js similarity index 100% rename from dev/Stores/User/App.jsx rename to dev/Stores/User/App.js diff --git a/dev/Stores/User/Identity.jsx b/dev/Stores/User/Identity.js similarity index 100% rename from dev/Stores/User/Identity.jsx rename to dev/Stores/User/Identity.js diff --git a/dev/admin.jsx b/dev/admin.js similarity index 100% rename from dev/admin.jsx rename to dev/admin.js diff --git a/dev/app.jsx b/dev/app.js similarity index 100% rename from dev/app.jsx rename to dev/app.js diff --git a/dev/boot.jsx b/dev/boot.js similarity index 96% rename from dev/boot.jsx rename to dev/boot.js index fc2719a9f..dfc668456 100644 --- a/dev/boot.jsx +++ b/dev/boot.js @@ -26,7 +26,7 @@ window.progressJs.onbeforeend(() => { require('json3'); require('../vendors/modernizr/modernizr-custom.js'); -require('Common/Booter.jsx'); +require('Common/Booter'); if (window.__runBoot) { diff --git a/dev/bootstrap.jsx b/dev/bootstrap.js similarity index 100% rename from dev/bootstrap.jsx rename to dev/bootstrap.js diff --git a/gulpfile.js b/gulpfile.js index 01495178f..37429ba36 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -185,11 +185,8 @@ function signFileTask(callback) { } }; -cfg.paths.globjs = 'dev/**/*.{js,jsx,html,css}'; -cfg.paths.globjsonly = 'dev/**/*.js'; -cfg.paths.globjsxonly = 'dev/**/*.jsx'; -cfg.paths.globjsall = 'dev/**/*.{js,jsx}'; -cfg.paths.globtsonly = 'dev/**/*.ts'; +cfg.paths.globall = 'dev/**/*.{js,html,css}'; +cfg.paths.globjs = 'dev/**/*.{js}'; cfg.paths.static = 'rainloop/v/' + cfg.devVersion + '/static/'; cfg.paths.staticJS = 'rainloop/v/' + cfg.devVersion + '/static/js/'; cfg.paths.staticMinJS = 'rainloop/v/' + cfg.devVersion + '/static/js/min/'; @@ -445,6 +442,7 @@ gulp.task('js:min', ['js:app', 'js:admin', 'js:validate'], function() { return gulp.src(cfg.paths.staticJS + '*.js') .pipe(ignore.exclude('*.next.js')) .pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"')) + .pipe(rename({suffix: '.min'})) .pipe(uglify({ mangle: true, compress: true @@ -456,7 +454,7 @@ gulp.task('js:min', ['js:app', 'js:admin', 'js:validate'], function() { // lint gulp.task('js:eslint', function() { - return gulp.src(cfg.paths.globjsall) + return gulp.src(cfg.paths.globjs) .pipe(cache('eslint')) .pipe(eslint()) .pipe(gulpif(cfg.watch, plumber({errorHandler: notify.onError("Error: <%= error.message %>")}))) @@ -684,7 +682,7 @@ gulp.task('watch', ['fast'], function() { cfg.watch = true; livereload.listen(); gulp.watch(cfg.paths.globjs, {interval: cfg.watchInterval}, ['js:app', 'js:admin']); - gulp.watch(cfg.paths.globjsall, {interval: cfg.watchInterval}, ['js:validate']); + gulp.watch(cfg.paths.globjs, {interval: cfg.watchInterval}, ['js:validate']); gulp.watch(cfg.paths.less.main.watch, {interval: cfg.watchInterval}, ['css:main']); }); diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php index 5905497e4..2863945ae 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -1945,8 +1945,11 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack $bAppJsDebug = !!$this->Config()->Get('labs', 'use_app_debug_js', false); - $aResult['StaticLibJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').'libs.js'); - $aResult['StaticAppJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').($bAdmin ? 'admin' : 'app').'.js'); + $aResult['StaticLibJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/'). + 'libs'.($bAppJsDebug ? '' : '.min').'.js'); + $aResult['StaticAppJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/'). + ($bAdmin ? 'admin' : 'app').($bAppJsDebug ? '' : '.min').'.js'); + $aResult['StaticAppJsNextLink'] = $this->StaticPath('js/'.($bAdmin ? 'admin' : 'app').'.next.js'); // todo min $aResult['StaticEditorJsLink'] = $this->StaticPath('ckeditor/ckeditor.js'); diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Service.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Service.php index 3620529cb..914b659f0 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Service.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Service.php @@ -1,323 +1,323 @@ -oHttp = \MailSo\Base\Http::SingletonInstance(); - $this->oActions = \RainLoop\Api::Actions(); - - $this->oServiceActions = new \RainLoop\ServiceActions($this->oHttp, $this->oActions); - - if ($this->oActions->Config()->Get('debug', 'enable', false)) - { - \error_reporting(E_ALL); - \ini_set('display_errors', 1); - } - - $sServer = \trim($this->oActions->Config()->Get('security', 'custom_server_signature', '')); - if (0 < \strlen($sServer)) - { - @\header('Server: '.$sServer, true); - } - - $sXFrameOptionsHeader = \trim($this->oActions->Config()->Get('security', 'x_frame_options_header', '')); - if (0 < \strlen($sXFrameOptionsHeader)) - { - @\header('X-Frame-Options: '.$sXFrameOptionsHeader, true); - } - - if ($this->oActions->Config()->Get('labs', 'force_https', false) && !$this->oHttp->IsSecure()) - { - @\header('Location: https://'.$this->oHttp->GetHost(false, false).$this->oHttp->GetUrl(), true); - exit(0); - } - - $this->localHandle(); - } - - /** - * @return bool - */ - public function RunResult() - { - return true; - } - - /** - * @staticvar bool $bOne - * @return bool - */ - public static function Handle() - { - static $bOne = null; - if (null === $bOne) - { - $oService = null; - if (\class_exists('MailSo\Version')) - { - $oService = new self(); - } - - $bOne = $oService->RunResult(); - } - - return $bOne; - } - - /** - * @return \RainLoop\Service - */ - private function localHandle() - { - if (!\class_exists('MailSo\Version')) - { - return $this; - } - - $this->oActions->BootStart(); - - $sResult = ''; - $bCached = false; - - $sQuery = $this->oActions->ParseQueryAuthString(); - - $this->oActions->Plugins()->RunHook('filter.http-query', array(&$sQuery)); - $aPaths = \explode('/', $sQuery); - $this->oActions->Plugins()->RunHook('filter.http-paths', array(&$aPaths)); - - $bAdmin = false; - $sAdminPanelHost = $this->oActions->Config()->Get('security', 'admin_panel_host', ''); - if (empty($sAdminPanelHost)) - { - $sAdminPanelKey = \strtolower($this->oActions->Config()->Get('security', 'admin_panel_key', 'admin')); - $bAdmin = !empty($aPaths[0]) && \strtolower($aPaths[0]) === $sAdminPanelKey; - } - else if (empty($aPaths[0]) && - \MailSo\Base\Utils::StrToLowerIfAscii($sAdminPanelHost) === \MailSo\Base\Utils::StrToLowerIfAscii($this->oHttp->GetHost())) - { - $bAdmin = true; - } - - if ($this->oHttp->IsPost()) - { - $this->oHttp->ServerNoCache(); - } - - if ($bAdmin && !$this->oActions->Config()->Get('security', 'allow_admin_panel', true)) - { - echo $this->oServiceActions->ErrorTemplates('Access Denied.', - 'Access to the RainLoop Webmail Admin Panel is not allowed!', true); - - return $this; - } - - $bIndex = true; - if (0 < \count($aPaths) && !empty($aPaths[0]) && !$bAdmin && 'index' !== \strtolower($aPaths[0])) - { - $bIndex = false; - $sMethodName = 'Service'.\preg_replace('/@.+$/', '', $aPaths[0]); - $sMethodExtra = 0 < \strpos($aPaths[0], '@') ? \preg_replace('/^[^@]+@/', '', $aPaths[0]) : ''; - - if (\method_exists($this->oServiceActions, $sMethodName) && - \is_callable(array($this->oServiceActions, $sMethodName))) - { - $this->oServiceActions->SetQuery($sQuery)->SetPaths($aPaths); - $sResult = \call_user_func(array($this->oServiceActions, $sMethodName), $sMethodExtra); - } - else if (!$this->oActions->Plugins()->RunAdditionalPart($aPaths[0], $aPaths)) - { - $bIndex = true; - } - } - - $bMobile = false; - $bMobileDevice = false; - - if ($this->oActions->Config()->Get('labs', 'allow_mobile_version', false)) - { - $oMobileDetect = new \Detection\MobileDetect(); - $bMobileDevice = $oMobileDetect->isMobile() && !$oMobileDetect->isTablet(); - - $bMobile = (0 < \count($aPaths) && !empty($aPaths[0]) && 'mobile' === \strtolower($aPaths[0])); - } - - if ($bIndex && !$bMobile) - { - $iMobileKey = (int) \RainLoop\Utils::GetCookie(\RainLoop\Actions::RL_SKIP_MOBILE_KEY, 0); - if (1 !== $iMobileKey) - { - if ($bMobileDevice) - { - $this->oActions->Location('./?/Mobile/'); - return $this; - } - } - } - - if ($bIndex) - { - @\header('Content-Security-Policy:'); - @\header_remove('Content-Security-Policy'); - - @header('Content-Type: text/html; charset=utf-8'); - $this->oHttp->ServerNoCache(); - - if (!@\is_dir(APP_DATA_FOLDER_PATH) || !@\is_writable(APP_DATA_FOLDER_PATH)) - { - echo $this->oServiceActions->ErrorTemplates( - 'Permission denied!', - 'RainLoop Webmail cannot access to the data folder "'.APP_DATA_FOLDER_PATH.'"' - ); - - return $this; - } - - $aTemplateParameters = $this->indexTemplateParameters($bAdmin, $bMobile, $bMobileDevice); - - $sCacheFileName = ''; - if ($this->oActions->Config()->Get('labs', 'cache_system_data', true) && !empty($aTemplateParameters['{{BaseHash}}'])) - { - $sCacheFileName = 'TMPL:'.$aTemplateParameters['{{BaseHash}}']; - $sResult = $this->oActions->Cacher()->Get($sCacheFileName); - } - - if (0 === \strlen($sResult)) - { -// $aTemplateParameters['{{BaseTemplates}}'] = $this->oServiceActions->compileTemplates($bAdmin, false); - $sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Index.html'), $aTemplateParameters); - - $sResult = \RainLoop\Utils::ClearHtmlOutput($sResult); - if (0 < \strlen($sCacheFileName)) - { - $this->oActions->Cacher()->Set($sCacheFileName, $sResult); - } - } - else - { - $bCached = true; - } - - $sResult .= ''; - } - - // Output result - echo $sResult; - unset($sResult); - - $this->oActions->BootEnd(); - return $this; - } - - /** - * @param string $sPath - * - * @return string - */ - private function staticPath($sPath) - { - return $this->oActions->StaticPath($sPath); - } - - /** - * @param bool $bAdmin = false - * @param bool $bMobile = false - * @param bool $bMobileDevice = false - * - * @return array - */ - private function indexTemplateParameters($bAdmin = false, $bMobile = false, $bMobileDevice = false) - { - $sLanguage = 'en'; - $sTheme = 'Default'; - - list($sLanguage, $sTheme) = $this->oActions->GetLanguageAndTheme($bAdmin, $bMobile); - - $bAppJsDebug = !!$this->oActions->Config()->Get('labs', 'use_app_debug_js', false); - $bAppCssDebug = !!$this->oActions->Config()->Get('labs', 'use_app_debug_css', false); - - $sFaviconUrl = (string) $this->oActions->Config()->Get('webmail', 'favicon_url', ''); - - $sFaviconPngLink = $sFaviconUrl ? $sFaviconUrl : $this->staticPath('apple-touch-icon.png'); - $sAppleTouchLink = $sFaviconUrl ? '' : $this->staticPath('apple-touch-icon.png'); - - $sContentSecurityPolicy = $this->oActions->Config()->Get('security', 'content_security_policy', ''); - - $aTemplateParameters = array( - '{{BaseAppFaviconPngLinkTag}}' => $sFaviconPngLink ? '' : '', - '{{BaseAppFaviconTouchLinkTag}}' => $sAppleTouchLink ? '' : '', - '{{BaseAppMainCssLink}}' => $this->staticPath('css/app'.($bAppCssDebug ? '' : '.min').'.css'), - '{{BaseAppThemeCssLink}}' => $this->oActions->ThemeLink($sTheme, $bAdmin), - '{{BaseAppBootScriptLink}}' => $this->staticPath('js/'.($bAppJsDebug ? '' : 'min/').'boot.js'), - '{{BaseViewport}}' => $bMobile ? 'width=device-width,initial-scale=1,user-scalable=no' : 'width=950,maximum-scale=2', - '{{BaseContentSecurityPolicy}}' => $sContentSecurityPolicy ? - '' : '', - '{{BaseDir}}' => false && \in_array($sLanguage, array('ar', 'he', 'ur')) ? 'rtl' : 'ltr', - '{{BaseAppManifestLink}}' => $this->staticPath('manifest.json') - ); - - $aTemplateParameters['{{RainloopBootData}}'] = \json_encode(array( - 'admin' => $bAdmin, - 'language' => $sLanguage, - 'theme' => $sTheme, - 'mobile' => $bMobile, - 'mobileDevice' => $bMobileDevice - )); - - $aTemplateParameters['{{BaseHash}}'] = \md5( - \implode('~', array( - $bAdmin ? '1' : '0', - \md5($this->oActions->Config()->Get('cache', 'index', '')), - $this->oActions->Plugins()->Hash(), - \RainLoop\Utils::WebVersionPath(), - APP_VERSION, - )). - \implode('~', $aTemplateParameters) - ); - - return $aTemplateParameters; - } -} +oHttp = \MailSo\Base\Http::SingletonInstance(); + $this->oActions = \RainLoop\Api::Actions(); + + $this->oServiceActions = new \RainLoop\ServiceActions($this->oHttp, $this->oActions); + + if ($this->oActions->Config()->Get('debug', 'enable', false)) + { + \error_reporting(E_ALL); + \ini_set('display_errors', 1); + } + + $sServer = \trim($this->oActions->Config()->Get('security', 'custom_server_signature', '')); + if (0 < \strlen($sServer)) + { + @\header('Server: '.$sServer, true); + } + + $sXFrameOptionsHeader = \trim($this->oActions->Config()->Get('security', 'x_frame_options_header', '')); + if (0 < \strlen($sXFrameOptionsHeader)) + { + @\header('X-Frame-Options: '.$sXFrameOptionsHeader, true); + } + + if ($this->oActions->Config()->Get('labs', 'force_https', false) && !$this->oHttp->IsSecure()) + { + @\header('Location: https://'.$this->oHttp->GetHost(false, false).$this->oHttp->GetUrl(), true); + exit(0); + } + + $this->localHandle(); + } + + /** + * @return bool + */ + public function RunResult() + { + return true; + } + + /** + * @staticvar bool $bOne + * @return bool + */ + public static function Handle() + { + static $bOne = null; + if (null === $bOne) + { + $oService = null; + if (\class_exists('MailSo\Version')) + { + $oService = new self(); + } + + $bOne = $oService->RunResult(); + } + + return $bOne; + } + + /** + * @return \RainLoop\Service + */ + private function localHandle() + { + if (!\class_exists('MailSo\Version')) + { + return $this; + } + + $this->oActions->BootStart(); + + $sResult = ''; + $bCached = false; + + $sQuery = $this->oActions->ParseQueryAuthString(); + + $this->oActions->Plugins()->RunHook('filter.http-query', array(&$sQuery)); + $aPaths = \explode('/', $sQuery); + $this->oActions->Plugins()->RunHook('filter.http-paths', array(&$aPaths)); + + $bAdmin = false; + $sAdminPanelHost = $this->oActions->Config()->Get('security', 'admin_panel_host', ''); + if (empty($sAdminPanelHost)) + { + $sAdminPanelKey = \strtolower($this->oActions->Config()->Get('security', 'admin_panel_key', 'admin')); + $bAdmin = !empty($aPaths[0]) && \strtolower($aPaths[0]) === $sAdminPanelKey; + } + else if (empty($aPaths[0]) && + \MailSo\Base\Utils::StrToLowerIfAscii($sAdminPanelHost) === \MailSo\Base\Utils::StrToLowerIfAscii($this->oHttp->GetHost())) + { + $bAdmin = true; + } + + if ($this->oHttp->IsPost()) + { + $this->oHttp->ServerNoCache(); + } + + if ($bAdmin && !$this->oActions->Config()->Get('security', 'allow_admin_panel', true)) + { + echo $this->oServiceActions->ErrorTemplates('Access Denied.', + 'Access to the RainLoop Webmail Admin Panel is not allowed!', true); + + return $this; + } + + $bIndex = true; + if (0 < \count($aPaths) && !empty($aPaths[0]) && !$bAdmin && 'index' !== \strtolower($aPaths[0])) + { + $bIndex = false; + $sMethodName = 'Service'.\preg_replace('/@.+$/', '', $aPaths[0]); + $sMethodExtra = 0 < \strpos($aPaths[0], '@') ? \preg_replace('/^[^@]+@/', '', $aPaths[0]) : ''; + + if (\method_exists($this->oServiceActions, $sMethodName) && + \is_callable(array($this->oServiceActions, $sMethodName))) + { + $this->oServiceActions->SetQuery($sQuery)->SetPaths($aPaths); + $sResult = \call_user_func(array($this->oServiceActions, $sMethodName), $sMethodExtra); + } + else if (!$this->oActions->Plugins()->RunAdditionalPart($aPaths[0], $aPaths)) + { + $bIndex = true; + } + } + + $bMobile = false; + $bMobileDevice = false; + + if ($this->oActions->Config()->Get('labs', 'allow_mobile_version', false)) + { + $oMobileDetect = new \Detection\MobileDetect(); + $bMobileDevice = $oMobileDetect->isMobile() && !$oMobileDetect->isTablet(); + + $bMobile = (0 < \count($aPaths) && !empty($aPaths[0]) && 'mobile' === \strtolower($aPaths[0])); + } + + if ($bIndex && !$bMobile) + { + $iMobileKey = (int) \RainLoop\Utils::GetCookie(\RainLoop\Actions::RL_SKIP_MOBILE_KEY, 0); + if (1 !== $iMobileKey) + { + if ($bMobileDevice) + { + $this->oActions->Location('./?/Mobile/'); + return $this; + } + } + } + + if ($bIndex) + { + @\header('Content-Security-Policy:'); + @\header_remove('Content-Security-Policy'); + + @header('Content-Type: text/html; charset=utf-8'); + $this->oHttp->ServerNoCache(); + + if (!@\is_dir(APP_DATA_FOLDER_PATH) || !@\is_writable(APP_DATA_FOLDER_PATH)) + { + echo $this->oServiceActions->ErrorTemplates( + 'Permission denied!', + 'RainLoop Webmail cannot access to the data folder "'.APP_DATA_FOLDER_PATH.'"' + ); + + return $this; + } + + $aTemplateParameters = $this->indexTemplateParameters($bAdmin, $bMobile, $bMobileDevice); + + $sCacheFileName = ''; + if ($this->oActions->Config()->Get('labs', 'cache_system_data', true) && !empty($aTemplateParameters['{{BaseHash}}'])) + { + $sCacheFileName = 'TMPL:'.$aTemplateParameters['{{BaseHash}}']; + $sResult = $this->oActions->Cacher()->Get($sCacheFileName); + } + + if (0 === \strlen($sResult)) + { +// $aTemplateParameters['{{BaseTemplates}}'] = $this->oServiceActions->compileTemplates($bAdmin, false); + $sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Index.html'), $aTemplateParameters); + + $sResult = \RainLoop\Utils::ClearHtmlOutput($sResult); + if (0 < \strlen($sCacheFileName)) + { + $this->oActions->Cacher()->Set($sCacheFileName, $sResult); + } + } + else + { + $bCached = true; + } + + $sResult .= ''; + } + + // Output result + echo $sResult; + unset($sResult); + + $this->oActions->BootEnd(); + return $this; + } + + /** + * @param string $sPath + * + * @return string + */ + private function staticPath($sPath) + { + return $this->oActions->StaticPath($sPath); + } + + /** + * @param bool $bAdmin = false + * @param bool $bMobile = false + * @param bool $bMobileDevice = false + * + * @return array + */ + private function indexTemplateParameters($bAdmin = false, $bMobile = false, $bMobileDevice = false) + { + $sLanguage = 'en'; + $sTheme = 'Default'; + + list($sLanguage, $sTheme) = $this->oActions->GetLanguageAndTheme($bAdmin, $bMobile); + + $bAppJsDebug = !!$this->oActions->Config()->Get('labs', 'use_app_debug_js', false); + $bAppCssDebug = !!$this->oActions->Config()->Get('labs', 'use_app_debug_css', false); + + $sFaviconUrl = (string) $this->oActions->Config()->Get('webmail', 'favicon_url', ''); + + $sFaviconPngLink = $sFaviconUrl ? $sFaviconUrl : $this->staticPath('apple-touch-icon.png'); + $sAppleTouchLink = $sFaviconUrl ? '' : $this->staticPath('apple-touch-icon.png'); + + $sContentSecurityPolicy = $this->oActions->Config()->Get('security', 'content_security_policy', ''); + + $aTemplateParameters = array( + '{{BaseAppFaviconPngLinkTag}}' => $sFaviconPngLink ? '' : '', + '{{BaseAppFaviconTouchLinkTag}}' => $sAppleTouchLink ? '' : '', + '{{BaseAppMainCssLink}}' => $this->staticPath('css/app'.($bAppCssDebug ? '' : '.min').'.css'), + '{{BaseAppThemeCssLink}}' => $this->oActions->ThemeLink($sTheme, $bAdmin), + '{{BaseAppBootScriptLink}}' => $this->staticPath('js/'.($bAppJsDebug ? '' : 'min/').'boot'.($bAppJsDebug ? '' : '.min').'.js'), + '{{BaseViewport}}' => $bMobile ? 'width=device-width,initial-scale=1,user-scalable=no' : 'width=950,maximum-scale=2', + '{{BaseContentSecurityPolicy}}' => $sContentSecurityPolicy ? + '' : '', + '{{BaseDir}}' => false && \in_array($sLanguage, array('ar', 'he', 'ur')) ? 'rtl' : 'ltr', + '{{BaseAppManifestLink}}' => $this->staticPath('manifest.json') + ); + + $aTemplateParameters['{{RainloopBootData}}'] = \json_encode(array( + 'admin' => $bAdmin, + 'language' => $sLanguage, + 'theme' => $sTheme, + 'mobile' => $bMobile, + 'mobileDevice' => $bMobileDevice + )); + + $aTemplateParameters['{{BaseHash}}'] = \md5( + \implode('~', array( + $bAdmin ? '1' : '0', + \md5($this->oActions->Config()->Get('cache', 'index', '')), + $this->oActions->Plugins()->Hash(), + \RainLoop\Utils::WebVersionPath(), + APP_VERSION, + )). + \implode('~', $aTemplateParameters) + ); + + return $aTemplateParameters; + } +} diff --git a/webpack.config.builder.js b/webpack.config.builder.js index ad2fb55df..daf9f670b 100644 --- a/webpack.config.builder.js +++ b/webpack.config.builder.js @@ -7,12 +7,12 @@ var module.exports = function(es6) { return { entry: es6 ? { - 'app.next': __dirname + '/dev/app.jsx', - 'admin.next': __dirname + '/dev/admin.jsx' + 'app.next': __dirname + '/dev/app.js', + 'admin.next': __dirname + '/dev/admin.js' } : { - 'boot': __dirname + '/dev/boot.jsx', - 'app': __dirname + '/dev/app.jsx', - 'admin': __dirname + '/dev/admin.jsx' + 'boot': __dirname + '/dev/boot.js', + 'app': __dirname + '/dev/app.js', + 'admin': __dirname + '/dev/admin.js' }, output: { pathinfo: true, @@ -25,7 +25,7 @@ module.exports = function(es6) { ], resolve: { modules: [devPath, 'node_modules'], - extensions: ['', '.js', '.jsx'], + extensions: ['', '.js'], alias: { 'Opentip': __dirname + '/dev/External/Opentip.js', 'ko': __dirname + '/dev/External/ko.js' @@ -121,5 +121,5 @@ module.exports = function(es6) { 'Promise': 'window.Promise', '$': 'window.jQuery' } - } + }; };