@todesktop/shared 7.82.0 → 7.85.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.
- package/lib/desktopify2.d.ts +5 -0
- package/lib/plans.d.ts +1 -0
- package/lib/plans.js +1 -0
- package/lib/validations.d.ts +2 -0
- package/lib/validations.js +3 -0
- package/package.json +1 -1
- package/src/desktopify2.ts +5 -0
- package/src/plans.ts +1 -0
- package/src/validations.ts +8 -0
package/lib/desktopify2.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export interface DesktopifyAppTray {
|
|
|
40
40
|
id: string;
|
|
41
41
|
icon: string;
|
|
42
42
|
bundledIcon?: string;
|
|
43
|
+
useTemplateImage?: boolean;
|
|
43
44
|
rightClick: DesktopifyAppTrayAction;
|
|
44
45
|
leftClick: DesktopifyAppTrayAction;
|
|
45
46
|
}
|
|
@@ -159,6 +160,10 @@ export interface DesktopifyApp2 {
|
|
|
159
160
|
* The name of the company that the app belongs to
|
|
160
161
|
*/
|
|
161
162
|
companyName?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Whether the app should minimize to tray when all windows are closed. Requires at least one tray.
|
|
165
|
+
*/
|
|
166
|
+
shouldMinimizeToTray?: boolean;
|
|
162
167
|
/**
|
|
163
168
|
* Only allow a single instance of this app to run
|
|
164
169
|
*/
|
package/lib/plans.d.ts
CHANGED
package/lib/plans.js
CHANGED
|
@@ -28,6 +28,7 @@ exports.prodPlanIds = {
|
|
|
28
28
|
essential_new: "plan_GYXn2cnPl5dy7j",
|
|
29
29
|
professional: "plan_GYXoKsa2j0yURg",
|
|
30
30
|
professional_annual: "price_1KHTgaIewCKA2h0I81TVg85r",
|
|
31
|
+
professional_annual_full_price: "price_1KLT32IewCKA2h0IFeJOAgG5",
|
|
31
32
|
cli_founder: "plan_GpzWZLfsOzjrvI",
|
|
32
33
|
cli_founder_30: "plan_GsL1IRUwpj5CIF",
|
|
33
34
|
cli_founder_50: "plan_GsL1IRUwpj5CIF",
|
package/lib/validations.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as yup from "yup";
|
|
2
|
+
import { DesktopifyApp2 } from ".";
|
|
2
3
|
export declare const appTitleValidation: yup.StringSchema;
|
|
3
4
|
export declare const forceVersionValidation: yup.StringSchema;
|
|
4
5
|
export declare const iconValidation: yup.StringSchema;
|
|
@@ -49,3 +50,4 @@ export declare const appConfigValidation: yup.ObjectSchema<{
|
|
|
49
50
|
publishedVersions: any;
|
|
50
51
|
};
|
|
51
52
|
}>;
|
|
53
|
+
export declare const shouldMinimizeToTrayIsActive: (desktopApp: DesktopifyApp2) => boolean;
|
package/lib/validations.js
CHANGED
package/package.json
CHANGED
package/src/desktopify2.ts
CHANGED
|
@@ -65,6 +65,7 @@ export interface DesktopifyAppTray {
|
|
|
65
65
|
id: string;
|
|
66
66
|
icon: string;
|
|
67
67
|
bundledIcon?: string;
|
|
68
|
+
useTemplateImage?: boolean;
|
|
68
69
|
rightClick: DesktopifyAppTrayAction;
|
|
69
70
|
leftClick: DesktopifyAppTrayAction;
|
|
70
71
|
}
|
|
@@ -266,6 +267,10 @@ export interface DesktopifyApp2 {
|
|
|
266
267
|
* The name of the company that the app belongs to
|
|
267
268
|
*/
|
|
268
269
|
companyName?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Whether the app should minimize to tray when all windows are closed. Requires at least one tray.
|
|
272
|
+
*/
|
|
273
|
+
shouldMinimizeToTray?: boolean;
|
|
269
274
|
/**
|
|
270
275
|
* Only allow a single instance of this app to run
|
|
271
276
|
*/
|
package/src/plans.ts
CHANGED
|
@@ -28,6 +28,7 @@ export const prodPlanIds = {
|
|
|
28
28
|
essential_new: "plan_GYXn2cnPl5dy7j",
|
|
29
29
|
professional: "plan_GYXoKsa2j0yURg",
|
|
30
30
|
professional_annual: "price_1KHTgaIewCKA2h0I81TVg85r",
|
|
31
|
+
professional_annual_full_price: "price_1KLT32IewCKA2h0IFeJOAgG5",
|
|
31
32
|
cli_founder: "plan_GpzWZLfsOzjrvI",
|
|
32
33
|
cli_founder_30: "plan_GsL1IRUwpj5CIF",
|
|
33
34
|
cli_founder_50: "plan_GsL1IRUwpj5CIF",
|
package/src/validations.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as yup from "yup";
|
|
2
2
|
import * as semver from "semver";
|
|
3
3
|
import * as isRegex from "is-regex";
|
|
4
|
+
import { DesktopifyApp2, IApp2 } from ".";
|
|
4
5
|
export const appTitleValidation = yup
|
|
5
6
|
.string()
|
|
6
7
|
.label("App title")
|
|
@@ -170,3 +171,10 @@ export const appConfigValidation = yup.object({
|
|
|
170
171
|
})
|
|
171
172
|
.required(),
|
|
172
173
|
});
|
|
174
|
+
|
|
175
|
+
export const shouldMinimizeToTrayIsActive = (desktopApp: DesktopifyApp2) => {
|
|
176
|
+
return desktopApp.trays.some(
|
|
177
|
+
(t) =>
|
|
178
|
+
t.leftClick.role === "toggleMenu" || t.rightClick.role === "toggleMenu"
|
|
179
|
+
);
|
|
180
|
+
};
|