summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-05-14 11:14:29 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-05-14 11:14:29 +0200
commit0f3e438f7cab87514be3896bb8acdc05defdef14 (patch)
tree75e44065584f0d169e63d61711e6816412f17133 /core/src
parentc41aa7a20929118ce1092c603f709d06aef1da57 (diff)
downloadnextcloud-server-0f3e438f7cab87514be3896bb8acdc05defdef14.tar.gz
nextcloud-server-0f3e438f7cab87514be3896bb8acdc05defdef14.zip
Move OC.theme to the bundle and deprecate oc_defaults
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OC/index.js2
-rw-r--r--core/src/OC/theme.js22
-rw-r--r--core/src/globals.js1
3 files changed, 25 insertions, 0 deletions
diff --git a/core/src/OC/index.js b/core/src/OC/index.js
index 6ba517028a2..ea217edaf88 100644
--- a/core/src/OC/index.js
+++ b/core/src/OC/index.js
@@ -88,6 +88,7 @@ import Notification from './notification'
import PasswordConfirmation from './password-confirmation'
import Plugins from './plugins'
import search from './search'
+import {theme} from './theme'
import Util from './util'
import {debug} from './debug'
import {redirect, reload} from './navigation'
@@ -202,6 +203,7 @@ export default {
PasswordConfirmation,
Plugins,
search,
+ theme,
Util,
debug,
filePath,
diff --git a/core/src/OC/theme.js b/core/src/OC/theme.js
new file mode 100644
index 00000000000..8e49499f485
--- /dev/null
+++ b/core/src/OC/theme.js
@@ -0,0 +1,22 @@
+/*
+ * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @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/>.
+ */
+
+export const theme = window._theme || {}
diff --git a/core/src/globals.js b/core/src/globals.js
index 2ec37c480cd..e644af84248 100644
--- a/core/src/globals.js
+++ b/core/src/globals.js
@@ -123,6 +123,7 @@ setDeprecatedProp('oc_capabilities', OC.getCapabilities, 'use OC.getCapabilities
setDeprecatedProp('oc_config', () => OC.config, 'use OC.config instead')
setDeprecatedProp('oc_current_user', () => OC.getCurrentUser().uid, 'use OC.getCurrentUser().uid instead')
setDeprecatedProp('oc_debug', () => OC.debug, 'use OC.debug instead')
+setDeprecatedProp('oc_defaults', () => OC.theme, 'use OC.theme instead')
setDeprecatedProp('oc_isadmin', OC.isUserAdmin, 'use OC.isUserAdmin() instead')
setDeprecatedProp('oc_requesttoken', () => getRequestToken(), 'use OC.requestToken instead')
setDeprecatedProp('oc_webroot', () => OC.webroot, 'use OC.getRootPath() instead')