Skip to content

Feature/json export #32

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

Merged
merged 18 commits into from
Mar 30, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.0.0] - UNRELEASED
### Changed
- Caption Studio now reads audio files directly from project root, or user specified audio directory
- Caption studio now allows for saving/opening caption JSON files directly from projects
### Added
- This CHANGELOG
- VUE front end renderer
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@
"last 2 versions",
"not dead"
]
}
}
4 changes: 4 additions & 0 deletions src/contents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export const EVENTS = {
UPDATE_TEMPLATE_CREATION_LOG: 'updateTemplateCreateLog',
PROJECT_CREATION_COMPLETE: 'projectCreationComplete',
UPDATE_AUDIO_LOCATION: 'updateAudioLocation',
SAVE_CAPTION_DATA: 'saveCaptionData',
CLEAR_CAPTION_DATA: 'clearCaptionData',
OPEN_TEMPLATE_DIALOG: 'openTemplateDialog',
OPEN_CAPTION_FILE: 'openCaptionFile',
};

export const DIALOGS = {
Expand Down
13 changes: 12 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
'use strict';

import { app, protocol, BrowserWindow } from 'electron';
import { app, protocol, BrowserWindow, Menu, MenuItem, ipcMain } from 'electron';
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib';
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer';
import { studio } from './studio';
import { template, captionStudioTemplate } from './studio/menus/AppMenuTemplate';

const isDevelopment = process.env.NODE_ENV !== 'production';

Expand All @@ -16,6 +17,16 @@ protocol.registerSchemesAsPrivileged([
{ scheme: 'app', privileges: { secure: true, standard: true } }
]);

// Create menus from templates
const menu = Menu.buildFromTemplate(template);
const captionStudioMenu = Menu.buildFromTemplate(captionStudioTemplate);
Menu.setApplicationMenu(menu);

//on caption studio open or close, set the appropriate menu
ipcMain.on('captionStudio', (event, page) => {
Menu.setApplicationMenu(page ? captionStudioMenu : menu);
});

/**
* Creates electron window
*/
Expand Down
1 change: 1 addition & 0 deletions src/main/studio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class SpringRollStudio {
if (paths !== undefined) {
projectInfo.location = paths[0];
captionInfo.audioLocation = paths[0]; //when the project location changes also change the default audio files directory
captionInfo.captionLocation = '';
}
break;

Expand Down
Loading