Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: frontend: speedtest: InternetSpeedTest: Fix widget not showing #3146

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions core/frontend/src/components/speedtest/InternetSpeedTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
width="100%"
absolute
opacity="0.92"
:value="helper.has_internet === InternetConnectionState.OFFLINE"
:value="internet_offline"
>
Waiting for internet connection..
</v-overlay>
Expand Down Expand Up @@ -127,13 +127,12 @@
import Vue from 'vue'

import helper from '@/store/helper'
import { SpeedTestResult } from '@/types/helper'
import { InternetConnectionState, SpeedTestResult } from '@/types/helper'

export default Vue.extend({
name: 'InternetSpeedTest',
data() {
return {
helper,
result: undefined as SpeedTestResult | undefined,
started: false,
message: undefined as string | undefined,
Expand Down Expand Up @@ -171,6 +170,9 @@ export default Vue.extend({
latency_ms(): number | undefined {
return this.result?.ping
},
internet_offline(): boolean {
return helper.has_internet === InternetConnectionState.OFFLINE
},
},
async mounted() {
this.result = await helper.checkPreviousInternetTestResult() ?? undefined
Expand Down
Loading