Skip to content

Commit

Permalink
Update docs links, code style in alrt (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
eatonphil committed Nov 17, 2021
1 parent 1db0d8c commit 453ada4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions server/auth.ts
Expand Up @@ -7,7 +7,7 @@ import {
TokenSet,
} from 'openid-client';
import passport from 'passport';
import { SITE_ROOT } from '../shared/constants';
import { DOCS_ROOT } from '../shared/constants';
import { App } from './app';
import { Config } from './config';
import log from './log';
Expand Down Expand Up @@ -43,7 +43,7 @@ export class Auth {
});
} else {
log.fatal(
`Missing auth scheme. Review ${SITE_ROOT}/docs/Installation.html#configuration for how to configure auth.`
`Missing auth scheme. Review ${DOCS_ROOT}/Installation.html#configuration for how to configure auth.`
);
}
}
Expand Down
2 changes: 2 additions & 0 deletions shared/constants.ts
Expand Up @@ -38,3 +38,5 @@ export const MODE_FEATURES = {
dashboard: MODE === 'server',
scheduledExports: MODE === 'server',
};

export const DOCS_ROOT = SITE_ROOT + '/docs/' + VERSION;
4 changes: 2 additions & 2 deletions ui/panels/DatabasePanel.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
import { SITE_ROOT } from '../../shared/constants';
import { DOCS_ROOT } from '../../shared/constants';
import { NoConnectorError } from '../../shared/errors';
import {
ConnectorInfo,
Expand Down Expand Up @@ -192,7 +192,7 @@ export function DatabaseInfo({ panel }: { panel: DatabasePanelInfo }) {
Use <code>DM_getPanel($panel_number_or_name)</code> to reference other
panels. Once you have called this once for one panel, use{' '}
<code>t_$panel_number_or_name</code> to refer to it again. Read more{' '}
<a href={SITE_ROOT + '/docs/Panels/Code_Panels.html'}>here</a>.
<a href={DOCS_ROOT + '/Panels/Code_Panels.html'}>here</a>.
</React.Fragment>
);
}
Expand Down
6 changes: 3 additions & 3 deletions ui/panels/ProgramPanel.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import { shape } from 'shape';
import { MODE, SITE_ROOT } from '../../shared/constants';
import { DOCS_ROOT, MODE } from '../../shared/constants';
import { LANGUAGES, SupportedLanguages } from '../../shared/languages';
import { PanelInfo, PanelResult, ProgramPanelInfo } from '../../shared/state';
import { panelRPC } from '../asyncRPC';
Expand Down Expand Up @@ -112,7 +112,7 @@ export function ProgramInfo({ panel }: { panel: ProgramPanelInfo }) {
Use <code>DM_getPanel($panel_number_or_name)</code> to reference other
panels. Once you have called this once for one panel, use{' '}
<code>t_$panel_number_or_name</code> to refer to it again. Read more{' '}
<a href={SITE_ROOT + '/docs/Panels/Code_Panels.html'}>here</a>.
<a href={DOCS_ROOT + '/Panels/Code_Panels.html'}>here</a>.
</React.Fragment>
);
}
Expand All @@ -122,7 +122,7 @@ export function ProgramInfo({ panel }: { panel: ProgramPanelInfo }) {
Use builtin functions, <code>DM_setPanel($some_array_data)</code> and{' '}
<code>DM_getPanel($panel_number_or_name)</code>, to interact with other
panels. Read more{' '}
<a href={SITE_ROOT + '/docs/Panels/Code_Panels.html'}>here</a>.
<a href={DOCS_ROOT + '/Panels/Code_Panels.html'}>here</a>.
</React.Fragment>
);
}
Expand Down
2 changes: 1 addition & 1 deletion ui/style.css
Expand Up @@ -611,7 +611,7 @@ header > div {
padding: 0 5px;
}

code {
p code {
border: 1px solid #ddd;
background: rgba(255, 255, 255, 0.5);
margin: 0 3px;
Expand Down

0 comments on commit 453ada4

Please sign in to comment.