Skip to content

Commit

Permalink
Merge pull request #7045 from ever-co/develop
Browse files Browse the repository at this point in the history
* fix: #7000 github integration check issue created by user/bot

* Feat/Ever Gauzy Platform branding (#7036)

* feat: add new desktop environment variables

* feat: use desktop environment variables instead hardcoded values

* feat: auto generate desktop icons from web or from assets

* feat: remove duplicated icons

* fix: generated desktop logo and generate icon tray

* fix: deepscan

* fix: macos icon format

* fix: url validation

* chore: update electron-builder

* fix: import

* fix: tiny improvements

* feat: update package.json on build

* feat: pack electron app package.json on build

* feat: set default project repository

* fix: remove unnecessary icons

* fix: generate @2x tray icon to optimize renderer for macOS retina display.

* fix: window ico generate dependency

* feat: create a factory that generate environment content

* fix: deepscan

* fix: desktop full app file replacement

* refactor: normalize variables for desktop applications

* feat: change icon tray path

* rename: PLATFORM_LOGO_URL to PLATFORM_LOGO

* feat: update server default package.json

* fix: deepscan

---------

Co-authored-by: RAHUL RATHORE <[email protected]>
Co-authored-by: Rahul R <[email protected]>
Co-authored-by: Kifungo A <[email protected]>
  • Loading branch information
4 people authored Oct 28, 2023
2 parents df74cac + 003e87a commit 44b8d3c
Show file tree
Hide file tree
Showing 154 changed files with 2,289 additions and 987 deletions.
32 changes: 31 additions & 1 deletion .env.compose
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ JITSU_SERVER_DEBUG=
JITSU_SERVER_ECHO_EVENTS=

# Platform Logo resource URL (SVG is Recommended)
PLATFORM_LOGO_URL='assets/images/logos/logo_Gauzy.svg'
PLATFORM_LOGO='assets/images/logos/logo_Gauzy.svg'

# Desktop App 512x512 icon
GAUZY_DESKTOP_LOGO_512X512='assets/icons/icon_512x512.png'
Expand Down Expand Up @@ -352,3 +352,33 @@ DESKTOP_APP_DOWNLOAD_LINK_WINDOWS='https://gauzy.co/downloads#desktop/windows'
DESKTOP_APP_DOWNLOAD_LINK_LINUX='https://gauzy.co/downloads#desktop/linux'
MOBILE_APP_DOWNLOAD_LINK='https://gauzy.co/downloads#mobile'
EXTENSION_DOWNLOAD_LINK='https://gauzy.co/downloads#extensions'

# Desktop Timer Application Configuration
PROJECT_REPO='https://github.com/ever-co/ever-gauzy.git'
DESKTOP_TIMER_APP_NAME='gauzy-desktop-timer'
DESKTOP_TIMER_APP_DESCRIPTION='Gauzy Desktop Timer'
DESKTOP_TIMER_APP_ID='com.ever.gauzydesktoptimer'
DESKTOP_TIMER_APP_REPO_NAME='ever-gauzy-desktop-timer'
DESKTOP_TIMER_APP_REPO_OWNER='ever-co'
DESKTOP_TIMER_APP_WELCOME_TITLE=
DESKTOP_TIMER_APP_WELCOME_CONTENT=

# Desktop Application Configuration
DESKTOP_APP_NAME='gauzy-desktop'
DESKTOP_APP_DESCRIPTION='Gauzy Desktop'
DESKTOP_APP_ID='com.ever.gauzydesktop'
DESKTOP_APP_REPO_NAME='ever-gauzy-desktop'
DESKTOP_APP_REPO_OWNER='ever-co'
DESKTOP_APP_WELCOME_TITLE=
DESKTOP_APP_WELCOME_CONTENT=
DESKTOP_APP_I18N_FILES_URL=

# Desktop Server Application Configuration
DESKTOP_SERVER_APP_NAME='gauzy-server'
DESKTOP_SERVER_APP_DESCRIPTION='Gauzy Server'
DESKTOP_SERVER_APP_ID='com.ever.gauzyserver'
DESKTOP_SERVER_APP_REPO_NAME='ever-gauzy-server'
DESKTOP_SERVER_APP_REPO_OWNER='ever-co'
DESKTOP_SERVER_APP_WELCOME_TITLE=
DESKTOP_SERVER_APP_WELCOME_CONTENT=
DESKTOP_SERVER_APP_I18N_FILES_URL=
33 changes: 32 additions & 1 deletion .env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ JITSU_SERVER_DEBUG=
JITSU_SERVER_ECHO_EVENTS=

# Platform Logo resource URL (SVG is Recommended)
PLATFORM_LOGO_URL='assets/images/logos/logo_Gauzy.svg'
PLATFORM_LOGO='assets/images/logos/logo_Gauzy.svg'

# Desktop App 512x512 icon
GAUZY_DESKTOP_LOGO_512X512='assets/icons/icon_512x512.png'
Expand Down Expand Up @@ -325,3 +325,34 @@ DESKTOP_APP_DOWNLOAD_LINK_WINDOWS='https://gauzy.co/downloads#desktop/windows'
DESKTOP_APP_DOWNLOAD_LINK_LINUX='https://gauzy.co/downloads#desktop/linux'
MOBILE_APP_DOWNLOAD_LINK='https://gauzy.co/downloads#mobile'
EXTENSION_DOWNLOAD_LINK='https://gauzy.co/downloads#extensions'


# Desktop Timer Application Configuration
PROJECT_REPO='https://github.com/ever-co/ever-gauzy.git'
DESKTOP_TIMER_APP_NAME='gauzy-desktop-timer'
DESKTOP_TIMER_APP_DESCRIPTION='Gauzy Desktop Timer'
DESKTOP_TIMER_APP_ID='com.ever.gauzydesktoptimer'
DESKTOP_TIMER_APP_REPO_NAME='ever-gauzy-desktop-timer'
DESKTOP_TIMER_APP_REPO_OWNER='ever-co'
DESKTOP_TIMER_APP_WELCOME_TITLE=
DESKTOP_TIMER_APP_WELCOME_CONTENT=

# Desktop Application Configuration
DESKTOP_APP_NAME='gauzy-desktop'
DESKTOP_APP_DESCRIPTION='Gauzy Desktop'
DESKTOP_APP_ID='com.ever.gauzydesktop'
DESKTOP_APP_REPO_NAME='ever-gauzy-desktop'
DESKTOP_APP_REPO_OWNER='ever-co'
DESKTOP_APP_WELCOME_TITLE=
DESKTOP_APP_WELCOME_CONTENT=
DESKTOP_APP_I18N_FILES_URL=

# Desktop Server Application Configuration
DESKTOP_SERVER_APP_NAME='gauzy-server'
DESKTOP_SERVER_APP_DESCRIPTION='Gauzy Server'
DESKTOP_SERVER_APP_ID='com.ever.gauzyserver'
DESKTOP_SERVER_APP_REPO_NAME='ever-gauzy-server'
DESKTOP_SERVER_APP_REPO_OWNER='ever-co'
DESKTOP_SERVER_APP_WELCOME_TITLE=
DESKTOP_SERVER_APP_WELCOME_CONTENT=
DESKTOP_SERVER_APP_I18N_FILES_URL=
33 changes: 32 additions & 1 deletion .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ JITSU_SERVER_DEBUG=
JITSU_SERVER_ECHO_EVENTS=

# Platform Logo resource URL (SVG is Recommended)
PLATFORM_LOGO_URL='assets/images/logos/logo_Gauzy.svg'
PLATFORM_LOGO='assets/images/logos/logo_Gauzy.svg'

# Desktop App 512x512 icon
GAUZY_DESKTOP_LOGO_512X512='assets/icons/icon_512x512.png'
Expand Down Expand Up @@ -312,3 +312,34 @@ DESKTOP_APP_DOWNLOAD_LINK_WINDOWS='https://gauzy.co/downloads#desktop/windows'
DESKTOP_APP_DOWNLOAD_LINK_LINUX='https://gauzy.co/downloads#desktop/linux'
MOBILE_APP_DOWNLOAD_LINK='https://gauzy.co/downloads#mobile'
EXTENSION_DOWNLOAD_LINK='https://gauzy.co/downloads#extensions'


# Desktop Timer Application Configuration
PROJECT_REPO='https://github.com/ever-co/ever-gauzy.git'
DESKTOP_TIMER_APP_NAME='gauzy-desktop-timer'
DESKTOP_TIMER_APP_DESCRIPTION='Gauzy Desktop Timer'
DESKTOP_TIMER_APP_ID='com.ever.gauzydesktoptimer'
DESKTOP_TIMER_APP_REPO_NAME='ever-gauzy-desktop-timer'
DESKTOP_TIMER_APP_REPO_OWNER='ever-co'
DESKTOP_TIMER_APP_WELCOME_TITLE=
DESKTOP_TIMER_APP_WELCOME_CONTENT=

# Desktop Application Configuration
DESKTOP_APP_NAME='gauzy-desktop'
DESKTOP_APP_DESCRIPTION='Gauzy Desktop'
DESKTOP_APP_ID='com.ever.gauzydesktop'
DESKTOP_APP_REPO_NAME='ever-gauzy-desktop'
DESKTOP_APP_REPO_OWNER='ever-co'
DESKTOP_APP_WELCOME_TITLE=
DESKTOP_APP_WELCOME_CONTENT=
DESKTOP_APP_I18N_FILES_URL=

# Desktop Server Application Configuration
DESKTOP_SERVER_APP_NAME='gauzy-server'
DESKTOP_SERVER_APP_DESCRIPTION='Gauzy Server'
DESKTOP_SERVER_APP_ID='com.ever.gauzyserver'
DESKTOP_SERVER_APP_REPO_NAME='ever-gauzy-server'
DESKTOP_SERVER_APP_REPO_OWNER='ever-co'
DESKTOP_SERVER_APP_WELCOME_TITLE=
DESKTOP_SERVER_APP_WELCOME_CONTENT=
DESKTOP_SERVER_APP_I18N_FILES_URL=
32 changes: 31 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ JITSU_SERVER_DEBUG=
JITSU_SERVER_ECHO_EVENTS=

# Platform Logo resource URL (SVG is Recommended)
PLATFORM_LOGO_URL='assets/images/logos/logo_Gauzy.svg'
PLATFORM_LOGO='assets/images/logos/logo_Gauzy.svg'

# Desktop App 512x512 icon
GAUZY_DESKTOP_LOGO_512X512='assets/icons/icon_512x512.png'
Expand Down Expand Up @@ -345,3 +345,33 @@ DESKTOP_APP_DOWNLOAD_LINK_WINDOWS='https://gauzy.co/downloads#desktop/windows'
DESKTOP_APP_DOWNLOAD_LINK_LINUX='https://gauzy.co/downloads#desktop/linux'
MOBILE_APP_DOWNLOAD_LINK='https://gauzy.co/downloads#mobile'
EXTENSION_DOWNLOAD_LINK='https://gauzy.co/downloads#extensions'

# Desktop Timer Application Configuration
PROJECT_REPO='https://github.com/ever-co/ever-gauzy.git'
DESKTOP_TIMER_APP_NAME='gauzy-desktop-timer'
DESKTOP_TIMER_APP_DESCRIPTION='Gauzy Desktop Timer'
DESKTOP_TIMER_APP_ID='com.ever.gauzydesktoptimer'
DESKTOP_TIMER_APP_REPO_NAME='ever-gauzy-desktop-timer'
DESKTOP_TIMER_APP_REPO_OWNER='ever-co'
DESKTOP_TIMER_APP_WELCOME_TITLE=
DESKTOP_TIMER_APP_WELCOME_CONTENT=

# Desktop Application Configuration
DESKTOP_APP_NAME='gauzy-desktop'
DESKTOP_APP_DESCRIPTION='Gauzy Desktop'
DESKTOP_APP_ID='com.ever.gauzydesktop'
DESKTOP_APP_REPO_NAME='ever-gauzy-desktop'
DESKTOP_APP_REPO_OWNER='ever-co'
DESKTOP_APP_WELCOME_TITLE=
DESKTOP_APP_WELCOME_CONTENT=
DESKTOP_APP_I18N_FILES_URL=

# Desktop Server Application Configuration
DESKTOP_SERVER_APP_NAME='gauzy-server'
DESKTOP_SERVER_APP_DESCRIPTION='Gauzy Server'
DESKTOP_SERVER_APP_ID='com.ever.gauzyserver'
DESKTOP_SERVER_APP_REPO_NAME='ever-gauzy-server'
DESKTOP_SERVER_APP_REPO_OWNER='ever-co'
DESKTOP_SERVER_APP_WELCOME_TITLE=
DESKTOP_SERVER_APP_WELCOME_CONTENT=
DESKTOP_SERVER_APP_I18N_FILES_URL=
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,28 @@ megalinter-reports/
/apps/desktop-timer/src/assets/i18n
/apps/desktop/src/assets/i18n
/apps/server/src/assets/i18n

# No need to duplicate desktop icons
/apps/desktop-timer/src/icons
/apps/desktop/src/icons
/apps/server/src/icons

# Generated platform logo
apps/desktop-timer/src/assets/images/logos/platform_logo.*
apps/desktop/src/assets/images/logos/platform_logo.*
apps/server/src/assets/images/logos/platform_logo.*

# Generated No internet logo
apps/desktop-timer/src/assets/images/logos/no_internet_logo.*
apps/desktop/src/assets/images/logos/no_internet_logo.*
apps/server/src/assets/images/logos/no_internet_logo.*

# Generated desktop icon tray
apps/desktop-timer/src/assets/icons/tray
apps/desktop/src/assets/icons/tray
apps/server/src/assets/icons/tray

# Generated desktop 512x512 icon
apps/desktop-timer/src/assets/icons/desktop_logo_512x512.png
apps/desktop/src/assets/icons/desktop_logo_512x512.png
apps/server/src/assets/icons/desktop_logo_512x512.png
63 changes: 59 additions & 4 deletions .scripts/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,37 @@ if (!env.IS_DOCKER) {
GAUZY_GITHUB_REDIRECT_URL: '${env.GAUZY_GITHUB_REDIRECT_URL}',
GAUZY_GITHUB_POST_INSTALL_URL: '${env.GAUZY_GITHUB_POST_INSTALL_URL}',
PLATFORM_LOGO_URL: '${env.PLATFORM_LOGO_URL}',
PLATFORM_LOGO: '${env.PLATFORM_LOGO}',
GAUZY_DESKTOP_LOGO_512X512: '${env.GAUZY_DESKTOP_LOGO_512X512}',
PLATFORM_PRIVACY_URL: '${env.PLATFORM_PRIVACY_URL}',
PLATFORM_TOS_URL: '${env.PLATFORM_TOS_URL}'
PLATFORM_TOS_URL: '${env.PLATFORM_TOS_URL}',
PROJECT_REPO: '${env.PROJECT_REPO}',
DESKTOP_TIMER_APP_NAME: '${env.DESKTOP_TIMER_APP_NAME}',
DESKTOP_TIMER_APP_DESCRIPTION: '${env.DESKTOP_TIMER_APP_DESCRIPTION}',
DESKTOP_TIMER_APP_ID: '${env.DESKTOP_TIMER_APP_ID}',
DESKTOP_TIMER_APP_REPO_NAME: '${env.DESKTOP_TIMER_APP_REPO_NAME}',
DESKTOP_TIMER_APP_REPO_OWNER: '${env.DESKTOP_TIMER_APP_REPO_OWNER}',
DESKTOP_TIMER_APP_WELCOME_TITLE: '${env.DESKTOP_TIMER_APP_WELCOME_TITLE}',
DESKTOP_TIMER_APP_WELCOME_CONTENT: '${env.DESKTOP_TIMER_APP_WELCOME_CONTENT}',
DESKTOP_TIMER_APP_I18N_FILES_URL: '${env.DESKTOP_TIMER_APP_I18N_FILES_URL}',
DESKTOP_APP_NAME: '${env.DESKTOP_APP_NAME}',
DESKTOP_APP_DESCRIPTION: '${env.DESKTOP_APP_DESCRIPTION}',
DESKTOP_APP_ID: '${env.DESKTOP_APP_ID}',
DESKTOP_APP_REPO_NAME: '${env.DESKTOP_APP_REPO_NAME}',
DESKTOP_APP_REPO_OWNER: '${env.DESKTOP_APP_REPO_OWNER}',
DESKTOP_APP_WELCOME_TITLE: '${env.DESKTOP_APP_WELCOME_TITLE}',
DESKTOP_APP_WELCOME_CONTENT: '${env.DESKTOP_APP_WELCOME_CONTENT}',
DESKTOP_APP_I18N_FILES_URL: '${env.DESKTOP_APP_I18N_FILES_URL}',
DESKTOP_SERVER_APP_NAME: '${env.DESKTOP_SERVER_APP_NAME}',
DESKTOP_SERVER_APP_DESCRIPTION: '${env.DESKTOP_SERVER_APP_DESCRIPTION}',
DESKTOP_SERVER_APP_ID: '${env.DESKTOP_SERVER_APP_ID}',
DESKTOP_SERVER_APP_REPO_NAME: '${env.DESKTOP_SERVER_APP_REPO_NAME}',
DESKTOP_SERVER_APP_REPO_OWNER: '${env.DESKTOP_SERVER_APP_REPO_OWNER}',
DESKTOP_SERVER_APP_WELCOME_TITLE: '${env.DESKTOP_SERVER_APP_WELCOME_TITLE}',
DESKTOP_SERVER_APP_WELCOME_CONTENT: '${env.DESKTOP_SERVER_APP_WELCOME_CONTENT}',
DESKTOP_SERVER_APP_I18N_FILES_URL: '${env.DESKTOP_SERVER_APP_I18N_FILES_URL}'
};
`;
} else {
Expand Down Expand Up @@ -268,10 +295,38 @@ if (!env.IS_DOCKER) {
GAUZY_GITHUB_REDIRECT_URL: 'DOCKER_GAUZY_GITHUB_REDIRECT_URL',
GAUZY_GITHUB_POST_INSTALL_URL: 'DOCKER_GAUZY_GITHUB_POST_INSTALL_URL',
PLATFORM_LOGO_URL: '${env.PLATFORM_LOGO_URL}',
PLATFORM_LOGO: '${env.PLATFORM_LOGO}',
GAUZY_DESKTOP_LOGO_512X512: '${env.GAUZY_DESKTOP_LOGO_512X512}',
PLATFORM_PRIVACY_URL: '${env.PLATFORM_PRIVACY_URL}',
PLATFORM_TOS_URL: '${env.PLATFORM_TOS_URL}'
PLATFORM_TOS_URL: '${env.PLATFORM_TOS_URL}',
PROJECT_REPO: '${env.PROJECT_REPO}',
DESKTOP_TIMER_APP_NAME: '${env.DESKTOP_TIMER_APP_NAME}',
DESKTOP_TIMER_APP_DESCRIPTION: '${env.DESKTOP_TIMER_APP_DESCRIPTION}',
DESKTOP_TIMER_APP_ID: '${env.DESKTOP_TIMER_APP_ID}',
DESKTOP_TIMER_APP_REPO_NAME: '${env.DESKTOP_TIMER_APP_REPO_NAME}',
DESKTOP_TIMER_APP_REPO_OWNER: '${env.DESKTOP_TIMER_APP_REPO_OWNER}',
DESKTOP_TIMER_APP_WELCOME_TITLE: '${env.DESKTOP_TIMER_APP_WELCOME_TITLE}',
DESKTOP_TIMER_APP_WELCOME_CONTENT: '${env.DESKTOP_TIMER_APP_WELCOME_CONTENT}',
DESKTOP_TIMER_APP_I18N_FILES_URL: '${env.DESKTOP_TIMER_APP_I18N_FILES_URL}',
DESKTOP_APP_NAME: '${env.DESKTOP_APP_NAME}',
DESKTOP_APP_DESCRIPTION: '${env.DESKTOP_APP_DESCRIPTION}',
DESKTOP_APP_ID: '${env.DESKTOP_APP_ID}',
DESKTOP_APP_REPO_NAME: '${env.DESKTOP_APP_REPO_NAME}',
DESKTOP_APP_REPO_OWNER: '${env.DESKTOP_APP_REPO_OWNER}',
DESKTOP_APP_WELCOME_TITLE: '${env.DESKTOP_APP_WELCOME_TITLE}',
DESKTOP_APP_WELCOME_CONTENT: '${env.DESKTOP_APP_WELCOME_CONTENT}',
DESKTOP_APP_I18N_FILES_URL: '${env.DESKTOP_APP_I18N_FILES_URL}',
DESKTOP_SERVER_APP_NAME: '${env.DESKTOP_SERVER_APP_NAME}',
DESKTOP_SERVER_APP_DESCRIPTION: '${env.DESKTOP_SERVER_APP_DESCRIPTION}',
DESKTOP_SERVER_APP_ID: '${env.DESKTOP_SERVER_APP_ID}',
DESKTOP_SERVER_APP_REPO_NAME: '${env.DESKTOP_SERVER_APP_REPO_NAME}',
DESKTOP_SERVER_APP_REPO_OWNER: '${env.DESKTOP_SERVER_APP_REPO_OWNER}',
DESKTOP_SERVER_APP_WELCOME_TITLE: '${env.DESKTOP_SERVER_APP_WELCOME_TITLE}',
DESKTOP_SERVER_APP_WELCOME_CONTENT: '${env.DESKTOP_SERVER_APP_WELCOME_CONTENT}',
DESKTOP_SERVER_APP_I18N_FILES_URL: '${env.DESKTOP_SERVER_APP_I18N_FILES_URL}'
};
`;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { IContentGenerator } from '../interfaces/i-content-generator';
import { Env } from '../../env';

export class CommonEnvironmentContent implements IContentGenerator {
public generate(variable: Partial<Env>): string {
return `
AWHost: '${variable.AWHost}',
API_DEFAULT_PORT: ${variable.API_DEFAULT_PORT},
GAUZY_UI_DEFAULT_PORT: ${variable.GAUZY_UI_DEFAULT_PORT},
SCREENSHOTS_ENGINE_METHOD: '${variable.SCREENSHOTS_ENGINE_METHOD}', // ElectronDesktopCapturer || ScreenshotDesktopLib
SENTRY_DSN: '${variable.SENTRY_DSN}',
SENTRY_TRACES_SAMPLE_RATE: '${variable.SENTRY_TRACES_SAMPLE_RATE}',
PLATFORM_LOGO: '${variable.PLATFORM_LOGO}',
PROJECT_REPO: '${variable.PROJECT_REPO}',
COMPANY_SITE_LINK: '${variable.COMPANY_SITE_LINK}',
GAUZY_DESKTOP_LOGO_512X512: '${variable.GAUZY_DESKTOP_LOGO_512X512}',
NO_INTERNET_LOGO: '${variable.NO_INTERNET_LOGO}',
`;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { IContentGenerator } from '../interfaces/i-content-generator';
import { IDesktopEnvironment } from '../interfaces/i-desktop-environment';

export class DesktopEnvironmentContent implements IContentGenerator {
public generate(variable: Partial<IDesktopEnvironment>): string {
return `
NAME: '${variable.DESKTOP_APP_NAME || variable.NAME}',
DESCRIPTION: '${variable.DESKTOP_APP_DESCRIPTION || variable.DESCRIPTION}',
APP_ID: '${variable.DESKTOP_APP_ID || variable.APP_ID}',
REPO_NAME: '${variable.DESKTOP_APP_REPO_NAME || variable.REPO_NAME}',
REPO_OWNER: '${variable.DESKTOP_APP_REPO_OWNER || variable.REPO_OWNER}',
WELCOME_TITLE: '${variable.DESKTOP_APP_WELCOME_TITLE || variable.WELCOME_TITLE || ''}',
WELCOME_CONTENT: '${variable.DESKTOP_APP_WELCOME_CONTENT || variable.WELCOME_CONTENT || ''}',
I18N_FILES_URL: '${variable.DESKTOP_APP_I18N_FILES_URL || variable.I18N_FILES_URL || ''}',
IS_DESKTOP_TIMER: ${false},
IS_DESKTOP: ${true},
IS_SERVER: ${false},
`;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { IContentGenerator } from '../interfaces/i-content-generator';
import { IDesktopEnvironment } from '../interfaces/i-desktop-environment';

export class DesktopServerEnvironmentContent implements IContentGenerator {
public generate(variable: Partial<IDesktopEnvironment>): string {
return `
NAME: '${variable.DESKTOP_SERVER_APP_NAME || variable.NAME}',
DESCRIPTION: '${variable.DESKTOP_SERVER_APP_DESCRIPTION || variable.DESCRIPTION}',
APP_ID: '${variable.DESKTOP_SERVER_APP_ID || variable.APP_ID}',
REPO_NAME: '${variable.DESKTOP_SERVER_APP_REPO_NAME || variable.REPO_NAME}',
REPO_OWNER: '${variable.DESKTOP_SERVER_APP_REPO_OWNER || variable.REPO_OWNER}',
WELCOME_TITLE: '${variable.DESKTOP_SERVER_APP_WELCOME_TITLE || variable.WELCOME_TITLE || ''}',
WELCOME_CONTENT: '${variable.DESKTOP_SERVER_APP_WELCOME_CONTENT || variable.WELCOME_CONTENT || ''}',
I18N_FILES_URL: '${variable.DESKTOP_SERVER_APP_I18N_FILES_URL || variable.I18N_FILES_URL || ''}',
IS_DESKTOP_TIMER: ${false},
IS_DESKTOP: ${false},
IS_SERVER: ${true},
`;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { IContentGenerator } from '../interfaces/i-content-generator';
import { IDesktopEnvironment } from '../interfaces/i-desktop-environment';

export class DesktopTimerEnvironmentContent implements IContentGenerator {
public generate(variable: Partial<IDesktopEnvironment>): string {
return `
NAME: '${variable.DESKTOP_TIMER_APP_NAME || variable.NAME}',
DESCRIPTION: '${variable.DESKTOP_TIMER_APP_DESCRIPTION || variable.DESCRIPTION}',
APP_ID: '${variable.DESKTOP_TIMER_APP_ID || variable.APP_ID}',
REPO_NAME: '${variable.DESKTOP_TIMER_APP_REPO_NAME || variable.REPO_NAME}',
REPO_OWNER: '${variable.DESKTOP_TIMER_APP_REPO_OWNER || variable.REPO_OWNER}',
WELCOME_TITLE: '${variable.DESKTOP_TIMER_APP_WELCOME_TITLE || variable.WELCOME_TITLE || ''}',
WELCOME_CONTENT: '${variable.DESKTOP_TIMER_APP_WELCOME_CONTENT || variable.WELCOME_CONTENT || ''}',
I18N_FILES_URL: '${variable.DESKTOP_TIMER_APP_I18N_FILES_URL || variable.I18N_FILES_URL || ''}',
IS_DESKTOP_TIMER: ${true},
IS_DESKTOP: ${false},
IS_SERVER: ${false},
`;
}
}
Loading

0 comments on commit 44b8d3c

Please sign in to comment.