mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-05 14:35:18 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32a21889fb | ||
|
|
c4a961f9da | ||
|
|
ceaa898570 | ||
|
|
73fe17041d | ||
|
|
9f756cad3e | ||
|
|
6db6b7c482 | ||
|
|
09c45e75e8 | ||
|
|
120b80cf65 | ||
|
|
22f705960d | ||
|
|
ca8ce1deaa |
@@ -1,5 +1,4 @@
|
|||||||
'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');
|
||||||
@@ -139,13 +138,11 @@ class AppMenu {
|
|||||||
}, {
|
}, {
|
||||||
label: 'Report an Issue...',
|
label: 'Report an Issue...',
|
||||||
click() {
|
click() {
|
||||||
const body = `
|
// the goal is to notify the main.html BrowserWindow
|
||||||
<!-- Please succinctly describe your issue and steps to reproduce it. -->
|
// which may not be the focused window.
|
||||||
-
|
BrowserWindow.getAllWindows().forEach(window => {
|
||||||
${app.getName()} ${app.getVersion()}
|
window.webContents.send('open-feedback-modal');
|
||||||
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
Normal file
1414
app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "zulip",
|
"name": "zulip",
|
||||||
"productName": "Zulip",
|
"productName": "Zulip",
|
||||||
"version": "1.9.0",
|
"version": "2.0.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,6 +26,7 @@
|
|||||||
"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",
|
||||||
@@ -36,7 +37,6 @@
|
|||||||
"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,6 +45,28 @@ 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;
|
||||||
@@ -408,3 +430,26 @@ 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;
|
||||||
|
}
|
||||||
|
|||||||
62
app/renderer/js/feedback.js
Normal file
62
app/renderer/js/feedback.js
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
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,6 +12,7 @@ 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() {
|
||||||
@@ -175,7 +176,7 @@ class ServerManagerView {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.sidebarHoverEvent(this.$addServerButton, this.$addServerTooltip);
|
this.sidebarHoverEvent(this.$addServerButton, this.$addServerTooltip, true);
|
||||||
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);
|
||||||
@@ -187,9 +188,17 @@ class ServerManagerView {
|
|||||||
return currentIndex;
|
return currentIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
sidebarHoverEvent(SidebarButton, SidebarTooltip) {
|
sidebarHoverEvent(SidebarButton, SidebarTooltip, addServer = false) {
|
||||||
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';
|
||||||
@@ -199,6 +208,11 @@ 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) {
|
||||||
@@ -496,6 +510,10 @@ 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,9 +37,11 @@ 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,6 +42,10 @@
|
|||||||
<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
Normal file
10607
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "zulip",
|
"name": "zulip",
|
||||||
"productName": "Zulip",
|
"productName": "Zulip",
|
||||||
"version": "1.9.0",
|
"version": "2.0.0",
|
||||||
"main": "./app/main",
|
"main": "./app/main",
|
||||||
"description": "Zulip Desktop App",
|
"description": "Zulip Desktop App",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
BIN
snap/gui/icon.png
Normal file
BIN
snap/gui/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
@@ -1,10 +1,10 @@
|
|||||||
name: zulip
|
name: zulip
|
||||||
version: 1.8.2
|
version: 2.0.0
|
||||||
summary: Zulip
|
summary: Zulip Desktop Client for Linux
|
||||||
description: Zulip Desktop Client for Linux
|
description: Zulip combines the immediacy of Slack with an email threading model. With Zulip, you can catch up on important conversations while ignoring irrelevant ones.
|
||||||
confinement: strict
|
confinement: strict
|
||||||
grade: stable
|
grade: stable
|
||||||
icon: ../build/icon.png
|
icon: snap/gui/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