pake-cli 1.2.9 โ†’ 1.3.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.
package/README.md CHANGED
@@ -99,20 +99,20 @@
99
99
  <a href="https://github.com/tw93/Pake/releases/latest/download/Flomo_x64.msi">Windows</a>
100
100
  <a href="https://github.com/tw93/Pake/releases/latest/download/Flomo_x86_64.deb">Linux</a>
101
101
  </td>
102
- <td>Qwerty
103
- <a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty.dmg">Mac</a>
104
- <a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_x64.msi">Windows</a>
105
- <a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_x86_64.deb">Linux</a>
102
+ <td>Loop
103
+ <a href="https://github.com/tw93/Pake/releases/latest/download/Loop.dmg">Mac</a>
104
+ <a href="https://github.com/tw93/Pake/releases/latest/download/Loop_x64.msi">Windows</a>
105
+ <a href="https://github.com/tw93/Pake/releases/latest/download/Loop_x86_64.deb">Linux</a>
106
106
  </td>
107
107
  </tr>
108
108
  <tr>
109
109
  <td><img src=https://gw.alipayobjects.com/zos/k/30/RoUSUf.png width=600/></td>
110
- <td><img src=https://cdn.fliggy.com/upic/CJjagn.jpg width=600/></td>
110
+ <td><img src=https://cdn.fliggy.com/upic/ajRw5F.png width=600/></td>
111
111
  </tr>
112
112
  </table>
113
113
 
114
114
  <details>
115
- <summary>๐Ÿ‚ You can download more applications (such as YuQue / Reference) from <a href="https://github.com/tw93/Pake/releases">Releases</a>. <b>Click here to expand the shortcuts reference!</b></summary>
115
+ <summary>๐Ÿ‚ You can download more applications (such as YuQue / Reference / Qwerty) from <a href="https://github.com/tw93/Pake/releases">Releases</a>. <b>Click here to expand the shortcuts reference!</b></summary>
116
116
 
117
117
  <br/>
118
118
 
