Merge and migrate locally-trusted preload scripts to contextBridge
API (#2553)
* Migrate intl_provider to contextBridge * Migrate modalPreload to contextBridge * Migrate loadingScreenPreload to contextBridge * Migrate downloadDropdown preloads to contextBridge * Migrate server dropdown preload to contextBridge * Migrate urlView preload to contextBridge * Merge all desktop API scripts into one * Remove unused communication channel constants
This commit is contained in:
@@ -8,8 +8,6 @@ import {FormattedMessage} from 'react-intl';
|
||||
|
||||
import {Button} from 'react-bootstrap';
|
||||
|
||||
import {START_UPDATE_DOWNLOAD} from 'common/communication';
|
||||
|
||||
import Thumbnail from '../Thumbnail';
|
||||
|
||||
type OwnProps = {
|
||||
@@ -19,7 +17,7 @@ type OwnProps = {
|
||||
const UpdateAvailable = ({item}: OwnProps) => {
|
||||
const onButtonClick = (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
e?.preventDefault?.();
|
||||
window.postMessage({type: START_UPDATE_DOWNLOAD}, window.location.href);
|
||||
window.desktop.downloadsDropdown.startUpdateDownload();
|
||||
};
|
||||
|
||||
return (
|
||||
|
@@ -10,8 +10,6 @@ import {Button} from 'react-bootstrap';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import {START_UPGRADE} from 'common/communication';
|
||||
|
||||
import Thumbnail from '../Thumbnail';
|
||||
import FileSizeAndStatus from '../FileSizeAndStatus';
|
||||
|
||||
@@ -24,7 +22,7 @@ const UpdateAvailable = ({item}: OwnProps) => {
|
||||
|
||||
const onButtonClick = (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
e?.preventDefault?.();
|
||||
window.postMessage({type: START_UPGRADE}, window.location.href);
|
||||
window.desktop.downloadsDropdown.startUpgrade();
|
||||
};
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user