pake-cli 3.0.3 → 3.1.1

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.
Files changed (61) hide show
  1. package/dist/cli.js +29 -21
  2. package/dist/dev.js +6 -5
  3. package/dist/dev.js.map +1 -1
  4. package/package.json +2 -2
  5. package/src-tauri/.pake/pake.json +30 -0
  6. package/src-tauri/.pake/tauri.conf.json +24 -0
  7. package/src-tauri/.pake/tauri.macos.conf.json +15 -0
  8. package/src-tauri/Cargo.lock +396 -224
  9. package/src-tauri/Cargo.toml +9 -9
  10. package/src-tauri/capabilities/default.json +7 -1
  11. package/src-tauri/gen/schemas/acl-manifests.json +1 -1
  12. package/src-tauri/gen/schemas/capabilities.json +1 -1
  13. package/src-tauri/gen/schemas/desktop-schema.json +215 -0
  14. package/src-tauri/gen/schemas/macOS-schema.json +215 -0
  15. package/src-tauri/icons/excalidraw.icns +0 -0
  16. package/src-tauri/icons/gemini.icns +0 -0
  17. package/src-tauri/icons/xiaohongshu.icns +0 -0
  18. package/src-tauri/png/chatgpt_512.png +0 -0
  19. package/src-tauri/png/excalidraw_256.ico +0 -0
  20. package/src-tauri/png/excalidraw_32.ico +0 -0
  21. package/src-tauri/png/excalidraw_512.png +0 -0
  22. package/src-tauri/png/flomo_512.png +0 -0
  23. package/src-tauri/png/gemini_256.ico +0 -0
  24. package/src-tauri/png/gemini_32.ico +0 -0
  25. package/src-tauri/png/gemini_512.png +0 -0
  26. package/src-tauri/png/icon_512.png +0 -0
  27. package/src-tauri/png/lizhi_512.png +0 -0
  28. package/src-tauri/png/programmusic_512.png +0 -0
  29. package/src-tauri/png/qwerty_512.png +0 -0
  30. package/src-tauri/png/twitter_512.png +0 -0
  31. package/src-tauri/png/wechat_512.png +0 -0
  32. package/src-tauri/png/weread_512.png +0 -0
  33. package/src-tauri/png/xiaohongshu_256.ico +0 -0
  34. package/src-tauri/png/xiaohongshu_32.ico +0 -0
  35. package/src-tauri/png/xiaohongshu_512.png +0 -0
  36. package/src-tauri/png/youtube_512.png +0 -0
  37. package/src-tauri/png/youtubemusic_512.png +0 -0
  38. package/src-tauri/src/app/invoke.rs +20 -0
  39. package/src-tauri/src/app/mod.rs +1 -1
  40. package/src-tauri/src/app/setup.rs +95 -0
  41. package/src-tauri/src/app/window.rs +6 -2
  42. package/src-tauri/src/inject/event.js +32 -1
  43. package/src-tauri/src/inject/style.js +12 -4
  44. package/src-tauri/src/lib.rs +37 -87
  45. package/src-tauri/src/util.rs +1 -2
  46. package/src-tauri/icons/coderunner.icns +0 -0
  47. package/src-tauri/icons/devv.icns +0 -0
  48. package/src-tauri/icons/juchats.icns +0 -0
  49. package/src-tauri/icons/poe.icns +0 -0
  50. package/src-tauri/icons/reference.icns +0 -0
  51. package/src-tauri/icons/xiaoyuzhou.icns +0 -0
  52. package/src-tauri/png/coderunner_256.ico +0 -0
  53. package/src-tauri/png/coderunner_32.ico +0 -0
  54. package/src-tauri/png/coderunner_512.png +0 -0
  55. package/src-tauri/png/poe_256.ico +0 -0
  56. package/src-tauri/png/poe_32.ico +0 -0
  57. package/src-tauri/png/poe_512.png +0 -0
  58. package/src-tauri/png/reference_256.ico +0 -0
  59. package/src-tauri/png/reference_32.ico +0 -0
  60. package/src-tauri/png/reference_512.png +0 -0
  61. package/src-tauri/src/app/menu.rs +0 -36
@@ -1152,6 +1152,11 @@
1152
1152
  "type": "string",
1153
1153
  "const": "core:webview:allow-reparent"
1154
1154
  },