package/dist/cli.js CHANGED
@@ -1659,6 +1659,7 @@ function mergeTauriConfig(url, options, tauriConf) {
1659
1659
  .then(() => true)
1660
1660
  .catch(() => false);
1661
1661
  if (process.platform === "linux") {
1662
+ delete tauriConf.tauri.bundle.deb.files;
1662
1663
  if (["all", "deb", "appimage"].includes(options.targets)) {
1663
1664
  tauriConf.tauri.bundle.targets = [options.targets];
1664
1665
  }
@@ -1681,7 +1682,6 @@ function mergeTauriConfig(url, options, tauriConf) {
1681
1682
  }
1682
1683
  }
1683
1684
  if (process.platform === "linux") {
1684
- delete tauriConf.tauri.bundle.deb.files;
1685
1685
  if (customIconExt != ".png") {
1686
1686
  updateIconPath = false;
1687
1687
  logger.warn(`icon file in Linux must be 512 * 512 pix with .png type, but you give ${customIconExt}`);
@@ -1700,6 +1700,21 @@ function mergeTauriConfig(url, options, tauriConf) {
1700
1700
  }
1701
1701
  else {
1702
1702
  logger.warn("the custom icon path may not exists. we will use default icon to replace it");
1703
+ switch (process.platform) {
1704
+ case "win32": {
1705
+ tauriConf.tauri.bundle.resources = ['png/icon_32.ico'];
1706
+ tauriConf.tauri.bundle.icon = ['png/icon_32.ico', 'png/icon_256.ico'];
1707
+ break;
1708
+ }
1709
+ case "darwin": {
1710
+ tauriConf.tauri.bundle.icon = ['icons/icon.icns'];
1711
+ break;
1712
+ }
1713
+ case "linux": {
1714
+ tauriConf.tauri.bundle.icon = ['png/icon_512.png'];
1715
+ break;
1716
+ }
1717
+ }
1703
1718
  }
1704
1719
  let configPath = "";
1705
1720
  switch (process.platform) {
@@ -2183,7 +2198,7 @@ class BuilderFactory {
2183
2198
  }
2184
2199
 
2185
2200
  var name = "pake-cli";
2186
- var version = "1.2.9";
2201
+ var version = "1.3.1";
2187
2202
  var description = "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with Rust. ๐Ÿคฑ๐Ÿป ๅพˆ็ฎ€ๅ•็š„็”จ Rust ๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆๅพˆๅฐ็š„ๆกŒ้ข Appใ€‚";
2188
2203
  var engines = {
2189
2204
  node: ">=16.0.0"
@@ -2282,7 +2297,7 @@ var packageJson = {
2282
2297
 
2283
2298
  function checkUpdateTips() {
2284
2299
  return __awaiter(this, void 0, void 0, function* () {
2285
- updateNotifier({ pkg: packageJson }).notify();
2300
+ updateNotifier({ pkg: packageJson }).notify({ isGlobal: true });
2286
2301
  });
2287
2302
  }
2288
2303
 
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <style>
4
+ html,
5
+ body {
6
+ margin: 0;
7
+ padding: 0;
8
+ width: 100%;
9
+ height: 100%;
10
+ }
11
+
12
+ body {
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ }
17
+ </style>
18
+ <body>
19
+ <h1>Loading...</h1>
20
+ <script type="text/javascript" src="script.js"></script>
21
+ </body>
22
+ </html>
package/dist/script.js ADDED
@@ -0,0 +1,7 @@
1
+ // Copyright (c) 2022 Eray Erdin
2
+ //
3
+ // This Source Code Form is subject to the terms of the Mozilla Public
4
+ // License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+
7
+ location.replace('https://web.whatsapp.com');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "1.2.9",
3
+ "version": "1.3.1",
4
4
  "description": "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with Rust. ๐Ÿคฑ๐Ÿป ๅพˆ็ฎ€ๅ•็š„็”จ Rust ๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆๅพˆๅฐ็š„ๆกŒ้ข Appใ€‚",
5
5
  "engines": {
6
6
  "node": ">=16.0.0"
Binary file
Binary file
Binary file
Binary file
@@ -1,6 +1,9 @@
1
1
  // at the top of main.rs - that will prevent the console from showing
2
2
  #![windows_subsystem = "windows"]
3
3
  extern crate image;
4
+
5
+ use dirs::download_dir;
6
+ use std::path::PathBuf;
4
7
  use tauri_utils::config::{Config, WindowConfig};
5
8
  use wry::{
6
9
  application::{
@@ -26,9 +29,6 @@ use wry::application::window::Icon;
26
29
  #[cfg(any(target_os = "linux", target_os = "windows"))]
27
30
  use wry::webview::WebContext;
28
31
 
29
- use dirs::desktop_dir;
30
- use std::path::PathBuf;
31
-
32
32
  enum UserEvent {
33
33
  DownloadStarted(String, String),
34
34
  DownloadComplete(Option<PathBuf>, bool),
@@ -147,7 +147,7 @@ fn main() -> wry::Result<()> {
147
147
  let download_started = {
148
148
  let proxy = proxy.clone();
149
149
  move |uri: String, default_path: &mut PathBuf| {
150
- let path = desktop_dir()
150
+ let path = download_dir()
151
151
  .unwrap()
152
152
  .join(default_path.display().to_string())
153
153
  .as_path()
@@ -243,7 +243,8 @@ fn main() -> wry::Result<()> {
243
243
  Event::UserEvent(UserEvent::DownloadComplete(_, success)) => {
244
244
  println!("Succeeded: {success}");
245
245
  if success {
246
- let _ = webview.evaluate_script("window.pakeToast('Downloaded to Desktop~')");
246
+ let _ = webview
247
+ .evaluate_script("window.pakeToast('Downloaded to download folder~')");
247
248
  } else {
248
249
  println!("No output path")
249
250
  }
@@ -67,6 +67,10 @@ window.addEventListener("DOMContentLoaded", (_event) => {
67
67
  padding-top: 20px;
68
68
  }
69
69
 
70
+ .fui-FluentProvider .fui-Button[data-testid="HomeButton"]{
71
+ padding-top: 20px;
72
+ }
73
+
70
74
  .chakra-ui-light #app .chakra-heading,
71
75
  .chakra-ui-dark #app .chakra-heading,
72
76
  .chakra-ui-light #app .chakra-stack,