Compare commits

..
Author SHA1 Message Date
zeppi d4f62dbefe update default comment server 2022-02-21 12:57:20 -05:00
7 changed files with 20 additions and 26 deletions

No files matched your search

+1 -1
View File
@@ -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.com/api/v2
COMMENT_SERVER_API=https://comments.odysee.tv/api/v2
COMMENT_SERVER_NAME=Odysee
SEARCH_SERVER_API=https://lighthouse.odysee.com/search
SOCKETY_SERVER_API=wss://sockety.odysee.com/ws
+6
View File
@@ -10,6 +10,7 @@ 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.
@@ -190,6 +191,11 @@ 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' };
});
+1 -4
View File
@@ -289,8 +289,6 @@ 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);
};
@@ -320,8 +318,7 @@ ipcMain.on('check-for-updates', () => {
autoUpdater.checkForUpdates();
});
autoUpdater.on('update-downloaded', (e, releaseNotes, releaseName) => {
rendererWindow.webContents.send('log-this', {e, releaseNotes, releaseName});
autoUpdater.on('update-downloaded', () => {
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', 'guide'], // guide hidden until fixed
hideIcons: ['heading', 'image', 'fullscreen', 'side-by-side'],
previewRender(plainText) {
const preview = <MarkdownPreview content={plainText} noDataStore />;
return ReactDOMServer.renderToString(preview);
+2 -13
View File
@@ -118,7 +118,6 @@ 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)));
});
@@ -147,21 +146,12 @@ 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();
});
@@ -201,9 +191,8 @@ function AppWrapper() {
useEffect(() => {
if (persistDone) {
const state = store.getState();
const prereleaseEnabled = makeSelectClientSetting(SETTINGS.ENABLE_PRERELEASE_UPDATES)(state);
// const autoUpdateEnabled = makeSelectClientSetting(SETTINGS.ENABLE_PRERELEASE_UPDATES)(state);
if (prereleaseEnabled) {
const enabled = makeSelectClientSetting(SETTINGS.ENABLE_PRERELEASE_UPDATES)(state);
if (enabled) {
autoUpdater.allowPrerelease = true;
}
}
+7 -4
View File
@@ -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), // update or clear this when download (Re)starts
downloadItem: selectUpgradeDownloadPath(state),
});
const perform = (dispatch) => ({
const perform = dispatch => ({
startUpgrade: () => dispatch(doStartUpgrade()),
cancelUpgrade: () => {
dispatch(doHideModal());
@@ -17,4 +17,7 @@ const perform = (dispatch) => ({
},
});
export default connect(select, perform)(ModalDownloading);
export default connect(
select,
perform
)(ModalDownloading);
+2 -3
View File
@@ -83,8 +83,7 @@ export function doSkipUpgrade() {
export function doStartUpgrade() {
return (dispatch, getState) => {
const state = getState();
const upgradeDownloadPath = selectUpgradeDownloadPath(state); // downloadPath
// make sure downloadPath is updated as soon as download starts
const upgradeDownloadPath = selectUpgradeDownloadPath(state);
ipcRenderer.send('upgrade', upgradeDownloadPath);
};
@@ -93,7 +92,7 @@ export function doStartUpgrade() {
export function doDownloadUpgrade() {
return (dispatch, getState) => {
const state = getState();
const url = selectUpdateUrl(state); // updateUrl
const url = selectUpdateUrl(state);
ipcRenderer.send('download-upgrade', { url, options: {} });
dispatch({
type: ACTIONS.UPGRADE_DOWNLOAD_STARTED,