Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9c81e8255 |
No files matched your search
+1
-1
@@ -11,7 +11,7 @@ WEB_SERVER_PORT=1337
|
||||
LBRY_WEB_API=https://api.na-backend.odysee.com
|
||||
LBRY_WEB_STREAMING_API=https://cdn.lbryplayer.xyz
|
||||
LBRY_WEB_BUFFER_API=https://collector-service.api.lbry.tv/api/v1/events/video
|
||||
COMMENT_SERVER_API=https://comments.odysee.tv/api/v2
|
||||
COMMENT_SERVER_API=https://comments.odysee.com/api/v2
|
||||
COMMENT_SERVER_NAME=Odysee
|
||||
SEARCH_SERVER_API=https://lighthouse.odysee.com/search
|
||||
SOCKETY_SERVER_API=wss://sockety.odysee.com/ws
|
||||
|
||||
@@ -10,7 +10,6 @@ import { TO_TRAY_WHEN_CLOSED } from 'constants/settings';
|
||||
import setupBarMenu from './menu/setupBarMenu';
|
||||
import * as PAGES from 'constants/pages';
|
||||
const remote = require('@electron/remote/main');
|
||||
const shell = require('electron').shell;
|
||||
function GetAppLangCode() {
|
||||
// https://www.electronjs.org/docs/api/locales
|
||||
// 1. Gets the user locale.
|
||||
@@ -191,11 +190,6 @@ export default appState => {
|
||||
});
|
||||
|
||||
window.webContents.setWindowOpenHandler((details) => {
|
||||
// Only open http and https links to prevent
|
||||
// security issues.
|
||||
if (['https:', 'http:'].includes(new URL(details.url).protocol)) {
|
||||
shell.openExternal(details.url);
|
||||
}
|
||||
return { action: 'deny' };
|
||||
});
|
||||
|
||||
|
||||
+4
-1
@@ -289,6 +289,8 @@ app.on('before-quit', () => {
|
||||
ipcMain.on('download-upgrade', async (event, params) => {
|
||||
const { url, options } = params;
|
||||
const dir = fs.mkdtempSync(app.getPath('temp') + path.sep);
|
||||
// tell app of new tempdir
|
||||
rendererWindow.webContents.send('update-download-path', dir);
|
||||
options.onProgress = function(p) {
|
||||
rendererWindow.webContents.send('download-progress-update', p);
|
||||
};
|
||||
@@ -318,7 +320,8 @@ ipcMain.on('check-for-updates', () => {
|
||||
autoUpdater.checkForUpdates();
|
||||
});
|
||||
|
||||
autoUpdater.on('update-downloaded', () => {
|
||||
autoUpdater.on('update-downloaded', (e, releaseNotes, releaseName) => {
|
||||
rendererWindow.webContents.send('log-this', {e, releaseNotes, releaseName});
|
||||
autoUpdateDownloaded = true;
|
||||
});
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ export class FormField extends React.PureComponent<Props> {
|
||||
getMdeInstance={getInstance}
|
||||
options={{
|
||||
spellChecker: true,
|
||||
hideIcons: ['heading', 'image', 'fullscreen', 'side-by-side'],
|
||||
hideIcons: ['heading', 'image', 'fullscreen', 'side-by-side', 'guide'], // guide hidden until fixed
|
||||
previewRender(plainText) {
|
||||
const preview = <MarkdownPreview content={plainText} noDataStore />;
|
||||
return ReactDOMServer.renderToString(preview);
|
||||
|
||||
+13
-2
@@ -118,6 +118,7 @@ ipcRenderer.on('open-uri-requested', (event, url, newSession) => {
|
||||
});
|
||||
|
||||
ipcRenderer.on('download-progress-update', (e, p) => {
|
||||
console.log('e', e, 'p', p);
|
||||
app.store.dispatch(doUpdateDownloadProgress(Math.round(p.percent * 100)));
|
||||
});
|
||||
|
||||
@@ -146,12 +147,21 @@ ipcRenderer.on('zoom-window', (event, action) => {
|
||||
|
||||
const { dock } = remote.app;
|
||||
|
||||
ipcRenderer.on('log-this', (e, log) => {
|
||||
console.log('electron log:', log);
|
||||
});
|
||||
|
||||
ipcRenderer.on('window-is-focused', () => {
|
||||
if (!dock) return;
|
||||
app.store.dispatch({ type: ACTIONS.WINDOW_FOCUSED });
|
||||
dock.setBadge('');
|
||||
});
|
||||
|
||||
ipcRenderer.on('update-download-path', (dir) => {
|
||||
console.log('dir');
|
||||
// doLogWarningConsoleMessage();
|
||||
});
|
||||
|
||||
ipcRenderer.on('devtools-is-opened', () => {
|
||||
doLogWarningConsoleMessage();
|
||||
});
|
||||
@@ -191,8 +201,9 @@ function AppWrapper() {
|
||||
useEffect(() => {
|
||||
if (persistDone) {
|
||||
const state = store.getState();
|
||||
const enabled = makeSelectClientSetting(SETTINGS.ENABLE_PRERELEASE_UPDATES)(state);
|
||||
if (enabled) {
|
||||
const prereleaseEnabled = makeSelectClientSetting(SETTINGS.ENABLE_PRERELEASE_UPDATES)(state);
|
||||
// const autoUpdateEnabled = makeSelectClientSetting(SETTINGS.ENABLE_PRERELEASE_UPDATES)(state);
|
||||
if (prereleaseEnabled) {
|
||||
autoUpdater.allowPrerelease = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@ import { doStartUpgrade, doCancelUpgrade, doHideModal } from 'redux/actions/app'
|
||||
import { selectDownloadProgress, selectDownloadComplete, selectUpgradeDownloadPath } from 'redux/selectors/app';
|
||||
import ModalDownloading from './view';
|
||||
|
||||
const select = state => ({
|
||||
const select = (state) => ({
|
||||
downloadProgress: selectDownloadProgress(state),
|
||||
downloadComplete: selectDownloadComplete(state),
|
||||
downloadItem: selectUpgradeDownloadPath(state),
|
||||
downloadItem: selectUpgradeDownloadPath(state), // update or clear this when download (Re)starts
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
const perform = (dispatch) => ({
|
||||
startUpgrade: () => dispatch(doStartUpgrade()),
|
||||
cancelUpgrade: () => {
|
||||
dispatch(doHideModal());
|
||||
@@ -17,7 +17,4 @@ const perform = dispatch => ({
|
||||
},
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(ModalDownloading);
|
||||
export default connect(select, perform)(ModalDownloading);
|
||||
@@ -83,7 +83,8 @@ export function doSkipUpgrade() {
|
||||
export function doStartUpgrade() {
|
||||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
const upgradeDownloadPath = selectUpgradeDownloadPath(state);
|
||||
const upgradeDownloadPath = selectUpgradeDownloadPath(state); // downloadPath
|
||||
// make sure downloadPath is updated as soon as download starts
|
||||
|
||||
ipcRenderer.send('upgrade', upgradeDownloadPath);
|
||||
};
|
||||
@@ -92,7 +93,7 @@ export function doStartUpgrade() {
|
||||
export function doDownloadUpgrade() {
|
||||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
const url = selectUpdateUrl(state);
|
||||
const url = selectUpdateUrl(state); // updateUrl
|
||||
ipcRenderer.send('download-upgrade', { url, options: {} });
|
||||
dispatch({
|
||||
type: ACTIONS.UPGRADE_DOWNLOAD_STARTED,
|
||||
|
||||
Reference in new issue
Block a user