Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jk authored and jk committed Aug 4, 2020
2 parents 31b2de5 + a31cf33 commit 6c9f6bb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ Ubuntu18 ```npm run distUbuntu18```
The built installers can then be found in the `dist` folder.
## Custom protocol support (Only Linux)

To be able to take advantage of zbay protocol on linux (Other platforms work by default) you need to create Desktop Entry.
You can find template file in repository ```zbay.desktop```. You need to change ```Exec=/path/to/zbay/Zbay-version.AppImage``` inside ```zbay.desktop``` to match your path to Zbay AppImage file.
Then place file inside ```~/.local/share/applications/``` folder and run command to register new entry ```xdg-mime default zbay.desktop x-scheme-handler/zbay```
To be able to open Zbay links on Linux you will, for the time being, need to create a "Desktop Entry".

1. Find the ```zbay.desktop``` template file in the repository.
2. Open ```zbay.desktop``` and change ```Exec=/path/to/zbay/Zbay-version.AppImage``` inside to match the path to your Zbay AppImage file.
3. Place the file inside the ```~/.local/share/applications/``` folder and run the following command to register the new entry: ```xdg-mime default zbay.desktop x-scheme-handler/zbay```

## Managing keys

Expand Down
6 changes: 4 additions & 2 deletions src/renderer/components/ui/PublishChannelModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ export const formSchema = publicChannels =>
'testFormat',
'Channel name can contain only small characters and up to one hyphen.',
function (value) {
return parseChannelName(value).match(/^[a-z0-9]+([\s-][a-z0-9]+){0,}$/)
return parseChannelName(value).match(
/^[a-z0-9]+([\s-][a-z0-9]+){0,}$/
)
}
)
.validateName(publicChannels)
Expand Down Expand Up @@ -235,7 +237,7 @@ export const PublishChannelModal = ({
/>
</Grid>
<div className={classes.gutter}>
{showParsedMessage(values.name) && (
{showParsedMessage(values.name) && isValid && (
<Grid container alignItems='center' direction='row'>
<Grid item className={classes.iconDiv}>
<WarningIcon className={classes.warrningIcon} />
Expand Down
7 changes: 5 additions & 2 deletions src/renderer/components/widgets/channels/CreateChannelForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ const styles = theme => ({
}
})
export const parseChannelName = (name = '') => {
return name.toLowerCase().replace(/ +/g, '-').replace(/-+/g, '-')
return name
.toLowerCase()
.replace(/ +/g, '-')
.replace(/-+/g, '-')
}
export const formSchema = Yup.object().shape({
name: Yup.string()
Expand Down Expand Up @@ -100,7 +103,7 @@ export const CreateChannelForm = ({ classes, onSubmit, setStep }) => (
placeholder='my-channel'
/>
<div className={classes.gutter}>
{showParsedMessage(values.name) && (
{showParsedMessage(values.name) && isValid && (
<Grid container alignItems='center' direction='row'>
<Grid item className={classes.iconDiv}>
<WarningIcon className={classes.warrningIcon} />
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/handlers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export const fetchUsers = () => async (dispatch, getState) => {
) {
minfee = parseFloat(msg.message.minFee)
}
if (!msg.spent.gte(minfee) || msg.type !== messageType.USER) {
if (msg.type !== messageType.USER || !msg.spent.gte(minfee)) {
continue
}
const user = ReceivedUser(msg)
Expand Down

0 comments on commit 6c9f6bb

Please sign in to comment.