Skip to content

Commit

Permalink
Add loading state to the Proxy tab
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihildt committed Dec 5, 2023
1 parent 01f73c4 commit 1abf863
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/ProxyStatus/ProxyDisconnectMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import useSocksProxy from '@/composables/useSocksProxy';
const { disableGlobalProxy } = useSocksProxy();
</script>

<template>
<p>The connection is set to use a proxy server.</p>
<p>If you can't load any pages, disconnect the proxy to access the internet directly.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/popup/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ConnectionDetails from '@/components/ConnectionDetails/ConnectionDetails.
import { ConnectionKey, defaultConnection } from '@/composables/useConnection';
const { isLoading } = inject(ConnectionKey) || defaultConnection;
const { isLoading } = inject(ConnectionKey, defaultConnection);
</script>

<template>
Expand Down
6 changes: 4 additions & 2 deletions src/popup/views/Proxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import ProxyGlobal from '@/components/ProxyStatus/ProxyGlobal.vue';
import ProxyHost from '@/components/ProxyStatus/ProxyHost.vue';
import { ConnectionKey, defaultConnection } from '@/composables/useConnection';
const { connection } = inject(ConnectionKey) || defaultConnection;
const { connection, isLoading } = inject(ConnectionKey, defaultConnection);
</script>

<template>
<div v-if="connection.isMullvad">
<IconLabel v-if="isLoading" text="Checking connection" type="spinner" />

<div v-else-if="connection.isMullvad">
<ProxyGlobal />
<ProxyHost />
</div>
Expand Down

0 comments on commit 1abf863

Please sign in to comment.