Few changes -
* webview: Show connection failure per server.
* network: Try to reconnect diff servers.
* Fixes concern that some proxy networks may allow only specific servers
to be reachable.
* domains: Show network error on server invalidation.
* webview: Handle network errors in preload script.
Fixes: #591, #312.
Using `import * as` import syntax causes some problem if the
module exports a class or function. Because the whole point of
star import is to import every property the module exports. It turns
out we have been using it incorrectly in many places which this commit
fixes.
Then we fix a linting error by adding a eslint disable rule to solve
it along with a TODO because the way we currently do it is wrong.
Finally, to conclude this cleanup, we merge all the .gitignore paths
into once now that we can.
The change in this commits are pretty involved but cannot be split
into small commits. The main changes in this commits are:
* Remove declare module * now that we don't need it
* Normalize import paths so typescript is happy
Previously, we were using wrong import paths and so typescript couldn't
really provide full types information for imports. The wrong paths isn't
a bug because it was done to make sure it work when it was imported via a
script tag; we fix this by using require inside the script tag in main.html.
Also, did audit to make sure we correctly use __dirname not that it's
value will be diffrent, it won't be js/ but will be respective to the file
path of the module.
* Browser-like loading indicator added to the sidebar.
Shows when the app is loading a page. Inactive once the user starts
navigating on the webpage, and in settings.
* Add tooltip saying "Loading" to indicator.
Fixes#430.
Addresses the issue of the webview not being in focus
after the Back button is clicked. Now, the webview is focused
explicitly by calling focus() on click.
This commit works around a couple of bugs, which seem to be upstream bugs in the
current version of Electron.
First, `webContents.isFocused()` seems to be true even if we just switched to
a tab, and are trying to set it as the focused element. To work around this, we
check if the `webview` element is the same as `document.activeElement`.
Also, as per https://github.com/electron/electron/issues/15718, it looks like
`blur` needs to be called on the currently active element, before switching
focus on another element i.e., calling `focus` on it.
Fixes: #634.
This commit updates the realm name in the sidebar tooltip,
domains.json and Window menu when it is updated in the server
through electron_bridge.
This commit also removes the server.alias parameter from the
tooltip onHover function and inserts it in the innerHTML of the
tooltip DOM.
Fixes: #425
In case of any failure, the app will fall back to the previous download
functionality which is to show a download dialog when a user clicks on
file attachments.
This PR adds a feature to download file-attachments to "Downloads" folder and shows a
notification when the download is complete. On clicking the notification user can
open the downloaded file with system default app. A user can set/change the download location
from the settings > general.
This PR changes the current implementation of the loading indicator by attaching
the indicator to the right dom element, so that it doesn't show up once a server
is loaded.
Fixes: #482.
This commit download file attachments using downloadURL method of
webContent, the same way loadURL opens internal links. This
removes the use of hidden webview added in
f70432f4e3.
Improves: #469.
It turns out if you add/remove an org the hidden webview get deleted
since its in #webview-container where other sidebar webviews like which
get removed and readded through that process.
Improves: #469.
* This will make sure that the current server webview will not
reload due to URL change.
* Add an option to allow users to download the file attachments.
Improves: #469.
Changing the behaviour of opening the attachments in the
default browser to the app. This commit enables users to
download the attachments. If the attachment type is image
then we open the same in the app though users need to
click on the go-back button.
To-do - Open the image link in a lightbox.
Improves: #469.
Creating the new functional tab for setting tab was unnecessary as we already have a sticky setting icon at the bottom. This PR adds a functionality to highlight that settings icon instead of creating the new one.
Fixes: #418.
This fixes an issue where the server tabs were not loading
according to the last active tab. This used to load last server
no matter what the last used server is.
Fixes - #416.
This PR adds reply option to notifications of macOS using
`node-mac-notifier` and then post the reply for to the webapp.
It also fixes an issue that even though the app is focused the server that sent
the notification did not focus. And it also adds parsing for mentioning. This also
refactors code for notification.
Fixes: #284, #381.
* silent: Reflect changes in webview for mute/silent option.
This silent the webview incase silent option is toggled, and
by default silent the webview when its create if needed.
Fixes: #380.