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

View File

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