1155
+ {
1156
+ "description": "Enables the set_webview_background_color command without any pre-configured scope.",
1157
+ "type": "string",
1158
+ "const": "core:webview:allow-set-webview-background-color"
1159
+ },
1155
1160
  {
1156
1161
  "description": "Enables the set_webview_focus command without any pre-configured scope.",
1157
1162
  "type": "string",
@@ -1232,6 +1237,11 @@
1232
1237
  "type": "string",
1233
1238
  "const": "core:webview:deny-reparent"
1234
1239
  },
1240
+ {
1241
+ "description": "Denies the set_webview_background_color command without any pre-configured scope.",
1242
+ "type": "string",
1243
+ "const": "core:webview:deny-set-webview-background-color"
1244
+ },
1235
1245
  {
1236
1246
  "description": "Denies the set_webview_focus command without any pre-configured scope.",
1237
1247
  "type": "string",
@@ -1447,6 +1457,21 @@
1447
1457
  "type": "string",
1448
1458
  "const": "core:window:allow-set-always-on-top"
1449
1459
  },
1460
+ {
1461
+ "description": "Enables the set_background_color command without any pre-configured scope.",
1462
+ "type": "string",
1463
+ "const": "core:window:allow-set-background-color"
1464
+ },
1465
+ {
1466
+ "description": "Enables the set_badge_count command without any pre-configured scope.",
1467
+ "type": "string",
1468
+ "const": "core:window:allow-set-badge-count"
1469
+ },
1470
+ {
1471
+ "description": "Enables the set_badge_label command without any pre-configured scope.",
1472
+ "type": "string",
1473
+ "const": "core:window:allow-set-badge-label"
1474
+ },
1450
1475
  {
1451
1476
  "description": "Enables the set_closable command without any pre-configured scope.",
1452
1477
  "type": "string",
@@ -1532,6 +1557,11 @@
1532
1557
  "type": "string",
1533
1558
  "const": "core:window:allow-set-minimizable"
1534
1559
  },
1560
+ {
1561
+ "description": "Enables the set_overlay_icon command without any pre-configured scope.",
1562
+ "type": "string",
1563
+ "const": "core:window:allow-set-overlay-icon"
1564
+ },
1535
1565
  {
1536
1566
  "description": "Enables the set_position command without any pre-configured scope.",
1537
1567
  "type": "string",
@@ -1792,6 +1822,21 @@
1792
1822
  "type": "string",
1793
1823
  "const": "core:window:deny-set-always-on-top"
1794
1824
  },
1825
+ {
1826
+ "description": "Denies the set_background_color command without any pre-configured scope.",
1827
+ "type": "string",
1828
+ "const": "core:window:deny-set-background-color"
1829
+ },
1830
+ {
1831
+ "description": "Denies the set_badge_count command without any pre-configured scope.",
1832
+ "type": "string",
1833
+ "const": "core:window:deny-set-badge-count"
1834
+ },
1835
+ {
1836
+ "description": "Denies the set_badge_label command without any pre-configured scope.",
1837
+ "type": "string",
1838
+ "const": "core:window:deny-set-badge-label"
1839
+ },
1795
1840
  {
1796
1841
  "description": "Denies the set_closable command without any pre-configured scope.",
1797
1842
  "type": "string",
@@ -1877,6 +1922,11 @@
1877
1922
  "type": "string",
1878
1923
  "const": "core:window:deny-set-minimizable"
1879
1924
  },
1925
+ {
1926
+ "description": "Denies the set_overlay_icon command without any pre-configured scope.",
1927
+ "type": "string",
1928
+ "const": "core:window:deny-set-overlay-icon"
1929
+ },
1880
1930
  {
1881
1931
  "description": "Denies the set_position command without any pre-configured scope.",
1882
1932
  "type": "string",
@@ -2072,6 +2122,171 @@
2072
2122
  "type": "string",
2073
2123
  "const": "http:deny-fetch-send"
2074
2124
  },
