-
+
+
@@ -74,5 +91,14 @@
+
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 01a7b69..1586fc2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,5 +1,5 @@
{
- "name": "enjoyloli",
+ "name": "gelbooru-client",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
@@ -9,6 +9,12 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.52.tgz",
"integrity": "sha512-jjpyQsKGsOF/wUElNjfPULk+d8PKvJOIXk3IUeBYYmNCy5dMWfrI+JiixYNw8ppKOlcRwWTXFl0B+i5oGrf95Q=="
},
+ "abbrev": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "dev": true
+ },
"ajv": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
@@ -25,11 +31,48 @@
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
+ "any-promise": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
+ "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=",
+ "dev": true
+ },
"array-find-index": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
"integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E="
},
+ "asar": {
+ "version": "0.14.1",
+ "resolved": "https://registry.npmjs.org/asar/-/asar-0.14.1.tgz",
+ "integrity": "sha512-zLifD8peD4VeEj4QblUv63xTvPOLDXPRRDInzbm23QxGzXjcZQzo3CfLKnBbxbOrKILCTrPLVOyWYc4d+BnPPg==",
+ "dev": true,
+ "requires": {
+ "chromium-pickle-js": "0.2.0",
+ "commander": "2.14.1",
+ "cuint": "0.2.2",
+ "glob": "6.0.4",
+ "minimatch": "3.0.4",
+ "mkdirp": "0.5.0",
+ "mksnapshot": "0.3.1",
+ "tmp": "0.0.28"
+ },
+ "dependencies": {
+ "glob": {
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz",
+ "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=",
+ "dev": true,
+ "requires": {
+ "inflight": "1.0.6",
+ "inherits": "2.0.3",
+ "minimatch": "3.0.4",
+ "once": "1.4.0",
+ "path-is-absolute": "1.0.1"
+ }
+ }
+ }
+ },
"asn1": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
@@ -45,6 +88,12 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
+ "author-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/author-regex/-/author-regex-1.0.0.tgz",
+ "integrity": "sha1-0IiFvmubv5Q5/gh8dihyRfCoFFA=",
+ "dev": true
+ },
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
@@ -69,6 +118,12 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
+ "base64-js": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz",
+ "integrity": "sha1-o5mS1yNYSBGYK+XikLtqU9hnAPE=",
+ "dev": true
+ },
"bcrypt-pbkdf": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
@@ -78,6 +133,22 @@
"tweetnacl": "0.14.5"
}
},
+ "binary": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz",
+ "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=",
+ "dev": true,
+ "requires": {
+ "buffers": "0.1.1",
+ "chainsaw": "0.1.0"
+ }
+ },
+ "bluebird": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
+ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==",
+ "dev": true
+ },
"boom": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
@@ -95,6 +166,12 @@
"concat-map": "0.0.1"
}
},
+ "buffers": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz",
+ "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=",
+ "dev": true
+ },
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
@@ -119,6 +196,21 @@
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
+ "chainsaw": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
+ "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=",
+ "dev": true,
+ "requires": {
+ "traverse": "0.3.9"
+ }
+ },
+ "chromium-pickle-js": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz",
+ "integrity": "sha1-BKEGZywYsIWrd02YPfo+oTjyIgU=",
+ "dev": true
+ },
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
@@ -137,6 +229,18 @@
"delayed-stream": "1.0.0"
}
},
+ "commander": {
+ "version": "2.14.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz",
+ "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==",
+ "dev": true
+ },
+ "compare-version": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz",
+ "integrity": "sha1-AWLsLZNR9d3VmpICy6k1NmpyUIA=",
+ "dev": true
+ },
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -204,6 +308,12 @@
}
}
},
+ "cuint": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz",
+ "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=",
+ "dev": true
+ },
"currently-unhandled": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
@@ -233,6 +343,21 @@
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
+ "decompress-zip": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.0.tgz",
+ "integrity": "sha1-rjvLfjTGWHmt/nfhnDD4ZgK0vbA=",
+ "dev": true,
+ "requires": {
+ "binary": "0.3.0",
+ "graceful-fs": "4.1.11",
+ "mkpath": "0.1.0",
+ "nopt": "3.0.6",
+ "q": "1.5.1",
+ "readable-stream": "1.1.14",
+ "touch": "0.0.3"
+ }
+ },
"deep-extend": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz",
@@ -278,6 +403,155 @@
"sumchecker": "1.3.1"
}
},
+ "electron-osx-sign": {
+ "version": "0.4.8",
+ "resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.8.tgz",
+ "integrity": "sha1-8Ln63e2eHlTsNfqJh3tcbDTHvEA=",
+ "dev": true,
+ "requires": {
+ "bluebird": "3.5.1",
+ "compare-version": "0.1.2",
+ "debug": "2.6.9",
+ "isbinaryfile": "3.0.2",
+ "minimist": "1.2.0",
+ "plist": "2.1.0"
+ }
+ },
+ "electron-packager": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-11.0.0.tgz",
+ "integrity": "sha512-ufyYMe3Gt6IEZm9RuG+KK3Nh+V2jZHWg9gihp8wylUNtleQihECIXtQdpPJxH9740XFERVPraNEaa7cZvDzpyw==",
+ "dev": true,
+ "requires": {
+ "asar": "0.14.1",
+ "debug": "3.1.0",
+ "electron-download": "4.1.0",
+ "electron-osx-sign": "0.4.8",
+ "extract-zip": "1.6.6",
+ "fs-extra": "5.0.0",
+ "get-package-info": "1.0.0",
+ "mz": "2.7.0",
+ "nodeify": "1.0.1",
+ "parse-author": "2.0.0",
+ "pify": "3.0.0",
+ "plist": "2.1.0",
+ "pruner": "0.0.7",
+ "rcedit": "0.9.0",
+ "resolve": "1.5.0",
+ "sanitize-filename": "1.6.1",
+ "semver": "5.5.0",
+ "yargs-parser": "8.1.0"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "electron-download": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.0.tgz",
+ "integrity": "sha1-v5MsdG8vh//MCdHdRy8v9rkYeEU=",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9",
+ "env-paths": "1.0.0",
+ "fs-extra": "2.1.2",
+ "minimist": "1.2.0",
+ "nugget": "2.0.1",
+ "path-exists": "3.0.0",
+ "rc": "1.2.4",
+ "semver": "5.5.0",
+ "sumchecker": "2.0.2"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "fs-extra": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz",
+ "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "4.1.11",
+ "jsonfile": "2.4.0"
+ }
+ }
+ }
+ },
+ "fs-extra": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz",
+ "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "4.1.11",
+ "jsonfile": "4.0.0",
+ "universalify": "0.1.1"
+ },
+ "dependencies": {
+ "jsonfile": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "4.1.11"
+ }
+ }
+ }
+ },
+ "path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "dev": true
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
+ "sumchecker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz",
+ "integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ }
+ }
+ }
+ }
+ },
+ "env-paths": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
+ "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=",
+ "dev": true
+ },
"error-ex": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
@@ -389,6 +663,77 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
+ "get-package-info": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/get-package-info/-/get-package-info-1.0.0.tgz",
+ "integrity": "sha1-ZDJ5ZWPigRPNlHTbvQAFKYWkmZw=",
+ "dev": true,
+ "requires": {
+ "bluebird": "3.5.1",
+ "debug": "2.6.9",
+ "lodash.get": "4.4.2",
+ "read-pkg-up": "2.0.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
+ "requires": {
+ "locate-path": "2.0.0"
+ }
+ },
+ "load-json-file": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
+ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "4.1.11",
+ "parse-json": "2.2.0",
+ "pify": "2.3.0",
+ "strip-bom": "3.0.0"
+ }
+ },
+ "path-type": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
+ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
+ "dev": true,
+ "requires": {
+ "pify": "2.3.0"
+ }
+ },
+ "read-pkg": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
+ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "2.0.0",
+ "normalize-package-data": "2.4.0",
+ "path-type": "2.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
+ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
+ "dev": true,
+ "requires": {
+ "find-up": "2.1.0",
+ "read-pkg": "2.0.0"
+ }
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "dev": true
+ }
+ }
+ },
"get-stdin": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
@@ -531,6 +876,12 @@
"number-is-nan": "1.0.1"
}
},
+ "is-promise": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz",
+ "integrity": "sha1-MVc3YcBX4zwukaq56W2gjO++duU=",
+ "dev": true
+ },
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -546,6 +897,12 @@
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
+ "isbinaryfile": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz",
+ "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=",
+ "dev": true
+ },
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
@@ -611,6 +968,30 @@
"strip-bom": "2.0.0"
}
},
+ "locate-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+ "dev": true,
+ "requires": {
+ "p-locate": "2.0.0",
+ "path-exists": "3.0.0"
+ },
+ "dependencies": {
+ "path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "dev": true
+ }
+ }
+ },
+ "lodash.get": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
+ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
+ "dev": true
+ },
"loud-rejection": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
@@ -683,11 +1064,73 @@
}
}
},
+ "mkpath": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-0.1.0.tgz",
+ "integrity": "sha1-dVSm+Nhxg0zJe1RisSLEwSTW3pE=",
+ "dev": true
+ },
+ "mksnapshot": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/mksnapshot/-/mksnapshot-0.3.1.tgz",
+ "integrity": "sha1-JQHAVldDbXQs6Vik/5LHfkDdN+Y=",
+ "dev": true,
+ "requires": {
+ "decompress-zip": "0.3.0",
+ "fs-extra": "0.26.7",
+ "request": "2.83.0"
+ },
+ "dependencies": {
+ "fs-extra": {
+ "version": "0.26.7",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz",
+ "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "4.1.11",
+ "jsonfile": "2.4.0",
+ "klaw": "1.3.1",
+ "path-is-absolute": "1.0.1",
+ "rimraf": "2.6.2"
+ }
+ }
+ }
+ },
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
+ "mz": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
+ "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
+ "dev": true,
+ "requires": {
+ "any-promise": "1.3.0",
+ "object-assign": "4.1.1",
+ "thenify-all": "1.6.0"
+ }
+ },
+ "nodeify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/nodeify/-/nodeify-1.0.1.tgz",
+ "integrity": "sha1-ZKtpp7268DzhB7TwM1yHwLnpGx0=",
+ "dev": true,
+ "requires": {
+ "is-promise": "1.0.1",
+ "promise": "1.3.0"
+ }
+ },
+ "nopt": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
+ "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+ "dev": true,
+ "requires": {
+ "abbrev": "1.1.1"
+ }
+ },
"normalize-package-data": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
@@ -741,6 +1184,45 @@
"wrappy": "1.0.2"
}
},
+ "os-tmpdir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "dev": true
+ },
+ "p-limit": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz",
+ "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==",
+ "dev": true,
+ "requires": {
+ "p-try": "1.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "dev": true,
+ "requires": {
+ "p-limit": "1.2.0"
+ }
+ },
+ "p-try": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+ "dev": true
+ },
+ "parse-author": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/parse-author/-/parse-author-2.0.0.tgz",
+ "integrity": "sha1-00YL8d3Q367tQtp1QkLmX7aEqB8=",
+ "dev": true,
+ "requires": {
+ "author-regex": "1.0.0"
+ }
+ },
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
@@ -762,6 +1244,12 @@
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
+ "path-parse": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
+ "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
+ "dev": true
+ },
"path-type": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
@@ -800,6 +1288,17 @@
"pinkie": "2.0.4"
}
},
+ "plist": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/plist/-/plist-2.1.0.tgz",
+ "integrity": "sha1-V8zbeggh3yGDEhejytVOPhRqECU=",
+ "dev": true,
+ "requires": {
+ "base64-js": "1.2.0",
+ "xmlbuilder": "8.2.2",
+ "xmldom": "0.1.27"
+ }
+ },
"pretty-bytes": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
@@ -823,11 +1322,57 @@
"through2": "0.2.3"
}
},
+ "promise": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/promise/-/promise-1.3.0.tgz",
+ "integrity": "sha1-5cyaTIJ45GZP/twBx9qEhCsEAXU=",
+ "dev": true,
+ "requires": {
+ "is-promise": "1.0.1"
+ }
+ },
+ "pruner": {
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/pruner/-/pruner-0.0.7.tgz",
+ "integrity": "sha1-NF+8s+gHARY6HXrfVrrCKaWh5ME=",
+ "dev": true,
+ "requires": {
+ "fs-extra": "4.0.3"
+ },
+ "dependencies": {
+ "fs-extra": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
+ "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "4.1.11",
+ "jsonfile": "4.0.0",
+ "universalify": "0.1.1"
+ }
+ },
+ "jsonfile": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "4.1.11"
+ }
+ }
+ }
+ },
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
},
+ "q": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
+ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
+ "dev": true
+ },
"qs": {
"version": "6.5.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
@@ -844,6 +1389,12 @@
"strip-json-comments": "2.0.1"
}
},
+ "rcedit": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/rcedit/-/rcedit-0.9.0.tgz",
+ "integrity": "sha1-ORDfVzRTmeKwMl9KUZAH+J5V7xw=",
+ "dev": true
+ },
"read-pkg": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
@@ -920,6 +1471,15 @@
"uuid": "3.2.1"
}
},
+ "resolve": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz",
+ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==",
+ "dev": true,
+ "requires": {
+ "path-parse": "1.0.5"
+ }
+ },
"rimraf": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
@@ -933,6 +1493,15 @@
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
},
+ "sanitize-filename": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.1.tgz",
+ "integrity": "sha1-YS2hyWRz+gLczaktzVtKsWSmdyo=",
+ "dev": true,
+ "requires": {
+ "truncate-utf8-bytes": "1.0.2"
+ }
+ },
"semver": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
@@ -1055,6 +1624,24 @@
"es6-promise": "4.2.4"
}
},
+ "thenify": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz",
+ "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=",
+ "dev": true,
+ "requires": {
+ "any-promise": "1.3.0"
+ }
+ },
+ "thenify-all": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
+ "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=",
+ "dev": true,
+ "requires": {
+ "thenify": "3.3.0"
+ }
+ },
"throttleit": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz",
@@ -1069,6 +1656,35 @@
"xtend": "2.1.2"
}
},
+ "tmp": {
+ "version": "0.0.28",
+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.28.tgz",
+ "integrity": "sha1-Fyc1t/YU6nrzlmT6hM8N5OUV0SA=",
+ "dev": true,
+ "requires": {
+ "os-tmpdir": "1.0.2"
+ }
+ },
+ "touch": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz",
+ "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=",
+ "dev": true,
+ "requires": {
+ "nopt": "1.0.10"
+ },
+ "dependencies": {
+ "nopt": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
+ "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
+ "dev": true,
+ "requires": {
+ "abbrev": "1.1.1"
+ }
+ }
+ }
+ },
"tough-cookie": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz",
@@ -1077,11 +1693,26 @@
"punycode": "1.4.1"
}
},
+ "traverse": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz",
+ "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=",
+ "dev": true
+ },
"trim-newlines": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM="
},
+ "truncate-utf8-bytes": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
+ "integrity": "sha1-QFkjkJWS1W94pYGENLC3hInKXys=",
+ "dev": true,
+ "requires": {
+ "utf8-byte-length": "1.0.4"
+ }
+ },
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -1101,6 +1732,18 @@
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
+ "universalify": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz",
+ "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=",
+ "dev": true
+ },
+ "utf8-byte-length": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
+ "integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=",
+ "dev": true
+ },
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -1135,6 +1778,18 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
+ "xmlbuilder": {
+ "version": "8.2.2",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz",
+ "integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=",
+ "dev": true
+ },
+ "xmldom": {
+ "version": "0.1.27",
+ "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
+ "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=",
+ "dev": true
+ },
"xtend": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
@@ -1143,6 +1798,23 @@
"object-keys": "0.4.0"
}
},
+ "yargs-parser": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz",
+ "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==",
+ "dev": true,
+ "requires": {
+ "camelcase": "4.1.0"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+ "dev": true
+ }
+ }
+ },
"yauzl": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
diff --git a/package.json b/package.json
index 8f618c0..b760997 100644
--- a/package.json
+++ b/package.json
@@ -4,13 +4,16 @@
"description": "You already know what it is.",
"main": "main.js",
"dependencies": {
- "axios": "^0.17.1",
- "electron": "1.7.11"
+ "axios": "0.17.1"
+ },
+ "devDependencies": {
+ "electron": "1.7.11",
+ "electron-packager": "11.0.0"
},
- "devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
- "start": "electron ."
+ "start": "electron .",
+ "build": "electron-packager ."
},
"author": "KeziahMoselle",
"license": "MIT",
diff --git a/renderer.js b/renderer.js
index e42f8f8..174ae6a 100644
--- a/renderer.js
+++ b/renderer.js
@@ -10,17 +10,18 @@
// Var
- // API URL
- const apiUrl = (parameters) => {
- return `https://gelbooru.com/index.php?page=dapi&s=post&q=index&limit=10&json=1&tags=${parameters}&pid=1`;
- };
// HTML elements
- const body = document.getElementsByTagName('body'); //
+ const root = document.getElementById('root'); //
const searchBar = document.getElementById('searchBar'); // Input type text
const searchBtn = document.getElementById('searchBtn'); // Input type btn
const loading = document.getElementById('loading'); // Display loading or not
const container = document.getElementById('container'); // Container of images
const themeBtn = document.getElementById('themeBtn'); // Checkbox for theme
+ const imgLimit = document.getElementById('imgLimit'); // Select for img limit
+ const selectCardLayout = document.getElementById('selectCardLayout'); // Select for Card Layout
+ // Value
+ var limit = 10;
+ var layout = 'm4';
// Links
const linkGelbooru = document.getElementById('linkGelbooru');
@@ -52,29 +53,128 @@
window.close();
});
- // Permet de récupérer 10 images avec des tags
+
+ // INPUT AND HIT ENTER
searchBar.onkeypress = (event) => {
if (event.keyCode === 13)
{
- event.preventDefault();
- if (searchBar.value === "")
- return;
- // On enlève la classe "hide" du loading pour qu'il s'affiche
- while (container.firstChild) {
+ let tags = searchBar.value;
+ search(tags, limit, layout);
+ }
+ };
+
+ // BTN
+ searchBtn.addEventListener('click', () => {
+ let tags = searchBar.value;
+ search(tags, limit, layout);
+ });
+
+ // LIMIT VAR
+ imgLimit.addEventListener('change', () => {
+ limit = imgLimit.value;
+ console.log(limit);
+ });
+
+ // LAYOUT VAR
+ selectCardLayout.addEventListener('change', () => {
+ layout = selectCardLayout.value;
+ console.log(layout);
+ });
+
+ // Light & Dark Mode
+ themeBtn.addEventListener('change', () => {
+ if (themeBtn.checked)
+ { // Si la checkbox est check = on veut le dark mode
+ root.classList.add('light-mode');
+ console.log('Light mode !');
+ }
+ else
+ { // Si la checkbox n'est pas check on retire le dark mode
+ root.classList.remove('light-mode');
+ console.log('Dark mode !');
+ }
+ });
+
+ // Links
+ linkGelbooru.addEventListener('click', (event) => {
+ event.preventDefault();
+ shell.openExternal('https://gelbooru.com');
+ });
+ linkGithub.addEventListener('click', (event) => {
+ event.preventDefault();
+ shell.openExternal('https://github.com/KeziahMoselle/gelbooru-client');
+ });
+
+
+
+/**
+ * GET Request to Gelbooru and display results
+ * @param {string} tags
+ * @param {number} limit
+ */
+function search(tags, limit = 10, layout)
+{
+
+ if (searchBar.value === "")
+ {
+ // Empty cards
+ while (container.firstChild)
+ {
+ container.removeChild(container.firstChild);
+ }
+
+ // Display loading...
+ loading.classList.remove('hide');
+
+ // GET request
+ axios.get(`https://gelbooru.com/index.php?page=dapi&s=post&q=index&limit=${limit}&json=1&pid=1`, {})
+ .then((response) => {
+ // Display images
+ response.data.forEach(image => {
+ container.insertAdjacentHTML('beforeend', `
+
+
+
+
+
+
+
`);
+ });
+
+ // Hide loading ...
+ loading.classList.add('hide');
+
+ }).catch((error) => {
+ console.log(error);
+ loading.classList.add('hide');
+ container.insertAdjacentHTML('afterbegin', `
+
+ ${error}
+
+
`);
+ });
+ }
+ else
+ {
+ // Empty cards
+ while (container.firstChild)
+ {
container.removeChild(container.firstChild);
}
+
+ // Display loading ...
loading.classList.remove('hide');
- // Fetching
- // On récupère la valeur des tags
- let tags = searchBar.value;
- // On remplace les espaces par des '+'
+
+ // Tags replace space -> '+'
tags.replace(/\s/g, '+');
- // On exécute la requête
- axios.get(apiUrl(tags), {})
+
+ // GET request
+ axios.get(`https://gelbooru.com/index.php?page=dapi&s=post&q=index&limit=${limit}&json=1&tags=${tags}&pid=1`, {})
.then((response) => {
- // On affiche les images
response.data.forEach(image => {
- container.insertAdjacentHTML('beforeend', `
+ container.insertAdjacentHTML('beforeend', `
@@ -85,8 +185,10 @@
`);
});
- // On enlève le loading
+
+ // Hide loading ...
loading.classList.add('hide');
+
}).catch((error) => {
console.log(error);
loading.classList.add('hide');
@@ -97,57 +199,5 @@
`);
});
}
- };
-
- // Permet de récupérer 10 images avec des tags grâce au btn
- searchBtn.addEventListener('click', () => {
- if (searchBar.value === "")
- return;
- // On enlève la classe "hide" du loading pour qu'il s'affiche
- loading.classList.remove('hide');
- // Fetching
- // On récupère la valeur des tags
- let tags = searchBar.value;
- // On remplace les espaces par des '+'
- tags.replace(/\s/g, '+');
- // On exécute la requête
- axios.get(apiUrl(tags), {})
- .then((response) => {
- // On affiche les images
- response.data.forEach(image => {
- container.insertAdjacentHTML('beforeend', `
-
-
-
-
Card Title
-
-
-
-
`);
- });
- // On enlève le loading
- loading.classList.add('hide');
- }).catch((error) => {
- console.log(error);
- });
- });
-
- // Light & Dark Mode
- themeBtn.addEventListener('change', () => {
- if (this.checked)
- { // Si la checkbox est check = on veut le dark mode
- body.classList.add('light-mode');
- }
- else
- { // Si la checkbox n'est pas check on retire le dark mode
- body.classList.remove('light-mode');
- }
- });
-
- // Links
- linkGelbooru.addEventListener('click', (event) => {
- shell.openExternal('https://gelbooru.com/');
- });
\ No newline at end of file
+}
\ No newline at end of file