diff --git a/backend/src/models/serviceTokenV3.ts b/backend/src/models/serviceTokenV3.ts new file mode 100644 index 000000000..695b3f894 --- /dev/null +++ b/backend/src/models/serviceTokenV3.ts @@ -0,0 +1,28 @@ +import { Document, Schema, Types, model } from "mongoose"; + +export interface IServiceTokenV3 extends Document { + _id: Types.ObjectId; + name: string; + workspace: Types.ObjectId; + publicKey: string; +} + +const serviceTokenV3Schema = new Schema( + { + name: { + type: String, + required: true + }, + workspace: { + type: Schema.Types.ObjectId, + ref: "Workspace", + required: true + }, + publicKey: { + type: String, + required: true + } + } +); + +export const ServiceTokenV3 = model("ServiceTokenV3", serviceTokenV3Schema); \ No newline at end of file diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectServiceTokensTab/ProjectServiceTokensTab.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectServiceTokensTab/ProjectServiceTokensTab.tsx index cfa325b41..12312dc78 100644 --- a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectServiceTokensTab/ProjectServiceTokensTab.tsx +++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectServiceTokensTab/ProjectServiceTokensTab.tsx @@ -1,7 +1,11 @@ import { ServiceTokenSection } from "../ServiceTokenSection"; +import { ServiceTokenV3Section } from "../ServiceTokenV3Section"; export const ProjectServiceTokensTab = () => { return ( - + <> + + + ); } \ No newline at end of file diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/AddServiceTokenV3Modal.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/AddServiceTokenV3Modal.tsx new file mode 100644 index 000000000..6fd6ce0d2 --- /dev/null +++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/AddServiceTokenV3Modal.tsx @@ -0,0 +1,7 @@ +export const AddServiceTokenV3Modal = () => { + return ( +
+ AddServiceTokenV3Modal +
+ ); +} \ No newline at end of file diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/ServiceTokenV3Section.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/ServiceTokenV3Section.tsx new file mode 100644 index 000000000..4d8250fd3 --- /dev/null +++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/ServiceTokenV3Section.tsx @@ -0,0 +1,14 @@ +import { AddServiceTokenV3Modal } from "./AddServiceTokenV3Modal"; +import { ServiceTokenV3Table } from "./ServiceTokenV3Table"; + +export const ServiceTokenV3Section = () => { + return ( +
+

+ Service Tokens 2.0 +

+ + +
+ ); +} \ No newline at end of file diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/ServiceTokenV3Table.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/ServiceTokenV3Table.tsx new file mode 100644 index 000000000..77b2b8fac --- /dev/null +++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/ServiceTokenV3Table.tsx @@ -0,0 +1,7 @@ +export const ServiceTokenV3Table = () => { + return ( +
+ ServiceTokenV3Table +
+ ); +} \ No newline at end of file diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/index.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/index.tsx new file mode 100644 index 000000000..b6abc117c --- /dev/null +++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/index.tsx @@ -0,0 +1 @@ +export { ServiceTokenV3Section } from "./ServiceTokenV3Section"; \ No newline at end of file