2125
+ {
2126
+ "description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n",
2127
+ "type": "string",
2128
+ "const": "notification:default"
2129
+ },
2130
+ {
2131
+ "description": "Enables the batch command without any pre-configured scope.",
2132
+ "type": "string",
2133
+ "const": "notification:allow-batch"
2134
+ },
2135
+ {
2136
+ "description": "Enables the cancel command without any pre-configured scope.",
2137
+ "type": "string",
2138
+ "const": "notification:allow-cancel"
2139
+ },
2140
+ {
2141
+ "description": "Enables the check_permissions command without any pre-configured scope.",
2142
+ "type": "string",
2143
+ "const": "notification:allow-check-permissions"
2144
+ },
2145
+ {
2146
+ "description": "Enables the create_channel command without any pre-configured scope.",
2147
+ "type": "string",
2148
+ "const": "notification:allow-create-channel"
2149
+ },
2150
+ {
2151
+ "description": "Enables the delete_channel command without any pre-configured scope.",
2152
+ "type": "string",
2153
+ "const": "notification:allow-delete-channel"
2154
+ },
2155
+ {
2156
+ "description": "Enables the get_active command without any pre-configured scope.",
2157
+ "type": "string",
2158
+ "const": "notification:allow-get-active"
2159
+ },
2160
+ {
2161
+ "description": "Enables the get_pending command without any pre-configured scope.",
2162
+ "type": "string",
2163
+ "const": "notification:allow-get-pending"
2164
+ },
2165
+ {
2166
+ "description": "Enables the is_permission_granted command without any pre-configured scope.",
2167
+ "type": "string",
2168
+ "const": "notification:allow-is-permission-granted"
2169
+ },
2170
+ {
2171
+ "description": "Enables the list_channels command without any pre-configured scope.",
2172
+ "type": "string",
2173
+ "const": "notification:allow-list-channels"
2174
+ },
2175
+ {
2176
+ "description": "Enables the notify command without any pre-configured scope.",
2177
+ "type": "string",
2178
+ "const": "notification:allow-notify"
2179
+ },
2180
+ {
2181
+ "description": "Enables the permission_state command without any pre-configured scope.",
2182
+ "type": "string",
2183
+ "const": "notification:allow-permission-state"
2184
+ },
2185
+ {
2186
+ "description": "Enables the register_action_types command without any pre-configured scope.",
2187
+ "type": "string",
2188
+ "const": "notification:allow-register-action-types"
2189
+ },
2190
+ {
2191
+ "description": "Enables the register_listener command without any pre-configured scope.",
2192
+ "type": "string",
2193
+ "const": "notification:allow-register-listener"
2194
+ },
2195
+ {
2196
+ "description": "Enables the remove_active command without any pre-configured scope.",
2197
+ "type": "string",
2198
+ "const": "notification:allow-remove-active"
2199
+ },
2200
+ {
2201
+ "description": "Enables the request_permission command without any pre-configured scope.",
2202
+ "type": "string",
2203
+ "const": "notification:allow-request-permission"
2204
+ },
2205
+ {
2206
+ "description": "Enables the show command without any pre-configured scope.",
2207
+ "type": "string",
2208
+ "const": "notification:allow-show"
2209
+ },
2210
+ {
2211
+ "description": "Denies the batch command without any pre-configured scope.",
2212
+ "type": "string",
2213
+ "const": "notification:deny-batch"
2214
+ },
2215
+ {
2216
+ "description": "Denies the cancel command without any pre-configured scope.",
2217
+ "type": "string",
2218
+ "const": "notification:deny-cancel"
2219
+ },
2220
+ {
2221
+ "description": "Denies the check_permissions command without any pre-configured scope.",
2222
+ "type": "string",
2223
+ "const": "notification:deny-check-permissions"
2224
+ },
2225
+ {
2226
+ "description": "Denies the create_channel command without any pre-configured scope.",
2227
+ "type": "string",
2228
+ "const": "notification:deny-create-channel"
2229
+ },
2230
+ {
2231
+ "description": "Denies the delete_channel command without any pre-configured scope.",
2232
+ "type": "string",
2233
+ "const": "notification:deny-delete-channel"
2234
+ },
2235
+ {
2236
+ "description": "Denies the get_active command without any pre-configured scope.",
2237
+ "type": "string",
2238
+ "const": "notification:deny-get-active"
2239
+ },
2240
+ {
2241
+ "description": "Denies the get_pending command without any pre-configured scope.",
2242
+ "type": "string",
2243
+ "const": "notification:deny-get-pending"
2244
+ },
2245
+ {
2246
+ "description": "Denies the is_permission_granted command without any pre-configured scope.",
2247
+ "type": "string",
2248
+ "const": "notification:deny-is-permission-granted"
2249
+ },
2250
+ {
2251
+ "description": "Denies the list_channels command without any pre-configured scope.",
2252
+ "type": "string",
2253
+ "const": "notification:deny-list-channels"
2254
+ },
2255
+ {
2256
+ "description": "Denies the notify command without any pre-configured scope.",
2257
+ "type": "string",
2258
+ "const": "notification:deny-notify"
2259
+ },
2260
+ {
2261
+ "description": "Denies the permission_state command without any pre-configured scope.",
2262
+ "type": "string",
2263
+ "const": "notification:deny-permission-state"
2264
+ },
2265
+ {
2266
+ "description": "Denies the register_action_types command without any pre-configured scope.",
2267
+ "type": "string",
2268
+ "const": "notification:deny-register-action-types"
2269
+ },
2270
+ {
2271
+ "description": "Denies the register_listener command without any pre-configured scope.",
2272
+ "type": "string",
2273
+ "const": "notification:deny-register-listener"
2274
+ },
2275
+ {
2276
+ "description": "Denies the remove_active command without any pre-configured scope.",
2277
+ "type": "string",
2278
+ "const": "notification:deny-remove-active"
2279
+ },
2280
+ {
2281
+ "description": "Denies the request_permission command without any pre-configured scope.",
2282
+ "type": "string",
2283
+ "const": "notification:deny-request-permission"
2284
+ },
2285
+ {
2286
+ "description": "Denies the show command without any pre-configured scope.",
2287
+ "type": "string",
2288
+ "const": "notification:deny-show"
2289
+ },
2075
2290
  {
2076
2291
  "description": "Enables the cancel command without any pre-configured scope.",
2077
2292
  "type": "string",
@@ -1152,6 +1152,11 @@
1152
1152
  "type": "string",
1153
1153
  "const": "core:webview:allow-reparent"
1154
1154
  },
