Skip to content

Commit

Permalink
refactor: expose public dir
Browse files Browse the repository at this point in the history
  • Loading branch information
cpvalente committed Oct 20, 2024
1 parent 82810f1 commit dd13eb3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/client/src/common/models/Info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export const ontimePlaceholderInfo: GetInfo = {
version: '2.0.0',
serverPort: 4001,
osc: oscPlaceholderSettings,
cssOverride: '',
publicDir: '',
};
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export default function ViewSettingsForm() {
<Alert status='info' variant='ontime-on-dark-info'>
<AlertIcon />
<AlertDescription>
You can override the styles of the viewers with a custom CSS file. <br />
{info?.cssOverride && `In your installation the file is at ${info?.cssOverride}`}
You can the Ontime views or customise its styles by modifying the provided CSS file. <br />
The CSS file is in the user directory at {`${info.publicDir}/user/styles/override.css`}
<br />
<br />
<ExternalLink href={cssOverrideDocsUrl}>See the docs</ExternalLink>
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/api-data/session/session.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GetInfo, SessionStats } from 'ontime-types';

import { getDataProvider } from '../../classes/data-provider/DataProvider.js';
import { publicFiles } from '../../setup/index.js';
import { publicDir } from '../../setup/index.js';
import { getNetworkInterfaces } from '../../utils/networkInterfaces.js';
import { socket } from '../../adapters/WebsocketAdapter.js';
import { getLastRequest } from '../../api-integration/integration.controller.js';
Expand Down Expand Up @@ -44,6 +44,6 @@ export async function getInfo(): Promise<GetInfo> {
version,
serverPort,
osc,
cssOverride: publicFiles.cssOverride,
publicDir: publicDir.root,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface GetInfo {
version: string;
serverPort: number;
osc: OSCSettings;
cssOverride: string;
publicDir: string;
}

export type ProjectFile = {
Expand Down

0 comments on commit dd13eb3

Please sign in to comment.