mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-02 04:53:17 +00:00
Moves the social login to browser since there was no way to verify the authencity of the auth process for a custom server and to prevent phishing attacks. Fixes #849. Co-authored-by: Kanishk Kakar <kanishk.kakar@gmail.com>
59 lines
1.7 KiB
TypeScript
59 lines
1.7 KiB
TypeScript
declare module 'adm-zip';
|
|
declare module 'auto-launch';
|
|
declare module 'is-online';
|
|
declare module 'request';
|
|
declare module 'semver';
|
|
declare module '@electron-elements/send-feedback';
|
|
declare module 'node-mac-notifier';
|
|
declare module 'electron-connect';
|
|
declare module 'electron-is-dev';
|
|
declare module 'electron-spellchecker';
|
|
declare module 'escape-html';
|
|
declare module 'fs-extra';
|
|
declare module 'wurl';
|
|
declare module 'i18n';
|
|
declare module 'backoff';
|
|
declare module 'crypto-random-string';
|
|
|
|
interface PageParamsObject {
|
|
realm_uri: string;
|
|
default_language: string;
|
|
external_authentication_methods: any;
|
|
}
|
|
declare var page_params: PageParamsObject;
|
|
|
|
// since requestIdleCallback didn't make it into lib.dom.d.ts yet
|
|
declare function requestIdleCallback(callback: Function, options?: object): void;
|
|
|
|
// Patch Notification object so we can implement our side
|
|
// of Notification classes which we export into zulip side through
|
|
// preload.js; if we don't do his extending Notification will throw error.
|
|
// Relevant code is in app/renderer/js/notification/default-notification.ts
|
|
// and the relevant function is requestPermission.
|
|
declare var PatchedNotification: {
|
|
prototype: Notification;
|
|
new(title: string, options?: NotificationOptions): Notification;
|
|
readonly maxActions: number;
|
|
readonly permission: NotificationPermission;
|
|
requestPermission(): void;
|
|
}
|
|
|
|
// This is mostly zulip side of code we access from window
|
|
interface Window {
|
|
$: any;
|
|
narrow: any
|
|
Notification: typeof PatchedNotification;
|
|
}
|
|
|
|
// typescript doesn't have up to date NotificationOptions yet
|
|
interface NotificationOptions {
|
|
silent?: boolean;
|
|
}
|
|
|
|
interface ZulipWebWindow extends Window {
|
|
electron_bridge: any;
|
|
tray: any;
|
|
$: any;
|
|
lightbox: any;
|
|
}
|