1155
+ {
1156
+ "description": "Enables the set_webview_background_color command without any pre-configured scope.",
1157
+ "type": "string",
1158
+ "const": "core:webview:allow-set-webview-background-color"
1159
+ },
1155
1160
  {
1156
1161
  "description": "Enables the set_webview_focus command without any pre-configured scope.",
1157
1162
  "type": "string",
@@ -1232,6 +1237,11 @@
1232
1237
  "type": "string",
1233
1238
  "const": "core:webview:deny-reparent"
1234
1239
  },
1240
+ {
1241
+ "description": "Denies the set_webview_background_color command without any pre-configured scope.",
1242
+ "type": "string",
1243
+ "const": "core:webview:deny-set-webview-background-color"
1244
+ },
1235
1245
  {
1236
1246
  "description": "Denies the set_webview_focus command without any pre-configured scope.",
1237
1247
  "type": "string",
@@ -1447,6 +1457,21 @@
1447
1457
  "type": "string",
1448
1458
  "const": "core:window:allow-set-always-on-top"
1449
1459
  },
1460
+ {
1461
+ "description": "Enables the set_background_color command without any pre-configured scope.",
1462
+ "type": "string",
1463
+ "const": "core:window:allow-set-background-color"
1464
+ },
1465
+ {
1466
+ "description": "Enables the set_badge_count command without any pre-configured scope.",
1467
+ "type": "string",
1468
+ "const": "core:window:allow-set-badge-count"
1469
+ },
1470
+ {
1471
+ "description": "Enables the set_badge_label command without any pre-configured scope.",
1472
+ "type": "string",
1473
+ "const": "core:window:allow-set-badge-label"
1474
+ },
1450
1475
  {
1451
1476
  "description": "Enables the set_closable command without any pre-configured scope.",
1452
1477
  "type": "string",
@@ -1532,6 +1557,11 @@
1532
1557
  "type": "string",
1533
1558
  "const": "core:window:allow-set-minimizable"
1534
1559
  },
1560
+ {
1561
+ "description": "Enables the set_overlay_icon command without any pre-configured scope.",
1562
+ "type": "string",
1563
+ "const": "core:window:allow-set-overlay-icon"
1564
+ },
1535
1565
  {
1536
1566
  "description": "Enables the set_position command without any pre-configured scope.",
1537
1567
  "type": "string",
@@ -1792,6 +1822,21 @@
1792
1822
  "type": "string",
1793
1823
  "const": "core:window:deny-set-always-on-top"
1794
1824
  },
