From 4b60f08235a939a9f2e7c6fcda26d4774fc2e789 Mon Sep 17 00:00:00 2001 From: Viktoriia <1> Date: Tue, 28 Nov 2023 12:20:25 +0100 Subject: [PATCH] Add WITH_TLDRAW --- ansible/roles/tldraw-client-core/tasks/main.yml | 6 +++++- src/App.tsx | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ansible/roles/tldraw-client-core/tasks/main.yml b/ansible/roles/tldraw-client-core/tasks/main.yml index 8c644b89..8e1de44d 100644 --- a/ansible/roles/tldraw-client-core/tasks/main.yml +++ b/ansible/roles/tldraw-client-core/tasks/main.yml @@ -3,6 +3,7 @@ kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" template: tldraw-client-svc.yml.j2 + when: WITH_TLDRAW is defined and WITH_TLDRAW|bool - name: tldraw client configmap kubernetes.core.k8s: @@ -10,16 +11,19 @@ namespace: "{{ NAMESPACE }}" template: tldraw-client-configmap.yml.j2 apply: yes + when: WITH_TLDRAW is defined and WITH_TLDRAW|bool - name: tldraw client deployment kubernetes.core.k8s: kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" template: tldraw-client-deployment.yml.j2 + when: WITH_TLDRAW is defined and WITH_TLDRAW|bool - name: tldraw client ingress kubernetes.core.k8s: kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" template: tldraw-client-ingress.yml.j2 - apply: yes \ No newline at end of file + apply: yes + when: WITH_TLDRAW is defined and WITH_TLDRAW|bool \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 644c1099..d175e610 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { Tldraw, useFileSystem } from '@tldraw/tldraw'; import { useUsers } from 'y-presence'; import { useCookies } from 'react-cookie'; @@ -18,6 +18,7 @@ function Editor({ roomId }: { roomId: string }) { onMount={onMount} onPatch={saveUserSettings} darkMode={getDarkMode()} + showMultiplayerMenu={false} {...events} onSaveProject={onSaveProject} onSaveProjectAs={onSaveProjectAs}