Skip to content

Commit

Permalink
Merge pull request #3420 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Dec 12, 2024
2 parents e6363e9 + 1bbb370 commit 72a58d6
Show file tree
Hide file tree
Showing 46 changed files with 1,076 additions and 309 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export class DesktopServerWebEnvironmentContent implements IContentGenerator {
GAUZY_API_SERVER_URL: '${variable.GAUZY_API_SERVER_URL}',
NEXT_PUBLIC_GAUZY_API_SERVER_URL: '${variable.NEXT_PUBLIC_GAUZY_API_SERVER_URL}',
DESKTOP_WEB_SERVER_HOSTNAME: '${variable.DESKTOP_WEB_SERVER_HOSTNAME}',
TERM_OF_SERVICE: '${variable.TERM_OF_SERVICE}',
PRIVACY_POLICY: '${variable.PRIVACY_POLICY}'
`;
}
}
10 changes: 9 additions & 1 deletion .scripts/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export type Env = Readonly<{
GAUZY_API_SERVER_URL: string;
NEXT_PUBLIC_GAUZY_API_SERVER_URL: string;
DESKTOP_WEB_SERVER_HOSTNAME: string;
TERM_OF_SERVICE: string;
PRIVACY_POLICY: string;
}>

export const env = cleanEnv(process.env, {
Expand All @@ -31,7 +33,7 @@ export const env = cleanEnv(process.env, {
default: 'https://github.com/ever-co/ever-teams'
}),
PLATFORM_LOGO: str({
default: 'src/resources/icons/platform-logo.png'
default: 'https://app.ever.team/assets/ever-teams.png'
}),
DESKTOP_WEB_SERVER_APP_NAME: str({
default: 'ever-teams-server-web'
Expand Down Expand Up @@ -69,5 +71,11 @@ export const env = cleanEnv(process.env, {
DESKTOP_WEB_SERVER_HOSTNAME: str({
default: '0.0.0.0', // let's use the same one for now for all envs
desc: 'WARNING: Using 0.0.0.0 binds to all network interfaces. Use with caution in production.'
}),
TERM_OF_SERVICE: str({
default: 'https://ever.team/tos'
}),
PRIVACY_POLICY: str({
default: 'https://ever.team/privacy'
})
});
53 changes: 51 additions & 2 deletions apps/server-web/src/main/helpers/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const EventLists = {
webServerStop: 'WEB_SERVER_STOP',
gotoSetting: 'GO_TO_SETTING',
gotoAbout: 'GO_TO_ABOUT',
OPEN_WINDOW: 'OPEN_WINDOW',
UPDATE_AVAILABLE: 'UPDATE_AVAILABLE',
UPDATE_ERROR: 'UPDATE_ERROR',
UPDATE_NOT_AVAILABLE: 'UPDATE_NOT_AVAILABLE',
Expand All @@ -19,7 +20,8 @@ export const EventLists = {
CHANGE_THEME: 'CHANGE_THEME',
SETUP_WINDOW: 'SETUP_WINDOW',
SETTING_WINDOW_DEV: 'SETTING_WINDOW_DEV',
SERVER_WINDOW_DEV: 'SERVER_WINDOW_DEV'
SERVER_WINDOW_DEV: 'SERVER_WINDOW_DEV',
WINDOW_EVENT: 'WINDOW_EVENT'
}

export const SettingPageTypeMessage = {
Expand All @@ -40,7 +42,13 @@ export const SettingPageTypeMessage = {
updateSettingResponse: 'update-setting-response',
updateCancel: 'update-cancel',
restartServer: 'restart-server',
themeChange: 'theme-change'
themeChange: 'theme-change',
linkAction: 'link-action'
}

export const APP_LINK = {
TERM_OF_SERVICE: 'TERM_OF_SERVICE',
PRIVACY_POLICY: 'PRIVACY_POLICY'
}

export const ServerPageTypeMessage = {
Expand All @@ -63,3 +71,44 @@ export const IPC_TYPES: {
UPDATER_PAGE: 'updater-page',
SERVER_PAGE: 'server-page'
}

export const WindowOptions = {
SETTING_WINDOW: {
width: 1024,
height: 728,
hashPath: 'setting'
},
LOG_WINDOW: {
width: 1024,
height: 728,
hashPath: 'history-console'
},
SETUP_WINDOW: {
width: 1024,
height: 728,
hashPath: 'setup'
},
ABOUT_WINDOW: {
width: 300,
height: 250,
hashPath: 'about'
}
}

export const WindowTypes: {
SETTING_WINDOW: 'SETTING_WINDOW',
LOG_WINDOW: 'LOG_WINDOW',
SETUP_WINDOW: 'SETUP_WINDOW',
ABOUT_WINDOW: 'ABOUT_WINDOW'
} = {
SETTING_WINDOW: 'SETTING_WINDOW',
LOG_WINDOW: 'LOG_WINDOW',
SETUP_WINDOW: 'SETUP_WINDOW',
ABOUT_WINDOW: 'ABOUT_WINDOW'
}

export const WINDOW_EVENTS: {
CLOSE: 'close'
} = {
CLOSE: 'close'
}
5 changes: 5 additions & 0 deletions apps/server-web/src/main/helpers/interfaces/i-events.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { IWindowTypes } from "./i-window";

export interface IOpenWindow {
windowType: IWindowTypes
}
8 changes: 8 additions & 0 deletions apps/server-web/src/main/helpers/interfaces/i-window.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Menu } from "electron";

export type IWindowTypes = 'SETTING_WINDOW' | 'LOG_WINDOW' | 'SETUP_WINDOW' | 'ABOUT_WINDOW'

export interface IAppWindow {
windowType: IWindowTypes,
menu: Menu
}
2 changes: 2 additions & 0 deletions apps/server-web/src/main/helpers/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ export * from './i-server';
export * from './i-desktop-dialog';
export * from './i-constant';
export * from './i-menu';
export * from './i-window';
export * from './i-events';
Loading

0 comments on commit 72a58d6

Please sign in to comment.