Fix calling tools JS

This commit is contained in:
ayumi-signal 2024-05-23 15:19:12 -07:00 committed by GitHub
parent 5f0080a7d7
commit 29eb07c159
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 27 additions and 23 deletions

View File

@ -20,6 +20,7 @@ build/ICUMessageParams.d.ts
# Third-party files
js/Mp3LameEncoder.min.js
js/WebAudioRecorderMp3.js
js/calling-tools/**
# TypeScript generated files
app/**/*.js

3
.gitignore vendored
View File

@ -38,9 +38,6 @@ build/ICUMessageParams.d.ts
app/*.js
ts/**/*.js
ts/protobuf/*.d.ts
# allow js from callingtools
!ts/windows/callingtools/**/*.js
ts/windows/callingtools/preload.js
# CSS Modules
**/*.scss.d.ts

View File

@ -29,6 +29,7 @@ components/**
js/curve/**
js/Mp3LameEncoder.min.js
js/WebAudioRecorderMp3.js
js/calling-tools/**
# Assets
/images/

View File

@ -1266,7 +1266,7 @@ async function showCallingDevToolsWindow() {
sandbox: true,
contextIsolation: true,
nativeWindowOpen: true,
preload: join(__dirname, '../bundles/callingtools/preload.js'),
preload: join(__dirname, '../bundles/calling-tools/preload.js'),
},
};

View File

@ -31,7 +31,7 @@
/>
<script
type="module"
src="bundles/callingtools/webrtc_internals.js"
src="bundles/calling-tools/webrtc_internals.js"
></script>
</head>
<body>

View File

@ -11,7 +11,7 @@ import {StatsRatesCalculator, StatsReport} from './stats_rates_calculator.js';
import {StatsTable} from './stats_table.js';
import {TabView} from './tab_view.js';
import {UserMediaTable} from './user_media_table.js';
import { i18n } from '../sandboxedInit.js';
import { i18n } from '../../ts/windows/sandboxedInit.js';
let tabView = null;
let peerConnectionUpdateTable = null;

View File

@ -136,8 +136,8 @@ async function sandboxedEnv() {
ROOT_DIR,
'ts',
'windows',
'callingtools',
'webrtc_internals.js'
'calling-tools',
'webrtc_internals.ts'
),
],
},
@ -149,7 +149,7 @@ async function sandboxedEnv() {
path.join(ROOT_DIR, 'ts', 'windows', 'debuglog', 'preload.ts'),
path.join(ROOT_DIR, 'ts', 'windows', 'loading', 'preload.ts'),
path.join(ROOT_DIR, 'ts', 'windows', 'permissions', 'preload.ts'),
path.join(ROOT_DIR, 'ts', 'windows', 'callingtools', 'preload.ts'),
path.join(ROOT_DIR, 'ts', 'windows', 'calling-tools', 'preload.ts'),
path.join(ROOT_DIR, 'ts', 'windows', 'screenShare', 'preload.ts'),
path.join(ROOT_DIR, 'ts', 'windows', 'settings', 'preload.ts'),
],

View File

@ -52,20 +52,20 @@ const FILES_TO_IGNORE = new Set(
'sticker-creator/src/util/protos.js',
// ignore calling developer tools licensing which use Chromium license
'calling_tools.html',
'ts/windows/callingtools/assert.js',
'ts/windows/callingtools/candidate_grid.js',
'ts/windows/callingtools/data_series.js',
'ts/windows/callingtools/dump_creator.js',
'ts/windows/callingtools/peer_connection_update_table.js',
'ts/windows/callingtools/stats_graph_helper.js',
'ts/windows/callingtools/stats_helper.js',
'ts/windows/callingtools/stats_rates_calculator.js',
'ts/windows/callingtools/stats_table.js',
'ts/windows/callingtools/tab_view.js',
'ts/windows/callingtools/timeline_graph_view.js',
'ts/windows/callingtools/user_media_table.js',
'ts/windows/callingtools/util.js',
'ts/windows/callingtools/webrtc_internals.js',
'js/calling-tools/assert.js',
'js/calling-tools/candidate_grid.js',
'js/calling-tools/data_series.js',
'js/calling-tools/dump_creator.js',
'js/calling-tools/peer_connection_update_table.js',
'js/calling-tools/stats_graph_helper.js',
'js/calling-tools/stats_helper.js',
'js/calling-tools/stats_rates_calculator.js',
'js/calling-tools/stats_table.js',
'js/calling-tools/tab_view.js',
'js/calling-tools/timeline_graph_view.js',
'js/calling-tools/user_media_table.js',
'js/calling-tools/util.js',
'js/calling-tools/webrtc_internals.js',
].map(
// This makes sure the files are correct on Windows.
path.normalize

View File

@ -0,0 +1,5 @@
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
// eslint-disable-next-line import/extensions
import '../../../js/calling-tools/webrtc_internals.js';