New sticker creator button

This commit is contained in:
Fedor Indutny 2023-02-27 14:34:43 -08:00 committed by GitHub
parent 85adb39d31
commit fad0529080
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 442 additions and 11 deletions

View file

@ -15,6 +15,7 @@ import * as log from '../../logging/log';
import * as Errors from '../../types/errors';
import { strictAssert } from '../../util/assert';
import { drop } from '../../util/drop';
// It is important to call this as early as possible
window.i18n = SignalContext.i18n;
@ -297,6 +298,24 @@ ipc.on('show-group-via-link', (_event, info) => {
}
});
ipc.on('open-art-creator', () => {
drop(window.Events.openArtCreator());
});
window.openArtCreator = ({
username,
password,
}: {
username: string;
password: string;
}) => {
return ipc.invoke('open-art-creator', { username, password });
};
ipc.on('authorize-art-creator', (_event, info) => {
const { token, pubKeyBase64 } = info;
window.Events.authorizeArtCreator?.({ token, pubKeyBase64 });
});
ipc.on('show-conversation-via-signal.me', (_event, info) => {
const { hash } = info;
strictAssert(typeof hash === 'string', 'Got an invalid hash over IPC');

View file

@ -26,6 +26,7 @@ window.WebAPI = window.textsecure.WebAPI.initialize({
storageUrl: config.storageUrl,
updatesUrl: config.updatesUrl,
resourcesUrl: config.resourcesUrl,
artCreatorUrl: config.artCreatorUrl,
directoryConfig: config.directoryConfig,
cdnUrlObject: {
0: config.cdnUrl0,