-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(about_window): enable sandbox on the about window
- Loading branch information
1 parent
efc45eb
commit 3774420
Showing
3 changed files
with
26 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
import '../../../node_modules/bootstrap/dist/css/bootstrap.min.css'; | ||
import '../main.css'; | ||
import './about.css'; | ||
import replaceText from '../../lib/replaceText'; | ||
|
||
declare const appVersion: () => Promise<string>; | ||
declare const versions: { [key: string]: string }; | ||
|
||
window.addEventListener('click', () => { | ||
window.close(); | ||
}); | ||
|
||
window.addEventListener('DOMContentLoaded', async () => { | ||
replaceText('app-version', await appVersion()); | ||
for (const dependency of ['chrome', 'node', 'electron']) { | ||
replaceText(`${dependency}-version`, versions[dependency]); | ||
} | ||
}); |