-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ledger-browser): implement dynamic app setup
- Read gui supabase connection information from environment variable. Include `.env` files in common `.gitignore` file. Change ledger-browser typescript target and module to `esnext` to use vite environment variables. - Read app configuration from the supabase DB. - Add button on home page for adding new application. Clicking on it will open dialog with setup wizzard. User must filter apps by it's group (step 1), select the app (step 2), input common app configuration data (step 3) and lastly input app-specific configuration (JSON format). - Add button to configure already added app. It opens a dialog that allows editing app details in the database. It also contains a button for deleting the app (after confirmation). - Show full screen error message with setup guidelines when app has failed to connect to supabase. - Clean up supabase type files, move app-related typedefs to specific app dirs. Depends on #3347 Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
- Loading branch information
Showing
42 changed files
with
1,646 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,7 @@ cactus-openapi-spec-*.json | |
build/ | ||
.gradle/ | ||
site/ | ||
.env | ||
|
||
.build-cache/*.tsbuildinfo | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
VITE_SUPABASE_URL=__SUPABSE_URL__ | ||
VITE_SUPABASE_KEY=__SUPABASE_KEY__ | ||
VITE_SUPABASE_SCHEMA=public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/balanceHistory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/cacti-ledger-browser/src/main/typescript/apps/eth/hooks.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useOutletContext } from "react-router-dom"; | ||
import { AppInstancePersistencePluginOptions } from "../../common/types/app"; | ||
|
||
export function useEthAppConfig() { | ||
return useOutletContext<AppInstancePersistencePluginOptions>(); | ||
} | ||
|
||
export function useEthSupabaseConfig() { | ||
const appConfig = useEthAppConfig(); | ||
|
||
return { | ||
schema: appConfig.supabaseSchema, | ||
url: appConfig.supabaseUrl, | ||
key: appConfig.supabaseKey, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.