Skip to content

Commit

Permalink
Revert "issue developerforce#7"
Browse files Browse the repository at this point in the history
This reverts commit 11a72da.
  • Loading branch information
DKulan committed Apr 7, 2021
1 parent 11a72da commit 94400e6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
4 changes: 0 additions & 4 deletions client/src/pages/Create/Create.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ textarea::placeholder {
transition: color 150ms ease-in-out;
}

.text-limit-error {
color: var(--color-error-500)
}

@media (min-width: 560px) {
.gif-video {
height: 288px;
Expand Down
17 changes: 2 additions & 15 deletions client/src/pages/Create/Create.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function Create({ history }) {
const [isWebcamReady, setIsWebcamReady] = useState(false)
const [gifId, setGifId] = useState()
const [text, setText] = useState('')
const [textLimitError, setTextLimitError] = useState('')
const [isProcessingGif, setIsProcessingGif] = useState('')
const [isUploading, setUploading] = useState(false)
const [warning, setWarning] = useState(
Expand Down Expand Up @@ -136,15 +135,6 @@ function Create({ history }) {
download(fileBlob, `${gifId}.gif`)
}

const handleText = (input) => {
if (input.length === 30) {
setTextLimitError('Caption must have a maximum limit of 30 characters.')
} else {
setText(input)
setTextLimitError('')
}
}

const header = (
<>
<h1>Create Your Own GIF</h1>
Expand Down Expand Up @@ -234,12 +224,9 @@ function Create({ history }) {
)}
{phase === PHASE_TEXT && (
<>
{textLimitError && (
<p className="text-limit-error">{textLimitError}</p>
)}
<textarea
placeholder="Add a caption to your GIF! (maximum 30 characters)"
onChange={(e) => handleText(e.target.value)}
placeholder="Add a caption to your GIF!"
onChange={(e) => setText(e.target.value)}
value={text}
/>
<div className="gif-button-group">
Expand Down
7 changes: 1 addition & 6 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ app.post('/uploadGIF', ({ body }, res) => {
})
})

/* eslint-disable */
app.post('/video2gif', upload.none(), ({ body }, res) => {
const { videoId, text, fontsize } = body
ffmpeg()
Expand All @@ -193,11 +192,7 @@ app.post('/video2gif', upload.none(), ({ body }, res) => {
{
filter: 'drawtext',
options: {
text: text
.replaceAll('\\\\', '\\\\\\\\\\\\\\\\')
.replaceAll("'", "'\\\\\\\\\\\\''")
.replaceAll('%', '\\\\\\\\\\\\%')
.replaceAll(':', '\\\\\\\\\\\\:'),
text: text.replace(/\r?\n|\r/gm, '\v'),
fontsize,
fontcolor: 'white',
x: '(w-text_w)/2',
Expand Down

0 comments on commit 94400e6

Please sign in to comment.