Skip to content

Commit c812caf

Browse files
Adding help and redesigning clip pack editting to include interstitials and an; albeit ugly, menu
1 parent 1cacb31 commit c812caf

File tree

9 files changed

+245
-102
lines changed

9 files changed

+245
-102
lines changed

release/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dub-editor-electron",
3-
"version": "2.1.0-beta",
3+
"version": "2.2.0-beta",
44
"description": "A dub editor for What the Dub and Rifftrax games by Wide Right Studios",
55
"license": "MIT",
66
"author": {

src/main/main.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ const HOME: string =
5050
process.platform === 'darwin'
5151
? process.env.HOME || '/'
5252
: `${process.env.HOMEDRIVE}${process.env.HOMEPATH}/AppData/Local/DubEditor`;
53-
const CONFIG_FILE: string = `${HOME}/.dub-editor-config.json`;
54-
const COLLECTIONS_FILE: string = '.dub-editor-collections.json';
55-
const BATCH_CACHE_FILE: string = '.dub-editor-batch-cache.json';
53+
const CONFIG_FILE: string = `${HOME}/.dub-editor-config.v2.json`;
54+
const COLLECTIONS_FILE: string = '.dub-editor-collections.v2.json';
55+
const BATCH_CACHE_FILE: string = '.dub-editor-batch-cache.v2.json';
5656

57-
const BATCH_VIDEO_TEMP_FILE: string = '.dub-editor-data/dub-editor-batch-tmp.mp4';
58-
const CLIP_VIDEO_TEMP_FILE: string = '.dub-editor-data/dub-editor-clip-tmp.mp4';
57+
const BATCH_VIDEO_TEMP_FILE: string = '.dub-editor-data.v2/dub-editor-batch-tmp.mp4';
58+
const CLIP_VIDEO_TEMP_FILE: string = '.dub-editor-data.v2/dub-editor-clip-tmp.mp4';
5959

60-
const VIDEO_SUB_DIRECTORY = '_VideoClips';
61-
const SUBTITLE_SUB_DIRECTORY = '_Subtitles';
62-
const THUMBNAIL_SUB_DIRECTORY = '_ThumbNails';
63-
const PREVIEW_IMAGE_SUB_DIRECTORY = '_PreviewImages';
60+
const VIDEO_SUB_DIRECTORY = 'VideoClips';
61+
const SUBTITLE_SUB_DIRECTORY = 'Subtitles';
62+
const THUMBNAIL_SUB_DIRECTORY = 'ThumbNails';
63+
const PREVIEW_IMAGE_SUB_DIRECTORY = 'PreviewImages';
6464

6565
export default class AppUpdater {
6666
constructor() {

src/renderer/App.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ li {
9292
color: white !important;
9393
}
9494

95+
button.selected {
96+
background-color: black !important;
97+
color: white !important;
98+
}
99+
95100
.subtitle,
96101
.resize-left,
97102
.resize-right {
@@ -198,4 +203,4 @@ li {
198203

199204
.preview-image {
200205
width: 800px;
201-
}
206+
}

src/renderer/App.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ import { interstitialAtom } from './atoms/interstitial.atom';
2727
import './App.css';
2828
import 'react-toastify/dist/ReactToastify.css';
2929

30-
const VERSION = 'v2.0.0-beta';
30+
import { version } from '../../release/app/package.json';
31+
32+
const VERSION = version;
3133

3234
let App = (props) => {
3335
const navigate = useNavigate();
@@ -127,6 +129,7 @@ let App = (props) => {
127129
>
128130
About
129131
</Link>
132+
|
130133
<a
131134
href="https://ko-fi.com/michaelcmain52278"
132135
target="_blank"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.help-text {
2+
position: absolute;
3+
top: 50%;
4+
left: 50%;
5+
transform: translate(-50%, -50%);
6+
background-color: teal;
7+
color: white;
8+
padding: 10px;
9+
}
10+
11+
.hidden {
12+
display: none;
13+
}
14+
15+
.help-button {
16+
display: inline-flex;
17+
justify-content: center;
18+
align-items: center;
19+
cursor: pointer;
20+
width: 25px;
21+
height: 25px;
22+
border-radius: 25px;
23+
color: white;
24+
background-color: teal;
25+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react';
2+
import './HelpButton.css';
3+
4+
export default ({ helpText }) => {
5+
const ref = React.createRef();
6+
7+
const toggleHelp = () => {
8+
if (ref.current.classList.contains('hidden')) {
9+
ref.current.classList.remove('hidden');
10+
} else {
11+
ref.current.classList.add('hidden');
12+
}
13+
};
14+
15+
return (
16+
<>
17+
<div className="help-text hidden" ref={ref}>
18+
{helpText}
19+
<button className="help-text-close" onClick={toggleHelp}>
20+
Close
21+
</button>
22+
</div>
23+
<span className="help-button" onClick={toggleHelp}>
24+
?
25+
</span>
26+
</>
27+
);
28+
};

0 commit comments

Comments
 (0)