Skip to content

Commit

Permalink
fix: correct component imports, open apps in same window
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgee committed Dec 17, 2024
1 parent 1970312 commit 250c449
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Layer } from '@dhis2-ui/layer'
import { Modal } from '@dhis2-ui/modal'
import { Popper } from '@dhis2-ui/popper'
import { render, fireEvent, waitFor } from '@testing-library/react'
import { mount } from 'enzyme'
import React from 'react'
import { act } from 'react-dom/test-utils'
import { Modal } from '../../../../modal/src/modal/modal.js'
import { Button } from '../../index.js'
import { DropdownButton } from '../dropdown-button.js'

Expand Down
40 changes: 35 additions & 5 deletions components/header-bar/i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,45 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-06-12T03:40:49.012Z\n"
"PO-Revision-Date: 2024-06-12T03:40:49.013Z\n"
"POT-Creation-Date: 2024-12-17T01:42:03.299Z\n"
"PO-Revision-Date: 2024-12-17T01:42:03.300Z\n"

msgid "Search apps"
msgstr "Search apps"

msgid "Search commands"
msgstr "Search commands"

msgid "Search shortcuts"
msgstr "Search shortcuts"

msgid "Search apps, shortcuts, commands"
msgstr "Search apps, shortcuts, commands"

msgid "Browse apps"
msgstr "Browse apps"

msgid "Browse commands"
msgstr "Browse commands"

msgid "Browse shortcuts"
msgstr "Browse shortcuts"

msgid "Logout"
msgstr "Logout"

msgid "Top apps"
msgstr "Top apps"

msgid "All Apps"
msgstr "All Apps"

msgid "All Commands"
msgstr "All Commands"

msgid "All Shortcuts"
msgstr "All Shortcuts"

msgid "DHIS2 {{dhis2Version}}"
msgstr "DHIS2 {{dhis2Version}}"

Expand Down Expand Up @@ -62,9 +95,6 @@ msgstr "Help"
msgid "About DHIS2"
msgstr "About DHIS2"

msgid "Logout"
msgstr "Logout"

msgid "New {{appName}} version available"
msgstr "New {{appName}} version available"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export const useNavigation = ({
?.childNodes?.[highlightedIndex]?.click()
} else {
// open apps, shortcuts link
window.open(itemsArray[highlightedIndex]?.['defaultAction'])
window.location.href = itemsArray[highlightedIndex]?.['defaultAction']
// TODO: execute commands
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function AppItem({ name, path, img, highlighted, handleMouseEnter }) {
return (
<a
href={path}
target="_self"
className={cx('item', { highlighted })}
onMouseEnter={handleMouseEnter}
tabIndex={-1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function ListItem({
return (
<a
href={path ? path : undefined}
target="_self"
onClick={onClickHandler}
className={cx('item', { highlighted })}
data-test={dataTest}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { colors, spacers, theme } from '@dhis2/ui-constants'
import { IconSearch16 } from '@dhis2/ui-icons'
import { InputField } from '@dhis2-ui/input'
import PropTypes from 'prop-types'
import React from 'react'
import { InputField } from '../../../../input/src/input-field/input-field.js'

function Search({ value, onChange, placeholder }) {
return (
Expand Down

0 comments on commit 250c449

Please sign in to comment.