pake-cli 3.7.7 → 3.7.8

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.
@@ -140,10 +140,10 @@
140
140
  "identifier": {
141
141
  "anyOf": [
142
142
  {
143
- "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-read-body`\n- `allow-fetch-send`",
143
+ "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-send`\n- `allow-fetch-read-body`\n- `allow-fetch-cancel-body`",
144
144
  "type": "string",
145
145
  "const": "http:default",
146
- "markdownDescription": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-read-body`\n- `allow-fetch-send`"
146
+ "markdownDescription": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-send`\n- `allow-fetch-read-body`\n- `allow-fetch-cancel-body`"
147
147
  },
148
148
  {
149
149
  "description": "Enables the fetch command without any pre-configured scope.",
@@ -157,6 +157,12 @@
157
157
  "const": "http:allow-fetch-cancel",
158
158
  "markdownDescription": "Enables the fetch_cancel command without any pre-configured scope."
159
159
  },
160
+ {
161
+ "description": "Enables the fetch_cancel_body command without any pre-configured scope.",
162
+ "type": "string",
163
+ "const": "http:allow-fetch-cancel-body",
164
+ "markdownDescription": "Enables the fetch_cancel_body command without any pre-configured scope."
165
+ },
160
166
  {
161
167
  "description": "Enables the fetch_read_body command without any pre-configured scope.",
162
168
  "type": "string",
@@ -181,6 +187,12 @@
181
187
  "const": "http:deny-fetch-cancel",
182
188
  "markdownDescription": "Denies the fetch_cancel command without any pre-configured scope."
183
189
  },
190
+ {
191
+ "description": "Denies the fetch_cancel_body command without any pre-configured scope.",
192
+ "type": "string",
193
+ "const": "http:deny-fetch-cancel-body",
194
+ "markdownDescription": "Denies the fetch_cancel_body command without any pre-configured scope."
195
+ },
184
196
  {
185
197
  "description": "Denies the fetch_read_body command without any pre-configured scope.",
186
198
  "type": "string",
@@ -2715,10 +2727,10 @@
2715
2727
  "markdownDescription": "Denies the unregister_all command without any pre-configured scope."
2716
2728
  },
2717
2729
  {
2718
- "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-read-body`\n- `allow-fetch-send`",
2730
+ "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-send`\n- `allow-fetch-read-body`\n- `allow-fetch-cancel-body`",
2719
2731
  "type": "string",
2720
2732
  "const": "http:default",
2721
- "markdownDescription": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-read-body`\n- `allow-fetch-send`"
2733
+ "markdownDescription": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-send`\n- `allow-fetch-read-body`\n- `allow-fetch-cancel-body`"
2722
2734
  },
2723
2735
  {
2724
2736
  "description": "Enables the fetch command without any pre-configured scope.",
@@ -2732,6 +2744,12 @@
2732
2744
  "const": "http:allow-fetch-cancel",
2733
2745
  "markdownDescription": "Enables the fetch_cancel command without any pre-configured scope."
2734
2746
  },
2747
+ {
2748
+ "description": "Enables the fetch_cancel_body command without any pre-configured scope.",
2749
+ "type": "string",
2750
+ "const": "http:allow-fetch-cancel-body",
2751
+ "markdownDescription": "Enables the fetch_cancel_body command without any pre-configured scope."
2752
+ },
2735
2753
  {
2736
2754
  "description": "Enables the fetch_read_body command without any pre-configured scope.",
2737
2755
  "type": "string",
@@ -2756,6 +2774,12 @@
2756
2774
  "const": "http:deny-fetch-cancel",
2757
2775
  "markdownDescription": "Denies the fetch_cancel command without any pre-configured scope."
2758
2776
  },
2777
+ {
2778
+ "description": "Denies the fetch_cancel_body command without any pre-configured scope.",
2779
+ "type": "string",
2780
+ "const": "http:deny-fetch-cancel-body",
2781
+ "markdownDescription": "Denies the fetch_cancel_body command without any pre-configured scope."
2782
+ },
2759
2783
  {
2760
2784
  "description": "Denies the fetch_read_body command without any pre-configured scope.",
2761
2785
  "type": "string",
@@ -140,10 +140,10 @@
140
140
  "identifier": {
141
141
  "anyOf": [
142
142
  {
143
- "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-read-body`\n- `allow-fetch-send`",
143
+ "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-send`\n- `allow-fetch-read-body`\n- `allow-fetch-cancel-body`",
144
144
  "type": "string",
145
145
  "const": "http:default",
146
- "markdownDescription": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-read-body`\n- `allow-fetch-send`"
146
+ "markdownDescription": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-send`\n- `allow-fetch-read-body`\n- `allow-fetch-cancel-body`"
147
147
  },
148
148
  {
149
149
  "description": "Enables the fetch command without any pre-configured scope.",
@@ -157,6 +157,12 @@
157
157
  "const": "http:allow-fetch-cancel",
158
158
  "markdownDescription": "Enables the fetch_cancel command without any pre-configured scope."
159
159
  },
160
+ {
161
+ "description": "Enables the fetch_cancel_body command without any pre-configured scope.",
162
+ "type": "string",
163
+ "const": "http:allow-fetch-cancel-body",
164
+ "markdownDescription": "Enables the fetch_cancel_body command without any pre-configured scope."
165
+ },
160
166
  {
161
167
  "description": "Enables the fetch_read_body command without any pre-configured scope.",
162
168
  "type": "string",
@@ -181,6 +187,12 @@
181
187
  "const": "http:deny-fetch-cancel",
182
188
  "markdownDescription": "Denies the fetch_cancel command without any pre-configured scope."
183
189
  },
190
+ {
191
+ "description": "Denies the fetch_cancel_body command without any pre-configured scope.",
192
+ "type": "string",
193
+ "const": "http:deny-fetch-cancel-body",
194
+ "markdownDescription": "Denies the fetch_cancel_body command without any pre-configured scope."
195
+ },
184
196
  {
185
197
  "description": "Denies the fetch_read_body command without any pre-configured scope.",
186
198
  "type": "string",
@@ -2715,10 +2727,10 @@
2715
2727
  "markdownDescription": "Denies the unregister_all command without any pre-configured scope."
2716
2728
  },
2717
2729
  {
2718
- "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-read-body`\n- `allow-fetch-send`",
2730
+ "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-send`\n- `allow-fetch-read-body`\n- `allow-fetch-cancel-body`",
2719
2731
  "type": "string",
2720
2732
  "const": "http:default",
2721
- "markdownDescription": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-read-body`\n- `allow-fetch-send`"
2733
+ "markdownDescription": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n\n#### This default permission set includes:\n\n- `allow-fetch`\n- `allow-fetch-cancel`\n- `allow-fetch-send`\n- `allow-fetch-read-body`\n- `allow-fetch-cancel-body`"
2722
2734
  },
2723
2735
  {
2724
2736
  "description": "Enables the fetch command without any pre-configured scope.",
@@ -2732,6 +2744,12 @@
2732
2744
  "const": "http:allow-fetch-cancel",
2733
2745
  "markdownDescription": "Enables the fetch_cancel command without any pre-configured scope."
2734
2746
  },
2747
+ {
2748
+ "description": "Enables the fetch_cancel_body command without any pre-configured scope.",
2749
+ "type": "string",
2750
+ "const": "http:allow-fetch-cancel-body",
2751
+ "markdownDescription": "Enables the fetch_cancel_body command without any pre-configured scope."
2752
+ },
2735
2753
  {
2736
2754
  "description": "Enables the fetch_read_body command without any pre-configured scope.",
2737
2755
  "type": "string",
@@ -2756,6 +2774,12 @@
2756
2774
  "const": "http:deny-fetch-cancel",
2757
2775
  "markdownDescription": "Denies the fetch_cancel command without any pre-configured scope."
2758
2776
  },
2777
+ {
2778
+ "description": "Denies the fetch_cancel_body command without any pre-configured scope.",
2779
+ "type": "string",
2780
+ "const": "http:deny-fetch-cancel-body",
2781
+ "markdownDescription": "Denies the fetch_cancel_body command without any pre-configured scope."
2782
+ },
2759
2783
  {
2760
2784
  "description": "Denies the fetch_read_body command without any pre-configured scope.",
2761
2785
  "type": "string",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "windows": [
3
3
  {
4
- "url": "https://weekly.tw93.fun/",
4
+ "url": "https://weekly.tw93.fun/en",
5
5
  "url_type": "web",
6
6
  "hide_title_bar": true,
7
7
  "fullscreen": false,
@@ -104,7 +104,7 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
104
104
  #[cfg(target_os = "windows")]
105
105
  let mut windows_browser_args = String::from("--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection --disable-blink-features=AutomationControlled");
106
106
 
107
- #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
107
+ #[cfg(target_os = "linux")]
108
108
  let mut linux_browser_args = String::from("--disable-blink-features=AutomationControlled");
109
109
 
110
110
  if window_config.ignore_certificate_errors {
@@ -113,7 +113,7 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
113
113
  windows_browser_args.push_str(" --ignore-certificate-errors");
114
114
  }
115
115
 
116
- #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
116
+ #[cfg(target_os = "linux")]
117
117
  {
118
118
  linux_browser_args.push_str(" --ignore-certificate-errors");
119
119
  }
@@ -131,7 +131,7 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
131
131
  windows_browser_args.push_str(" --enable-unsafe-webgpu");
132
132
  }
133
133
 
134
- #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
134
+ #[cfg(target_os = "linux")]
135
135
  {
136
136
  linux_browser_args.push_str(" --enable-features=SharedArrayBuffer");
137
137
  linux_browser_args.push_str(" --enable-unsafe-webgpu");
@@ -189,7 +189,7 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
189
189
  window_builder = window_builder.additional_browser_args(&windows_browser_args);
190
190
  }
191
191
 
192
- #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
192
+ #[cfg(target_os = "linux")]
193
193
  {
194
194
  window_builder = window_builder.additional_browser_args(&linux_browser_args);
195
195
  }
@@ -39,8 +39,8 @@ document.addEventListener("DOMContentLoaded", () => {
39
39
  let wasInBody = false;
40
40
 
41
41
  // Inject fullscreen styles
42
- const styleEl = document.createElement('style');
43
- styleEl.id = 'pake-fullscreen-style';
42
+ const styleEl = document.createElement("style");
43
+ styleEl.id = "pake-fullscreen-style";
44
44
  styleEl.textContent = `
45
45
  body.pake-fullscreen-active {
46
46
  overflow: hidden !important;
@@ -69,11 +69,11 @@ document.addEventListener("DOMContentLoaded", () => {
69
69
 
70
70
  // Find the actual video element
71
71
  function findMediaElement() {
72
- const videos = document.querySelectorAll('video');
72
+ const videos = document.querySelectorAll("video");
73
73
  if (videos.length > 0) {
74
74
  let largestVideo = videos[0];
75
75
  let maxArea = 0;
76
- videos.forEach(video => {
76
+ videos.forEach((video) => {
77
77
  const rect = video.getBoundingClientRect();
78
78
  const area = rect.width * rect.height;
79
79
  if (area > maxArea || !video.paused) {
@@ -127,8 +127,8 @@ document.addEventListener("DOMContentLoaded", () => {
127
127
  }
128
128
 
129
129
  // Apply fullscreen
130
- targetElement.classList.add('pake-fullscreen-element');
131
- document.body.classList.add('pake-fullscreen-active');
130
+ targetElement.classList.add("pake-fullscreen-element");
131
+ document.body.classList.add("pake-fullscreen-active");
132
132
 
133
133
  if (!wasInBody) {
134
134
  document.body.appendChild(targetElement);
@@ -136,11 +136,13 @@ document.addEventListener("DOMContentLoaded", () => {
136
136
 
137
137
  // Fullscreen window
138
138
  appWindow.setFullscreen(true).then(() => {
139
- const event = new Event('fullscreenchange', { bubbles: true });
139
+ const event = new Event("fullscreenchange", { bubbles: true });
140
140
  document.dispatchEvent(event);
141
141
  element.dispatchEvent(event);
142
142
 
143
- const webkitEvent = new Event('webkitfullscreenchange', { bubbles: true });
143
+ const webkitEvent = new Event("webkitfullscreenchange", {
144
+ bubbles: true,
145
+ });
144
146
  document.dispatchEvent(webkitEvent);
145
147
  element.dispatchEvent(webkitEvent);
146
148
  });
@@ -158,17 +160,20 @@ document.addEventListener("DOMContentLoaded", () => {
158
160
  const targetElement = actualFullscreenElement;
159
161
 
160
162
  // Restore styles and position
161
- targetElement.classList.remove('pake-fullscreen-element');
162
- document.body.classList.remove('pake-fullscreen-active');
163
+ targetElement.classList.remove("pake-fullscreen-element");
164
+ document.body.classList.remove("pake-fullscreen-active");
163
165
 
164
166
  if (originalStyles) {
165
- Object.keys(originalStyles).forEach(key => {
167
+ Object.keys(originalStyles).forEach((key) => {
166
168
  targetElement.style[key] = originalStyles[key];
167
169
  });
168
170
  }
169
171
 
170
172
  if (!wasInBody && originalParent) {
171
- if (originalNextSibling && originalNextSibling.parentNode === originalParent) {
173
+ if (
174
+ originalNextSibling &&
175
+ originalNextSibling.parentNode === originalParent
176
+ ) {
172
177
  originalParent.insertBefore(targetElement, originalNextSibling);
173
178
  } else if (originalParent.isConnected) {
174
179
  originalParent.appendChild(targetElement);
@@ -185,38 +190,40 @@ document.addEventListener("DOMContentLoaded", () => {
185
190
 
186
191
  // Exit window fullscreen
187
192
  return appWindow.setFullscreen(false).then(() => {
188
- const event = new Event('fullscreenchange', { bubbles: true });
193
+ const event = new Event("fullscreenchange", { bubbles: true });
189
194
  document.dispatchEvent(event);
190
195
  exitingElement.dispatchEvent(event);
191
196
 
192
- const webkitEvent = new Event('webkitfullscreenchange', { bubbles: true });
197
+ const webkitEvent = new Event("webkitfullscreenchange", {
198
+ bubbles: true,
199
+ });
193
200
  document.dispatchEvent(webkitEvent);
194
201
  exitingElement.dispatchEvent(webkitEvent);
195
202
  });
196
203
  }
197
204
 
198
205
  // Override fullscreenEnabled
199
- Object.defineProperty(document, 'fullscreenEnabled', {
206
+ Object.defineProperty(document, "fullscreenEnabled", {
200
207
  get: () => true,
201
- configurable: true
208
+ configurable: true,
202
209
  });
203
- Object.defineProperty(document, 'webkitFullscreenEnabled', {
210
+ Object.defineProperty(document, "webkitFullscreenEnabled", {
204
211
  get: () => true,
205
- configurable: true
212
+ configurable: true,
206
213
  });
207
214
 
208
215
  // Override fullscreenElement
209
- Object.defineProperty(document, 'fullscreenElement', {
216
+ Object.defineProperty(document, "fullscreenElement", {
210
217
  get: () => fullscreenElement,
211
- configurable: true
218
+ configurable: true,
212
219
  });
213
- Object.defineProperty(document, 'webkitFullscreenElement', {
220
+ Object.defineProperty(document, "webkitFullscreenElement", {
214
221
  get: () => fullscreenElement,
215
- configurable: true
222
+ configurable: true,
216
223
  });
217
- Object.defineProperty(document, 'webkitCurrentFullScreenElement', {
224
+ Object.defineProperty(document, "webkitCurrentFullScreenElement", {
218
225
  get: () => fullscreenElement,
219
- configurable: true
226
+ configurable: true,
220
227
  });
221
228
 
222
229
  // Override requestFullscreen
@@ -236,21 +243,28 @@ document.addEventListener("DOMContentLoaded", () => {
236
243
  document.webkitCancelFullScreen = exitFullscreen;
237
244
 
238
245
  // Handle Escape key
239
- document.addEventListener('keydown', (e) => {
240
- if (e.key === 'Escape' && fullscreenElement) {
241
- exitFullscreen();
242
- }
243
- }, true);
246
+ document.addEventListener(
247
+ "keydown",
248
+ (e) => {
249
+ if (e.key === "Escape" && fullscreenElement) {
250
+ exitFullscreen();
251
+ }
252
+ },
253
+ true,
254
+ );
244
255
 
245
256
  // Monitor window fullscreen changes
246
257
  let lastFullscreenState = false;
247
258
  setInterval(() => {
248
- appWindow.isFullscreen().then(isFullscreen => {
249
- if (lastFullscreenState && !isFullscreen && fullscreenElement) {
250
- exitFullscreen();
251
- }
252
- lastFullscreenState = isFullscreen;
253
- }).catch(() => {});
259
+ appWindow
260
+ .isFullscreen()
261
+ .then((isFullscreen) => {
262
+ if (lastFullscreenState && !isFullscreen && fullscreenElement) {
263
+ exitFullscreen();
264
+ }
265
+ lastFullscreenState = isFullscreen;
266
+ })
267
+ .catch(() => {});
254
268
  }, 500);
255
269
  }
256
270
 
@@ -22,6 +22,13 @@ use app::{
22
22
  use util::get_pake_config;
23
23
 
24
24
  pub fn run_app() {
25
+ #[cfg(target_os = "linux")]
26
+ {
27
+ if std::env::var("WEBKIT_DISABLE_DMABUF_RENDERER").is_err() {
28
+ std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
29
+ }
30
+ }
31
+
25
32
  let (pake_config, tauri_config) = get_pake_config();
26
33
  let tauri_app = tauri::Builder::default();
27
34
 
@@ -101,7 +108,7 @@ pub fn run_app() {
101
108
  window_clone.show().unwrap();
102
109
 
103
110
  // Fixed: Linux fullscreen issue with virtual keyboard
104
- #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
111
+ #[cfg(target_os = "linux")]
105
112
  {
106
113
  if init_fullscreen {
107
114
  window_clone.set_fullscreen(true).unwrap();
@@ -127,7 +134,7 @@ pub fn run_app() {
127
134
  tokio::time::sleep(Duration::from_millis(900)).await;
128
135
  }
129
136
  }
130
- #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
137
+ #[cfg(target_os = "linux")]
131
138
  {
132
139
  if window.is_fullscreen().unwrap_or(false) {
133
140
  window.set_fullscreen(false).unwrap();
@@ -135,6 +142,8 @@ pub fn run_app() {
135
142
  let _ = window.set_focus();
136
143
  }
137
144
  }
145
+ // On macOS, directly hide without minimize to avoid duplicate Dock icons
146
+ #[cfg(not(target_os = "macos"))]
138
147
  window.minimize().unwrap();
139
148
  window.hide().unwrap();
140
149
  });
@@ -145,8 +154,24 @@ pub fn run_app() {
145
154
  }
146
155
  }
147
156
  })
148
- .run(tauri::generate_context!())
149
- .expect("error while running tauri application");
157
+ .build(tauri::generate_context!())
158
+ .expect("error while building tauri application")
159
+ .run(|app, event| {
160
+ // Handle macOS dock icon click to reopen hidden window
161
+ #[cfg(target_os = "macos")]
162
+ if let tauri::RunEvent::Reopen {
163
+ has_visible_windows,
164
+ ..
165
+ } = event
166
+ {
167
+ if !has_visible_windows {
168
+ if let Some(window) = app.get_webview_window("pake") {
169
+ let _ = window.show();
170
+ let _ = window.set_focus();
171
+ }
172
+ }
173
+ }
174
+ });
150
175
  }
151
176
 
152
177
  pub fn run() {