@todesktop/shared 7.129.0 → 7.131.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ import { ISwitchableValue } from "./toDesktop";
3
3
  import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences } from "@todesktop/client-electron-types";
4
4
  import { BaseApp } from "./base";
5
5
  import { DesktopAppPlugin } from "./plugin";
6
+ import { ValidTranslationKeys, ValidTranslationLanguages } from "./translation";
6
7
  interface BaseAssetDetails {
7
8
  /**
8
9
  * Remote URL where the asset can be downloaded
@@ -120,10 +121,6 @@ export interface DesktopifyAppWindow {
120
121
  * The type of window
121
122
  */
122
123
  type: "menubar" | "app";
123
- /**
124
- * The window's application menu
125
- */
126
- applicationMenu: DesktopifyAppMenu[];
127
124
  /**
128
125
  * Keyboard shortcut to toggle window visibility
129
126
  */
@@ -343,6 +340,14 @@ export interface DesktopifyApp2 {
343
340
  buttonBackgroundColor: string;
344
341
  buttonTextColor: string;
345
342
  };
343
+ /**
344
+ * Sets strings to be used in the app UI. Currently only supports English
345
+ */
346
+ appStrings?: {
347
+ [key in ValidTranslationKeys]?: {
348
+ [lang in ValidTranslationLanguages]?: string;
349
+ };
350
+ };
346
351
  }
347
352
  export interface IApp2 extends BaseApp {
348
353
  desktopApp: DesktopifyApp2;
@@ -0,0 +1,2 @@
1
+ export declare type ValidTranslationKeys = "updateNotification.title" | "updateNotification.body";
2
+ export declare type ValidTranslationLanguages = "default";
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /* TODO - Support more languages here */
4
+ // | "en"
5
+ // | "es"
6
+ // | "fr"
7
+ // | "de"
8
+ // | "it"
9
+ // | "ja"
10
+ // | "ko"
11
+ // | "pt-BR"
12
+ // | "ru"
13
+ // | "zh-CN"
14
+ // | "zh-TW";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.129.0",
3
+ "version": "7.131.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -6,6 +6,7 @@ import {
6
6
  } from "@todesktop/client-electron-types";
7
7
  import { BaseApp, Schemable } from "./base";
8
8
  import { DesktopAppPlugin } from "./plugin";
9
+ import { ValidTranslationKeys, ValidTranslationLanguages } from "./translation";
9
10
 
10
11
  interface BaseAssetDetails {
11
12
  /**
@@ -236,10 +237,6 @@ export interface DesktopifyAppWindow {
236
237
  * The type of window
237
238
  */
238
239
  type: "menubar" | "app";
239
- /**
240
- * The window's application menu
241
- */
242
- applicationMenu: DesktopifyAppMenu[];
243
240
  /**
244
241
  * Keyboard shortcut to toggle window visibility
245
242
  */
@@ -466,6 +463,14 @@ export interface DesktopifyApp2 {
466
463
  buttonBackgroundColor: string;
467
464
  buttonTextColor: string;
468
465
  };
466
+ /**
467
+ * Sets strings to be used in the app UI. Currently only supports English
468
+ */
469
+ appStrings?: {
470
+ [key in ValidTranslationKeys]?: {
471
+ [lang in ValidTranslationLanguages]?: string;
472
+ };
473
+ };
469
474
  }
470
475
 
471
476
  export interface IApp2 extends BaseApp {
@@ -0,0 +1,16 @@
1
+ export type ValidTranslationKeys =
2
+ | "updateNotification.title"
3
+ | "updateNotification.body";
4
+ export type ValidTranslationLanguages = "default";
5
+ /* TODO - Support more languages here */
6
+ // | "en"
7
+ // | "es"
8
+ // | "fr"
9
+ // | "de"
10
+ // | "it"
11
+ // | "ja"
12
+ // | "ko"
13
+ // | "pt-BR"
14
+ // | "ru"
15
+ // | "zh-CN"
16
+ // | "zh-TW";