diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/internal-server/app/Controllers/Http/ImageController.js | 3 | ||||
-rw-r--r-- | src/internal-server/app/Controllers/Http/UserController.js | 6 | ||||
-rw-r--r-- | src/internal-server/public/js/transfer.js | 2 | ||||
-rw-r--r-- | src/styles/animations.scss | 2 | ||||
-rw-r--r-- | src/styles/globals.scss | 26 | ||||
-rw-r--r-- | src/styles/main.scss | 3 | ||||
-rw-r--r-- | src/styles/vertical.scss | 1 |
7 files changed, 38 insertions, 5 deletions
diff --git a/src/internal-server/app/Controllers/Http/ImageController.js b/src/internal-server/app/Controllers/Http/ImageController.js index 731f181e0..5b8337c49 100644 --- a/src/internal-server/app/Controllers/Http/ImageController.js +++ b/src/internal-server/app/Controllers/Http/ImageController.js | |||
@@ -19,7 +19,8 @@ class ImageController { | |||
19 | 19 | ||
20 | try { | 20 | try { |
21 | await fs.access(iconPath); | 21 | await fs.access(iconPath); |
22 | } catch { | 22 | } catch (error) { |
23 | console.log(error); | ||
23 | // File not available. | 24 | // File not available. |
24 | return response.status(404).send({ | 25 | return response.status(404).send({ |
25 | status: "Icon doesn't exist", | 26 | status: "Icon doesn't exist", |
diff --git a/src/internal-server/app/Controllers/Http/UserController.js b/src/internal-server/app/Controllers/Http/UserController.js index fb1a19db6..9a9d76636 100644 --- a/src/internal-server/app/Controllers/Http/UserController.js +++ b/src/internal-server/app/Controllers/Http/UserController.js | |||
@@ -25,7 +25,8 @@ const apiRequest = (url, route, method, auth) => | |||
25 | }) | 25 | }) |
26 | .then(data => data.json()) | 26 | .then(data => data.json()) |
27 | .then(json => resolve(json)); | 27 | .then(json => resolve(json)); |
28 | } catch { | 28 | } catch (error) { |
29 | console.log(error); | ||
29 | reject(); | 30 | reject(); |
30 | } | 31 | } |
31 | }); | 32 | }); |
@@ -255,7 +256,8 @@ class UserController { | |||
255 | let file; | 256 | let file; |
256 | try { | 257 | try { |
257 | file = JSON.parse(request.input('file')); | 258 | file = JSON.parse(request.input('file')); |
258 | } catch { | 259 | } catch (error) { |
260 | console.log(error); | ||
259 | return response.send( | 261 | return response.send( |
260 | 'Could not import: Invalid file, could not read file', | 262 | 'Could not import: Invalid file, could not read file', |
261 | ); | 263 | ); |
diff --git a/src/internal-server/public/js/transfer.js b/src/internal-server/public/js/transfer.js index 36fdbd61a..e3b3f92a2 100644 --- a/src/internal-server/public/js/transfer.js +++ b/src/internal-server/public/js/transfer.js | |||
@@ -2,7 +2,7 @@ const submitBtn = document.querySelector('#submit'); | |||
2 | const fileInput = document.querySelector('#file'); | 2 | const fileInput = document.querySelector('#file'); |
3 | const fileOutput = document.querySelector('#fileoutput'); | 3 | const fileOutput = document.querySelector('#fileoutput'); |
4 | 4 | ||
5 | fileInput?.addEventListener('change', () => { | 5 | fileInput.addEventListener('change', () => { |
6 | const reader = new FileReader(); | 6 | const reader = new FileReader(); |
7 | reader.addEventListener('load', () => { | 7 | reader.addEventListener('load', () => { |
8 | const text = reader.result; | 8 | const text = reader.result; |
diff --git a/src/styles/animations.scss b/src/styles/animations.scss index b121af7d2..35125dec5 100644 --- a/src/styles/animations.scss +++ b/src/styles/animations.scss | |||
@@ -1,3 +1,5 @@ | |||
1 | @import "./globals.scss"; | ||
2 | |||
1 | // FadeIn | 3 | // FadeIn |
2 | .fadeIn-appear { opacity: .01; } | 4 | .fadeIn-appear { opacity: .01; } |
3 | 5 | ||
diff --git a/src/styles/globals.scss b/src/styles/globals.scss new file mode 100644 index 000000000..b6a7949c2 --- /dev/null +++ b/src/styles/globals.scss | |||
@@ -0,0 +1,26 @@ | |||
1 | $raw-theme-brand-primary: "114,102,240"; | ||
2 | $raw-theme-brand-success: "92,184,92"; | ||
3 | $raw-theme-brand-info: "91,192,222"; | ||
4 | $raw-theme-brand-warning: "255,159,0"; | ||
5 | $raw-theme-brand-danger: "217,83,79"; | ||
6 | $raw-theme-gray-dark: "55,58,60"; | ||
7 | $raw-theme-gray: "85,89,92"; | ||
8 | $raw-theme-gray-light: "129,138,145"; | ||
9 | $raw-theme-gray-lighter: "236,238,239"; | ||
10 | $raw-theme-gray-lightest: "247,247,249"; | ||
11 | $raw-theme-border-radius: 6px; | ||
12 | $raw-theme-border-radius-small: 3px; | ||
13 | $raw-theme-sidebar-width: 68px; | ||
14 | $raw-theme-text-color: "55,58,60"; | ||
15 | $raw-theme-transition-time: .5s; | ||
16 | $raw-theme-inset-shadow: inset 0 2px 5px rgba(0, 0, 0, .03); | ||
17 | $raw-dark-theme-black: "26,26,26"; | ||
18 | $raw-dark-theme-gray-darkest: "30,30,30"; | ||
19 | $raw-dark-theme-gray-darker: "45,47,49"; | ||
20 | $raw-dark-theme-gray-dark: "56,58,59"; | ||
21 | $raw-dark-theme-gray: "71,73,75"; | ||
22 | $raw-dark-theme-gray-light: "81,83,85"; | ||
23 | $raw-dark-theme-gray-lighter: "138,139,139"; | ||
24 | $raw-dark-theme-gray-lightest: "255,255,255"; | ||
25 | $raw-dark-theme-gray-smoke: "206,208,209"; | ||
26 | $raw-dark-theme-text-color: "255,255,255"; | ||
diff --git a/src/styles/main.scss b/src/styles/main.scss index e6278efd0..8369c9298 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss | |||
@@ -1,6 +1,7 @@ | |||
1 | @import './node_modules/electron-react-titlebar/assets/style'; | 1 | @import '../../node_modules/electron-react-titlebar/assets/style'; |
2 | 2 | ||
3 | // modules | 3 | // modules |
4 | @import './globals.scss'; | ||
4 | @import './reset.scss'; | 5 | @import './reset.scss'; |
5 | @import './util.scss'; | 6 | @import './util.scss'; |
6 | @import './layout.scss'; | 7 | @import './layout.scss'; |
diff --git a/src/styles/vertical.scss b/src/styles/vertical.scss index 87bbae1b0..dd2ae4ed1 100644 --- a/src/styles/vertical.scss +++ b/src/styles/vertical.scss | |||
@@ -1,3 +1,4 @@ | |||
1 | @import './globals.scss'; | ||
1 | @import './config.scss'; | 2 | @import './config.scss'; |
2 | 3 | ||
3 | $sidebar-width: 75px; | 4 | $sidebar-width: 75px; |