Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
retypos-webclient
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
retypos-webclient
Commits
7ad16ba5
Commit
7ad16ba5
authored
Aug 01, 2018
by
Jorgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a debug mode hadled by local storage variable
parent
5d1941e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
index.js
src/Modal/index.js
+12
-1
config.js
src/config.js
+3
-3
No files found.
src/Modal/index.js
View file @
7ad16ba5
...
@@ -37,6 +37,11 @@ class TypoModal extends Component {
...
@@ -37,6 +37,11 @@ class TypoModal extends Component {
// Bindings
// Bindings
this
.
submitTypo
=
this
.
submitTypo
.
bind
(
this
);
this
.
submitTypo
=
this
.
submitTypo
.
bind
(
this
);
if
(
!
window
.
localStorage
.
getItem
(
`
${
config
.
appStorageKey
}
.debug`
))
{
window
.
localStorage
.
setItem
(
`
${
config
.
appStorageKey
}
.debug`
,
false
);
}
}
}
handleShow
=
()
=>
{
handleShow
=
()
=>
{
...
@@ -86,7 +91,13 @@ class TypoModal extends Component {
...
@@ -86,7 +91,13 @@ class TypoModal extends Component {
// Send data to the server
// Send data to the server
async
sendRequest
()
{
async
sendRequest
()
{
const
serverUrl
=
config
.
serverUrl
;
let
debugMode
=
window
.
localStorage
.
getItem
(
`
${
config
.
appStorageKey
}
.debug`
);
let
serverUrl
=
config
.
serverUrl
;
if
(
debugMode
==
"true"
)
{
serverUrl
=
config
.
devServerUrl
;
}
const
url
=
window
.
location
.
href
;
const
url
=
window
.
location
.
href
;
const
data
=
{
const
data
=
{
...
...
src/config.js
View file @
7ad16ba5
...
@@ -4,9 +4,9 @@ export const config = {
...
@@ -4,9 +4,9 @@ export const config = {
maxCorrectLength
:
50
,
maxCorrectLength
:
50
,
minCorrectLength
:
1
,
minCorrectLength
:
1
,
serverUrl
:
"//eterfund.ru/api/typos/server.php"
,
serverUrl
:
"//eterfund.ru/api/typos/server.php"
,
//serverUrl:
"//ambulance.pubsandbox.eterhost.ru/typos.server/server.php",
devServerUrl
:
"//ambulance.pubsandbox.eterhost.ru/typos.server/server.php"
,
requestTimeout
:
10000
,
requestTimeout
:
10000
,
defaultLanguage
:
"ru"
,
defaultLanguage
:
"ru"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment