add isNew to template workspace
This commit is contained in:
@@ -13,6 +13,8 @@ export class UmbTemplateWorkspaceContext {
|
||||
name = createObservablePart(this.#data, (data) => data?.name);
|
||||
content = createObservablePart(this.#data, (data) => data?.content);
|
||||
|
||||
isNew = false;
|
||||
|
||||
constructor(host: UmbControllerHostInterface) {
|
||||
this.#host = host;
|
||||
this.#templateDetailRepo = new UmbTemplateDetailRepository(this.#host);
|
||||
@@ -39,6 +41,7 @@ export class UmbTemplateWorkspaceContext {
|
||||
}
|
||||
|
||||
async createScaffold(parentKey: string | null) {
|
||||
this.isNew = true;
|
||||
const { data } = await this.#templateDetailRepo.createScaffold(parentKey);
|
||||
if (!data) return;
|
||||
this.#data.next(data);
|
||||
|
||||
Reference in New Issue
Block a user