Skip to content

Commit

Permalink
confine art creator to staging for now
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Mar 1, 2023
1 parent 4d357f6 commit f59e35e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/main.ts
Expand Up @@ -94,7 +94,7 @@ import type { MenuActionType } from '../ts/types/menu';
import { createTemplate } from './menu';
import { installFileHandler, installWebHandler } from './protocol_filter';
import * as OS from '../ts/OS';
import { isProduction } from '../ts/util/version';
import { isProduction, isStaging } from '../ts/util/version';
import {
isSgnlHref,
isCaptchaHref,
Expand Down Expand Up @@ -1984,6 +1984,7 @@ function setupMenu(options?: Partial<CreateTemplateOptionsType>) {
devTools: defaultWebPrefs.devTools,
includeSetup: false,
isProduction: isProduction(app.getVersion()),
isStaging: isStaging(app.getVersion()),
platform,

// actions
Expand Down
3 changes: 2 additions & 1 deletion app/menu.ts
Expand Up @@ -22,6 +22,7 @@ export const createTemplate = (

const {
isProduction,
isStaging,
devTools,
includeSetup,
openContactUs,
Expand All @@ -47,7 +48,7 @@ export const createTemplate = (
submenu: [
{
label: i18n('mainMenuCreateStickers'),
click: isProduction ? showStickerCreator : openArtCreator,
click: isStaging ? openArtCreator : showStickerCreator,
},
{
label: i18n('mainMenuSettings'),
Expand Down
1 change: 1 addition & 0 deletions config/production.json
Expand Up @@ -7,6 +7,7 @@
"0": "https://cdn.signal.org",
"2": "https://cdn2.signal.org"
},
"artCreatorUrl": "https://create.signal.art",
"serverPublicParams": "AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X36nOoGPs54XsEGzPdEV+itQNGUFEjY6X9Uv+Acuks7NpyGvCoKxGwgKgE5XyJ+nNKlyHHOLb6N1NuHyBrZrgtY/JYJHRooo5CEqYKBqdFnmbTVGEkCvJKxLnjwKWf+fEPoWeQFj5ObDjcKMZf2Jm2Ae69x+ikU5gBXsRmoF94GXTLfN0/vLt98KDPnxwAQL9j5V1jGOY8jQl6MLxEs56cwXN0dqCnImzVH3TZT1cJ8SW1BRX6qIVxEzjsSGx3yxF3suAilPMqGRp4ffyopjMD1JXiKR2RwLKzizUe5e8XyGOy9fplzhw3jVzTRyUZTRSZKkMLWcQ/gv0E4aONNqs4P",
"serverTrustRoot": "BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF",
"updatesEnabled": true
Expand Down
1 change: 1 addition & 0 deletions ts/background.ts
Expand Up @@ -1082,6 +1082,7 @@ export async function startApp(): Promise<void> {
devTools: false,
includeSetup: false,
isProduction: true,
isStaging: false,
platform: 'unknown',
};

Expand Down
1 change: 1 addition & 0 deletions ts/state/ducks/user.ts
Expand Up @@ -126,6 +126,7 @@ export function getEmptyState(): UserStateType {
devTools: false,
includeSetup: false,
isProduction: true,
isStaging: false,
platform: 'unknown',
},
osName,
Expand Down
2 changes: 2 additions & 0 deletions ts/test-node/app/menu_test.ts
Expand Up @@ -238,6 +238,7 @@ describe('createTemplate', () => {
devTools: true,
includeSetup: false,
isProduction: true,
isStaging: false,
platform,
...actions,
};
Expand All @@ -252,6 +253,7 @@ describe('createTemplate', () => {
devTools: true,
includeSetup: true,
isProduction: true,
isStaging: false,
platform,
...actions,
};
Expand Down
1 change: 1 addition & 0 deletions ts/types/menu.ts
Expand Up @@ -10,6 +10,7 @@ export type MenuOptionsType = Readonly<{
devTools: boolean;
includeSetup: boolean;
isProduction: boolean;
isStaging: boolean;
platform: string;
}>;

Expand Down

0 comments on commit f59e35e

Please sign in to comment.