Skip to content
This repository was archived by the owner on May 25, 2025. It is now read-only.

Commit c75668f

Browse files
committed
WIP
1 parent 3fe3450 commit c75668f

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/apps/main/core/common/pwa/supports/windows.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,23 @@ import { ImageTools } from "../imageTools";
88
import type { Manifest } from "../type";
99

1010
export class WindowsSupport {
11-
private static shellService = Cc["@mozilla.org/browser/shell-service;1"].getService(
12-
Ci.nsIWindowsShellService
13-
);
11+
private static shellService = Cc["@mozilla.org/browser/shell-service;1"]
12+
.getService(
13+
Ci.nsIWindowsShellService,
14+
);
1415

1516
private static uiUtils = Cc["@mozilla.org/windows-ui-utils;1"].getService(
16-
Ci.nsIWindowsUIUtils
17+
Ci.nsIWindowsUIUtils,
1718
);
1819

1920
private static taskbar = Cc["@mozilla.org/windows-taskbar;1"].getService(
20-
Ci.nsIWinTaskbar
21+
Ci.nsIWinTaskbar,
2122
);
2223

2324
private static nsIFile = Components.Constructor(
2425
"@mozilla.org/file/local;1",
2526
Ci.nsIFile,
26-
"initWithPath"
27+
"initWithPath",
2728
);
2829

2930
constructor(private ssbManager: SiteSpecificBrowserManager) {}
@@ -49,7 +50,7 @@ export class WindowsSupport {
4950
const icon = ssb.icon;
5051
if (icon) {
5152
const { container } = await ImageTools.loadImage(
52-
Services.io.newURI(icon)
53+
Services.io.newURI(icon),
5354
);
5455
ImageTools.saveIcon(container, 128, 128, iconFile);
5556
} else {
@@ -64,7 +65,7 @@ export class WindowsSupport {
6465
0,
6566
this.buildGroupId(ssb.id),
6667
"Programs",
67-
`${ssb.name}.lnk`
68+
`${ssb.name}.lnk`,
6869
);
6970
}
7071

@@ -104,7 +105,7 @@ export class WindowsSupport {
104105
async applyOSIntegration(ssb: Manifest, aWindow: Window) {
105106
WindowsSupport.taskbar.setGroupIdForWindow(
106107
aWindow,
107-
this.buildGroupId(ssb.id)
108+
this.buildGroupId(ssb.id),
108109
);
109110
const getIcon = async (size: number) => {
110111
const icon = ssb.icon;
@@ -130,6 +131,8 @@ export class WindowsSupport {
130131
getIcon(WindowsSupport.uiUtils.systemLargeIconSize),
131132
]);
132133

134+
console.log(icons);
135+
133136
if (icons[0] || icons[1]) {
134137
WindowsSupport.uiUtils.setWindowIcon(aWindow, icons[0], icons[1]);
135138
}

0 commit comments

Comments
 (0)