pake-cli 0.0.6 → 0.1.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.
@@ -17,11 +17,11 @@ tauri-build = { version = "1.2.1", features = [] }
17
17
  [dependencies]
18
18
  serde_json = "1.0.88"
19
19
  serde = { version = "1.0.147", features = ["derive"] }
20
- tauri = { version = "1.2.1", features = ["api-all"] }
20
+ tauri = { version = "1.2.1", features = [] }
21
21
  image = "0.24.5"
22
22
  tauri-utils = "1.2.1"
23
23
  webbrowser = "0.8.2"
24
- wry = "0.22.5"
24
+ wry = "0.21.1"
25
25
 
26
26
  [features]
27
27
  # by default Tauri runs in production mode
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -157,28 +157,30 @@ fn main() -> wry::Result<()> {
157
157
  };
158
158
 
159
159
  // 用于欺骗部分页面对于浏览器的强检测
160
- let user_agent_string = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15";
160
+
161
+ // #[cfg(target_os = "macos")]
162
+ // let user_agent_string = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15";
161
163
 
162
164
  #[cfg(target_os = "macos")]
163
165
  let webview = WebViewBuilder::new(window)?
164
- .with_user_agent(user_agent_string)
165
- .with_accept_first_mouse(true)
166
+ // .with_user_agent(user_agent_string)
167
+ // .with_accept_first_mouse(true)
166
168
  .with_url(&url.to_string())?
167
169
  .with_devtools(cfg!(feature = "devtools"))
168
170
  .with_initialization_script(include_str!("pake.js"))
169
171
  .with_ipc_handler(handler)
170
- .with_back_forward_navigation_gestures(true)
172
+ // .with_back_forward_navigation_gestures(true)
171
173
  .build()?;
172
174
 
173
175
  #[cfg(target_os = "windows")]
174
176
  let webview = WebViewBuilder::new(window)?
175
- .with_user_agent(user_agent_string)
176
- .with_accept_first_mouse(true)
177
+ // .with_user_agent(user_agent_string)
178
+ // .with_accept_first_mouse(true)
177
179
  .with_url(&url.to_string())?
178
180
  .with_devtools(cfg!(feature = "devtools"))
179
181
  .with_initialization_script(include_str!("pake.js"))
180
182
  .with_ipc_handler(handler)
181
- .with_back_forward_navigation_gestures(true)
183
+ // .with_back_forward_navigation_gestures(true)
182
184
  .build()?;
183
185
  // 自定义cookie文件夹,仅用于Linux
184
186
  // Custom Cookie folder, only for Linux
