🐛 Fix Chinese input method Enter
This commit is contained in:
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -3494,7 +3494,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-window-state"
|
name = "tauri-plugin-window-state"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=dev#dce0f02bc571128308c30278cde3233f341e6a50"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#0863f800b81925884a6a37c042f3d92d433d4a37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"bitflags 2.3.3",
|
"bitflags 2.3.3",
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ tauri-build = { version = "1.4.0", features = [] }
|
|||||||
serde_json = "1.0.96"
|
serde_json = "1.0.96"
|
||||||
serde = { version = "1.0.163", features = ["derive"] }
|
serde = { version = "1.0.163", features = ["derive"] }
|
||||||
tauri = { version = "1.4.1", features = ["api-all", "system-tray"] }
|
tauri = { version = "1.4.1", features = ["api-all", "system-tray"] }
|
||||||
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
|
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cargo-bloat = "0.11.1"
|
cargo-bloat = "0.11.1"
|
||||||
|
|||||||
BIN
src-tauri/icons/wechat.icns
Normal file
BIN
src-tauri/icons/wechat.icns
Normal file
Binary file not shown.
31
src-tauri/src/inject/component.js
vendored
31
src-tauri/src/inject/component.js
vendored
@@ -146,35 +146,4 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
|
|
||||||
window.pakeToast = pakeToast;
|
window.pakeToast = pakeToast;
|
||||||
|
|
||||||
// chatgpt supports unlimited times of GPT4-Mobile
|
|
||||||
if (window.location.hostname === 'chat.openai.com') {
|
|
||||||
const originFetch = fetch;
|
|
||||||
window.fetch = (url, options) => {
|
|
||||||
return originFetch(url, options).then(async response => {
|
|
||||||
if (url.indexOf('/backend-api/models') === -1) {
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
const responseClone = response.clone();
|
|
||||||
let res = await responseClone.json();
|
|
||||||
res.models = res.models.map(m => {
|
|
||||||
m.tags = m.tags.filter(t => {
|
|
||||||
return t !== 'mobile';
|
|
||||||
});
|
|
||||||
if (m.slug === 'gpt-4-mobile') {
|
|
||||||
res.categories.push({
|
|
||||||
browsing_model: null,
|
|
||||||
category: 'gpt_4',
|
|
||||||
code_interpreter_model: null,
|
|
||||||
default_model: 'gpt-4-mobile',
|
|
||||||
human_category_name: 'GPT-4-Mobile',
|
|
||||||
plugins_model: null,
|
|
||||||
subscription_level: 'plus',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return m;
|
|
||||||
});
|
|
||||||
return new Response(JSON.stringify(res), response);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|||||||
6
src-tauri/src/inject/event.js
vendored
6
src-tauri/src/inject/event.js
vendored
@@ -163,6 +163,12 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix Chinese input method "Enter" on Safari
|
||||||
|
document.addEventListener('keydown', (e) => {
|
||||||
|
if (e.keyCode === 229) e.stopPropagation();
|
||||||
|
}, true);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function setDefaultZoom() {
|
function setDefaultZoom() {
|
||||||
|
|||||||
Reference in New Issue
Block a user