src: add custom repositories import feature
This allows sharing blueprints cross organizations even with custom repositories.
This commit is contained in:
parent
2bee0ef49b
commit
e805c65f81
5 changed files with 158 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { PayloadAction, createSlice } from '@reduxjs/toolkit';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import type { ApiRepositoryResponseRead } from './contentSourcesApi';
|
||||
import type { ApiRepositoryImportResponseRead, ApiRepositoryRequest, ApiRepositoryResponseRead } from './contentSourcesApi';
|
||||
import type {
|
||||
CustomRepository,
|
||||
Distributions,
|
||||
|
|
@ -665,6 +665,15 @@ export const wizardSlice = createSlice({
|
|||
changeSnapshotDate: (state, action: PayloadAction<string>) => {
|
||||
state.snapshotting.snapshotDate = action.payload;
|
||||
},
|
||||
importCustomRepositories: (
|
||||
state,
|
||||
action: PayloadAction<CustomRepository[]>
|
||||
) => {
|
||||
state.repositories.customRepositories = [
|
||||
...state.repositories.customRepositories,
|
||||
...action.payload
|
||||
]
|
||||
},
|
||||
changeCustomRepositories: (
|
||||
state,
|
||||
action: PayloadAction<CustomRepository[]>
|
||||
|
|
@ -867,6 +876,7 @@ export const {
|
|||
changeUseLatest,
|
||||
changeSnapshotDate,
|
||||
changeCustomRepositories,
|
||||
importCustomRepositories,
|
||||
changePayloadRepositories,
|
||||
addRecommendedRepository,
|
||||
removeRecommendedRepository,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue