mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-17 15:01:42 +08:00
fix typescript errors
This commit is contained in:
parent
35c15dbbe9
commit
dc7eb9879d
@ -13,7 +13,7 @@ import { PropType } from 'vue';
|
||||
@Component
|
||||
export default class Card extends Vue {
|
||||
@Prop({ type: Object as PropType<Announcement>, required: true })
|
||||
announcement: Announcement;
|
||||
announcement!: Announcement;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -31,7 +31,7 @@ export interface Control {
|
||||
@Component
|
||||
export default class Card extends Vue {
|
||||
@Prop({ type: Array as PropType<Control[]>, required: true })
|
||||
controls: Control[];
|
||||
controls!: Control[];
|
||||
|
||||
isRouterLink(control: Control): Boolean {
|
||||
return control.link.startsWith('/');
|
||||
|
@ -64,13 +64,24 @@ import { Component, Vue } from 'nuxt-property-decorator';
|
||||
import { Context } from '@nuxt/types';
|
||||
import { PaginatedProjectList } from 'hangar-api';
|
||||
|
||||
// TODO move somewhere else
|
||||
interface Category {
|
||||
icon: string;
|
||||
text: string;
|
||||
}
|
||||
|
||||
interface Platform {
|
||||
icon: string;
|
||||
text: string;
|
||||
}
|
||||
|
||||
@Component
|
||||
export default class Home extends Vue {
|
||||
projects?: PaginatedProjectList;
|
||||
totalProjects: Number = 1337;
|
||||
projectFilter: String = null;
|
||||
projectFilter: String | null = null;
|
||||
// TODO get categories from server
|
||||
categories: Array = [
|
||||
categories: Category[] = [
|
||||
{
|
||||
icon: 'mdi-home',
|
||||
text: 'Test',
|
||||
@ -78,7 +89,7 @@ export default class Home extends Vue {
|
||||
];
|
||||
|
||||
// TODO get platforms from server
|
||||
platforms: Array = [
|
||||
platforms: Platform[] = [
|
||||
{
|
||||
icon: 'mdi-home',
|
||||
text: 'Test',
|
||||
|
Loading…
Reference in New Issue
Block a user