Skip to content

Commit

Permalink
🔖 0.14.1-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Jun 3, 2024
1 parent d6399a9 commit 7cfeb5c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"url": "https://github.com/bepass-org/oblivion-desktop/issues",
"email": "[email protected]"
},
"version": "0.14.0_beta",
"version": "0.14.1-beta",
"license": "Restrictive",
"main": "./src/main/main.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "oblivion-desktop",
"description": "unofficial desktop version of oblivion",
"version": "0.14.0_beta",
"version": "0.14.1-beta",
"homepage": "https://github.com/bepass-org/oblivion-desktop#readme",
"license": "Restrictive",
"author": "ircfspace+kiomarzsss <[email protected]> (https://ircf.space/)",
Expand Down
55 changes: 27 additions & 28 deletions src/renderer/pages/Landing/useLanding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,31 +117,6 @@ const useLanding = () => {
};
}, []);

useEffect(() => {
ipcRenderer.on('wp-start', (ok) => {
if (ok) {
setIsLoading(false);
setIsConnected(true);
if (proxyStatus && proxyStatus !== '') {
ipcRenderer.sendMessage('tray-icon', `connected-${proxyStatus}`);
}
}
});

ipcRenderer.on('wp-end', (ok) => {
if (ok) {
setIsConnected(false);
setIsLoading(false);
setIpInfo({
countryCode: false,
ip: ''
});
ipcRenderer.sendMessage('tray-icon', 'disconnected');
setStatusText(`${appLang?.status?.disconnected}`);
}
});
}, [isConnected, isLoading, ipInfo, proxyStatus]);

useEffect(() => {
if (online) {
toast.remove('ONLINE_STATUS');
Expand Down Expand Up @@ -279,14 +254,38 @@ const useLanding = () => {
if (proxyStatus !== 'none') {
setStatusText(`${appLang?.status?.ip_check}`);
} else {
setStatusText(`${appLang?.status?.connecting}`);
setStatusText(`${appLang?.status?.connected}`);
}
} else if (isConnected && !ipData) {
setStatusText(`${appLang?.status?.connected}`);
} else {
setStatusText(`${appLang?.status?.disconnected}`);
}
}, [isLoading, isConnected, ipInfo, ipData]);

ipcRenderer.on('wp-start', (ok) => {
if (ok) {
setIsLoading(false);
setIsConnected(true);
if (proxyStatus !== '') {
ipcRenderer.sendMessage('tray-icon', `connected-${proxyStatus}`);
}
}
});

ipcRenderer.on('wp-end', (ok) => {
if (ok) {
setIsConnected(false);
setIsLoading(false);
setIpInfo({
countryCode: false,
ip: ''
});
if (proxyStatus !== '') {
ipcRenderer.sendMessage('tray-icon', 'disconnected');
}
}
});
}, [isLoading, isConnected, ipInfo, ipData, proxyStatus]);

const onChange = useCallback(() => {
if (!online) {
Expand All @@ -308,7 +307,7 @@ const useLanding = () => {
setPing(0);
}
}
}, [online, isLoading, isConnected, setIsLoading]);
}, [online, isLoading, isConnected, setIsLoading, proxyMode]);

const handleMenuOnKeyDown = useCallback((event: KeyboardEvent<HTMLDivElement>) => {
if (event.key === 'Enter') {
Expand Down

0 comments on commit 7cfeb5c

Please sign in to comment.