mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Playlists: don't show TV mode in singleTopNav
(#95339)
don't show TV mode in singleTopNav
This commit is contained in:
parent
d1a00540dd
commit
d0e124e2f9
@ -1,6 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
|
||||
import { SelectableValue, UrlQueryMap, urlUtil } from '@grafana/data';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { Checkbox, ClipboardButton, Field, FieldSet, Input, Modal, RadioButtonGroup } from '@grafana/ui';
|
||||
import { t, Trans } from 'app/core/internationalization';
|
||||
import { buildBaseUrl } from 'app/features/dashboard/components/ShareModal/utils';
|
||||
@ -15,12 +16,14 @@ interface Props {
|
||||
export const ShareModal = ({ playlistUid, onDismiss }: Props) => {
|
||||
const [mode, setMode] = useState<PlaylistMode>(false);
|
||||
const [autoFit, setAutofit] = useState(false);
|
||||
const isSingleTopNav = config.featureToggles.singleTopNav;
|
||||
|
||||
const modes: Array<SelectableValue<PlaylistMode>> = [
|
||||
{ label: t('share-playlist.mode-normal', 'Normal'), value: false },
|
||||
{ label: t('share-playlist.mode-tv', 'TV'), value: 'tv' },
|
||||
{ label: t('share-playlist.mode-kiosk', 'Kiosk'), value: true },
|
||||
];
|
||||
const modes: Array<SelectableValue<PlaylistMode>> = [];
|
||||
modes.push({ label: t('share-playlist.mode-normal', 'Normal'), value: false });
|
||||
if (!isSingleTopNav) {
|
||||
modes.push({ label: t('share-playlist.mode-tv', 'TV'), value: 'tv' });
|
||||
}
|
||||
modes.push({ label: t('share-playlist.mode-kiosk', 'Kiosk'), value: true });
|
||||
|
||||
const params: UrlQueryMap = {};
|
||||
if (mode) {
|
||||
|
@ -17,12 +17,14 @@ export const StartModal = ({ playlist, onDismiss }: Props) => {
|
||||
const [displayTimePicker, setDisplayTimePicker] = useState(true);
|
||||
const [displayVariables, setDisplayVariables] = useState(true);
|
||||
const [displayLinks, setDisplayLinks] = useState(true);
|
||||
const isSingleTopNav = config.featureToggles.singleTopNav;
|
||||
|
||||
const modes: Array<SelectableValue<PlaylistMode>> = [
|
||||
{ label: 'Normal', value: false },
|
||||
{ label: 'TV', value: 'tv' },
|
||||
{ label: 'Kiosk', value: true },
|
||||
];
|
||||
const modes: Array<SelectableValue<PlaylistMode>> = [];
|
||||
modes.push({ label: 'Normal', value: false });
|
||||
if (!isSingleTopNav) {
|
||||
modes.push({ label: 'TV', value: 'tv' });
|
||||
}
|
||||
modes.push({ label: 'Kiosk', value: true });
|
||||
|
||||
const onStart = () => {
|
||||
const params: UrlQueryMap = {};
|
||||
|
Loading…
Reference in New Issue
Block a user