-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from PatrickSachs/develop
0.3.0
- Loading branch information
Showing
63 changed files
with
4,921 additions
and
2,915 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# The URI to your database. If you have installed MongoDB on the same machine and are | ||
# using the default installation on of MongoDB you can leave this at its default. | ||
# Otherwise see https://docs.mongodb.com/manual/reference/connection-string/ for details. | ||
DB="mongodb://localhost/helios" | ||
DB_OPTS="{"useNewUrlParser": true}" | ||
|
||
# The ports to run Helios on. (Set HTTP to -1 to not not listen to HTTP at all - | ||
# HSTS recommended in this case) | ||
PORT_HTTP=80 | ||
PORT_HTTPS=443 | ||
|
||
# The IP Helios will bind to. Set to [::] for IPv6. You'll know when you need any | ||
# other value. | ||
BIND_IP="0.0.0.0" | ||
|
||
# Host on these domains. The first domain will be your primary, canonical URL. | ||
# Helios will only issue a certificate valid for these domains. | ||
BIND_DOMAINS="localhost" | ||
|
||
# Do you want HTTPS support? Valid values are: | ||
# * none - No SSL | ||
# * letsEncrypt - Free SSL certificates by Let's Encrypt. Make sure that your | ||
# BIND_DOMAINS are correct and pointing to this server. (In this case also | ||
# set AGREE_GREENLOCK_TOS to true) | ||
# * certificate - Manually issued certificates (not implemented yet) | ||
SSL="none" | ||
AGREE_GREENLOCK_TOS=false | ||
|
||
# Your webmaster mail. Required by Let's Encrypt and Web Push service. | ||
MAIL="webmaster@localhost.local" | ||
|
||
# TODO: Some sort of canonical port for NAT? | ||
|
||
# Leave this at its default value unless you want to join in on developing Helios. | ||
# Enables developer mode if set to development. | ||
ENV=production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import * as React from "react"; | ||
import ValidationResult from "@react-formilicious/core/validators/ValidationResult"; | ||
import classnames from "classnames" | ||
import MenuDownOutlineIcon from "mdi-react/MenuDownOutlineIcon"; | ||
import { FormattedMessage } from "react-intl"; | ||
|
||
export default class DropdownField extends React.Component { | ||
constructor() { | ||
super(); | ||
} | ||
|
||
static getDefaultValue() { | ||
return ""; | ||
} | ||
|
||
render() { | ||
const { | ||
multiple = false, name, | ||
system: { waiting }, value, field, | ||
values = [] | ||
} = this.props; | ||
const selected = values.find(({ key }) => key === value); | ||
return (<div className="field" onDragOver={this.onDragOver} onDragLeave={this.onDragLeave} onDrop={this.onDrop} > | ||
<label className="label">{name}</label> | ||
<div className="contol"> | ||
<div className="dropdown is-hoverable"> | ||
<div className="dropdown-trigger"> | ||
<button type="button" className="button" aria-haspopup="true" aria-controls="dropdown-menu2"> | ||
<span>{selected ? selected.label : <FormattedMessage id="form.select" />}</span> | ||
<span className="icon is-small"> | ||
<MenuDownOutlineIcon /> | ||
</span> | ||
</button> | ||
</div> | ||
<div className="dropdown-menu" id="dropdown-menu2" role="menu"> | ||
<div className="dropdown-content"> | ||
{values.map(({ key, label }, i) => (<a onClick={() => this.props.onChange(key)} key={i + "-" + key} className="dropdown-item"> | ||
{label} | ||
</a>))} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<ValidationResult {...field} /> | ||
</div>); | ||
} | ||
|
||
renderFileList(files) { | ||
if (!files || !files.length) return (<FormattedMessage id="form.noFilesSelected" />); | ||
if (files.length !== 1) return (<FormattedMessage id="form.filesSelected" values={{ n: files.length }} />); | ||
// todo: display more than one file name if it fits on the screen | ||
return files[0].name; | ||
} | ||
} |
Oops, something went wrong.