1825
+ {
1826
+ "description": "Denies the set_background_color command without any pre-configured scope.",
1827
+ "type": "string",
1828
+ "const": "core:window:deny-set-background-color"
1829
+ },
1830
+ {
1831
+ "description": "Denies the set_badge_count command without any pre-configured scope.",
1832
+ "type": "string",
1833
+ "const": "core:window:deny-set-badge-count"
1834
+ },
1835
+ {
1836
+ "description": "Denies the set_badge_label command without any pre-configured scope.",
1837
+ "type": "string",
1838
+ "const": "core:window:deny-set-badge-label"
1839
+ },
1795
1840
  {
1796
1841
  "description": "Denies the set_closable command without any pre-configured scope.",
1797
1842
  "type": "string",
@@ -1877,6 +1922,11 @@
1877
1922
  "type": "string",
1878
1923
  "const": "core:window:deny-set-minimizable"
1879
1924
  },
1925
+ {
1926
+ "description": "Denies the set_overlay_icon command without any pre-configured scope.",
1927
+ "type": "string",
1928
+ "const": "core:window:deny-set-overlay-icon"
1929
+ },
1880
1930
  {
1881
1931
  "description": "Denies the set_position command without any pre-configured scope.",
1882
1932
  "type": "string",
@@ -2072,6 +2122,171 @@
2072
2122
  "type": "string",
2073
2123
  "const": "http:deny-fetch-send"
2074
2124
  },
