mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-07 15:33:16 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6738b7087 |
@@ -1,4 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
const os = require('os');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const { app, shell, BrowserWindow, Menu, dialog } = require('electron');
|
const { app, shell, BrowserWindow, Menu, dialog } = require('electron');
|
||||||
@@ -138,11 +139,13 @@ class AppMenu {
|
|||||||
}, {
|
}, {
|
||||||
label: 'Report an Issue...',
|
label: 'Report an Issue...',
|
||||||
click() {
|
click() {
|
||||||
// the goal is to notify the main.html BrowserWindow
|
const body = `
|
||||||
// which may not be the focused window.
|
<!-- Please succinctly describe your issue and steps to reproduce it. -->
|
||||||
BrowserWindow.getAllWindows().forEach(window => {
|
-
|
||||||
window.webContents.send('open-feedback-modal');
|
${app.getName()} ${app.getVersion()}
|
||||||
});
|
Electron ${process.versions.electron}
|
||||||
|
${process.platform} ${process.arch} ${os.release()}`;
|
||||||
|
shell.openExternal(`https://github.com/zulip/zulip-electron/issues/new?body=${encodeURIComponent(body)}`);
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|||||||
1414
app/package-lock.json
generated
1414
app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "zulip",
|
"name": "zulip",
|
||||||
"productName": "Zulip",
|
"productName": "Zulip",
|
||||||
"version": "2.0.0",
|
"version": "1.9.0",
|
||||||
"description": "Zulip Desktop App",
|
"description": "Zulip Desktop App",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"copyright": "Kandra Labs, Inc.",
|
"copyright": "Kandra Labs, Inc.",
|
||||||
@@ -26,7 +26,6 @@
|
|||||||
"InstantMessaging"
|
"InstantMessaging"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron-elements/send-feedback": "1.0.7",
|
|
||||||
"auto-launch": "5.0.1",
|
"auto-launch": "5.0.1",
|
||||||
"electron-is-dev": "0.3.0",
|
"electron-is-dev": "0.3.0",
|
||||||
"electron-log": "2.2.7",
|
"electron-log": "2.2.7",
|
||||||
@@ -37,6 +36,7 @@
|
|||||||
"node-json-db": "0.7.3",
|
"node-json-db": "0.7.3",
|
||||||
"request": "2.81.0",
|
"request": "2.81.0",
|
||||||
"semver": "5.4.1",
|
"semver": "5.4.1",
|
||||||
|
"@sentry/electron": "0.5.0",
|
||||||
"wurl": "2.5.0"
|
"wurl": "2.5.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
|||||||
@@ -45,28 +45,6 @@ body {
|
|||||||
transition: all 0.6s ease-out;
|
transition: all 0.6s ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
#view-controls-container {
|
|
||||||
height: calc(100% - 156px);
|
|
||||||
overflow-y: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
#view-controls-container:hover {
|
|
||||||
overflow-y: overlay;
|
|
||||||
}
|
|
||||||
|
|
||||||
#view-controls-container::-webkit-scrollbar {
|
|
||||||
width: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#view-controls-container::-webkit-scrollbar-track {
|
|
||||||
box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
#view-controls-container::-webkit-scrollbar-thumb {
|
|
||||||
background-color: darkgrey;
|
|
||||||
outline: 1px solid slategrey;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Material Icons';
|
font-family: 'Material Icons';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -430,26 +408,3 @@ webview.focus {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
send-feedback {
|
|
||||||
width: 60%;
|
|
||||||
height: 85%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#feedback-modal {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-color: rgba(68, 67, 67, 0.81);
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
z-index: 2;
|
|
||||||
transition: all 1s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
#feedback-modal.show {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
const { app } = require('electron').remote;
|
|
||||||
const path = require('path');
|
|
||||||
const fs = require('fs');
|
|
||||||
const SendFeedback = require('@electron-elements/send-feedback');
|
|
||||||
|
|
||||||
// make the button color match zulip app's theme
|
|
||||||
SendFeedback.customStyles = `
|
|
||||||
button:hover, button:focus {
|
|
||||||
border-color: #4EBFAC;
|
|
||||||
color: #4EBFAC;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:active {
|
|
||||||
background-color: #f1f1f1;
|
|
||||||
color: #4EBFAC;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
background-color: #4EBFAC;
|
|
||||||
border-color: #4EBFAC;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
customElements.define('send-feedback', SendFeedback);
|
|
||||||
const sendFeedback = document.querySelector('send-feedback');
|
|
||||||
const feedbackHolder = sendFeedback.parentElement;
|
|
||||||
|
|
||||||
// customize the fields of custom elements
|
|
||||||
sendFeedback.title = 'Report Issue';
|
|
||||||
sendFeedback.titleLabel = 'Issue title:';
|
|
||||||
sendFeedback.titlePlaceholder = 'Enter issue title';
|
|
||||||
sendFeedback.textareaLabel = 'Describe the issue:';
|
|
||||||
sendFeedback.textareaPlaceholder = 'Succinctly describe your issue and steps to reproduce it...';
|
|
||||||
sendFeedback.buttonLabel = 'Report Issue';
|
|
||||||
sendFeedback.loaderSuccessText = '';
|
|
||||||
|
|
||||||
sendFeedback.useReporter('emailReporter', {
|
|
||||||
email: 'akash@zulipchat.com'
|
|
||||||
});
|
|
||||||
|
|
||||||
feedbackHolder.addEventListener('click', e => {
|
|
||||||
// only remove the class if the grey out faded
|
|
||||||
// part is clicked and not the feedback element itself
|
|
||||||
if (e.target === e.currentTarget) {
|
|
||||||
feedbackHolder.classList.remove('show');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
sendFeedback.addEventListener('feedback-submitted', () => {
|
|
||||||
setTimeout(() => {
|
|
||||||
feedbackHolder.classList.remove('show');
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
|
|
||||||
const dataDir = app.getPath('userData');
|
|
||||||
const logsDir = path.join(dataDir, '/Logs');
|
|
||||||
sendFeedback.logs.push(...fs.readdirSync(logsDir).map(file => path.join(logsDir, file)));
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
feedbackHolder,
|
|
||||||
sendFeedback
|
|
||||||
};
|
|
||||||
@@ -12,7 +12,6 @@ const ServerTab = require(__dirname + '/js/components/server-tab.js');
|
|||||||
const FunctionalTab = require(__dirname + '/js/components/functional-tab.js');
|
const FunctionalTab = require(__dirname + '/js/components/functional-tab.js');
|
||||||
const ConfigUtil = require(__dirname + '/js/utils/config-util.js');
|
const ConfigUtil = require(__dirname + '/js/utils/config-util.js');
|
||||||
const ReconnectUtil = require(__dirname + '/js/utils/reconnect-util.js');
|
const ReconnectUtil = require(__dirname + '/js/utils/reconnect-util.js');
|
||||||
const { feedbackHolder } = require(__dirname + '/js/feedback.js');
|
|
||||||
|
|
||||||
class ServerManagerView {
|
class ServerManagerView {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -176,7 +175,7 @@ class ServerManagerView {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.sidebarHoverEvent(this.$addServerButton, this.$addServerTooltip, true);
|
this.sidebarHoverEvent(this.$addServerButton, this.$addServerTooltip);
|
||||||
this.sidebarHoverEvent(this.$settingsButton, this.$settingsTooltip);
|
this.sidebarHoverEvent(this.$settingsButton, this.$settingsTooltip);
|
||||||
this.sidebarHoverEvent(this.$reloadButton, this.$reloadTooltip);
|
this.sidebarHoverEvent(this.$reloadButton, this.$reloadTooltip);
|
||||||
this.sidebarHoverEvent(this.$backButton, this.$backTooltip);
|
this.sidebarHoverEvent(this.$backButton, this.$backTooltip);
|
||||||
@@ -188,17 +187,9 @@ class ServerManagerView {
|
|||||||
return currentIndex;
|
return currentIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
sidebarHoverEvent(SidebarButton, SidebarTooltip, addServer = false) {
|
sidebarHoverEvent(SidebarButton, SidebarTooltip) {
|
||||||
SidebarButton.addEventListener('mouseover', () => {
|
SidebarButton.addEventListener('mouseover', () => {
|
||||||
SidebarTooltip.removeAttribute('style');
|
SidebarTooltip.removeAttribute('style');
|
||||||
// To handle position of add server tooltip due to scrolling of list of organizations
|
|
||||||
// This could not be handled using CSS, hence the top of the tooltip is made same
|
|
||||||
// as that of its parent element.
|
|
||||||
// This needs to handled only for the add server tooltip and not others.
|
|
||||||
if (addServer) {
|
|
||||||
const { top } = SidebarButton.getBoundingClientRect();
|
|
||||||
SidebarTooltip.style.top = top + 'px';
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
SidebarButton.addEventListener('mouseout', () => {
|
SidebarButton.addEventListener('mouseout', () => {
|
||||||
SidebarTooltip.style.display = 'none';
|
SidebarTooltip.style.display = 'none';
|
||||||
@@ -208,11 +199,6 @@ class ServerManagerView {
|
|||||||
onHover(index, serverName) {
|
onHover(index, serverName) {
|
||||||
this.$serverIconTooltip[index].innerHTML = serverName;
|
this.$serverIconTooltip[index].innerHTML = serverName;
|
||||||
this.$serverIconTooltip[index].removeAttribute('style');
|
this.$serverIconTooltip[index].removeAttribute('style');
|
||||||
// To handle position of servers' tooltip due to scrolling of list of organizations
|
|
||||||
// This could not be handled using CSS, hence the top of the tooltip is made same
|
|
||||||
// as that of its parent element.
|
|
||||||
const { top } = this.$serverIconTooltip[index].parentElement.getBoundingClientRect();
|
|
||||||
this.$serverIconTooltip[index].style.top = top + 'px';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onHoverOut(index) {
|
onHoverOut(index) {
|
||||||
@@ -510,10 +496,6 @@ class ServerManagerView {
|
|||||||
}
|
}
|
||||||
ipcRenderer.send('update-taskbar-icon', createOverlayIcon(messageCount).toDataURL(), String(messageCount));
|
ipcRenderer.send('update-taskbar-icon', createOverlayIcon(messageCount).toDataURL(), String(messageCount));
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcRenderer.on('open-feedback-modal', () => {
|
|
||||||
feedbackHolder.classList.add('show');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,11 +37,9 @@ class ReconnectUtil {
|
|||||||
|
|
||||||
console.log('There is no internet connection, try checking network cables, modem and router.');
|
console.log('There is no internet connection, try checking network cables, modem and router.');
|
||||||
const errMsgHolder = document.querySelector('#description');
|
const errMsgHolder = document.querySelector('#description');
|
||||||
if (errMsgHolder) {
|
|
||||||
errMsgHolder.innerHTML = `
|
errMsgHolder.innerHTML = `
|
||||||
<div>You internet connection does't seem to work properly!</div>
|
<div>You internet connection does't seem to work properly!</div>
|
||||||
</div>Verify that it works and then click try again.</div>`;
|
</div>Verify that it works and then click try again.</div>`;
|
||||||
}
|
|
||||||
return resolve(false);
|
return resolve(false);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -42,10 +42,6 @@
|
|||||||
<div id="webviews-container"></div>
|
<div id="webviews-container"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="feedback-modal">
|
|
||||||
<send-feedback></send-feedback>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
<script src="js/main.js"></script>
|
<script src="js/main.js"></script>
|
||||||
<script>require('./js/shared/preventdrag.js')</script>
|
<script>require('./js/shared/preventdrag.js')</script>
|
||||||
|
|||||||
10607
package-lock.json
generated
10607
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "zulip",
|
"name": "zulip",
|
||||||
"productName": "Zulip",
|
"productName": "Zulip",
|
||||||
"version": "2.0.0",
|
"version": "1.9.0",
|
||||||
"main": "./app/main",
|
"main": "./app/main",
|
||||||
"description": "Zulip Desktop App",
|
"description": "Zulip Desktop App",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
name: zulip
|
name: zulip
|
||||||
version: 2.0.0
|
version: 1.8.2
|
||||||
summary: Zulip
|
summary: Zulip
|
||||||
description: Zulip Desktop Client for Linux.
|
description: Zulip Desktop Client for Linux
|
||||||
confinement: strict
|
confinement: strict
|
||||||
grade: stable
|
grade: stable
|
||||||
icon: build/icon.png
|
icon: ../build/icon.png
|
||||||
apps:
|
apps:
|
||||||
zulip:
|
zulip:
|
||||||
command: env TMPDIR=$XDG_RUNTIME_DIR desktop-launch $SNAP/zulip
|
command: env TMPDIR=$XDG_RUNTIME_DIR desktop-launch $SNAP/zulip
|
||||||
@@ -32,6 +32,6 @@ parts:
|
|||||||
- libpulse0
|
- libpulse0
|
||||||
- libxss1
|
- libxss1
|
||||||
- libxtst6
|
- libxtst6
|
||||||
source: dist/linux-unpacked
|
source: ../dist/linux-unpacked
|
||||||
after:
|
after:
|
||||||
- desktop-gtk2
|
- desktop-gtk2
|
||||||
|
|||||||
Reference in New Issue
Block a user