diff --git a/models/doctype/AccountingSettings/AccountingSettings.js b/models/doctype/AccountingSettings/AccountingSettings.js index 1b71ac59..66677ab5 100644 --- a/models/doctype/AccountingSettings/AccountingSettings.js +++ b/models/doctype/AccountingSettings/AccountingSettings.js @@ -1,6 +1,4 @@ -const countryList = Object.keys( - require('../../../fixtures/countryInfo.json') -).sort(); +const countryList = Object.keys(require('../../../fixtures/countryInfo.json')).sort(); module.exports = { name: 'AccountingSettings', @@ -29,7 +27,7 @@ module.exports = { { fieldname: 'country', label: 'Country', - fieldtype: 'Autocomplete', + fieldtype: 'AutoComplete', required: 1, getList: () => countryList }, @@ -85,5 +83,14 @@ module.exports = { fieldtype: 'Date', required: 1 } + ], + quickEditFields: [ + 'fullname', + 'email', + 'companyName', + 'country', + 'currency', + 'fiscalYearStart', + 'fiscalYearEnd', ] }; diff --git a/src/App.vue b/src/App.vue index 2964ffc3..fcea67d9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -55,9 +55,7 @@ export default { Settings }, mounted() { - if (this.$route.path === '/settings') { - this.showSettings = true; - } else if (!localStorage.dbPath) { + if (!localStorage.dbPath) { this.showDatabaseSelector = true; } else { frappe.events.trigger('connect-database', localStorage.dbPath); @@ -70,7 +68,11 @@ export default { }); frappe.events.on('show-desk', () => { - this.showDesk = true; + if (this.$route.path === '/settings') { + this.showSettings = true; + } else { + this.showDesk = true; + } this.showSetupWizard = false; this.showDatabaseSelector = false; }); diff --git a/src/components/TwoColumnForm.vue b/src/components/TwoColumnForm.vue new file mode 100644 index 00000000..c6f08ead --- /dev/null +++ b/src/components/TwoColumnForm.vue @@ -0,0 +1,40 @@ + + diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 8d098214..5849e0b3 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -1,32 +1,43 @@ + diff --git a/src/router.js b/src/router.js index 9f37f937..0600c073 100644 --- a/src/router.js +++ b/src/router.js @@ -109,6 +109,5 @@ const routes = [ ]; let router = new Router({ routes }); -router.replace('/list/Item'); export default router; diff --git a/src/sidebarConfig.js b/src/sidebarConfig.js index 4f1f8fe5..3fbfeb9b 100644 --- a/src/sidebarConfig.js +++ b/src/sidebarConfig.js @@ -1,10 +1,12 @@ import frappe from 'frappejs'; +import { remote } from 'electron'; import { _ } from 'frappejs/utils'; import DashboardIcon from './components/Icons/Dashboard'; import SalesIcon from './components/Icons/Sales'; import PurchasesIcon from './components/Icons/Purchases'; import ReportsIcon from './components/Icons/Reports'; import SettingsIcon from './components/Icons/Settings'; +import theme from '@/theme'; const config = { getTitle: async () => { @@ -105,7 +107,18 @@ const config = { title: _('Settings'), icon: SettingsIcon, action() { - window.open('/index.html#/settings'); + let child = new remote.BrowserWindow({ + parent: remote.getCurrentWindow(), + frame: false, + width: 460, + height: 577, + backgroundColor: theme.backgroundColor.gray['200'], + webPreferences: { + webSecurity: false, + nodeIntegration: true + } + }); + child.loadURL('http://localhost:8000/#/settings'); } } ] diff --git a/src/theme.js b/src/theme.js new file mode 100644 index 00000000..32d4ca18 --- /dev/null +++ b/src/theme.js @@ -0,0 +1,4 @@ +import resolveConfig from 'tailwindcss/resolveConfig'; +import tailwindConfig from '../tailwind.config'; + +export default resolveConfig(tailwindConfig).theme; diff --git a/tailwind.config.js b/tailwind.config.js index 70a4e53b..6659825b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -40,7 +40,8 @@ module.exports = { } }, variants: { - margin: ['responsive', 'first', 'hover', 'focus'] + margin: ['responsive', 'first', 'hover', 'focus'], + backgroundColor: ['responsive', 'first', 'hover', 'focus', 'focus-within'], }, plugins: [] };