mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-12-03 06:22:35 +08:00
remove unnecessary props
This commit is contained in:
parent
37a10677ae
commit
ecae457660
@ -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 };
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user