Skip to content

Commit d13e9e0

Browse files
author
Paul Pillot
committed
tmp: disable electron for now
1 parent 7d62914 commit d13e9e0

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

src/components/Searchlibmol.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
import ajax, { LibmolQueryResponse } from '../utils/queryLibmolAjax'
1414
import { debounce } from 'throttle-debounce'
1515
import BaseSearchDatabase from './BaseSearchDatabase.vue'
16-
import { LibmolResponse } from '../utils/queryLibmolElectron'
16+
import { LibmolResponse } from '../utils/queryLibmolAjax'
1717
1818
// this replaces the webapp ajax call by a DB query in electron app
1919
let query = ajax
20-
if (process.env.IS_ELECTRON) {
21-
import('../utils/queryLibmolElectron').then(mod => {
22-
query = mod.default
23-
})
24-
}
20+
// if (process.env.IS_ELECTRON) {
21+
// import('../utils/queryLibmolElectron').then(mod => {
22+
// query = mod.default
23+
// })
24+
// }
2525
2626
export default {
2727
name: 'SearchLibmol',

src/utils/queryLibmolAjax.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import axios, { CancelTokenSource, AxiosResponse } from 'axios'
2-
import { LibmolResponse } from './queryLibmolElectron'
2+
33
export interface LibmolQueryResponse {
44
molId: string,
55
label: string,
66
file: string
77
}
8+
export interface LibmolResponse {
9+
value: string,
10+
file: string,
11+
molId: string,
12+
source: 'libmol'
13+
}
814
const CancelToken = axios.CancelToken
915
let source: CancelTokenSource
1016
const path = (process.env.NODE_ENV !== 'production')

src/utils/queryLibmolElectron.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
import Datastore from 'nedb'
22
import path from 'path'
33
import fs from 'fs'
4-
4+
import { LibmolResponse } from './queryLibmolAjax'
55
declare const __static: string;
66
interface LibmolNeDBDoc {
77
TITRE: string
88
FICHIER: string
99
ID: string
1010
}
11-
export interface LibmolResponse {
12-
value: string,
13-
file: string,
14-
molId: string,
15-
source: 'libmol'
16-
}
11+
1712

1813
const molecules = new Datastore({
1914
inMemoryOnly: true

0 commit comments

Comments
 (0)