remove unnecessary props

This commit is contained in:
MiniDigger 2021-03-14 12:07:48 +01:00
parent 37a10677ae
commit ecae457660
2 changed files with 4 additions and 12 deletions

View File

@ -107,9 +107,8 @@
<script lang="ts">
import { Component } from 'nuxt-property-decorator';
import { HangarProject, ProjectPage } from 'hangar-internal';
import { ProjectPage } from 'hangar-internal';
import { Context } from '@nuxt/types';
import { Prop } from 'vue-property-decorator';
import MarkdownEditor from '~/components/MarkdownEditor.vue';
import Tag from '~/components/Tag.vue';
import DonationModal from '~/components/donation/DonationModal.vue';
@ -123,9 +122,6 @@ import ProjectPageList from '~/components/projects/ProjectPageList.vue';
components: { ProjectPageList, NewPageModal, Markdown, MemberList, DonationModal, MarkdownEditor, Tag },
})
export default class DocsPage extends DocPageMixin {
@Prop()
project!: HangarProject;
async asyncData({ $api, params, $util }: Context) {
const page = await $api.requestInternal<ProjectPage>(`pages/page/${params.author}/${params.slug}`, false).catch<any>($util.handlePageRequestError);
return { page };

View File

@ -204,19 +204,18 @@
</template>
<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator';
import { HangarProject } from 'hangar-internal';
import { Prop } from 'vue-property-decorator';
import { Component } from 'nuxt-property-decorator';
import { ProjectPermission } from '~/utils/perms';
import { NamedPermission, ProjectCategory } from '~/types/enums';
import { RootState } from '~/store';
import MemberList from '~/components/MemberList.vue';
import UserSelectionForm from '~/components/UserSelectionForm.vue';
import { HangarProjectMixin } from '~/components/mixins';
@Component({
components: { UserSelectionForm, MemberList },
})
@ProjectPermission(NamedPermission.EDIT_SUBJECT_SETTINGS)
export default class ProjectManagePage extends Vue {
export default class ProjectManagePage extends HangarProjectMixin {
apiKey = '';
newName = '';
form = {
@ -236,9 +235,6 @@ export default class ProjectManagePage extends Vue {
category: ProjectCategory.UNDEFINED,
};
@Prop()
project!: HangarProject;
get categoryIcon() {
return (this.$store.state as RootState).projectCategories.get(this.form.category)?.icon;
}