diff options
Diffstat (limited to 'src/helpers')
-rw-r--r-- | src/helpers/recipe-helpers.js | 2 | ||||
-rw-r--r-- | src/helpers/service-helpers.js | 2 | ||||
-rw-r--r-- | src/helpers/url-helpers.js | 2 | ||||
-rw-r--r-- | src/helpers/validation-helpers.js | 10 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/helpers/recipe-helpers.js b/src/helpers/recipe-helpers.js index 257e322fb..a31c29e72 100644 --- a/src/helpers/recipe-helpers.js +++ b/src/helpers/recipe-helpers.js | |||
@@ -3,7 +3,7 @@ import { remote } from 'electron'; | |||
3 | 3 | ||
4 | // import ServiceModel from '../models/Service'; | 4 | // import ServiceModel from '../models/Service'; |
5 | 5 | ||
6 | const app = remote.app; | 6 | const { app } = remote; |
7 | 7 | ||
8 | export function getRecipeDirectory(id = '') { | 8 | export function getRecipeDirectory(id = '') { |
9 | return path.join(app.getPath('userData'), 'recipes', id); | 9 | return path.join(app.getPath('userData'), 'recipes', id); |
diff --git a/src/helpers/service-helpers.js b/src/helpers/service-helpers.js index 5f63f6b7c..83f89f108 100644 --- a/src/helpers/service-helpers.js +++ b/src/helpers/service-helpers.js | |||
@@ -2,7 +2,7 @@ import path from 'path'; | |||
2 | import { remote } from 'electron'; | 2 | import { remote } from 'electron'; |
3 | import fs from 'fs-extra'; | 3 | import fs from 'fs-extra'; |
4 | 4 | ||
5 | const app = remote.app; | 5 | const { app } = remote; |
6 | 6 | ||
7 | export function getServicePartitionsDirectory() { | 7 | export function getServicePartitionsDirectory() { |
8 | return path.join(app.getPath('userData'), 'Partitions'); | 8 | return path.join(app.getPath('userData'), 'Partitions'); |
diff --git a/src/helpers/url-helpers.js b/src/helpers/url-helpers.js index 750d1f00c..2f429a25c 100644 --- a/src/helpers/url-helpers.js +++ b/src/helpers/url-helpers.js | |||
@@ -2,7 +2,7 @@ import { URL } from 'url'; | |||
2 | 2 | ||
3 | import { ALLOWED_PROTOCOLS } from '../config'; | 3 | import { ALLOWED_PROTOCOLS } from '../config'; |
4 | 4 | ||
5 | const debug = require('debug')('Franz:Helpers:url'); | 5 | const debug = require('debug')('Ferdi:Helpers:url'); |
6 | 6 | ||
7 | export function isValidExternalURL(url) { | 7 | export function isValidExternalURL(url) { |
8 | const parsedUrl = new URL(url); | 8 | const parsedUrl = new URL(url); |
diff --git a/src/helpers/validation-helpers.js b/src/helpers/validation-helpers.js index ab2376b1b..f489ec65e 100644 --- a/src/helpers/validation-helpers.js +++ b/src/helpers/validation-helpers.js | |||
@@ -26,13 +26,13 @@ const messages = defineMessages({ | |||
26 | 26 | ||
27 | export function required({ field }) { | 27 | export function required({ field }) { |
28 | const isValid = (field.value.trim() !== ''); | 28 | const isValid = (field.value.trim() !== ''); |
29 | return [isValid, window.franz.intl.formatMessage(messages.required, { field: field.label })]; | 29 | return [isValid, window.ferdi.intl.formatMessage(messages.required, { field: field.label })]; |
30 | } | 30 | } |
31 | 31 | ||
32 | export function email({ field }) { | 32 | export function email({ field }) { |
33 | const value = field.value.trim(); | 33 | const value = field.value.trim(); |
34 | const isValid = isEmail(value); | 34 | const isValid = isEmail(value); |
35 | return [isValid, window.franz.intl.formatMessage(messages.email, { field: field.label })]; | 35 | return [isValid, window.ferdi.intl.formatMessage(messages.email, { field: field.label })]; |
36 | } | 36 | } |
37 | 37 | ||
38 | export function url({ field }) { | 38 | export function url({ field }) { |
@@ -46,7 +46,7 @@ export function url({ field }) { | |||
46 | isValid = true; | 46 | isValid = true; |
47 | } | 47 | } |
48 | 48 | ||
49 | return [isValid, window.franz.intl.formatMessage(messages.url, { field: field.label })]; | 49 | return [isValid, window.ferdi.intl.formatMessage(messages.url, { field: field.label })]; |
50 | } | 50 | } |
51 | 51 | ||
52 | export function minLength(length) { | 52 | export function minLength(length) { |
@@ -55,13 +55,13 @@ export function minLength(length) { | |||
55 | if (field.touched) { | 55 | if (field.touched) { |
56 | isValid = field.value.length >= length; | 56 | isValid = field.value.length >= length; |
57 | } | 57 | } |
58 | return [isValid, window.franz.intl.formatMessage(messages.minLength, { field: field.label, length })]; | 58 | return [isValid, window.ferdi.intl.formatMessage(messages.minLength, { field: field.label, length })]; |
59 | }; | 59 | }; |
60 | } | 60 | } |
61 | 61 | ||
62 | export function oneRequired(targets) { | 62 | export function oneRequired(targets) { |
63 | return ({ field, form }) => { | 63 | return ({ field, form }) => { |
64 | const invalidFields = targets.filter(target => form.$(target).value === ''); | 64 | const invalidFields = targets.filter(target => form.$(target).value === ''); |
65 | return [targets.length !== invalidFields.length, window.franz.intl.formatMessage(messages.required, { field: field.label })]; | 65 | return [targets.length !== invalidFields.length, window.ferdi.intl.formatMessage(messages.required, { field: field.label })]; |
66 | }; | 66 | }; |
67 | } | 67 | } |