From a445cdde04bae56f27e3044bab9b789ffcce0836 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 26 Jul 2024 21:48:02 +0200 Subject: [PATCH] =?UTF-8?q?Add=20some=20advanced=20delete=20options=20to?= =?UTF-8?q?=20hackerspaces=20(namely=20'repair=20caf=C3=A9'=20and=20'cowor?= =?UTF-8?q?king')=20as=20the=20hackerspace=20tag=20has=20been=20widely=20a?= =?UTF-8?q?bused=20for=20this=20type=20of=20amenity.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/layers/hackerspace/hackerspace.json | 30 ++++++++++++++++++- .../ThemeConfig/Json/DeleteConfigJson.ts | 3 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/assets/layers/hackerspace/hackerspace.json b/assets/layers/hackerspace/hackerspace.json index 2a866c4f1..69bf6bc64 100644 --- a/assets/layers/hackerspace/hackerspace.json +++ b/assets/layers/hackerspace/hackerspace.json @@ -513,6 +513,34 @@ "internet-all", "questions" ], - "deletion": true, + "deletion": { + "nonDeleteMappings": [ + { + "if": { + "and": [ + "leisure=", + "hackerspace=", + "amenity=workshop", + "repair=assisted_self_service" + ] + }, + "then": { + "en": "This is an workshop for assisted self service, such as a repair café" + } + }, + { + "if": { + "and": [ + "leisure=", + "hackerspace=", + "office=coworking" + ] + }, + "then": { + "en": "This is a coworking office" + } + } + ] + }, "allowMove": true } diff --git a/src/Models/ThemeConfig/Json/DeleteConfigJson.ts b/src/Models/ThemeConfig/Json/DeleteConfigJson.ts index 07d247d02..4571bd904 100644 --- a/src/Models/ThemeConfig/Json/DeleteConfigJson.ts +++ b/src/Models/ThemeConfig/Json/DeleteConfigJson.ts @@ -1,4 +1,5 @@ import { TagConfigJson } from "./TagConfigJson" +import { Translatable } from "./Translatable" export interface DeleteConfigJson { /*** @@ -62,7 +63,7 @@ export interface DeleteConfigJson { * * question: What text should be shown to the contributor for this reason? */ - then: string | any + then: Translatable }[] /**