-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Loading.ts
31 lines (27 loc) · 877 Bytes
/
Loading.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import Component from 'vue-class-component';
import Vue from 'vue';
import { LoadingProgress } from '@casual-simulation/aux-common/LoadingProgress';
import { appManager, AppType } from '../../../shared/AppManager';
import { hasValue } from '@casual-simulation/aux-common';
import { Prop } from 'vue-property-decorator';
import Tagline from '../Tagline/Tagline';
@Component({
components: {
tagline: Tagline,
},
})
export default class Loading extends Vue {
@Prop({ default: '' }) status: string;
@Prop({ default: 0 }) progress: number;
@Prop({ default: null }) error: string;
@Prop({ default: false }) show: boolean;
get hasError(): boolean {
return hasValue(this.error);
}
get isPlayer(): boolean {
return appManager.appType === AppType.Player;
}
onErrorDismiss() {
this.$emit('dismiss');
}
}