aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2020-05-25 23:05:04 -0700
committerjackyzha0 <[email protected]>2020-05-25 23:05:04 -0700
commit0568ee72bd05ed16cf5250a444d936821c42b524 (patch)
treef9f1b1fcc58a9b5658579cf68e3025f15719abf3 /frontend/src/components
parentadd icon, fix title, add content to meta (diff)
downloadctrl-v-0568ee72bd05ed16cf5250a444d936821c42b524.tar.xz
ctrl-v-0568ee72bd05ed16cf5250a444d936821c42b524.zip
various fixes
Diffstat (limited to 'frontend/src/components')
-rw-r--r--frontend/src/components/Err.js3
-rw-r--r--frontend/src/components/Footer.js2
-rw-r--r--frontend/src/components/NewPaste.js3
-rw-r--r--frontend/src/components/PasteInfo.js5
-rw-r--r--frontend/src/components/ViewPaste.js4
-rw-r--r--frontend/src/components/modals/PasswordModal.js3
-rw-r--r--frontend/src/components/modals/shared.js5
7 files changed, 15 insertions, 10 deletions
diff --git a/frontend/src/components/Err.js b/frontend/src/components/Err.js
index dc78398..c87f6a8 100644
--- a/frontend/src/components/Err.js
+++ b/frontend/src/components/Err.js
@@ -4,7 +4,6 @@ import styled, { css } from 'styled-components'
const ErrMsg = styled.p`
display: inline;
font-weight: 700;
- margin-left: 2em;
color: #ff3333;
opacity: 0;
transition: opacity 0.3s cubic-bezier(.25,.8,.25,1);
@@ -23,7 +22,7 @@ class Error extends React.Component {
this.state = {
active: false,
- msg: '',
+ msg: '&nbsp;',
};
this.showMessage = this.showMessage.bind(this);
diff --git a/frontend/src/components/Footer.js b/frontend/src/components/Footer.js
index ecd85e1..c7878e5 100644
--- a/frontend/src/components/Footer.js
+++ b/frontend/src/components/Footer.js
@@ -2,7 +2,7 @@ import React from 'react';
import styled from 'styled-components'
const SpacedFooter = styled.div`
- margin: 1em 0;
+ margin: 2em 0;
`
const Link = (props) => {
diff --git a/frontend/src/components/NewPaste.js b/frontend/src/components/NewPaste.js
index 8012b99..f17c8b4 100644
--- a/frontend/src/components/NewPaste.js
+++ b/frontend/src/components/NewPaste.js
@@ -91,7 +91,7 @@ class NewPaste extends React.Component {
// some weird err
if (resp !== undefined) {
- const errTxt = `${resp.statusText}: ${resp.data}`
+ const errTxt = `${resp.status}: ${resp.data}`
this.ErrorLabel.current.showMessage(errTxt)
} else {
// some weird err (e.g. network)
@@ -165,6 +165,7 @@ class NewPaste extends React.Component {
onClick={this.togglePreview} >
preview
</Button>
+ <br />
<Error ref={this.ErrorLabel} />
</form>
);
diff --git a/frontend/src/components/PasteInfo.js b/frontend/src/components/PasteInfo.js
index 0b4188d..76d8859 100644
--- a/frontend/src/components/PasteInfo.js
+++ b/frontend/src/components/PasteInfo.js
@@ -79,10 +79,9 @@ const PasteInfo = (props) => {
<SpacedText>
<Bold>expires:&nbsp;</Bold>{props.expiry}
</SpacedText>
- <SpacedText>
- {props.err}
- </SpacedText>
</StyledDiv>
+ <br />
+ {props.err}
</div>
);
}
diff --git a/frontend/src/components/ViewPaste.js b/frontend/src/components/ViewPaste.js
index 30fb29e..117bb18 100644
--- a/frontend/src/components/ViewPaste.js
+++ b/frontend/src/components/ViewPaste.js
@@ -70,7 +70,7 @@ class ViewPaste extends React.Component {
// otherwise, just log it lmao
if (resp !== undefined) {
- const errTxt = `${resp.statusText}: ${resp.data}`
+ const errTxt = `${resp.status}: ${resp.data}`
this.ErrorLabel.current.showMessage(errTxt)
} else {
// some weird err (e.g. network)
@@ -166,7 +166,7 @@ class ViewPaste extends React.Component {
// some weird err
if (resp !== undefined) {
- const errTxt = `${resp.statusText}: ${resp.data}`
+ const errTxt = `${resp.status}: ${resp.data}`
this.ErrorLabel.current.showMessage(errTxt, -1)
return
}
diff --git a/frontend/src/components/modals/PasswordModal.js b/frontend/src/components/modals/PasswordModal.js
index 619e60a..527fc54 100644
--- a/frontend/src/components/modals/PasswordModal.js
+++ b/frontend/src/components/modals/PasswordModal.js
@@ -1,7 +1,7 @@
import React from 'react';
import Modal from 'react-modal';
import { PassInput } from '../Inputs'
-import { RightPad, LeftPad, ModalHeader } from './shared'
+import { RightPad, LeftPad, ModalHeader, Padding } from './shared'
import Error from '../Err';
const modalStyles = {
@@ -51,6 +51,7 @@ class PasswordModal extends React.Component {
</RightPad>
<LeftPad>
<input className="lt-button lt-shadow lt-hover" type="submit" value="continue" />
+ <Padding />
<Error ref={this.ErrorLabel} />
</LeftPad>
</form>
diff --git a/frontend/src/components/modals/shared.js b/frontend/src/components/modals/shared.js
index 9359436..d63be06 100644
--- a/frontend/src/components/modals/shared.js
+++ b/frontend/src/components/modals/shared.js
@@ -11,3 +11,8 @@ export const LeftPad = styled.div`
export const ModalHeader = styled.h3`
font-weight: 700
`
+
+export const Padding = styled.span`
+ content: '&nbsp;';
+ margin-right: 2em;
+` \ No newline at end of file