Add link to terms and privacy policy in about window
This commit is contained in:
parent
0abdd5ead1
commit
9ef7c42097
4 changed files with 28 additions and 3 deletions
|
@ -1,4 +1,8 @@
|
||||||
{
|
{
|
||||||
|
"privacyPolicy": {
|
||||||
|
"message": "Terms & Privacy Policy",
|
||||||
|
"description": "Shown in the about box for the link to https://signal.org/legal"
|
||||||
|
},
|
||||||
"mainMenuFile": {
|
"mainMenuFile": {
|
||||||
"message": "&File",
|
"message": "&File",
|
||||||
"description": "The label that is used for the File menu in the program main menu. The '&' indicates that the following letter will be used as the keyboard 'shortcut letter' for accessing the menu with the Alt-<letter> combination."
|
"description": "The label that is used for the File menu in the program main menu. The '&' indicates that the following letter will be used as the keyboard 'shortcut letter' for accessing the menu with the Alt-<letter> combination."
|
||||||
|
|
|
@ -11,8 +11,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
margin-top: 2em;
|
margin-top: 1em;
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
@ -47,6 +46,10 @@ a {
|
||||||
<div>
|
<div>
|
||||||
<a href="https://signal.org">signal.org</a>
|
<a href="https://signal.org">signal.org</a>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<a class="privacy" href="https://signal.org/legal">Terms & Privacy Policy</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script type='text/javascript' src='node_modules/jquery/dist/jquery.js'></script>
|
<script type='text/javascript' src='node_modules/jquery/dist/jquery.js'></script>
|
||||||
<script>
|
<script>
|
||||||
|
@ -55,6 +58,8 @@ $(document).on('keyup', function(e) {
|
||||||
window.closeAbout();
|
window.closeAbout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.privacy').text(window.i18n('privacyPolicy'));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
15
about_preload.js
Normal file
15
about_preload.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
const { ipcRenderer } = require('electron');
|
||||||
|
const url = require('url');
|
||||||
|
const i18n = require('./js/modules/i18n');
|
||||||
|
|
||||||
|
const config = url.parse(window.location.toString(), true).query;
|
||||||
|
const { locale } = config;
|
||||||
|
const localeMessages = ipcRenderer.sendSync('locale-data');
|
||||||
|
|
||||||
|
window.getEnvironment = () => config.environment;
|
||||||
|
window.getVersion = () => config.version;
|
||||||
|
window.getAppInstance = () => config.appInstance;
|
||||||
|
|
||||||
|
window.closeAbout = () => ipc.send('close-about');
|
||||||
|
|
||||||
|
window.i18n = i18n.setup(locale, localeMessages);
|
3
main.js
3
main.js
|
@ -419,7 +419,8 @@ function showAbout() {
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
nodeIntegrationInWorker: false,
|
nodeIntegrationInWorker: false,
|
||||||
preload: path.join(__dirname, 'preload.js'),
|
preload: path.join(__dirname, 'about_preload.js'),
|
||||||
|
// sandbox: true,
|
||||||
nativeWindowOpen: true,
|
nativeWindowOpen: true,
|
||||||
},
|
},
|
||||||
parent: mainWindow,
|
parent: mainWindow,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue