Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-06-12 15:32:20 +0300
committerJulius Härtl <jus@bitgrid.net>2019-06-12 15:32:42 +0300
commit6824232ab2269a7b815c66f2b7cc57612f15f201 (patch)
tree61ab9e1f0a4221502187895c7c770bc97e132531 /src/main.js
parenta0e5b0ddab7ebbaa4f09b379a7c98ad298b9b90d (diff)
Cleanup sessions/steps when no session are active anymore
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/main.js b/src/main.js
index f4639a102..404cd20a4 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,5 +1,4 @@
import Vue from 'vue'
-
import Editor from './components/EditorWrapper'
__webpack_nonce__ = btoa(OC.requestToken) // eslint-disable-line
@@ -8,12 +7,17 @@ __webpack_public_path__ = OC.linkTo('text', 'js/') // eslint-disable-line
Vue.prototype.t = t
Vue.prototype.OCA = OCA
-new Vue({
- render: h => h(Editor, {
- props: {
- relativePath: '/welcome.md',
- active: true
- }
- })
+if (document.getElementById('maineditor')) {
+ new Vue({
+ render: h => h(Editor, {
+ props: {
+ relativePath: '/welcome.md',
+ active: true
+ }
+ })
+ }).$mount('#maineditor')
+}
-}).$mount('#maineditor')
+OCA.Text = {
+ Editor
+}