diff --git a/app.json b/app.json new file mode 100644 index 00000000..a27dc6fe --- /dev/null +++ b/app.json @@ -0,0 +1,26 @@ +{ + "name": "Umami", + "description": "Umami is a simple, fast, website analytics alternative to Google Analytics.", + "keywords": [ + "analytics", + "charts", + "statistics", + "web-analytics" + ], + "website": "https://umami.is", + "repository": "https://github.com/mikecao/umami", + "addons": [ + "heroku-postgresql" + ], + "env": { + "HASH_SALT": { + "description": "Used to generate unique values for your installation", + "required": true, + "generator": "secret" + } + }, + "scripts": { + "postdeploy": "psql $DATABASE_URL -f sql/schema.postgresql.sql" + }, + "success_url": "/" +} diff --git a/assets/arrow-up-right-from-square.svg b/assets/arrow-up-right-from-square.svg new file mode 100644 index 00000000..90ad457f --- /dev/null +++ b/assets/arrow-up-right-from-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/components/common/Calendar.js b/components/common/Calendar.js index fd28363c..7aea34c3 100644 --- a/components/common/Calendar.js +++ b/components/common/Calendar.js @@ -20,7 +20,7 @@ import Button from './Button'; import useLocale from 'hooks/useLocale'; import { dateFormat } from 'lib/date'; import { chunk } from 'lib/array'; -import { dateLocales } from 'lib/lang'; +import { getDateLocale } from 'lib/lang'; import Chevron from 'assets/chevron-down.svg'; import Cross from 'assets/times.svg'; import styles from './Calendar.module.css'; @@ -106,8 +106,8 @@ export default function Calendar({ date, minDate, maxDate, onChange }) { } const DaySelector = ({ date, minDate, maxDate, locale, onSelect }) => { - const startWeek = startOfWeek(date, { locale: dateLocales[locale] }); - const startMonth = startOfMonth(date, { locale: dateLocales[locale] }); + const startWeek = startOfWeek(date, { locale: getDateLocale(locale) }); + const startMonth = startOfMonth(date, { locale: getDateLocale(locale) }); const startDay = subDays(startMonth, startMonth.getDay()); const month = date.getMonth(); const year = date.getFullYear(); diff --git a/components/common/ErrorMessage.module.css b/components/common/ErrorMessage.module.css index 232b5f84..88769cf5 100644 --- a/components/common/ErrorMessage.module.css +++ b/components/common/ErrorMessage.module.css @@ -6,6 +6,8 @@ margin: auto; display: flex; z-index: 1; + background-color: var(--gray50); + padding: 10px; } .icon { diff --git a/components/common/MenuButton.js b/components/common/MenuButton.js index 40df2e0c..eb8d62fe 100644 --- a/components/common/MenuButton.js +++ b/components/common/MenuButton.js @@ -16,6 +16,7 @@ function MenuButton({ menuAlign = 'right', onSelect, renderValue, + hideLabel, }) { const [showMenu, setShowMenu] = useState(false); const ref = useRef(); @@ -44,7 +45,9 @@ function MenuButton({ onClick={toggleMenu} variant="light" > -
{renderValue ? renderValue(selectedOption) : value}
+ {!hideLabel && ( +
{renderValue ? renderValue(selectedOption) : value}
+ )} {showMenu && ( +