Unverified Commit 88f4dc92 authored by Tasso Evangelista's avatar Tasso Evangelista Committed by GitHub

Merge pull request #889 from RocketChat/fix/about-dialog

[FIX] About dialog
parents c3f3a829 ca411e40
......@@ -3,7 +3,7 @@ import querystring from 'querystring';
import url from 'url';
import jetpack from 'fs-jetpack';
import idle from '@paulcbetts/system-idle-time';
import { app, ipcMain, Menu } from 'electron';
import { app, ipcMain, BrowserWindow, Menu } from 'electron';
import autoUpdate from './background/autoUpdate';
import certificate from './background/certificate';
......@@ -108,3 +108,22 @@ app.on('window-all-closed', () => {
ipcMain.on('getSystemIdleTime', (event) => {
event.returnValue = idle.getIdleTime();
});
ipcMain.on('show-about-dialog', () => {
getMainWindow().then((mainWindow) => {
const win = new BrowserWindow({
title: i18n.__('About', app.getName()),
parent: mainWindow,
width: 400,
height: 300,
resizable: false,
maximizable: false,
minimizable: false,
center: true,
show: false,
});
win.setMenuBarVisibility(false);
win.once('ready-to-show', () => win.show());
win.loadURL(`file://${ __dirname }/public/about.html`);
});
});
......@@ -33,17 +33,26 @@ class I18n {
* @constructor
*/
constructor() {
let dir = path.join(__dirname, '../i18n/lang');
if (!fs.existsSync(dir)) {
dir = path.join(__dirname, 'i18n/lang');
}
const defaultLocale = path.join(dir, 'en.i18n.json');
loadedLanguage = JSON.parse(fs.readFileSync(defaultLocale, 'utf8'));
const locale = path.join(dir, `${ eApp.getLocale() }.i18n.json`);
if (fs.existsSync(locale)) {
const lang = JSON.parse(fs.readFileSync(locale, 'utf8'));
loadedLanguage = Object.assign(loadedLanguage, lang);
const load = () => {
let dir = path.join(__dirname, '../i18n/lang');
if (!fs.existsSync(dir)) {
dir = path.join(__dirname, 'i18n/lang');
}
const defaultLocale = path.join(dir, 'en.i18n.json');
loadedLanguage = JSON.parse(fs.readFileSync(defaultLocale, 'utf8'));
const locale = path.join(dir, `${ eApp.getLocale() }.i18n.json`);
if (fs.existsSync(locale)) {
const lang = JSON.parse(fs.readFileSync(locale, 'utf8'));
loadedLanguage = Object.assign(loadedLanguage, lang);
}
};
if (eApp.isReady()) {
load();
return;
}
eApp.once('ready', load);
}
/**
......
......@@ -47,6 +47,7 @@
"New_Version": "New Version:",
"No": "No",
"No_suggestions": "No suggestions",
"No updates are available.": "No updates are available.",
"No_valid_server_found": "No valid server found at the URL",
"Open_DevTools": "Open DevTools",
"Open_Language_Dictionary": "Open Language Dictionary",
......
......@@ -44,6 +44,7 @@
"New_Version": "Nova Versão:",
"No": "Não",
"No_suggestions": "Sem sugestões",
"No updates are available.": "Não há atualizações disponíveis.",
"No_valid_server_found": "Nenhum servidor válido encontrado neste endereço",
"Open_DevTools": "Abrir DevTools",
"Open_Language_Dictionary": "Abrir Dicionário Idioma",
......
<!doctype html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<style>
html {
background-color: #ececec;
font-family: helvetica;
padding: 10px;
}
body {
margin: 0px;
text-align: center;
}
img {
height: 60px;
margin-bottom: 5px;
}
.app-name {
font-size: 14px;
font-weight: bold;
}
.app-version {
margin-top: 15px;
font-size: 11px;
}
.app-version .version {
font-weight: bold;
}
.update {
margin-top:5px;
}
.copyright {
font-size: 10px;
position: absolute;
bottom: 0;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
}
.update-container {
display: none;
}
.update-container.update-container--enabled {
display: block;
}
.auto-update-container {
margin: auto 0;
}
</style>
<script>
const i18n = require('../i18n/index');
</script>
</head>
<body>
<img src="images/icon.png">
<div class="app-name"></div>
<div class="app-version"></div>
<div class="update-container">
<span class="update-spin icon-spin3 animate-spin" style="display:none;"></span>
<button class="update"><script>document.write(i18n.__('Check_for_Updates'))</script></button>
<p class="auto-update-container"><input type="checkbox" id="auto-update" checked /> <script>document.write(i18n.__('Check_for_Updates_on_Start'))</script></p>
</div>
<p class="copyright"><script>document.write(i18n.__('Copyright', require('../../package.json').copyright))</script></p>
<script>
<title>About %s</title>
<link rel="stylesheet" href="../stylesheets/main.css" />
<script>
document.addEventListener('DOMContentLoaded', () => {
const { remote, ipcRenderer } = require('electron');
const i18n = require('../i18n/index');
const { copyright } = require('../../package.json');
document.querySelector('.app-name').innerHTML = remote.app.getName();
document.title = i18n.__('About', remote.app.getName());
document.querySelector('.app-version').innerHTML = `${i18n.__('Version')} <span class="version">${remote.app.getVersion()}</span>`;
document.querySelector('.check-for-updates').innerHTML = i18n.__('Check_for_Updates');
document.querySelector('.check-for-updates-on-start + span').innerHTML = i18n.__('Check_for_Updates_on_Start');
document.querySelector('.copyright').innerHTML = i18n.__('Copyright', copyright);
const canUpdate = ipcRenderer.sendSync('can-update');
......@@ -87,36 +22,82 @@
const canAutoUpdate = ipcRenderer.sendSync('can-auto-update');
if (canAutoUpdate) {
document.querySelector('#auto-update').setAttribute('checked', 'checked');
document.querySelector('.check-for-updates-on-start').setAttribute('checked', 'checked');
} else {
document.querySelector('#auto-update').removeAttribute('checked');
document.querySelector('.check-for-updates-on-start').removeAttribute('checked');
}
const canSetAutoUpdate = ipcRenderer.sendSync('can-set-auto-update');
if (canSetAutoUpdate) {
document.querySelector('#auto-update').addEventListener('change', (event) => {
document.querySelector('.check-for-updates-on-start').addEventListener('change', (event) => {
ipcRenderer.send('set-auto-update', event.target.checked);
});
} else {
document.querySelector('#auto-update').setAttribute('disabled', 'disabled');
document.querySelector('.check-for-updates-on-start').setAttribute('disabled', 'disabled');
}
document.querySelector('.update').onclick = function(e) {
document.querySelector('.update-spin').setAttribute('style', '');
document.querySelector('.update').setAttribute('disabled', 'disabled');
document.querySelector('.check-for-updates').addEventListener('click', (e) => {
e.preventDefault();
document.querySelector('.check-for-updates').setAttribute('disabled', 'disabled');
document.querySelector('.check-for-updates').classList.add('hidden');
document.querySelector('.checking-for-updates').classList.remove('hidden');
ipcRenderer.send('check-for-updates');
};
}, false);
ipcRenderer.on('update-result', (e, updateAvailable) => {
document.querySelector('.update-spin').setAttribute('style', 'display:none');
document.querySelector('.update').removeAttribute('disabled');
if (!updateAvailable) {
alert('No updates are available.');
const resetUpdatesSection = () => {
document.querySelector('.check-for-updates').removeAttribute('disabled');
document.querySelector('.check-for-updates').classList.remove('hidden');
document.querySelector('.checking-for-updates').classList.add('hidden');
};
if (updateAvailable) {
resetUpdatesSection();
return;
}
document.querySelector('.checking-for-updates .message').innerHTML = i18n.__('No updates are available.');
document.querySelector('.checking-for-updates').classList.add('message-shown');
setTimeout(() => {
resetUpdatesSection();
document.querySelector('.checking-for-updates .message').innerHTML = '';
document.querySelector('.checking-for-updates').classList.remove('message-shown');
}, 5000);
});
document.querySelector('.update-container').classList.add('update-container--enabled');
document.querySelector('.updates').classList.remove('hidden');
}
</script>
</body>
}, false);
</script>
</head>
<body class="about-page">
<section class="app-info">
<div class="app-logo">
<img src="./images/logo.svg">
</div>
<div class="app-version">
Version <span class="version">%s</span>
</div>
</section>
<section class="updates hidden">
<button class="check-for-updates button primary">
Check for Updates
</button>
<div class="checking-for-updates hidden">
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="message"></span>
</div>
<label class="check-for-updates-on-start__label">
<input class="check-for-updates-on-start" type="checkbox" checked /> <span>Check for Updates on Start</span>
</label>
</section>
<div class="copyright"></div>
</body>
</html>
......@@ -28,7 +28,7 @@
<section class="landing-page">
<div class="wrapper">
<header>
<img class="logo" src="./images/logo.svg" />
<img class="logo" src="./images/logo-dark.svg" />
</header>
<div class="loading-animation" id="loading">
<div class="bounce1"></div>
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1000px" height="182px" viewBox="0 0 1000 182" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="type" transform="translate(245.154709, 29.581775)" fill="#9ea2a8" fill-rule="nonzero">
<path d="M62.5717573,58.8485839 C62.5717573,69.0064127 58.7804613,75.6774374 51.5006054,78.8592939 L61.9662852,118.580494 C62.4203893,120.403088 61.5121812,121.308475 59.8424026,121.308475 L44.0670163,121.308475 C42.5509709,121.308475 41.7941308,120.552016 41.4890296,119.185662 L31.3260858,80.6795239 L20.8604059,80.6795239 L20.8604059,118.885442 C20.8604059,120.403088 19.9521978,121.308475 18.4337873,121.308475 L2.65840094,121.308475 C1.14235556,121.308475 0.231782288,120.39836 0.231782288,118.885442 L0.231782288,2.44982204 C0.231782288,0.934539684 1.14235556,0.0244246988 2.65840094,0.0244246988 L40.7298244,0.0244246988 C54.9868002,0.0244246988 62.5717573,7.60556433 62.5717573,21.8553647 L62.5717573,58.8485839 Z M35.8765871,60.6664499 C39.8192511,60.6664499 41.9431337,58.5436363 41.9431337,54.6029566 L41.9431337,26.100992 C41.9431337,22.1603123 39.8192511,20.0398626 35.8765871,20.0398626 L20.8604059,20.0398626 L20.8604059,60.6688139 L35.8765871,60.6664499 Z" id="Shape"></path>
<path d="M74.6977552,21.8553647 C74.6977552,7.60556433 82.2803472,0.0244246988 96.5396882,0.0244246988 L113.528384,0.0244246988 C127.78536,0.0244246988 135.370317,7.60556433 135.370317,21.8553647 L135.370317,99.4775352 C135.370317,113.724972 127.78536,121.306111 113.528384,121.306111 L96.5396882,121.306111 C82.2803472,121.306111 74.6977552,113.724972 74.6977552,99.4775352 L74.6977552,21.8553647 Z M109.734723,101.749277 C113.677387,101.749277 115.801269,99.7777549 115.801269,95.6857834 L115.801269,25.6471165 C115.801269,21.7064368 113.677387,19.5836231 109.734723,19.5836231 L100.938821,19.5836231 C96.9961574,19.5836231 94.8722748,21.7064368 94.8722748,25.6471165 L94.8722748,95.6881474 C94.8722748,99.7777549 96.9961574,101.749277 100.938821,101.749277 L109.734723,101.749277 Z" id="Shape"></path>
<path d="M211.352335,38.2279787 C211.352335,39.7456249 210.441762,40.653376 208.928082,40.653376 L193.760533,40.653376 C192.090754,40.653376 191.333914,39.7456249 191.333914,38.2279787 L191.333914,26.100992 C191.333914,22.1603123 189.212396,20.0398626 185.269732,20.0398626 L177.382039,20.0398626 C173.288007,20.0398626 171.315493,22.1603123 171.315493,26.100992 L171.315493,95.2366358 C171.315493,99.3286073 173.43701,101.295401 177.382039,101.295401 L185.269732,101.295401 C189.212396,101.295401 191.333914,99.3262434 191.333914,95.2366358 L191.333914,83.1049212 C191.333914,81.5872749 192.090754,80.6795239 193.760533,80.6795239 L208.928082,80.6795239 C210.448857,80.6795239 211.352335,81.5872749 211.352335,83.1049212 L211.352335,99.4798991 C211.352335,113.727336 203.61601,121.308475 189.512767,121.308475 L172.524072,121.308475 C158.267096,121.308475 150.530771,113.727336 150.530771,99.4798991 L150.530771,21.8553647 C150.530771,7.60556433 158.267096,0.0244246988 172.524072,0.0244246988 L189.512767,0.0244246988 C203.618375,0.0244246988 211.352335,7.60556433 211.352335,21.8553647 L211.352335,38.2279787 Z" id="Shape"></path>
<path d="M275.352628,121.308475 C273.529117,121.308475 272.471905,120.552016 271.861703,119.036734 L252.753855,74.0084992 L247.139047,84.7738593 L247.139047,118.275547 C247.139047,120.247068 246.079471,121.308475 244.106957,121.308475 L229.54488,121.308475 C227.572365,121.308475 226.510424,120.247068 226.510424,118.275547 L226.510424,3.05735334 C226.510424,1.08819546 227.572365,0.0244246988 229.54488,0.0244246988 L244.106957,0.0244246988 C246.077106,0.0244246988 247.139047,1.08583153 247.139047,3.05735334 L247.139047,50.0547456 L270.497026,2.29853019 C271.256231,0.783247842 272.320537,0.0244246988 273.987951,0.0244246988 L289.91234,0.0244246988 C292.187591,0.0244246988 293.098164,1.54207099 292.033858,3.6625207 L266.251626,56.5721145 L293.701271,117.821671 C294.763212,119.793193 293.852639,121.308475 291.428386,121.308475 L275.352628,121.308475 Z" id="Shape"></path>
<path d="M365.293617,17.6121013 C365.293617,19.1273836 364.685779,20.1887905 362.866998,20.1887905 L324.946943,20.1887905 L324.946943,50.5086211 L353.917363,50.5086211 C355.438139,50.5086211 356.343982,51.4187361 356.343982,53.0853103 L356.343982,68.0939338 C356.343982,69.7628719 355.433409,70.6729869 353.917363,70.6729869 L324.946943,70.6729869 L324.946943,101.295401 L362.866998,101.295401 C364.69051,101.295401 365.293617,102.054224 365.293617,103.720799 L365.293617,118.883078 C365.293617,120.39836 364.685779,121.303747 362.866998,121.303747 L307.050039,121.303747 C305.682996,121.303747 304.772423,120.393632 304.772423,118.883078 L304.772423,2.44982204 C304.772423,0.934539684 305.682996,0.0244246988 307.050039,0.0244246988 L362.866998,0.0244246988 C364.69051,0.0244246988 365.293617,0.934539684 365.293617,2.44982204 L365.293617,17.6121013 Z" id="Shape"></path>
<path d="M435.665557,0.0244246988 C437.332971,0.0244246988 438.092176,0.934539684 438.092176,2.44982204 L438.092176,17.6121013 C438.092176,19.1273836 437.332971,20.0374986 435.665557,20.0374986 L418.07139,20.0374986 L418.07139,118.883078 C418.07139,120.549652 417.31455,121.303747 415.647136,121.303747 L399.87175,121.303747 C398.350974,121.303747 397.445131,120.549652 397.445131,118.883078 L397.445131,20.0374986 L379.853328,20.0374986 C378.332553,20.0374986 377.42671,19.1273836 377.42671,17.6121013 L377.42671,2.44982204 C377.42671,0.934539684 378.337283,0.0244246988 379.853328,0.0244246988 L435.665557,0.0244246988 Z" id="Shape"></path>
<path d="M436.586195,104.356644 C436.586195,102.385122 437.648136,101.32608 439.620651,101.32608 L453.423523,101.32608 C455.396037,101.32608 456.455614,102.385122 456.455614,104.356644 L456.455614,118.301497 C456.455614,120.275383 455.396037,121.334426 453.423523,121.334426 L439.620651,121.334426 C437.648136,121.334426 436.586195,120.275383 436.586195,118.301497 L436.586195,104.356644 Z" id="Shape"></path>
<path d="M532.422837,38.2279787 C532.422837,39.7456249 531.509899,40.653376 529.996219,40.653376 L514.828669,40.653376 C513.161256,40.653376 512.404416,39.7456249 512.404416,38.2279787 L512.404416,26.100992 C512.404416,22.1603123 510.282898,20.0398626 506.340234,20.0398626 L498.452541,20.0398626 C494.356144,20.0398626 492.385995,22.1603123 492.385995,26.100992 L492.385995,95.2366358 C492.385995,99.3286073 494.507512,101.295401 498.452541,101.295401 L506.340234,101.295401 C510.282898,101.295401 512.404416,99.3262434 512.404416,95.2366358 L512.404416,83.1049212 C512.404416,81.5872749 513.161256,80.6795239 514.828669,80.6795239 L529.996219,80.6795239 C531.516994,80.6795239 532.422837,81.5872749 532.422837,83.1049212 L532.422837,99.4798991 C532.422837,113.727336 524.686512,121.308475 510.580904,121.308475 L493.592209,121.308475 C479.335233,121.308475 471.598908,113.727336 471.598908,99.4798991 L471.598908,21.8553647 C471.598908,7.60556433 479.335233,0.0244246988 493.592209,0.0244246988 L510.580904,0.0244246988 C524.688877,0.0244246988 532.422837,7.60556433 532.422837,21.8553647 L532.422837,38.2279787 Z" id="Shape"></path>
<path d="M587.627229,2.44982204 C587.627229,0.934539684 588.535437,0.0244246988 590.051482,0.0244246988 L605.673136,0.0244246988 C607.494282,0.0244246988 608.248757,0.934539684 608.248757,2.44982204 L608.248757,118.883078 C608.248757,120.39836 607.491917,121.303747 605.673136,121.303747 L590.051482,121.303747 C588.530707,121.303747 587.627229,120.393632 587.627229,118.883078 L587.627229,70.6729869 L568.211915,70.6729869 L568.211915,118.885442 C568.211915,120.403088 567.301341,121.308475 565.785296,121.308475 L550.166008,121.308475 C548.342496,121.308475 547.585656,120.39836 547.585656,118.885442 L547.585656,2.44982204 C547.585656,0.934539684 548.342496,0.0244246988 550.166008,0.0244246988 L565.785296,0.0244246988 C567.306072,0.0244246988 568.211915,0.934539684 568.211915,2.44982204 L568.211915,50.659913 L587.627229,50.659913 L587.627229,2.44982204 Z" id="Shape"></path>
<path d="M677.416849,121.308475 C676.052172,121.308475 675.295332,120.552016 674.990231,119.185662 L670.744831,97.0545018 L643.744559,97.0545018 L639.652892,119.185662 C639.347791,120.552016 638.590951,121.308475 637.226273,121.308475 L620.999148,121.308475 C619.331735,121.308475 618.57253,120.39836 619.024268,118.731786 L644.203393,2.14723835 C644.508495,0.631956001 645.416703,0.0244246988 646.78138,0.0244246988 L667.866473,0.0244246988 C669.23115,0.0244246988 670.141724,0.631956001 670.44446,2.14723835 L695.623585,118.731786 C695.928686,120.39836 695.320848,121.308475 693.502067,121.308475 L677.416849,121.308475 Z M657.24233,26.5548675 L647.535855,79.4644613 L666.951169,79.4644613 L657.24233,26.5548675 Z" id="Shape"></path>
<path d="M752.339291,0.0244246988 C754.006705,0.0244246988 754.76591,0.934539684 754.76591,2.44982204 L754.76591,17.6121013 C754.76591,19.1273836 754.006705,20.0374986 752.339291,20.0374986 L734.747489,20.0374986 L734.747489,118.883078 C734.747489,120.549652 733.988283,121.303747 732.32087,121.303747 L716.545484,121.303747 C715.029438,121.303747 714.12123,120.549652 714.12123,118.883078 L714.12123,20.0374986 L696.529428,20.0374986 C695.011017,20.0374986 694.105174,19.1273836 694.105174,17.6121013 L694.105174,2.44982204 C694.105174,0.934539684 695.015747,0.0244246988 696.529428,0.0244246988 L752.339291,0.0244246988 Z" id="Shape"></path>
</g>
<g id="icon">
<path d="M180.330283,70.2108641 L180.333892,70.2165073 C180.333291,70.2155668 180.332689,70.2146264 180.332087,70.213686 C180.331486,70.2127454 180.330884,70.2118047 180.330283,70.2108641 Z M61.954152,7.64436327 C68.2928921,11.164898 74.2846134,15.6191491 79.4016009,20.5699674 C87.6499712,19.0760214 96.1550122,18.3226821 104.783255,18.3226821 C130.612543,18.3226821 155.100983,25.0984914 173.733224,37.3980812 C183.38199,43.7706948 191.051311,51.3316745 196.525584,59.8730564 C202.622027,69.3905961 205.712343,79.6253998 205.712343,90.5923218 C205.712343,101.264274 202.622027,111.503322 196.525584,121.01874 C191.051311,129.564366 183.38199,137.123224 173.733224,143.495837 C155.100983,155.795427 130.614597,162.566992 104.783255,162.566992 C96.1550122,162.566992 87.6520245,161.813653 79.4016009,160.321829 C74.28256,165.270525 68.2928921,169.726898 61.954152,173.247433 C28.085937,190.209238 0,173.646385 0,173.646385 C0,173.646385 26.1126525,151.476989 21.8662921,132.042958 C10.1826408,120.068047 3.85211418,105.625154 3.85211418,90.3015965 C3.85211418,75.2666424 10.1846942,60.8237493 21.8662921,48.846716 C26.1119493,29.4180247 0.00864693756,7.25275357 2.14766577e-06,7.24541359 C0.00835435701,7.24048522 28.0909741,-9.31704081 61.954152,7.64436327 Z" id="rocket" fill="#DB2323" fill-rule="nonzero"></path>
<path d="M41.6969487,124.026456 C30.0889845,114.878649 23.1213873,103.17255 23.1213873,90.4136809 C23.1213873,61.1362728 59.8093762,37.4022441 105.066304,37.4022441 C150.323232,37.4022441 187.011221,61.1362728 187.011221,90.4136809 C187.011221,119.691089 150.323232,143.425118 105.066304,143.425118 C93.912316,143.425118 83.2788238,141.983462 73.5867827,139.372472 L66.5009556,146.206206 C62.6508003,149.919383 58.1381119,153.279632 53.4342869,155.927536 C47.1994165,158.989423 41.0426011,160.659947 34.9512744,161.16967 C35.2948967,160.544948 35.6113103,159.912092 35.9509881,159.286387 C43.0509631,146.207835 44.9662833,134.454525 41.6969487,124.026456 Z" id="bubble" fill="#FFF"></path>
<path d="M65.7703624,103.026182 C59.1169113,103.026182 53.7232234,97.5458181 53.7232234,90.7854471 C53.7232234,84.0250762 59.1169113,78.5447127 65.7703624,78.5447127 C72.4238136,78.5447127 77.8175014,84.0250762 77.8175014,90.7854471 C77.8175014,97.5458181 72.4238136,103.026182 65.7703624,103.026182 Z M104.556273,103.026182 C97.9028222,103.026182 92.5091344,97.5458181 92.5091344,90.7854471 C92.5091344,84.0250762 97.9028222,78.5447127 104.556273,78.5447127 C111.209725,78.5447127 116.603412,84.0250762 116.603412,90.7854471 C116.603412,97.5458181 111.209725,103.026182 104.556273,103.026182 Z M143.342184,103.026182 C136.688733,103.026182 131.295045,97.5458181 131.295045,90.7854471 C131.295045,84.0250762 136.688733,78.5447127 143.342184,78.5447127 C149.995636,78.5447127 155.389323,84.0250762 155.389323,90.7854471 C155.389323,97.5458181 149.995636,103.026182 143.342184,103.026182 Z" id="circles" fill="#DB2323" fill-rule="nonzero"></path>
</g>
</g>
</svg>
This diff is collapsed.
import { remote } from 'electron';
import { remote, ipcRenderer } from 'electron';
import i18n from '../../i18n/index.js';
const APP_NAME = remote.app.getName();
const appName = remote.app.getName();
const isMac = process.platform === 'darwin';
const appTemplate = [
{
label: i18n.__('About', APP_NAME),
click() {
const win = new remote.BrowserWindow({
width: 310,
height: 240,
resizable: false,
show: false,
center: true,
maximizable: false,
minimizable: false,
title: 'About Rocket.Chat',
});
win.loadURL(`file://${ __dirname }/about.html`);
win.setMenuBarVisibility(false);
win.show();
},
label: i18n.__('About', appName),
click: () => ipcRenderer.send('show-about-dialog'),
},
{
type: 'separator',
id: 'about-sep',
},
{
label: i18n.__('Quit_App', APP_NAME),
label: i18n.__('Quit_App', appName),
accelerator: 'CommandOrControl+Q',
click() {
remote.app.quit();
},
click: () => remote.app.quit(),
},
];
......
......@@ -4,6 +4,7 @@
@import "../branding/branding.less";
@import "fontello.less";
@import "utils/_loading.import.less";
@import "pages/about.less";
*,
*:before,
......@@ -305,7 +306,7 @@ input[type='password'] {
.loading-error {
height: 100%;
color: white;
color: white;
text-align: center;
background-color: @primary-background-color;
background-position: center bottom;
......
.about-page {
display: flex;
flex-direction: column;
padding: 0.25rem 0.75rem;
min-height: 100vh;
background-color: @secondary-background-color;
cursor: default;
user-select: none;
.hidden {
display: none !important;
}
.app-info {
display: flex;
flex-direction: column;
justify-content: center;
flex: 1;
.app-logo img {
width: 100%;
}
.app-version {
margin: 0 auto;
font-size: 0.75rem;
.version {
cursor: text;
user-select: text;
font-weight: bold;
}
}
}
.updates {
display: flex;
flex-direction: column;
justify-content: center;
flex: 1;
.check-for-updates {
height: 2.5rem;
}
.checking-for-updates {
display: flex;
justify-content: center;
align-items: center;
height: 2.5rem;
margin: 4px;
color: @secondary-font-color;
.dot {
width: 0.5rem;
height: 0.5rem;
border-radius: 100%;
margin: 0.1rem;
background-color: currentColor;
animation: loading-bouncedelay 1.4s infinite ease-in-out both;
&:nth-of-type(1) {
animation-delay: -0.32s;
}
&:nth-of-type(2) {
animation-delay: -0.16s;
}
}
.message {
display: none;
font-size: 1rem;
}
&.message-shown {
.dot {
display: none;
}
.message {
display: inline-flex;
}
}
}
.check-for-updates-on-start__label {
margin: 0.1rem auto;
font-size: 0.8rem;
}
}
.copyright {
margin: 0 auto;
font-size: 0.65rem;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment