Commit db817a15 authored by Matthieu Le Corre's avatar Matthieu Le Corre

Massive lint + switch to axios

parent 8a047882
This diff is collapsed.
This diff is collapsed.
(window["webpackJsonpFileWhiteboard"] = window["webpackJsonpFileWhiteboard"] || []).push([[2],{
/***/ 75:
/***/ (function(module, exports) {
throw new Error("Module build failed: Error: ENOENT: no such file or directory, open '/var/www/html/stable18/apps/whiteboard/src/appconfig.js'");
/***/ })
}]);
//# sourceMappingURL=2.js.map
\ No newline at end of file
{"version":3,"sources":[],"names":[],"mappings":"","file":"2.js","sourceRoot":""}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */,
/* 1 */
/***/ (function(module, exports) {
/**
* @author Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>
*
* @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/>.
*
*/
/**
* @namespace collaboration
*/
collaborationEngine = {
startSession: function(filename) {
var url = OC.generateUrl('apps/whiteboard/collaboration/createsession');
var id = window.FileList.findFile(filename).id
console.log("Create session for id #"+id) ;
ajx = $.ajax({
type: 'POST',
url: url,
data: {id: id }
}) ;
return ajx.promise() ;
},
addUser: function(filename) {
var url = OC.generateUrl('apps/whiteboard/collaboration/adduser');
var id = window.FileList.findFile(filename).id
console.log("Adding user " + OC.currentUser ) ;
ajx = $.ajax({
type: 'POST',
url: url,
data: {id: id,
user: OC.currentUser
}
}) ;
return ajx.promise() ;
}
}
/***/ })
/******/ ]);
//# sourceMappingURL=collaboration.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/collaboration.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,SAAS;;AAET;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,SAAS;;AAET;;AAEA;;;;AAIA","file":"collaboration.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","/**\n * @author Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n \n/**\n* @namespace collaboration\n*/\ncollaborationEngine = {\n\n startSession: function(filename) {\n var url = OC.generateUrl('apps/whiteboard/collaboration/createsession');\n var id = window.FileList.findFile(filename).id\n console.log(\"Create session for id #\"+id) ;\n ajx = $.ajax({\n type: 'POST',\n url: url,\n data: {id: id }\n }) ;\n \n return ajx.promise() ;\n },\n\n addUser: function(filename) {\n var url = OC.generateUrl('apps/whiteboard/collaboration/adduser');\n var id = window.FileList.findFile(filename).id\n console.log(\"Adding user \" + OC.currentUser ) ;\n\n ajx = $.ajax({\n type: 'POST',\n url: url,\n data: {id: id,\n user: OC.currentUser\n }\n }) ;\n \n return ajx.promise() ;\n \n }\n\n\n\n}\n\n"],"sourceRoot":""}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,6 @@
"name": "whiteboard",
"version": "0.0.1",
"description": "collaborative whiteboard",
"main": "./js/main.js",
"repository": "https://gitlab.univ-nantes.fr/uncloud/whiteboard.git",
"author": "Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>",
"license": "AGPL-3.0",
......@@ -16,11 +15,18 @@
"stylelint:fix": "stylelint src --fix"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.9.5",
"@nextcloud/eslint-config": "^2.0.0",
"@nextcloud/eslint-plugin": "^1.4.0",
"@vue/test-utils": "^1.0.0-beta.33",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"css-loader": "^3.5.2",
"eslint": "^6.8.0",
"eslint-config-standard": "^12.0.0",
"eslint-import-resolver-webpack": "^0.12.1",
"eslint-loader": "^3.0.4",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-nextcloud": "^0.3.0",
......@@ -28,15 +34,31 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2",
"eslint-plugin-vue-libs": "^4.0.0",
"node-sass": "^4.13.1",
"sass-loader": "^8.0.2",
"stylelint": "^13.3.2",
"stylelint-config-recommended-scss": "^4.2.0",
"stylelint-scss": "^3.17.1",
"stylelint-webpack-plugin": "^1.2.3",
"vue-loader": "^15.9.1",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11"
"webpack-cli": "^3.3.11",
"webpack-merge": "^4.2.2",
"webpack-node-externals": "^1.7.2"
},
"dependencies": {
"@nextcloud/auth": "^1.2.3",
"@nextcloud/axios": "^1.3.2",
"@nextcloud/event-bus": "^1.1.4",
"@nextcloud/router": "^1.0.2",
"@nextcloud/vue": "^1.5.0",
"create-react-class": "^15.6.3",
"literallycanvas": "^0.5.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-dom-factories": "^1.0.2"
"react-dom-factories": "^1.0.2",
"vue": "^2.6.11"
}
}
/* eslint-env jquery */
/**
* @author Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>
*
......@@ -19,6 +21,10 @@
*/
import { emit } from '@nextcloud/event-bus'
import { generateUrl } from '@nextcloud/router'
import { getCurrentUser } from '@nextcloud/auth'
import axios from '@nextcloud/axios'
/**
* @namespace collaborationEngine
*/
......@@ -34,22 +40,22 @@ export default {
this.filename = filename
this.context = context
this.SSE_URL = OC.generateUrl('apps/' + this.appName + '/collaboration/event')
this.SSE_URL = generateUrl('apps/' + this.appName + '/collaboration/event')
this.SSE_OPT = { withCredentials: true }
this.init().then(function(data) {
console.log('CE : Collaboration started for ' + self.appName)
// console.log('CE : Collaboration started for ' + self.appName)
self.addUser()
// because we may arrive in an allready running session
// get all steps from last last save
self.getSteps().then(function(steps) {
steps.forEach(step => emit(self.appName + '::externalAddStep', step))
steps.data.forEach(step => emit(self.appName + '::externalAddStep', step))
})
// start pulling for change
self.communicationStarted = true
console.log('CE : starting communication ')
// console.log('CE : starting communication ')
self.startCommunication()
})
......@@ -58,110 +64,98 @@ export default {
stop: function() {
this.removeUser()
this.stopCommunication()
console.log('CE : Collaboration stopped for ' + this.appName)
// console.log('CE : Collaboration stopped for ' + this.appName)
},
init: function() {
const url = OC.generateUrl('apps/' + this.appName + '/collaboration/startsession')
const url = generateUrl('apps/' + this.appName + '/collaboration/startsession')
this.id = window.FileList.findFile(this.filename).id
const ajx = $.ajax({
type: 'POST',
url: url,
data: { id: this.id },
const ajx = axios.post(url, {
id: this.id,
})
return ajx.promise()
return ajx
},
addUser: function() {
const url = OC.generateUrl('apps/' + this.appName + '/collaboration/adduser')
console.log('CE : Adding user ' + OC.currentUser)
const ajx = $.ajax({
type: 'POST',
url: url,
data: { id: this.id,
user: OC.currentUser,
},
const url = generateUrl('apps/' + this.appName + '/collaboration/adduser')
// console.log('CE : Adding user ' + OC.currentUser)
const ajx = axios.post(url, {
id: this.id,
user: getCurrentUser().uid,
})
return ajx.promise()
return ajx
},
removeUser: function() {
const url = OC.generateUrl('apps/' + this.appName + '/collaboration/removeuser')
console.log('CE : Removing user ' + OC.currentUser)
const ajx = $.ajax({
type: 'POST',
url: url,
data: { id: this.id,
user: OC.currentUser,
},
const url = generateUrl('apps/' + this.appName + '/collaboration/removeuser')
// console.log('CE : Removing user ' + OC.currentUser)
const ajx = axios.post(url, {
id: this.id,
user: getCurrentUser().uid,
})
return ajx.promise()
return ajx
},
sendStep: function(payload) {
const url = OC.generateUrl('apps/' + this.appName + '/collaboration/addstep')
console.log('CE : Sending ', payload.type, ' step')
const ajx = $.ajax({
type: 'POST',
url: url,
data: { id: this.id,
user: OC.currentUser,
type: payload.type,
step: JSON.stringify(payload.step),
},
const url = generateUrl('apps/' + this.appName + '/collaboration/addstep')
// console.log('CE : Sending ', payload.type, ' step')
const ajx = axios.post(url, {
id: this.id,
user: getCurrentUser().uid,
type: payload.type,
step: JSON.stringify(payload.step),
})
return ajx.promise()
return ajx
},
getSteps: function() {
const url = OC.generateUrl('apps/' + this.appName + '/collaboration/getsteps')
console.log('CE : Getting initial steps')
const ajx = $.ajax({
type: 'GET',
url: url,
data: {
const url = generateUrl('apps/' + this.appName + '/collaboration/getsteps')
// console.log('CE : Getting initial steps')
const ajx = axios.get(url, {
params: {
id: this.id,
},
})
return ajx.promise()
return ajx
},
startCommunication: function() {
const self = this
this.longPull().done(function(steps) {
steps.forEach(function(step) {
if (step.userId != OC.currentUser) {
this.longPull().then(function(reponse) {
reponse.data.forEach(function(step) {
if (step.userId !== getCurrentUser().uid) {
emit(self.appName + '::externalAddStep', step)
console.log('CE : A step for me !')
// console.log('CE : A step for me !')
}
})
if (self.communicationStarted == true) {
if (self.communicationStarted === true) {
self.startCommunication()
}
})
},
longPull: function() {
const url = OC.generateUrl('apps/' + this.appName + '/collaboration/pushstep')
console.log('CE : Poll again ...')
const ajx = $.ajax({
type: 'GET',
url: url,
data: {
const url = generateUrl('apps/' + this.appName + '/collaboration/pushstep')
// console.log('CE : Poll again ...')
const ajx = axios.get(url, {
params: {
id: this.id,
user: OC.currentUser,
user: getCurrentUser().uid,
},
})
return ajx.promise()
return ajx
},
......
/* eslint-env jquery */
/**
* @author Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>
*
......@@ -17,16 +19,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
import { emit } from '@nextcloud/event-bus'
import { linkTo, generateUrl } from '@nextcloud/router'
import axios from '@nextcloud/axios'
export default {
name: 'editor',
start: function(app_name, filename, context) {
start: function(appName, filename, context) {
const self = this
this.app_name = app_name
this.appname = appName
this.filename = filename
this.context = context
......@@ -41,9 +45,9 @@ export default {
return import(/* webpackChunkName: "literallycanvas" */ 'literallycanvas').then(LC => {
this.LC = LC
this.whiteboard = LC.init(
document.getElementById(this.app_name + '-editor'),
document.getElementById(this.appname + '-editor'),
{
imageURLPrefix: OC.linkTo(this.app_name, 'img/lc_assets'),
imageURLPrefix: linkTo(this.appname, 'img/lc_assets'),
toolbarPosition: 'top',
}
)
......@@ -54,16 +58,16 @@ export default {
loadContent: function() {
const self = this
const url = OC.generateUrl('apps/' + this.app_name + '/file/load')
const url = generateUrl('apps/' + this.appname + '/file/load')
$.ajax({
type: 'GET',
url: url,
data: { path: this.context.dir + '/' + this.filename },
}).done(function(content) {
axios.get(url, {
params: {
path: this.context.dir + '/' + this.filename,
},
}).then(function(content) {
// console.log("WB : loaded") ;
if (content.trim() != '') {
self.whiteboard.loadSnapshot(JSON.parse(content))
if (content.data.trim() !== '') {
self.whiteboard.loadSnapshot(JSON.parse(content.data))
}
})
},
......@@ -73,24 +77,20 @@ export default {
const self = this
const url = OC.generateUrl('apps/' + this.app_name + '/file/save')
const postObject = {
content: JSON.stringify(this.whiteboard.getSnapshot()),
path: this.context.dir + '/' + this.filename,
}
const url = generateUrl('apps/' + this.appname + '/file/save')
$.ajax({
type: 'POST',
url: url,
data: postObject,
}).done(function(content) {
axios.post(url, {
param: {
content: JSON.stringify(this.whiteboard.getSnapshot()),
path: this.context.dir + '/' + this.filename,
},
}).then(function(content) {
OC.Notification.showTemporary('File saved')
const payload = {
'type': 'save',
'step': 'NA',
}
emit(self.app_name + '::editorAddStep', payload)
emit(self.appname + '::editorAddStep', payload)
})
},
......@@ -112,8 +112,8 @@ export default {
'type': 'shapeSave',
'step': self.LC.shapeToJSON(data.shape),
}
emit(self.app_name + '::editorAddStep', payload)
console.log('ED: Creating NewShape ')
emit(self.appname + '::editorAddStep', payload)
// console.log('ED: Creating NewShape ')
return data
})
......@@ -127,7 +127,7 @@ export default {
applyChange: function(step) {
switch (step.stepType) {
case 'shapeSave':
var shapeStep = this.LC.JSONToShape(JSON.parse(step.stepData))
const shapeStep = this.LC.JSONToShape(JSON.parse(step.stepData)) // eslint-disable-line
this.whiteboard.saveShape(shapeStep, false)
break
default: console.warn('unknown step type')
......
......@@ -24,12 +24,12 @@ const APP_NAME = 'whiteboard'
const APP_EXT = 'wbr'
const APP_MIME = 'application/wbr'
__webpack_nonce__ = btoa(OC.requestToken)
__webpack_public_path__ = OC.linkTo(APP_NAME, 'js/')
__webpack_nonce__ = btoa(OC.requestToken) // eslint-disable-line
__webpack_public_path__ = OC.linkTo(APP_NAME, 'js/') // eslint-disable-line
OCA.whiteboard = ApplicationPrototype
$(document).ready(function() {
document.addEventListener('DOMContentLoaded', () => {
OCA.whiteboard.initialise(APP_NAME, APP_EXT, APP_MIME)
......
/* eslint-env jquery */
/**
* @author Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>
*
......@@ -20,7 +22,11 @@
import editor from './editor.js'
import collaborationEngine from './collaboration.js'
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
import { imagePath } from '@nextcloud/router'
// import Vue from 'vue'
// import prototypeView from './prototypeView'
/**
* @namespace ApplicationPrototype
......@@ -50,8 +56,24 @@ export default {
setupContainer: function(filename, context) {
const self = this
/*
const container = document.createElement('div')
container.id = this.APP_NAME + '-container'
document.body.appendChild(container)
Vue.prototype.t = window.t
Vue.prototype.n = window.n
Vue.prototype.OCA = window.OCA
const vm = new Vue({
el: '#whiteboard-container',
render: h => h(prototypeView),
})
vm.$mount(container)
*/
$('#content')
$('#content')
.append(this.container)
.addClass('viewer-mode')
.addClass('no-sidebar')
......@@ -89,7 +111,7 @@ export default {
mime: this.APP_MIME,
permissions: OC.PERMISSION_READ,
icon: function() {
return OC.imagePath('core', 'actions/edit')