2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: Move openSettings to common utils

This commit is contained in:
Faris Ansari 2020-01-02 22:36:57 +05:30
parent 8133ad0300
commit 86f346913b
4 changed files with 7 additions and 8 deletions

View File

@ -158,7 +158,7 @@ import Button from '@/components/Button';
import FormControl from '@/components/Controls/FormControl';
import DropdownWithActions from '@/components/DropdownWithActions';
import BackLink from '@/components/BackLink';
import { openSettings } from '@/pages/Settings/utils';
import { openSettings } from '@/utils';
import {
handleErrorWithDialog,
getActionsForDocument,

View File

@ -1,5 +0,0 @@
import { ipcRenderer } from 'electron';
export function openSettings(tab = 'General') {
ipcRenderer.send('open-settings-window', tab);
}

View File

@ -1,5 +1,5 @@
import frappe from 'frappejs';
import { openSettings } from './pages/Settings/utils';
import { openSettings } from '@/utils';
import { _ } from 'frappejs/utils';
import Icon from './components/Icon';
import router from './router';

View File

@ -1,7 +1,7 @@
import frappe from 'frappejs';
import fs from 'fs';
import { _ } from 'frappejs/utils';
import { remote, shell } from 'electron';
import { remote, shell, ipcRenderer } from 'electron';
import SQLite from 'frappejs/backends/sqlite';
import postStart from '../server/postStart';
import router from '@/router';
@ -266,3 +266,7 @@ export function getActionsForDocument(doc) {
return actions;
}
export function openSettings(tab = 'General') {
ipcRenderer.send('open-settings-window', tab);
}