File tree 3 files changed +15
-14
lines changed
3 files changed +15
-14
lines changed Original file line number Diff line number Diff line change 13
13
import ajax , { LibmolQueryResponse } from ' ../utils/queryLibmolAjax'
14
14
import { debounce } from ' throttle-debounce'
15
15
import BaseSearchDatabase from ' ./BaseSearchDatabase.vue'
16
- import { LibmolResponse } from ' ../utils/queryLibmolElectron '
16
+ import { LibmolResponse } from ' ../utils/queryLibmolAjax '
17
17
18
18
// this replaces the webapp ajax call by a DB query in electron app
19
19
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
+ // }
25
25
26
26
export default {
27
27
name: ' SearchLibmol' ,
Original file line number Diff line number Diff line change 1
1
import axios , { CancelTokenSource , AxiosResponse } from 'axios'
2
- import { LibmolResponse } from './queryLibmolElectron'
2
+
3
3
export interface LibmolQueryResponse {
4
4
molId : string ,
5
5
label : string ,
6
6
file : string
7
7
}
8
+ export interface LibmolResponse {
9
+ value : string ,
10
+ file : string ,
11
+ molId : string ,
12
+ source : 'libmol'
13
+ }
8
14
const CancelToken = axios . CancelToken
9
15
let source : CancelTokenSource
10
16
const path = ( process . env . NODE_ENV !== 'production' )
Original file line number Diff line number Diff line change 1
1
import Datastore from 'nedb'
2
2
import path from 'path'
3
3
import fs from 'fs'
4
-
4
+ import { LibmolResponse } from './queryLibmolAjax'
5
5
declare const __static : string ;
6
6
interface LibmolNeDBDoc {
7
7
TITRE : string
8
8
FICHIER : string
9
9
ID : string
10
10
}
11
- export interface LibmolResponse {
12
- value : string ,
13
- file : string ,
14
- molId : string ,
15
- source : 'libmol'
16
- }
11
+
17
12
18
13
const molecules = new Datastore ( {
19
14
inMemoryOnly : true
You can’t perform that action at this time.
0 commit comments