diff --git a/web/src/RouteDefinitions.ts b/web/src/RouteDefinitions.ts index b877023f7..6702edfe5 100644 --- a/web/src/RouteDefinitions.ts +++ b/web/src/RouteDefinitions.ts @@ -42,6 +42,7 @@ export interface SCMRoutes { }) => string toSCMRepositoryCommits: ({ repoPath, commitRef }: { repoPath: string; commitRef: string }) => string toSCMRepositoryBranches: ({ repoPath, branch }: { repoPath: string; branch?: string }) => string + toSCMRepositorySettings: ({ repoPath }: { repoPath: string }) => string } export const routes: SCMRoutes = { @@ -52,5 +53,6 @@ export const routes: SCMRoutes = { `/${repoPath}/${gitRef ? '/' + gitRef : ''}${resourcePath ? '/~/' + resourcePath : ''}`, toSCMRepositoryFileEdit: ({ repoPath, gitRef, resourcePath }) => `/${repoPath}/edit/${gitRef}/~/${resourcePath}`, toSCMRepositoryCommits: ({ repoPath, commitRef }) => `/${repoPath}/commits/${commitRef}`, - toSCMRepositoryBranches: ({ repoPath, branch }) => `/${repoPath}/branches/${branch ? '/' + branch : ''}` + toSCMRepositoryBranches: ({ repoPath, branch }) => `/${repoPath}/branches/${branch ? '/' + branch : ''}`, + toSCMRepositorySettings: ({ repoPath }) => `/${repoPath}/settings` } diff --git a/web/src/framework/strings/stringTypes.ts b/web/src/framework/strings/stringTypes.ts index 496fb6f0d..8a84b1cc4 100644 --- a/web/src/framework/strings/stringTypes.ts +++ b/web/src/framework/strings/stringTypes.ts @@ -78,6 +78,7 @@ export interface StringsMap { newRepo: string next: string noAccount: string + noWebHooks: string none: string ok: string onDate: string diff --git a/web/src/i18n/strings.en.yaml b/web/src/i18n/strings.en.yaml index 0640c9404..e0527fe03 100644 --- a/web/src/i18n/strings.en.yaml +++ b/web/src/i18n/strings.en.yaml @@ -112,3 +112,4 @@ branchUpToDate: Up to date with {{defaultBranch}} branchDivergenceBehind: '{{behind}} commit(s) behind {{defaultBranch}}' branchDivergenceAhead: '{{ahead}} commit(s) ahead {{defaultBranch}}' branchDivergenceAheadBehind: '{{ahead}} commit(s) ahead, {{behind}} commit(s) behind {{defaultBranch}}' +noWebHooks: 'Here is no Webhook. Try to' diff --git a/web/src/pages/RepositorySettings/RepositorySettings.tsx b/web/src/pages/RepositorySettings/RepositorySettings.tsx index 5351b330e..58be07cd3 100644 --- a/web/src/pages/RepositorySettings/RepositorySettings.tsx +++ b/web/src/pages/RepositorySettings/RepositorySettings.tsx @@ -1,15 +1,36 @@ import React from 'react' -import { Container, PageBody } from '@harness/uicore' +import { PageBody, Button, Intent, Container, PageHeader } from '@harness/uicore' import { useGetRepositoryMetadata } from 'hooks/useGetRepositoryMetadata' +import { useStrings } from 'framework/strings' + +import { RepositorySettingsHeader } from './RepositorySettingsHeader/RepositorySettingsHeader' + +import emptyStateImage from './empty-state.svg' import css from './RepositorySettings.module.scss' -export default function RepositoryBranches() { +export default function RepositorySettings() { const { repoMetadata, error, loading } = useGetRepositoryMetadata() - + const NewWebHookButton =