2
0
mirror of https://github.com/frappe/books.git synced 2025-02-02 20:18:26 +00:00

Initialize docs in frappe.init

This commit is contained in:
Faris Ansari 2018-07-14 18:45:21 +05:30
parent cda0bbffc7
commit e9d2f5c2c2
3 changed files with 98 additions and 98 deletions

View File

@ -10,7 +10,7 @@ function getSettings() {
try { try {
settings = require(configFilePath); settings = require(configFilePath);
} catch (e) { } catch (e) {
settings = {} settings = {};
} }
return settings; return settings;
@ -23,4 +23,4 @@ async function saveSettings(settings) {
module.exports = { module.exports = {
getSettings, getSettings,
saveSettings saveSettings
} };

View File

@ -8,10 +8,9 @@ import router from './router';
import frappeVue from 'frappejs/ui/plugins/frappeVue'; import frappeVue from 'frappejs/ui/plugins/frappeVue';
// frappejs imports // frappejs imports
import io from 'socket.io-client';
import frappe from 'frappejs'; import frappe from 'frappejs';
import io from 'socket.io-client';
import HTTPClient from 'frappejs/backends/http'; import HTTPClient from 'frappejs/backends/http';
import Observable from 'frappejs/utils/observable';
import common from 'frappejs/common'; import common from 'frappejs/common';
import coreModels from 'frappejs/models'; import coreModels from 'frappejs/models';
import models from '../models'; import models from '../models';
@ -26,8 +25,6 @@ frappe.fetch = window.fetch.bind();
frappe.db = new HTTPClient({ server }); frappe.db = new HTTPClient({ server });
const socket = io.connect(`http://${server}`); const socket = io.connect(`http://${server}`);
frappe.db.bindSocketClient(socket); frappe.db.bindSocketClient(socket);
frappe.registerModels(models);
frappe.docs = new Observable();
frappe.getSingle('SystemSettings'); frappe.getSingle('SystemSettings');
registerReportMethods(); registerReportMethods();

View File

@ -40,10 +40,11 @@ import indicatorColor from 'frappejs/ui/constants/indicators';
import setupConfig from './config'; import setupConfig from './config';
export default { export default {
name: 'SetupWizard',
data() { data() {
return { return {
currentSection: 0 currentSection: 0
} };
}, },
components: { components: {
FormLayout FormLayout
@ -85,7 +86,9 @@ export default {
this.currentSection -= 1; this.currentSection -= 1;
}, },
indicatorColor(i) { indicatorColor(i) {
return i === this.currentSection ? indicatorColor.BLUE : ''; return i === this.currentSection
? indicatorColor.BLUE
: indicatorColor.GREY;
} }
}, },
computed: { computed: {
@ -96,5 +99,5 @@ export default {
return setupConfig.layout; return setupConfig.layout;
} }
} }
} };
</script> </script>