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 { useState } from 'react';
|
||||||
|
|
||||||
import { SelectableValue, UrlQueryMap, urlUtil } from '@grafana/data';
|
import { SelectableValue, UrlQueryMap, urlUtil } from '@grafana/data';
|
||||||
|
import { config } from '@grafana/runtime';
|
||||||
import { Checkbox, ClipboardButton, Field, FieldSet, Input, Modal, RadioButtonGroup } from '@grafana/ui';
|
import { Checkbox, ClipboardButton, Field, FieldSet, Input, Modal, RadioButtonGroup } from '@grafana/ui';
|
||||||
import { t, Trans } from 'app/core/internationalization';
|
import { t, Trans } from 'app/core/internationalization';
|
||||||
import { buildBaseUrl } from 'app/features/dashboard/components/ShareModal/utils';
|
import { buildBaseUrl } from 'app/features/dashboard/components/ShareModal/utils';
|
||||||
@ -15,12 +16,14 @@ interface Props {
|
|||||||
export const ShareModal = ({ playlistUid, onDismiss }: Props) => {
|
export const ShareModal = ({ playlistUid, onDismiss }: Props) => {
|
||||||
const [mode, setMode] = useState<PlaylistMode>(false);
|
const [mode, setMode] = useState<PlaylistMode>(false);
|
||||||
const [autoFit, setAutofit] = useState(false);
|
const [autoFit, setAutofit] = useState(false);
|
||||||
|
const isSingleTopNav = config.featureToggles.singleTopNav;
|
||||||
|
|
||||||
const modes: Array<SelectableValue<PlaylistMode>> = [
|
const modes: Array<SelectableValue<PlaylistMode>> = [];
|
||||||
{ label: t('share-playlist.mode-normal', 'Normal'), value: false },
|
modes.push({ label: t('share-playlist.mode-normal', 'Normal'), value: false });
|
||||||
{ label: t('share-playlist.mode-tv', 'TV'), value: 'tv' },
|
if (!isSingleTopNav) {
|
||||||
{ label: t('share-playlist.mode-kiosk', 'Kiosk'), value: true },
|
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 = {};
|
const params: UrlQueryMap = {};
|
||||||
if (mode) {
|
if (mode) {
|
||||||
|
@ -17,12 +17,14 @@ export const StartModal = ({ playlist, onDismiss }: Props) => {
|
|||||||
const [displayTimePicker, setDisplayTimePicker] = useState(true);
|
const [displayTimePicker, setDisplayTimePicker] = useState(true);
|
||||||
const [displayVariables, setDisplayVariables] = useState(true);
|
const [displayVariables, setDisplayVariables] = useState(true);
|
||||||
const [displayLinks, setDisplayLinks] = useState(true);
|
const [displayLinks, setDisplayLinks] = useState(true);
|
||||||
|
const isSingleTopNav = config.featureToggles.singleTopNav;
|
||||||
|
|
||||||
const modes: Array<SelectableValue<PlaylistMode>> = [
|
const modes: Array<SelectableValue<PlaylistMode>> = [];
|
||||||
{ label: 'Normal', value: false },
|
modes.push({ label: 'Normal', value: false });
|
||||||
{ label: 'TV', value: 'tv' },
|
if (!isSingleTopNav) {
|
||||||
{ label: 'Kiosk', value: true },
|
modes.push({ label: 'TV', value: 'tv' });
|
||||||
];
|
}
|
||||||
|
modes.push({ label: 'Kiosk', value: true });
|
||||||
|
|
||||||
const onStart = () => {
|
const onStart = () => {
|
||||||
const params: UrlQueryMap = {};
|
const params: UrlQueryMap = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user