Skip to content

TagSpaces is an offline, open source, document manager with tagging support

feat: add configuration for the welcome panel

Ilian Sapundshiev89892cf215bb
diff --git a/app/components/FolderContainer.tsx b/app/components/FolderContainer.tsx
index 637fa10dc..f82213c12 100644
--- a/app/components/FolderContainer.tsx
+++ b/app/components/FolderContainer.tsx
@@ -57,6 +57,7 @@ import {
FileSystemEntry,
FileSystemEntryMeta
} from '-/services/utils-io';
+import AppConfig from '-/config';
const GridPerspective = React.lazy(() =>
import(
@@ -335,7 +336,11 @@ const FolderContainer = (props: Props) => {
const renderPerspective = () => {
if (!props.currentDirectoryPath && props.directoryContent.length < 1) {
- return <WelcomePanelAsync />;
+ return AppConfig.showWelcomePanel ? (
+ <WelcomePanelAsync />
+ ) : (
+ <React.Fragment />
+ );
}
if (
Pro &&
diff --git a/app/config.ts b/app/config.ts
index ab882e69d..c7277af9f 100644
--- a/app/config.ts
+++ b/app/config.ts
@@ -103,6 +103,10 @@ export const AppConfig = {
(window as any).ExtShowAdvancedSearch !== undefined
? (window as any).ExtShowAdvancedSearch
: true,
+ showWelcomePanel:
+ (window as any).ExtShowWelcomePanel !== undefined
+ ? (window as any).ExtShowWelcomePanel
+ : true,
sidebarColor: (window as any).ExtSidebarColor || '#2C001E', // '#00D1A1' // #008023
sidebarSelectionColor: (window as any).ExtSidebarSelectionColor || '#880E4F',
lightThemeLightColor: (window as any).ExtLightThemeLightColor || '#dcf3ec',