From b1acd37d0fee1623f6412486b48a056814f7e943 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 6 Oct 2021 02:52:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20Make=20more=20progress=20towards?= =?UTF-8?q?=20the=20"Context"=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/inspectionProfiles/Project_Default.xml | 1 + frontend/src/App.tsx | 61 ++++++++- .../authorization/AuthorizationBrowseBox.tsx | 61 +++++++++ .../authorization/AuthorizationLoginBox.tsx | 110 ++++++++++++++++ .../authorization/AuthorizationRouter.tsx | 19 +++ .../authorization/AuthorizationStepPage.tsx | 16 +++ .../authorization/useAuthorizedAxios.ts | 16 +++ .../src/components/errors/ErrorCatcherBox.tsx | 5 +- .../informative/WhatIsSophonBox.tsx | 16 +++ .../instance/InstanceDescriptionBox.tsx | 38 ++++++ .../components/instance/InstanceFormBox.tsx | 124 ++++++++++++++++++ .../components/instance/InstanceRouter.tsx | 26 ++++ .../components/instance/InstanceStepPage.tsx | 20 +++ .../instance/SophonInstanceContainer.tsx | 57 -------- .../instance/SophonInstanceContext.tsx | 10 -- .../instance/SophonInstanceFormBox.tsx | 86 ------------ .../instance/SophonInstancePage.tsx | 34 ----- .../instance/SophonInstanceProvider.tsx | 28 ---- .../instance/SophonInstanceRouter.tsx | 32 ----- .../instance/SophonInstanceState.ts | 19 --- frontend/src/components/instance/index.ts | 10 -- .../components/instance/useInstanceAxios.ts | 31 +++++ .../components/instance/useInstanceLoader.ts | 62 +++++++++ .../components/instance/useInstanceTheme.ts | 34 +++++ .../src/components/instance/useSophonAxios.ts | 26 ---- .../components/instance/useSophonInstance.ts | 11 -- .../instance/useSophonInstanceLoader.ts | 47 ------- .../src/components/login/LoginContainer.tsx | 25 ---- .../src/components/login/LoginContext.tsx | 8 -- .../src/components/login/LoginFormBox.tsx | 97 -------------- .../src/components/login/LoginGuestBox.tsx | 18 --- frontend/src/components/login/LoginPage.tsx | 19 --- .../src/components/login/LoginProvider.tsx | 28 ---- frontend/src/components/login/LoginRouter.tsx | 21 --- frontend/src/components/login/LoginState.ts | 62 --------- frontend/src/components/login/useLogin.ts | 7 - .../src/components/login/useLoginAxios.ts | 15 --- .../routing/LocationViewSetRouter.tsx | 19 +-- .../src/components/routing/ResourceRouter.tsx | 50 +++---- .../src/components/routing/ViewSetRouter.tsx | 22 ++-- frontend/src/contexts/authorization.tsx | 68 ++++++++-- frontend/src/contexts/instance.tsx | 21 ++- frontend/src/contexts/theme.tsx | 9 +- frontend/src/hooks/useViewSet.ts | 26 ++-- 44 files changed, 770 insertions(+), 745 deletions(-) create mode 100644 frontend/src/components/authorization/AuthorizationBrowseBox.tsx create mode 100644 frontend/src/components/authorization/AuthorizationLoginBox.tsx create mode 100644 frontend/src/components/authorization/AuthorizationRouter.tsx create mode 100644 frontend/src/components/authorization/AuthorizationStepPage.tsx create mode 100644 frontend/src/components/authorization/useAuthorizedAxios.ts create mode 100644 frontend/src/components/informative/WhatIsSophonBox.tsx create mode 100644 frontend/src/components/instance/InstanceDescriptionBox.tsx create mode 100644 frontend/src/components/instance/InstanceFormBox.tsx create mode 100644 frontend/src/components/instance/InstanceRouter.tsx create mode 100644 frontend/src/components/instance/InstanceStepPage.tsx delete mode 100644 frontend/src/components/instance/SophonInstanceContainer.tsx delete mode 100644 frontend/src/components/instance/SophonInstanceContext.tsx delete mode 100644 frontend/src/components/instance/SophonInstanceFormBox.tsx delete mode 100644 frontend/src/components/instance/SophonInstancePage.tsx delete mode 100644 frontend/src/components/instance/SophonInstanceProvider.tsx delete mode 100644 frontend/src/components/instance/SophonInstanceRouter.tsx delete mode 100644 frontend/src/components/instance/SophonInstanceState.ts delete mode 100644 frontend/src/components/instance/index.ts create mode 100644 frontend/src/components/instance/useInstanceAxios.ts create mode 100644 frontend/src/components/instance/useInstanceLoader.ts create mode 100644 frontend/src/components/instance/useInstanceTheme.ts delete mode 100644 frontend/src/components/instance/useSophonAxios.ts delete mode 100644 frontend/src/components/instance/useSophonInstance.ts delete mode 100644 frontend/src/components/instance/useSophonInstanceLoader.ts delete mode 100644 frontend/src/components/login/LoginContainer.tsx delete mode 100644 frontend/src/components/login/LoginContext.tsx delete mode 100644 frontend/src/components/login/LoginFormBox.tsx delete mode 100644 frontend/src/components/login/LoginGuestBox.tsx delete mode 100644 frontend/src/components/login/LoginPage.tsx delete mode 100644 frontend/src/components/login/LoginProvider.tsx delete mode 100644 frontend/src/components/login/LoginRouter.tsx delete mode 100644 frontend/src/components/login/LoginState.ts delete mode 100644 frontend/src/components/login/useLogin.ts delete mode 100644 frontend/src/components/login/useLoginAxios.ts diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index e101d3f..e18db9f 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -3,6 +3,7 @@