@@ -193,14 +195,14 @@ fn main() -> wry::Result<()> {
193
195
  let mut web_content = WebContext::new(Some(data_path));
194
196
  #[cfg(target_os = "linux")]
195
197
  let webview = WebViewBuilder::new(window)?
196
- .with_user_agent(user_agent_string)
197
- .with_accept_first_mouse(true)
198
+ // .with_user_agent(user_agent_string)
199
+ // .with_accept_first_mouse(true)
198
200
  .with_url(&url.to_string())?
199
201
  .with_devtools(cfg!(feature = "devtools"))
200
202
  .with_initialization_script(include_str!("pake.js"))
201
203
  .with_ipc_handler(handler)
202
204
  .with_web_context(&mut web_content)
203
- .with_back_forward_navigation_gestures(true)
205
+ // .with_back_forward_navigation_gestures(true)
204
206
  .build()?;
205
207
 
206
208
  #[cfg(feature = "devtools")]
@@ -55,6 +55,14 @@ window.addEventListener("DOMContentLoaded", (_event) => {
55
55
  padding-top: 20px;
56
56
  }
57
57
 
58
+ .lark > .dashboard-sidebar, .lark > .dashboard-sidebar > .sidebar-user-info , .lark > .dashboard-sidebar .index-module_wrapper_F-Wbq{
59
+ padding-top:15px;
60
+ }
61
+
62
+ .lark > .main-wrapper [data-testid="aside"] {
63
+ top: 15px;
64
+ }
65
+
58
66
  .panel.give_me .nav_view {
59
67
  top: 154px !important;
60
68
  }
@@ -92,23 +100,23 @@ window.addEventListener("DOMContentLoaded", (_event) => {
92
100
  margin-top:24px;
93
101
  }
94
102
 
95
- [data-testid="placementTracking"] article,
96
- a[href*="quick_promote_web"],
97
- [data-testid="AppTabBar_Explore_Link"],
98
- a[href*="/lists"][role="link"][aria-label],
99
- a[href="/i/bookmarks"] {
103
+ #react-root [data-testid="placementTracking"] article,
104
+ #react-root a[href*="quick_promote_web"],
105
+ #react-root [data-testid="AppTabBar_Explore_Link"],
106
+ #react-root a[href*="/lists"][role="link"][aria-label],
107
+ #react-root a[href="/i/bookmarks"] {
100
108
  display: none !important;
101
109
  }
102
110
 
103
- [data-testid="DMDrawer"] {
111
+ #react-root [data-testid="DMDrawer"] {
104
112
  visibility: hidden !important;
105
113
  }
106
114
 
107
- [data-testid="primaryColumn"] > div > div {
115
+ #react-root [data-testid="primaryColumn"] > div > div {
108
116
  position: relative !important;
109
117
  }
110
118
 
111
- [data-testid="sidebarColumn"] {
119
+ #react-root [data-testid="sidebarColumn"] {
112
120
  visibility: hidden !important;
113
121
  width: 0 !important;
114
122
  margin: 0 !important;
@@ -117,69 +125,69 @@ window.addEventListener("DOMContentLoaded", (_event) => {
117
125
  }
118
126
 
119
127
  @media only screen and (min-width: 1000px) {
120
- main[role="main"] {
128
+ #react-root main[role="main"] {
121
129
  align-items: center !important;
122
130
  overflow-x: clip !important;
123
131
  }
124
132
 
125
- [data-testid="primaryColumn"] {
133
+ #react-root [data-testid="primaryColumn"] {
126
134
  width: 700px !important;
127
135
  max-width: 700px !important;
128
136
  margin: 0 auto !important;
129
137
  }
130
- [data-testid="primaryColumn"] > div > div:last-child,
131
- [data-testid="primaryColumn"] > div > div:last-child div {
138
+ #react-root [data-testid="primaryColumn"] > div > div:last-child,
139
+ #react-root [data-testid="primaryColumn"] > div > div:last-child div {
132
140
  max-width: unset !important;
133
141
  }
134
142
 
135
- div[aria-label][role="group"][id^="id__"] {
143
+ #react-root div[aria-label][role="group"][id^="id__"] {
136
144
  margin-right: 81px !important;
137
145
  }
138
146
 
139
- header[role="banner"] {
147
+ #react-root header[role="banner"] {
140
148
  position: fixed !important;
141
149
  left: 0 !important;
142
150
  }
143
151
 
144
- header[role="banner"] > div > div > div {
152
+ #react-root header[role="banner"] > div > div > div {
145
153
  justify-content: center !important;
146
154
  padding-top: 0;
147
155
  }
148
156
 
149
- form[role="search"] > div:nth-child(1) > div {
157
+ #react-root form[role="search"] > div:nth-child(1) > div {
150
158
  background-color: transparent !important;
151
159
  }
152
160
 
153
- h1[role="heading"] {
161
+ #react-root h1[role="heading"] {
154
162
  padding-top: 4px !important;
155
163
  }
156
164
 
157
- header[role="banner"]
165
+ #react-root header[role="banner"]
158
166
  nav[role="navigation"]
159
167
  *
160
168
  div[dir="auto"]:not([aria-label])
161
169
  > span,
162
- [data-testid="SideNav_AccountSwitcher_Button"] > div:not(:first-child) {
170
+ #react-root [data-testid="SideNav_AccountSwitcher_Button"] > div:not(:first-child) {
163
171
  display: inline-block !important;
164
172
  opacity: 0 !important;
165
173
  transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
166
174
  }
167
- header[role="banner"]
175
+ #react-root header[role="banner"]
168
176
  nav[role="navigation"]:hover
169
177
  *
170
178
  div[dir="auto"]:not([aria-label])
171
179
  > span,
172
- [data-testid="SideNav_AccountSwitcher_Button"]:hover > div:not(:first-child) {
180
+ #react-root [data-testid="SideNav_AccountSwitcher_Button"]:hover > div:not(:first-child) {
173
181
  opacity: 1 !important;
174
182
  }
175
- header[role="banner"] nav[role="navigation"]:hover > * > div {
183
+ #react-root header[role="banner"] nav[role="navigation"]:hover > * > div {
176
184
  backdrop-filter: blur(12px) !important;
177
185
  }
178
- header[role="banner"] nav[role="navigation"] > a {
186
+ #react-root header[role="banner"] nav[role="navigation"] > a {
179
187
  position: relative;
180
188
  }
181
189
 
182
- header[role="banner"] nav[role="navigation"] > a::before {
190
+ #react-root header[role="banner"] nav[role="navigation"] > a::before {
183
191
  content: "";
184
192
  position: absolute;
185
193
  top: 0px;
@@ -187,61 +195,56 @@ window.addEventListener("DOMContentLoaded", (_event) => {
187
195
  bottom: 0px;
188
196
  left: 0px;
189
197
  }
190
- [data-testid="SideNav_AccountSwitcher_Button"] {
198
+ #react-root [data-testid="SideNav_AccountSwitcher_Button"] {
191
199
  bottom: 18px !important;
192
200
  left: 1px !important;
193
201
  }
194
202
 
195
- [data-testid="SideNav_NewTweet_Button"] {
203
+ #react-root [data-testid="SideNav_NewTweet_Button"] {
196
204
  position: fixed !important;
197
205
  right: 16px !important;
198
206
  bottom: 24px !important;
199
207
  }
200
208
  }
201
209
 
202
- @media only screen and (min-width: 1000px) and (max-width: 1265px) {
203
- body {
204
- padding-left: 88px;
205
- }
206
- }
207
-
208
210
  @media only screen and (min-width: 1265px) {
209
- [data-testid="sidebarColumn"] form[role="search"] {
211
+ #react-root [data-testid="sidebarColumn"] form[role="search"] {
210
212
  visibility: visible !important;
211
213
  position: fixed !important;
212
214
  top: 12px !important;
213
215
  right: 16px !important;
214
216
  }
215
217
 
216
- [data-testid="sidebarColumn"] input[placeholder="Search Twitter"] {
218
+ #react-root [data-testid="sidebarColumn"] input[placeholder="Search Twitter"] {
217
219
  width: 150px;
218
220
  }
219
221
 
220
- [data-testid="sidebarColumn"] form[role="search"]:focus-within {
222
+ #react-root [data-testid="sidebarColumn"] form[role="search"]:focus-within {
221
223
  width: 374px !important;
222
224
  backdrop-filter: blur(12px) !important;
223
225
  }
224
226
 
225
- [data-testid="sidebarColumn"] input[placeholder="Search Twitter"]:focus {
227
+ #react-root [data-testid="sidebarColumn"] input[placeholder="Search Twitter"]:focus {
226
228
  width: 328px !important;
227
229
  }
228
230
 
229
- div[style*="left: -12px"] {
231
+ #react-root div[style*="left: -12px"] {
230
232
  left: unset !important;
231
233
  }
232
- div[style="left: -8px; width: 306px;"] {
234
+
235
+ #react-root div[style="left: -8px; width: 306px;"] {
233
236
  left: unset !important;
234
237
  width: 374px !important;
235
238
  }
236
239
 
237
- .searchFilters {
240
+ #react-root .searchFilters {
238
241
  visibility: visible !important;
239
242
  position: fixed;
240
243
  top: 12px;
241
244
  right: 16px;
242
245
  width: 240px;
243
246
  }
244
- .searchFilters > div > div:first-child {
247
+ #react-root .searchFilters > div > div:first-child {
245
248
  display: none;
246
249
  }
247
250
  }
@@ -295,7 +298,7 @@ window.addEventListener("DOMContentLoaded", (_event) => {
295
298
  }
296
299
  if (/macintosh|mac os x/i.test(navigator.userAgent)) {
297
300
  if (event.metaKey && event.key in metaKeyShortcuts) {
298
- preventDefault(ctrlKeyShortcuts[event.key]);
301
+ preventDefault(metaKeyShortcuts[event.key]);
299
302
  }
300
303
  }
301
304
  });
@@ -14,56 +14,6 @@
14
14
  "resizable": true
15
15
  }
16
16
  ],
17
- "allowlist": {
18
- "all": true
19
- },
20
- "bundle": {
21
- "icon": [
22
- "icons/weread.icns",
23
- "png/weread_256.ico",
24
- "png/weread_32.ico",
25
- "png/weread_512.png"
26
- ],
27
- "identifier": "com.tw93.weread",
28
- "active": true,
29
- "category": "DeveloperTool",
30
- "copyright": "",
31
- "deb": {
32
- "depends": [
33
- "libwebkit2gtk-4.0-dev",
34
- "build-essential",
35
- "curl",
36
- "wget",
37
- "libssl-dev",
38
- "libgtk-3-dev",
39
- "libayatana-appindicator3-dev",
40
- "librsvg2-dev"
41
- ],
42
- "files": {
43
- "/usr/share/applications/com-tw93-weread.desktop": "assets/com-tw93-weread.desktop"
44
- }
45
- },
46
- "externalBin": [],
47
- "longDescription": "",
48
- "macOS": {
49
- "entitlements": null,
50
- "exceptionDomain": "",
51
- "frameworks": [],
52
- "providerShortName": null,
53
- "signingIdentity": null
54
- },
55
- "resources": ["png/weread_32.ico"],
56
- "shortDescription": "",
57
- "targets": ["deb", "msi", "dmg"],
58
- "windows": {
59
- "certificateThumbprint": null,
60
- "digestAlgorithm": "sha256",
61
- "timestampUrl": "",
62
- "wix": {
63
- "language": ["en-US", "zh-CN"]
64
- }
65
- }
66
- },
67
17
  "security": {
68
18
  "csp": null
69
19
  },
@@ -0,0 +1,30 @@
1
+ {
2
+ "package": {
3
+ "productName": "WeRead",
4
+ "version": "1.0.0"
5
+ },
6
+ "tauri": {
7
+ "windows": [
8
+ {
9
+ "url": "https://weread.qq.com/",
10
+ "transparent": true,
11
+ "fullscreen": false,
12
+ "width": 1200,
13
+ "height": 728,
14
+ "resizable": true
15
+ }
16
+ ],
17
+ "security": {
18
+ "csp": null
19
+ },
20
+ "updater": {
21
+ "active": false
22
+ }
23
+ },
24
+ "build": {
25
+ "devPath": "../dist",
26
+ "distDir": "../dist",
27
+ "beforeBuildCommand": "",
28
+ "beforeDevCommand": ""
29
+ }
30
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "tauri": {
3
+ "bundle": {
4
+ "icon": [
5
+ "png/weread_256.ico",
6
+ "png/weread_512.png"
7
+ ],
8
+ "identifier": "com.tw93.weread",
9
+ "active": true,
10
+ "category": "DeveloperTool",
11
+ "copyright": "",
12
+ "deb": {
13
+ "depends": [
14
+ "libwebkit2gtk-4.0-dev",
15
+ "build-essential",
16
+ "curl",
17
+ "wget",
18
+ "libssl-dev",
19
+ "libgtk-3-dev",
20
+ "libayatana-appindicator3-dev",
21
+ "librsvg2-dev"
22
+ ],
23
+ "files": {
24
+ "/usr/share/applications/com-tw93-weread.desktop": "assets/com-tw93-weread.desktop"
25
+ }
26
+ },
27
+ "externalBin": [],
28
+ "longDescription": "",
29
+ "resources": [],
30
+ "shortDescription": "",
31
+ "targets": ["deb"]
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "tauri": {
3
+ "bundle": {
4
+ "icon": [
5
+ "icons/weread.icns"
6
+ ],
7
+ "identifier": "com.tw93.weread",
8
+ "active": true,
9
+ "category": "DeveloperTool",
10
+ "copyright": "",
11
+ "externalBin": [],
12
+ "longDescription": "",
13
+ "macOS": {
14
+ "entitlements": null,
15
+ "exceptionDomain": "",
16
+ "frameworks": [],
17
+ "providerShortName": null,
18
+ "signingIdentity": null
19
+ },
20
+ "resources": [],
21
+ "shortDescription": "",
22
+ "targets": ["dmg"]
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "tauri": {
3
+ "bundle": {
4
+ "icon": [
5
+ "png/weread_256.ico",
6
+ "png/weread_32.ico"
7
+ ],
8
+ "identifier": "com.tw93.weread",
9
+ "active": true,
10
+ "category": "DeveloperTool",
11
+ "copyright": "",
12
+ "externalBin": [],
13
+ "longDescription": "",
14
+ "resources": ["png/weread_32.ico"],
15
+ "shortDescription": "",
16
+ "targets": ["msi"],
17
+ "windows": {
18
+ "certificateThumbprint": null,
19
+ "digestAlgorithm": "sha256",
20
+ "timestampUrl": "",
21
+ "wix": {
22
+ "language": ["en-US"]
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
Binary file
Binary file
Binary file
Binary file