Skip to content

Commit

Permalink
Custom homing sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneclaes committed Oct 10, 2020
1 parent f7ce9e4 commit d11312b
Show file tree
Hide file tree
Showing 19 changed files with 127 additions and 72 deletions.
34 changes: 29 additions & 5 deletions src/app/containers/Login/Login.jsx
Expand Up @@ -182,7 +182,9 @@ class Login extends PureComponent {
type="button"
className="btn btn-block btn-secondary"
style={{ marginLeft: '0' }}
onClick={this.actions.handleResendVerification}
onClick={(e) => {
window.location.replace(`https://openwork.shop/api/auth/${name}`);
}}
disabled={authenticating}
>
<i
Expand Down Expand Up @@ -216,7 +218,6 @@ class Login extends PureComponent {
const state = { ...this.state };
// const actions = { ...this.actions };
const { alertMessage, authenticating, registering } = state;
const act = i18n._('Login');
const docLink = 'http://www.makerverse.com/features/security/';
let enabled = !authenticating && this.fields.username && this.fields.username.value.length > 0 &&
this.fields.password && this.fields.password.value.length > 0;
Expand Down Expand Up @@ -245,7 +246,7 @@ class Login extends PureComponent {
<div className={styles.login}>
<div className={styles.title}>
<img src="images/logo-badge-32x32.png" alt="" style={{ maxWidth: '32px', marginRight: '10px' }} />
{act}
{i18n._('Login')}
</div>
<div className={styles.content}>
{error.length > 0 && (
Expand All @@ -268,11 +269,34 @@ class Login extends PureComponent {
'fa-fw',
{ 'fa-spin': authenticating },
{ 'fa-circle-o-notch': authenticating },
{ 'fa-envelope-o': !authenticating },
{ 'fa-user': !authenticating },
)}
/>
<Space width="8" />
{act} with Email
{i18n._('Login')}
</button>
<center>
<i>
- or -
</i>
</center>
<button
type="submit"
className="btn btn-block btn-primary"
onClick={this.actions.handleSignIn}
disabled={authenticating}
>
<i
className={cx(
'fa',
'fa-fw',
{ 'fa-spin': authenticating },
{ 'fa-circle-o-notch': authenticating },
{ 'fa-user-plus': !authenticating },
)}
/>
<Space width="8" />
{i18n._('Create an Account')}
</button>
{alertMessage && (
<div className={styles.error}>
Expand Down
5 changes: 3 additions & 2 deletions src/app/i18n/cs/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/de/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/en/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "Save",
"Machine": "Machine",
"Frame": "Frame",
"Move machine to 0/0": "Move machine to 0/0",
"Update Firmware": "Update Firmware",
"Chains": "Chains",
"Stock": "Stock",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "Program: Stop",
"Program: Resume": "Program: Resume",
"Login": "Login",
"Why is it necessary to log in?": "Why is it necessary to log in?"
"Why is it necessary to log in?": "Why is it necessary to log in?",
"Create an Account": "Create an Account",
"Run homing sequence": "Run homing sequence"
}
5 changes: 3 additions & 2 deletions src/app/i18n/es/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/fr/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/hu/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/it/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/ja/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/nl/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/pt-br/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/ru/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/tr/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/zh-cn/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
5 changes: 3 additions & 2 deletions src/app/i18n/zh-tw/resource.json
Expand Up @@ -517,7 +517,6 @@
"Save": "",
"Machine": "",
"Frame": "",
"Move machine to 0/0": "",
"Update Firmware": "",
"Chains": "",
"Stock": "",
Expand All @@ -537,5 +536,7 @@
"Program: Stop": "",
"Program: Resume": "",
"Login": "",
"Why is it necessary to log in?": ""
"Why is it necessary to log in?": "",
"Create an Account": "",
"Run homing sequence": ""
}
8 changes: 8 additions & 0 deletions src/app/lib/workspaces.jsx
Expand Up @@ -316,6 +316,14 @@ class Workspaces extends events.EventEmitter {

_controllerSettings = null;

get commands() {
return this._record.commands;
}

getCommand(name, def = []) {
return [].concat(this.commands[name] || def);
}

_controllerEvents = {
'serialport:change': (options) => {
const { port } = options;
Expand Down

0 comments on commit d11312b

Please sign in to comment.