Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update icons, fix validation #23

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/build/icon.icns
Binary file not shown.
Binary file added assets/build/icon.ico
Binary file not shown.
Binary file added assets/build/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/icon.icns
Binary file not shown.
Binary file removed assets/icon.ico
Binary file not shown.
Binary file removed assets/icon.png
Binary file not shown.
Binary file modified assets/icons/1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/24x24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/icons/96x96.png
Binary file not shown.
Binary file modified assets/icons/disconnect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
]
},
"build": {
"productName": "PomeriumTcpConnector",
"appId": "io.pomerium.PomeriumTcpConnector",
"productName": "Pomerium Desktop",
"appId": "io.pomerium.PomeriumDesktop",
"files": [
"dist/",
"node_modules/",
Expand Down Expand Up @@ -95,13 +95,13 @@
],
"publish": {
"provider": "github",
"owner": "pomerium-tcp-connector",
"repo": "pomerium-tcp-connector"
"owner": "pomerium-desktop",
"repo": "https://github.com/pomerium/desktop-client"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/pomerium/pomerium-tcp-connector.git"
"url": "git+https://github.com/pomerium/desktop-client.git"
},
"author": {
"name": "Pomerium Inc",
Expand All @@ -117,15 +117,15 @@
],
"license": "MIT",
"bugs": {
"url": "https://github.com/pomerium/pomerium-tcp-connector/issues"
"url": "https://github.com/pomerium/desktop-client/issues"
},
"keywords": [
"zero trust",
"network",
"internal",
"security"
],
"homepage": "https://github.com/pomerium/pomerium-tcp-connector#readme",
"homepage": "https://github.com/pomerium/desktop-client#readme",
"jest": {
"testURL": "https://localhost/",
"moduleNameMapper": {
Expand Down
4 changes: 2 additions & 2 deletions src/components/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ const useStyles = makeStyles((theme: Theme) => ({
backgroundColor: theme.palette.error.main,
},
'& .MuiOutlinedInput-notchedOutline': {
borderWidth: '0px',
borderWidth: '1px',
borderColor: theme.palette.divider,
},
'& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)': {
transform: 'translate(8px, 10px) scale(1)',
},
boxShadow: theme.shadows[1],
borderRadius: '2px',
'& .Mui-disabled': {
background: '#cfcfcf',
Expand Down
36 changes: 11 additions & 25 deletions src/pages/ConnectForm.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import {
makeStyles,
Button,
Grid,
Typography,
FormGroup,
FormControlLabel,
Switch,
ListItem,
FormGroup,
Grid,
List,
ListItem,
makeStyles,
Switch,
Typography,
} from '@material-ui/core';
import { ipcRenderer } from 'electron';
import React, { FC, useEffect, useState } from 'react';
import { v4 as uuidv4 } from 'uuid';
import { useParams } from 'react-router-dom';
import Store from 'electron-store';
import { isUrl, isIp } from '../utils/validators';
import { isIp } from '../utils/validators';
import {
CONNECTION_CLOSED,
CONNECTION_RESPONSE,
DISCONNECT,
ConnectionData,
DISCONNECT,
} from '../utils/constants';
import TextField from '../components/TextField';
import { Theme } from '../utils/theme';
Expand Down Expand Up @@ -98,24 +98,20 @@ const ConnectForm: FC<Props> = () => {
});
setErrors({
...errors,
...{ destinationUrl: !isUrl(value) || !value.trim() },
...{ destinationUrl: !value.trim() },
});
};

const saveLocal = (value: string): void => {
setConnectionData({ ...connectionData, ...{ localAddress: value.trim() } });
setErrors({
...errors,
...{ localAddress: !isIp(value) },
...{ localAddress: !isIp(value) && !!value },
});
};

const savePomeriumUrl = (value: string): void => {
setConnectionData({ ...connectionData, ...{ pomeriumUrl: value.trim() } });
setErrors({
...errors,
...{ pomeriumUrl: !isUrl(value) },
});
};

const saveDisableTLS = (): void => {
Expand All @@ -127,18 +123,10 @@ const ConnectForm: FC<Props> = () => {

const saveCaFilePath = (value: string): void => {
setConnectionData({ ...connectionData, ...{ caFilePath: value.trim() } });
setErrors({
...errors,
...{ caFilePath: !!connectionData.caFileText },
});
};

const saveCaFileText = (value: string): void => {
setConnectionData({ ...connectionData, ...{ caFileText: value.trim() } });
setErrors({
...errors,
...{ caFileText: !!connectionData.caFilePath },
});
};

const disconnect = (channel_id: string): void => {
Expand Down Expand Up @@ -166,8 +154,7 @@ const ConnectForm: FC<Props> = () => {
setConnected(true);
const args: ConnectionData = { ...connectionData };
if (!args.channelID) {
const uuid = uuidv4();
args.channelID = uuid;
args.channelID = uuidv4();
}
setConnectionData(args);
ipcRenderer.send('connect', args);
Expand Down Expand Up @@ -195,7 +182,6 @@ const ConnectForm: FC<Props> = () => {
<TextField
fullWidth
required
error={errors.destinationUrl}
label="Destination Url"
value={connectionData.destinationUrl}
onChange={(evt): void => saveDestination(evt.target.value)}
Expand Down