fix: improve dashboard fullscreen text (#15139)

This commit is contained in:
gordern 2021-06-14 17:54:37 +08:00 committed by GitHub
parent 856a2bd5ed
commit 57035c1b93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -112,7 +112,7 @@ test('should render the menu items', async () => {
expect(screen.getByText('Refresh dashboard')).toBeInTheDocument();
expect(screen.getByText('Set auto-refresh interval')).toBeInTheDocument();
expect(screen.getByText('Download as image')).toBeInTheDocument();
expect(screen.getByText('Toggle fullscreen')).toBeInTheDocument();
expect(screen.getByText('Enter fullscreen')).toBeInTheDocument();
});
test('should render the menu items in edit mode', async () => {

View File

@ -307,7 +307,9 @@ class HeaderActionsDropdown extends React.PureComponent {
{!editMode && (
<Menu.Item key={MENU_KEYS.TOGGLE_FULLSCREEN}>
{t('Toggle fullscreen')}
{getUrlParam(URL_PARAMS.standalone)
? t('Exit fullscreen')
: t('Enter fullscreen')}
</Menu.Item>
)}
</Menu>