2125
+ {
2126
+ "description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n",
2127
+ "type": "string",
2128
+ "const": "notification:default"
2129
+ },
2130
+ {
2131
+ "description": "Enables the batch command without any pre-configured scope.",
2132
+ "type": "string",
2133
+ "const": "notification:allow-batch"
2134
+ },
2135
+ {
2136
+ "description": "Enables the cancel command without any pre-configured scope.",
2137
+ "type": "string",
2138
+ "const": "notification:allow-cancel"
2139
+ },
2140
+ {
2141
+ "description": "Enables the check_permissions command without any pre-configured scope.",
2142
+ "type": "string",
2143
+ "const": "notification:allow-check-permissions"
2144
+ },
2145
+ {
2146
+ "description": "Enables the create_channel command without any pre-configured scope.",
2147
+ "type": "string",
2148
+ "const": "notification:allow-create-channel"
2149
+ },
2150
+ {
2151
+ "description": "Enables the delete_channel command without any pre-configured scope.",
2152
+ "type": "string",
2153
+ "const": "notification:allow-delete-channel"
2154
+ },
2155
+ {
2156
+ "description": "Enables the get_active command without any pre-configured scope.",
2157
+ "type": "string",
2158
+ "const": "notification:allow-get-active"
2159
+ },
2160
+ {
2161
+ "description": "Enables the get_pending command without any pre-configured scope.",
2162
+ "type": "string",
2163
+ "const": "notification:allow-get-pending"
2164
+ },
2165
+ {
2166
+ "description": "Enables the is_permission_granted command without any pre-configured scope.",
2167
+ "type": "string",
2168
+ "const": "notification:allow-is-permission-granted"
2169
+ },
2170
+ {
2171
+ "description": "Enables the list_channels command without any pre-configured scope.",
2172
+ "type": "string",
2173
+ "const": "notification:allow-list-channels"
2174
+ },
2175
+ {
2176
+ "description": "Enables the notify command without any pre-configured scope.",
2177
+ "type": "string",
2178
+ "const": "notification:allow-notify"
2179
+ },
2180
+ {
2181
+ "description": "Enables the permission_state command without any pre-configured scope.",
2182
+ "type": "string",
2183
+ "const": "notification:allow-permission-state"
2184
+ },
2185
+ {
2186
+ "description": "Enables the register_action_types command without any pre-configured scope.",
2187
+ "type": "string",
2188
+ "const": "notification:allow-register-action-types"
2189
+ },
2190
+ {
2191
+ "description": "Enables the register_listener command without any pre-configured scope.",
2192
+ "type": "string",
2193
+ "const": "notification:allow-register-listener"
2194
+ },
2195
+ {
2196
+ "description": "Enables the remove_active command without any pre-configured scope.",
2197
+ "type": "string",
2198
+ "const": "notification:allow-remove-active"
2199
+ },
2200
+ {
2201
+ "description": "Enables the request_permission command without any pre-configured scope.",
2202
+ "type": "string",
2203
+ "const": "notification:allow-request-permission"
2204
+ },
2205
+ {
2206
+ "description": "Enables the show command without any pre-configured scope.",
2207
+ "type": "string",
2208
+ "const": "notification:allow-show"
2209
+ },
2210
+ {
2211
+ "description": "Denies the batch command without any pre-configured scope.",
2212
+ "type": "string",
2213
+ "const": "notification:deny-batch"
2214
+ },
2215
+ {
2216
+ "description": "Denies the cancel command without any pre-configured scope.",
2217
+ "type": "string",
2218
+ "const": "notification:deny-cancel"
2219
+ },
2220
+ {
2221
+ "description": "Denies the check_permissions command without any pre-configured scope.",
2222
+ "type": "string",
2223
+ "const": "notification:deny-check-permissions"
2224
+ },
2225
+ {
2226
+ "description": "Denies the create_channel command without any pre-configured scope.",
2227
+ "type": "string",
2228
+ "const": "notification:deny-create-channel"
2229
+ },
2230
+ {
2231
+ "description": "Denies the delete_channel command without any pre-configured scope.",
2232
+ "type": "string",
2233
+ "const": "notification:deny-delete-channel"
2234
+ },
2235
+ {
2236
+ "description": "Denies the get_active command without any pre-configured scope.",
2237
+ "type": "string",
2238
+ "const": "notification:deny-get-active"
2239
+ },
2240
+ {
2241
+ "description": "Denies the get_pending command without any pre-configured scope.",
2242
+ "type": "string",
2243
+ "const": "notification:deny-get-pending"
2244
+ },
2245
+ {
2246
+ "description": "Denies the is_permission_granted command without any pre-configured scope.",
2247
+ "type": "string",
2248
+ "const": "notification:deny-is-permission-granted"
2249
+ },
2250
+ {
2251
+ "description": "Denies the list_channels command without any pre-configured scope.",
2252
+ "type": "string",
2253
+ "const": "notification:deny-list-channels"
2254
+ },
2255
+ {
2256
+ "description": "Denies the notify command without any pre-configured scope.",
2257
+ "type": "string",
2258
+ "const": "notification:deny-notify"
2259
+ },
2260
+ {
2261
+ "description": "Denies the permission_state command without any pre-configured scope.",
2262
+ "type": "string",
2263
+ "const": "notification:deny-permission-state"
2264
+ },
2265
+ {
2266
+ "description": "Denies the register_action_types command without any pre-configured scope.",
2267
+ "type": "string",
2268
+ "const": "notification:deny-register-action-types"
2269
+ },
2270
+ {
2271
+ "description": "Denies the register_listener command without any pre-configured scope.",
2272
+ "type": "string",
2273
+ "const": "notification:deny-register-listener"
2274
+ },
2275
+ {
2276
+ "description": "Denies the remove_active command without any pre-configured scope.",
2277
+ "type": "string",
2278
+ "const": "notification:deny-remove-active"
2279
+ },
2280
+ {
2281
+ "description": "Denies the request_permission command without any pre-configured scope.",
2282
+ "type": "string",
2283
+ "const": "notification:deny-request-permission"
2284
+ },
2285
+ {
2286
+ "description": "Denies the show command without any pre-configured scope.",
2287
+ "type": "string",
2288
+ "const": "notification:deny-show"
2289
+ },
2075
2290
  {
2076
2291
  "description": "Enables the cancel command without any pre-configured scope.",
2077
2292
  "type": "string",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -18,6 +18,13 @@ pub struct BinaryDownloadParams {
18
18
  binary: Vec<u8>,
19
19
  }
20
20
 
21
+ #[derive(serde::Deserialize)]
22
+ pub struct NotificationParams {
23
+ title: String,
24
+ body: String,
25
+ icon: String,
26
+ }
27
+
21
28
  #[command]
22
29
  pub async fn download_file(app: AppHandle, params: DownloadFileParams) -> Result<(), String> {
23
30
  let window: WebviewWindow = app.get_webview_window("pake").unwrap();
@@ -71,3 +78,16 @@ pub async fn download_file_by_binary(
71
78
  }
72
79
  }
73
80
  }
81
+
82
+ #[command]
83
+ pub fn send_notification(app: AppHandle, params: NotificationParams) -> Result<(), String> {
84
+ use tauri_plugin_notification::NotificationExt;
85
+ app.notification()
86
+ .builder()
87
+ .title(&params.title)
88
+ .body(&params.body)
89
+ .icon(&params.icon)
90
+ .show()
91
+ .unwrap();
92
+ Ok(())
93
+ }
@@ -1,4 +1,4 @@
1
1
  pub mod config;
2
2
  pub mod invoke;
3
- pub mod menu;
3
+ pub mod setup;
4
4
  pub mod window;