Skip to content

Commit

Permalink
Nvus (#25)
Browse files Browse the repository at this point in the history
* add ci

* add github yml

* update ci

* update ci

* update error ci

* update

* resolver issue #6

* ci

* udpate ci

* update ci

* a

* add github integration and update mknote

* update

* update code
  • Loading branch information
srnovus authored Oct 31, 2024
1 parent 18af9ef commit c05d5de
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/backend/src/server/api/endpoints/admin/update-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,18 @@ export default define(meta, paramDef, async (ps, me) => {
set.summalyProxy = ps.summalyProxy;
}


if (ps.enableGithubIntegration !== undefined) {
set.enableGithubIntegration = ps.enableGithubIntegration;
}

if (ps.githubClientId !== undefined) {
set.githubClientId = ps.githubClientId;
}

if (ps.githubClientSecret !== undefined) {
set.githubClientSecret = ps.githubClientSecret;
}
if (ps.enableEmail !== undefined) {
set.enableEmail = ps.enableEmail;
}
Expand Down
52 changes: 52 additions & 0 deletions packages/client/src/pages/admin/integrations.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<template>
<MkStickyContainer>
<template #header
><MkPageHeader
:actions="headerActions"
:tabs="headerTabs"
:display-back-button="true"
/></template>
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init">
<FormFolder class="_formBlock">
<template #icon
><i class="ph-github-logo ph-bold ph-lg"></i
></template>
<template #label>GitHub</template>
<template #suffix>{{
enableGithubIntegration
? i18n.ts.enabled
: i18n.ts.disabled
}}</template>
<XGithub />
</FormFolder>
</FormSuspense>
</MkSpacer>
</MkStickyContainer>
</template>

<script lang="ts" setup>
import {} from "vue";
import XGithub from "./integrations.github.vue";
import FormSuspense from "@/components/form/suspense.vue";
import FormFolder from "@/components/form/folder.vue";
import * as os from "@/os";
import { i18n } from "@/i18n";
import { definePageMetadata } from "@/scripts/page-metadata";
let enableGithubIntegration: boolean = $ref(false);
async function init() {
const meta = await os.api("admin/meta");
enableGithubIntegration = meta.enableGithubIntegration;
}
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.integration,
icon: "ph-plug ph-bold ph-lg",
});
</script>

0 comments on commit c05d5de

Please sign in to comment.