Merge remote-tracking branch 'upstream/master'
commit
86f9fa8e56
|
@ -29,7 +29,7 @@ export default function DropDown({
|
||||||
}
|
}
|
||||||
|
|
||||||
useDocumentClick(e => {
|
useDocumentClick(e => {
|
||||||
if (!ref.current.contains(e.target)) {
|
if (!ref.current?.contains(e.target)) {
|
||||||
setShowMenu(false);
|
setShowMenu(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default function MenuButton({
|
||||||
}
|
}
|
||||||
|
|
||||||
useDocumentClick(e => {
|
useDocumentClick(e => {
|
||||||
if (!ref.current.contains(e.target)) {
|
if (!ref.current?.contains(e.target)) {
|
||||||
setShowMenu(false);
|
setShowMenu(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import React, { useRef } from 'react';
|
import React, { useRef } from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
import { useRouter } from 'next/router';
|
||||||
import Button from 'components/common/Button';
|
import Button from 'components/common/Button';
|
||||||
import FormLayout, { FormButtons, FormRow } from 'components/layout/FormLayout';
|
import FormLayout, { FormButtons, FormRow } from 'components/layout/FormLayout';
|
||||||
import CopyButton from 'components/common/CopyButton';
|
import CopyButton from 'components/common/CopyButton';
|
||||||
|
|
||||||
export default function TrackingCodeForm({ values, onClose }) {
|
export default function TrackingCodeForm({ values, onClose }) {
|
||||||
const ref = useRef();
|
const ref = useRef();
|
||||||
|
const { basePath } = useRouter();
|
||||||
const { name, share_id } = values;
|
const { name, share_id } = values;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -23,7 +25,9 @@ export default function TrackingCodeForm({ values, onClose }) {
|
||||||
rows={3}
|
rows={3}
|
||||||
cols={60}
|
cols={60}
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
defaultValue={`${document.location.origin}/share/${share_id}/${encodeURIComponent(name)}`}
|
defaultValue={`${
|
||||||
|
document.location.origin
|
||||||
|
}${basePath}/share/${share_id}/${encodeURIComponent(name)}`}
|
||||||
readOnly
|
readOnly
|
||||||
/>
|
/>
|
||||||
</FormRow>
|
</FormRow>
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import React, { useRef } from 'react';
|
import React, { useRef } from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
import { useRouter } from 'next/router';
|
||||||
import Button from 'components/common/Button';
|
import Button from 'components/common/Button';
|
||||||
import FormLayout, { FormButtons, FormRow } from 'components/layout/FormLayout';
|
import FormLayout, { FormButtons, FormRow } from 'components/layout/FormLayout';
|
||||||
import CopyButton from 'components/common/CopyButton';
|
import CopyButton from 'components/common/CopyButton';
|
||||||
|
|
||||||
export default function TrackingCodeForm({ values, onClose }) {
|
export default function TrackingCodeForm({ values, onClose }) {
|
||||||
const ref = useRef();
|
const ref = useRef();
|
||||||
|
const { basePath } = useRouter();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormLayout>
|
<FormLayout>
|
||||||
|
@ -22,7 +24,7 @@ export default function TrackingCodeForm({ values, onClose }) {
|
||||||
rows={3}
|
rows={3}
|
||||||
cols={60}
|
cols={60}
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
defaultValue={`<script async defer data-website-id="${values.website_uuid}" src="${document.location.origin}/umami.js"></script>`}
|
defaultValue={`<script async defer data-website-id="${values.website_uuid}" src="${document.location.origin}${basePath}/umami.js"></script>`}
|
||||||
readOnly
|
readOnly
|
||||||
/>
|
/>
|
||||||
</FormRow>
|
</FormRow>
|
||||||
|
|
|
@ -18,13 +18,13 @@ export default function Header() {
|
||||||
<header className="container">
|
<header className="container">
|
||||||
{user?.is_admin && <UpdateNotice />}
|
{user?.is_admin && <UpdateNotice />}
|
||||||
<div className={classNames(styles.header, 'row align-items-center')}>
|
<div className={classNames(styles.header, 'row align-items-center')}>
|
||||||
<div className="col-12 col-md-12 col-lg-3">
|
<div className="col-6 col-lg-3 order-1 order-lg-1">
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>
|
||||||
<Icon icon={<Logo />} size="large" className={styles.logo} />
|
<Icon icon={<Logo />} size="large" className={styles.logo} />
|
||||||
<Link href={user ? '/' : 'https://umami.is'}>umami</Link>
|
<Link href={user ? '/' : 'https://umami.is'}>umami</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-12 col-md-12 col-lg-6">
|
<div className="col-12 col-lg-6 order-3 order-lg-2">
|
||||||
{user && (
|
{user && (
|
||||||
<div className={styles.nav}>
|
<div className={styles.nav}>
|
||||||
<Link href="/dashboard">
|
<Link href="/dashboard">
|
||||||
|
@ -39,7 +39,7 @@ export default function Header() {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-12 col-md-12 col-lg-3">
|
<div className="col-6 col-lg-3 order-2 order-lg-3">
|
||||||
<div className={styles.buttons}>
|
<div className={styles.buttons}>
|
||||||
<ThemeButton />
|
<ThemeButton />
|
||||||
<LanguageButton menuAlign="right" />
|
<LanguageButton menuAlign="right" />
|
||||||
|
|
|
@ -33,17 +33,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 992px) {
|
@media only screen and (max-width: 992px) {
|
||||||
.title {
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
font-size: var(--font-size-large);
|
font-size: var(--font-size-large);
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.buttons {
|
@media only screen and (max-width: 576px) {
|
||||||
justify-content: center;
|
.header {
|
||||||
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ export default function Layout({ title, children, header = true, footer = true }
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>umami{title && ` - ${title}`}</title>
|
<title>umami{title && ` - ${title}`}</title>
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="favicon.ico" />
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default function EventsTable({ websiteId, ...props }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const Label = ({ value }) => {
|
const Label = ({ value }) => {
|
||||||
const [event, label] = value.split(':');
|
const [event, label] = value.split('\t');
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tag>{event}</Tag>
|
<Tag>{event}</Tag>
|
||||||
|
|
|
@ -10,12 +10,23 @@ import Arrow from 'assets/arrow-right.svg';
|
||||||
import styles from './WebsiteHeader.module.css';
|
import styles from './WebsiteHeader.module.css';
|
||||||
|
|
||||||
export default function WebsiteHeader({ websiteId, title, domain, showLink = false }) {
|
export default function WebsiteHeader({ websiteId, title, domain, showLink = false }) {
|
||||||
|
const header = showLink ? (
|
||||||
|
<>
|
||||||
|
<Favicon domain={domain} />
|
||||||
|
<Link href="/website/[...id]" as={`/website/${websiteId}/${title}`}>
|
||||||
|
{title}
|
||||||
|
</Link>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<div>
|
||||||
|
<Favicon domain={domain} />
|
||||||
|
{title}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageHeader>
|
<PageHeader>
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>{header}</div>
|
||||||
<Favicon domain={domain} />
|
|
||||||
{title}
|
|
||||||
</div>
|
|
||||||
<ActiveUsers className={styles.active} websiteId={websiteId} />
|
<ActiveUsers className={styles.active} websiteId={websiteId} />
|
||||||
<ButtonLayout align="right">
|
<ButtonLayout align="right">
|
||||||
<RefreshButton websiteId={websiteId} />
|
<RefreshButton websiteId={websiteId} />
|
||||||
|
|
|
@ -29,14 +29,13 @@ export default function AccountSettings() {
|
||||||
|
|
||||||
const Checkmark = ({ is_admin }) => (is_admin ? <Icon icon={<Check />} size="medium" /> : null);
|
const Checkmark = ({ is_admin }) => (is_admin ? <Icon icon={<Check />} size="medium" /> : null);
|
||||||
|
|
||||||
const DashboardLink = row =>
|
const DashboardLink = row => (
|
||||||
row.is_admin ? null : (
|
<Link href={`/dashboard/${row.user_id}/${row.username}`}>
|
||||||
<Link href={`/dashboard/${row.user_id}/${row.username}`}>
|
<a>
|
||||||
<a>
|
<Icon icon={<LinkIcon />} />
|
||||||
<Icon icon={<LinkIcon />} />
|
</a>
|
||||||
</a>
|
</Link>
|
||||||
</Link>
|
);
|
||||||
);
|
|
||||||
|
|
||||||
const Buttons = row =>
|
const Buttons = row =>
|
||||||
row.username !== 'admin' ? (
|
row.username !== 'admin' ? (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.menu {
|
.menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
min-width: 500px;
|
min-width: 560px;
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
|
import { useRouter } from 'next/router';
|
||||||
import { get } from 'lib/web';
|
import { get } from 'lib/web';
|
||||||
import { setShareToken } from 'redux/actions/app';
|
import { setShareToken } from 'redux/actions/app';
|
||||||
|
|
||||||
export default function useShareToken(shareId) {
|
export default function useShareToken(shareId) {
|
||||||
|
const { basePath } = useRouter();
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const shareToken = useSelector(state => state.app.shareToken);
|
const shareToken = useSelector(state => state.app.shareToken);
|
||||||
|
|
||||||
async function loadToken(id) {
|
async function loadToken(id) {
|
||||||
const { data } = await get(`/api/share/${id}`);
|
const { data } = await get(`${basePath}/api/share/${id}`);
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
dispatch(setShareToken(data));
|
dispatch(setShareToken(data));
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
"message.confirm-delete": "Sind sie sich sicher {target} zu löschen?",
|
"message.confirm-delete": "Sind sie sich sicher {target} zu löschen?",
|
||||||
"message.copied": "In Zwischenablage kopiert!",
|
"message.copied": "In Zwischenablage kopiert!",
|
||||||
"message.delete-warning": "Alle zugehörigen Daten werden auch gelöscht.",
|
"message.delete-warning": "Alle zugehörigen Daten werden auch gelöscht.",
|
||||||
"message.failure": "Es it ein Fehler aufgetreten.",
|
"message.failure": "Es ist ein Fehler aufgetreten.",
|
||||||
"message.get-share-url": "Freigabe-URL abrufen",
|
"message.get-share-url": "Freigabe-URL abrufen",
|
||||||
"message.get-tracking-code": "Erstelle Tracking Kennung",
|
"message.get-tracking-code": "Erstelle Tracking Kennung",
|
||||||
"message.go-to-settings": "Zu den Einstellungen",
|
"message.go-to-settings": "Zu den Einstellungen",
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
"message.page-not-found": "Seite nicht gefunden.",
|
"message.page-not-found": "Seite nicht gefunden.",
|
||||||
"message.powered-by": "Ermöglicht durch {name}",
|
"message.powered-by": "Ermöglicht durch {name}",
|
||||||
"message.save-success": "Erfolgreich gespeichert.",
|
"message.save-success": "Erfolgreich gespeichert.",
|
||||||
"message.share-url": "Dies ist der öffentliche URL zum Teilen für {target}.",
|
"message.share-url": "Dies ist die öffentliche URL zum Teilen für {target}.",
|
||||||
"message.track-stats": "Um die Statistiken für {target} zu übermitteln, platzieren Sie bitte den folgenden Quelltext im {head} ihrer Homepage.",
|
"message.track-stats": "Um die Statistiken für {target} zu übermitteln, platzieren Sie bitte den folgenden Quelltext im {head} ihrer Homepage.",
|
||||||
"message.type-delete": "Geben Sie {delete} in das Feld unten ein um zu bestätigen.",
|
"message.type-delete": "Geben Sie {delete} in das Feld unten ein um zu bestätigen.",
|
||||||
"metrics.actions": "Aktionen",
|
"metrics.actions": "Aktionen",
|
||||||
|
|
|
@ -0,0 +1,99 @@
|
||||||
|
{
|
||||||
|
"label.accounts": "חשבונות",
|
||||||
|
"label.add-account": "הוספה",
|
||||||
|
"label.add-website": "הוספת אתר",
|
||||||
|
"label.administrator": "מנהל",
|
||||||
|
"label.all": "הכל",
|
||||||
|
"label.all-websites": "כל האתרים",
|
||||||
|
"label.back": "חזרה",
|
||||||
|
"label.cancel": "ביטול",
|
||||||
|
"label.change-password": "שינוי סיסמה",
|
||||||
|
"label.confirm-password": "אישור סיסמה",
|
||||||
|
"label.copy-to-clipboard": "העתקה",
|
||||||
|
"label.current-password": "סיסמה נוכחית",
|
||||||
|
"label.custom-range": "טווח מותאם",
|
||||||
|
"label.dashboard": "דשבורד",
|
||||||
|
"label.date-range": "טווח תאריכים",
|
||||||
|
"label.default-date-range": "טווח תאריכים בברירת מחדל",
|
||||||
|
"label.delete": "הסרה",
|
||||||
|
"label.delete-account": "הסרת חשבון",
|
||||||
|
"label.delete-website": "הסרת אתר",
|
||||||
|
"label.dismiss": "שיחרור",
|
||||||
|
"label.domain": "דומיין",
|
||||||
|
"label.edit": "עריכה",
|
||||||
|
"label.edit-account": "עריכת חשבון",
|
||||||
|
"label.edit-website": "עריכת אתר",
|
||||||
|
"label.enable-share-url": "הפעלת URL שיתוף",
|
||||||
|
"label.invalid": "לא תקין",
|
||||||
|
"label.invalid-domain": "דומיין לא תקין",
|
||||||
|
"label.last-days": "{x} ימים אחרונים",
|
||||||
|
"label.last-hours": "{x} שעות אחרונות",
|
||||||
|
"label.logged-in-as": "מחובר כ-{username}",
|
||||||
|
"label.login": "התחברות",
|
||||||
|
"label.logout": "התנתקות",
|
||||||
|
"label.more": "עוד",
|
||||||
|
"label.name": "שם",
|
||||||
|
"label.new-password": "סיסמה חדשה",
|
||||||
|
"label.password": "סיסמה",
|
||||||
|
"label.passwords-dont-match": "סיסמאות לא תואמות",
|
||||||
|
"label.profile": "פרופיל",
|
||||||
|
"label.realtime": "זמן אמת",
|
||||||
|
"label.realtime-logs": "לוגים - זמן אמת",
|
||||||
|
"label.refresh": "רענון",
|
||||||
|
"label.required": "נדרש",
|
||||||
|
"label.reset": "איפוס",
|
||||||
|
"label.save": "שמירה",
|
||||||
|
"label.settings": "הגדרות",
|
||||||
|
"label.share-url": "שיתוף URL",
|
||||||
|
"label.single-day": "יום בודד",
|
||||||
|
"label.this-month": "החודש",
|
||||||
|
"label.this-week": "השבוע",
|
||||||
|
"label.this-year": "השנה",
|
||||||
|
"label.timezone": "אזור זמן",
|
||||||
|
"label.today": "היום",
|
||||||
|
"label.tracking-code": "קוד מעקב",
|
||||||
|
"label.unknown": "לא ידוע",
|
||||||
|
"label.username": "שם משתמש",
|
||||||
|
"label.view-details": "פרטים נוספים",
|
||||||
|
"label.websites": "אתרים",
|
||||||
|
"message.active-users": "{x} נוכחיים {x, plural, one {מבקר} other {מבקרים}}",
|
||||||
|
"message.confirm-delete": "האם באמת למחוק את {target}?",
|
||||||
|
"message.copied": "הועתק!",
|
||||||
|
"message.delete-warning": "כל המידע המקושר יימחק",
|
||||||
|
"message.failure": "משהו השתבש",
|
||||||
|
"message.get-share-url": "קבלת URL שיתוף",
|
||||||
|
"message.get-tracking-code": "קבלת קוד מעקב",
|
||||||
|
"message.go-to-settings": "להדרותג",
|
||||||
|
"message.incorrect-username-password": "שם משתמש או סיסמה לא נכונים",
|
||||||
|
"message.log.visitor": "מבקר ממדינת {country} משתמבש בדפדפן {browser} ב-{os} {device}",
|
||||||
|
"message.new-version-available": "גרסה חדשה של Umami {version} זמינה!",
|
||||||
|
"message.no-data-available": "אין מידע זמין",
|
||||||
|
"message.no-websites-configured": "לא מוגדרים אתרים",
|
||||||
|
"message.page-not-found": "דף לא נמצא",
|
||||||
|
"message.powered-by": "Powered by {name}",
|
||||||
|
"message.save-success": "נשמר בהצלחה",
|
||||||
|
"message.share-url": "זהו URL ציבורי עבור {target}",
|
||||||
|
"message.track-stats": "יש להוסיף את הקוד הבא לאזור ה-{head} של האתר",
|
||||||
|
"message.type-delete": "הקלידו {delete} בתיבה על מנת לאשר",
|
||||||
|
"metrics.actions": "פעולות",
|
||||||
|
"metrics.average-visit-time": "זמן ביקור ממוצע",
|
||||||
|
"metrics.bounce-rate": "Bounce rate",
|
||||||
|
"metrics.browsers": "דפדפנים",
|
||||||
|
"metrics.countries": "מדינות",
|
||||||
|
"metrics.device.desktop": "דסקטופ",
|
||||||
|
"metrics.device.laptop": "לפטופ",
|
||||||
|
"metrics.device.mobile": "מובייל",
|
||||||
|
"metrics.device.tablet": "טאבלט",
|
||||||
|
"metrics.devices": "מכשירים",
|
||||||
|
"metrics.events": "אירועים",
|
||||||
|
"metrics.filter.combined": "משותף",
|
||||||
|
"metrics.filter.domain-only": "דומיין בלבד",
|
||||||
|
"metrics.filter.raw": "גולמי",
|
||||||
|
"metrics.operating-systems": "מערכות הפעלה",
|
||||||
|
"metrics.page-views": "צפיות בדפים",
|
||||||
|
"metrics.pages": "דפים",
|
||||||
|
"metrics.referrers": "מפנים",
|
||||||
|
"metrics.unique-visitors": "מבקרים ייחודיים",
|
||||||
|
"metrics.views": "צפיות",
|
||||||
|
"metrics.visitors": "מבקרים"
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
{
|
||||||
|
"label.accounts": "Utenti",
|
||||||
|
"label.add-account": "Aggiungi utente",
|
||||||
|
"label.add-website": "Aggiungi sito",
|
||||||
|
"label.administrator": "Amministratore",
|
||||||
|
"label.all": "Tutto",
|
||||||
|
"label.all-websites": "Tutti i siti web",
|
||||||
|
"label.back": "Indietro",
|
||||||
|
"label.cancel": "Annulla",
|
||||||
|
"label.change-password": "Modifica password",
|
||||||
|
"label.confirm-password": "Conferma password",
|
||||||
|
"label.copy-to-clipboard": "Copia",
|
||||||
|
"label.current-password": "Password corrente",
|
||||||
|
"label.custom-range": "Personalizzato",
|
||||||
|
"label.dashboard": "Dashboard",
|
||||||
|
"label.date-range": "Periodo",
|
||||||
|
"label.default-date-range": "Periodo standard",
|
||||||
|
"label.delete": "Elimina",
|
||||||
|
"label.delete-account": "Elimina account",
|
||||||
|
"label.delete-website": "Elimina sito",
|
||||||
|
"label.dismiss": "Scarta",
|
||||||
|
"label.domain": "Dominio",
|
||||||
|
"label.edit": "Modifica",
|
||||||
|
"label.edit-account": "Modifica account",
|
||||||
|
"label.edit-website": "Modifica sito",
|
||||||
|
"label.enable-share-url": "Abilita URL di condivisione",
|
||||||
|
"label.invalid": "Non valido",
|
||||||
|
"label.invalid-domain": "Dominio non valido",
|
||||||
|
"label.last-days": "Ultimi {x} giorni",
|
||||||
|
"label.last-hours": "Ultime {x} ore",
|
||||||
|
"label.logged-in-as": "Ciao {username}",
|
||||||
|
"label.login": "Login",
|
||||||
|
"label.logout": "Logout",
|
||||||
|
"label.more": "Dettagli",
|
||||||
|
"label.name": "Nome",
|
||||||
|
"label.new-password": "Nuova password",
|
||||||
|
"label.password": "Password",
|
||||||
|
"label.passwords-dont-match": "Le password non corrispondono",
|
||||||
|
"label.profile": "Profilo",
|
||||||
|
"label.realtime": "Realtime",
|
||||||
|
"label.realtime-logs": "Log in realtime",
|
||||||
|
"label.refresh": "Ricarica",
|
||||||
|
"label.required": "Obbligatorio",
|
||||||
|
"label.reset": "Reset",
|
||||||
|
"label.save": "Salva",
|
||||||
|
"label.settings": "Impostazioni",
|
||||||
|
"label.share-url": "Share URL",
|
||||||
|
"label.single-day": "Singolo giorno",
|
||||||
|
"label.this-month": "Questo mese",
|
||||||
|
"label.this-week": "Questa settimana",
|
||||||
|
"label.this-year": "Quest'anno",
|
||||||
|
"label.timezone": "Fuso orario",
|
||||||
|
"label.today": "Oggi",
|
||||||
|
"label.tracking-code": "Codice di tracking",
|
||||||
|
"label.unknown": "Sconosciuto",
|
||||||
|
"label.username": "Username",
|
||||||
|
"label.view-details": "Vedi dettagli",
|
||||||
|
"label.websites": "Siti web",
|
||||||
|
"message.active-users": "{x} {x, plural, one {visitatore} other {visitatori}} online",
|
||||||
|
"message.confirm-delete": "Sei sicuro di voler eliminare {target}?",
|
||||||
|
"message.copied": "Copiato!",
|
||||||
|
"message.delete-warning": "Saranno eliminati anche tutti i dati associati.",
|
||||||
|
"message.failure": "Si è verificato un errore.",
|
||||||
|
"message.get-share-url": "Ottieni l'URL di condivisione",
|
||||||
|
"message.get-tracking-code": "Ottieni il codice di tracking",
|
||||||
|
"message.go-to-settings": "Vai alle impostazioni",
|
||||||
|
"message.incorrect-username-password": "Username o password non corretti.",
|
||||||
|
"message.log.visitor": "Utenti da {country} tramite {browser} su {os} {device}",
|
||||||
|
"message.new-version-available": "Una nuova versione umami {version} è disponibile!",
|
||||||
|
"message.no-data-available": "Nessun dato disponibile.",
|
||||||
|
"message.no-websites-configured": "Non hai ancora configurato alcun sito.",
|
||||||
|
"message.page-not-found": "Pagina non trovata",
|
||||||
|
"message.powered-by": "Powered by {name}",
|
||||||
|
"message.save-success": "Salvato!",
|
||||||
|
"message.share-url": "Questo è l'URL di condivisione per {target}.",
|
||||||
|
"message.track-stats": "Per tracciare le statistiche di {target}, inserisci questo codice nella sezione {head} del tuo sito web.",
|
||||||
|
"message.type-delete": "Digita {delete} nel box qui sotto per confermare.",
|
||||||
|
"metrics.actions": "Azioni",
|
||||||
|
"metrics.average-visit-time": "Tempo medio di visita",
|
||||||
|
"metrics.bounce-rate": "Frequenza di rimbalzo",
|
||||||
|
"metrics.browsers": "Browser",
|
||||||
|
"metrics.countries": "Nazioni",
|
||||||
|
"metrics.device.desktop": "Desktop",
|
||||||
|
"metrics.device.laptop": "Laptop",
|
||||||
|
"metrics.device.mobile": "Mobile",
|
||||||
|
"metrics.device.tablet": "Tablet",
|
||||||
|
"metrics.devices": "Dispositivi",
|
||||||
|
"metrics.events": "Eventi",
|
||||||
|
"metrics.filter.combined": "Aggregati",
|
||||||
|
"metrics.filter.domain-only": "Solo dominio",
|
||||||
|
"metrics.filter.raw": "Raw",
|
||||||
|
"metrics.operating-systems": "Sistemi operativi",
|
||||||
|
"metrics.page-views": "Visualizzazioni di pagina",
|
||||||
|
"metrics.pages": "Pagine",
|
||||||
|
"metrics.referrers": "Referr",
|
||||||
|
"metrics.unique-visitors": "Visitatori unici",
|
||||||
|
"metrics.views": "Visualizzazioni",
|
||||||
|
"metrics.visitors": "Visitatori"
|
||||||
|
}
|
|
@ -32,7 +32,7 @@
|
||||||
"label.login": "Zaloguj sie",
|
"label.login": "Zaloguj sie",
|
||||||
"label.logout": "Wyloguj",
|
"label.logout": "Wyloguj",
|
||||||
"label.more": "Więcej",
|
"label.more": "Więcej",
|
||||||
"label.name": "Name",
|
"label.name": "Nazwa",
|
||||||
"label.new-password": "Nowe hasło",
|
"label.new-password": "Nowe hasło",
|
||||||
"label.password": "Hasło",
|
"label.password": "Hasło",
|
||||||
"label.passwords-dont-match": "Hasła się nie zgadzają",
|
"label.passwords-dont-match": "Hasła się nie zgadzają",
|
||||||
|
|
|
@ -0,0 +1,99 @@
|
||||||
|
{
|
||||||
|
"label.accounts": "Contas",
|
||||||
|
"label.add-account": "Adicionar conta",
|
||||||
|
"label.add-website": "Adicionar site",
|
||||||
|
"label.administrator": "Administrador",
|
||||||
|
"label.all": "Todos",
|
||||||
|
"label.all-websites": "Todos os sites",
|
||||||
|
"label.back": "Voltar",
|
||||||
|
"label.cancel": "Cancelar",
|
||||||
|
"label.change-password": "Alterar a senha",
|
||||||
|
"label.confirm-password": "Confirme a nova senha",
|
||||||
|
"label.copy-to-clipboard": "Copiar para a área de transferência",
|
||||||
|
"label.current-password": "Senha atual",
|
||||||
|
"label.custom-range": "Intervalo personalizado",
|
||||||
|
"label.dashboard": "Painel",
|
||||||
|
"label.date-range": "Intervalo de datas",
|
||||||
|
"label.default-date-range": "Intervalo de datas predefinido",
|
||||||
|
"label.delete": "Remover",
|
||||||
|
"label.delete-account": "Remover conta",
|
||||||
|
"label.delete-website": "Remover site",
|
||||||
|
"label.dismiss": "Dispensar",
|
||||||
|
"label.domain": "Domínio",
|
||||||
|
"label.edit": "Editar",
|
||||||
|
"label.edit-account": "Editar conta",
|
||||||
|
"label.edit-website": "Editar site",
|
||||||
|
"label.enable-share-url": "Ativar link de compartilhamento",
|
||||||
|
"label.invalid": "Inválido",
|
||||||
|
"label.invalid-domain": "Domínio inválido",
|
||||||
|
"label.last-days": "Últimos {x} dias",
|
||||||
|
"label.last-hours": "Últimas {x} horas",
|
||||||
|
"label.logged-in-as": "Sessão iniciada como {username}",
|
||||||
|
"label.login": "Iniciar sessão",
|
||||||
|
"label.logout": "Sair",
|
||||||
|
"label.more": "Mais",
|
||||||
|
"label.name": "Nome",
|
||||||
|
"label.new-password": "Nova senha",
|
||||||
|
"label.password": "Senha",
|
||||||
|
"label.passwords-dont-match": "As senhas não correspondem",
|
||||||
|
"label.profile": "Perfil",
|
||||||
|
"label.realtime": "Tempo real",
|
||||||
|
"label.realtime-logs": "Relatório em tempo real",
|
||||||
|
"label.refresh": "Atualizar",
|
||||||
|
"label.required": "Obrigatório",
|
||||||
|
"label.reset": "Redefinir",
|
||||||
|
"label.save": "Salvar",
|
||||||
|
"label.settings": "Configurações",
|
||||||
|
"label.share-url": "Link de compartilhamento",
|
||||||
|
"label.single-day": "Dia específico",
|
||||||
|
"label.this-month": "Este mês",
|
||||||
|
"label.this-week": "Esta semana",
|
||||||
|
"label.this-year": "Este ano",
|
||||||
|
"label.timezone": "Fuso horário",
|
||||||
|
"label.today": "Hoje",
|
||||||
|
"label.tracking-code": "Código de rastreamento",
|
||||||
|
"label.unknown": "Desconhecido",
|
||||||
|
"label.username": "Nome de usuário",
|
||||||
|
"label.view-details": "Ver detalhes",
|
||||||
|
"label.websites": "Sites",
|
||||||
|
"message.active-users": "{x} {x, plural, one {visitante} other {visitantes}} neste momento",
|
||||||
|
"message.confirm-delete": "Deseja realmente remover {target}?",
|
||||||
|
"message.copied": "Copiado!",
|
||||||
|
"message.delete-warning": "Todos os dados associados também serão eliminados.",
|
||||||
|
"message.failure": "Ocorreu um erro.",
|
||||||
|
"message.get-share-url": "Obter link de compartilhamento",
|
||||||
|
"message.get-tracking-code": "Obter código de rastreamento",
|
||||||
|
"message.go-to-settings": "Ir para as configurações",
|
||||||
|
"message.incorrect-username-password": "O nome de usuário e/ou senha está incorreto.",
|
||||||
|
"message.log.visitor": "Visitante de {country} usando {browser} no {device} {os}",
|
||||||
|
"message.new-version-available": "Uma nova versão de umami {version} está disponível!",
|
||||||
|
"message.no-data-available": "Sem dados disponíveis.",
|
||||||
|
"message.no-websites-configured": "Nenhum site foi configurado ainda.",
|
||||||
|
"message.page-not-found": "Página não encontrada.",
|
||||||
|
"message.powered-by": "Distribuído por {name}",
|
||||||
|
"message.save-success": "Salvo com sucesso.",
|
||||||
|
"message.share-url": "Este é o link público de compartilhamento para {target}.",
|
||||||
|
"message.track-stats": "Para gerar estatística para {target}, coloque o seguinte código no {head} do html do seu site.",
|
||||||
|
"message.type-delete": "Escreva {delete} abaixo para continuar.",
|
||||||
|
"metrics.actions": "Ações",
|
||||||
|
"metrics.average-visit-time": "Tempo médio da visita",
|
||||||
|
"metrics.bounce-rate": "Taxa de rejeição",
|
||||||
|
"metrics.browsers": "Navegadores",
|
||||||
|
"metrics.countries": "Países",
|
||||||
|
"metrics.device.desktop": "Computador",
|
||||||
|
"metrics.device.laptop": "Notebook",
|
||||||
|
"metrics.device.mobile": "Celular",
|
||||||
|
"metrics.device.tablet": "Tablet",
|
||||||
|
"metrics.devices": "Dispositivos",
|
||||||
|
"metrics.events": "Eventos",
|
||||||
|
"metrics.filter.combined": "Combinado",
|
||||||
|
"metrics.filter.domain-only": "Apenas domínio",
|
||||||
|
"metrics.filter.raw": "Dados brutos",
|
||||||
|
"metrics.operating-systems": "Sistemas operacionais",
|
||||||
|
"metrics.page-views": "Visualizações de página",
|
||||||
|
"metrics.pages": "Páginas",
|
||||||
|
"metrics.referrers": "Referências",
|
||||||
|
"metrics.unique-visitors": "Visitantes únicos",
|
||||||
|
"metrics.views": "Visualizações",
|
||||||
|
"metrics.visitors": "Visitantes"
|
||||||
|
}
|
|
@ -116,7 +116,7 @@ export const BROWSERS = {
|
||||||
edge: 'Edge',
|
edge: 'Edge',
|
||||||
'edge-ios': 'Edge (iOS)',
|
'edge-ios': 'Edge (iOS)',
|
||||||
yandexbrowser: 'Yandex',
|
yandexbrowser: 'Yandex',
|
||||||
kakaotalk: 'KKaoTalk',
|
kakaotalk: 'KaKaoTalk',
|
||||||
samsung: 'Samsung',
|
samsung: 'Samsung',
|
||||||
silk: 'Silk',
|
silk: 'Silk',
|
||||||
miui: 'MIUI',
|
miui: 'MIUI',
|
||||||
|
|
15
lib/lang.js
15
lib/lang.js
|
@ -8,13 +8,16 @@ import {
|
||||||
es,
|
es,
|
||||||
fi,
|
fi,
|
||||||
fr,
|
fr,
|
||||||
|
he,
|
||||||
hi,
|
hi,
|
||||||
id,
|
id,
|
||||||
|
it,
|
||||||
ja,
|
ja,
|
||||||
nb,
|
nb,
|
||||||
nl,
|
nl,
|
||||||
pl,
|
pl,
|
||||||
pt,
|
pt,
|
||||||
|
ptBR,
|
||||||
ro,
|
ro,
|
||||||
ru,
|
ru,
|
||||||
sv,
|
sv,
|
||||||
|
@ -40,6 +43,7 @@ import svMessages from 'lang-compiled/sv-SE.json';
|
||||||
import grMessages from 'lang-compiled/el-GR.json';
|
import grMessages from 'lang-compiled/el-GR.json';
|
||||||
import foMessages from 'lang-compiled/fo-FO.json';
|
import foMessages from 'lang-compiled/fo-FO.json';
|
||||||
import ptMessages from 'lang-compiled/pt-PT.json';
|
import ptMessages from 'lang-compiled/pt-PT.json';
|
||||||
|
import ptBRMessages from 'lang-compiled/pt-BR.json';
|
||||||
import roMessages from 'lang-compiled/ro-RO.json';
|
import roMessages from 'lang-compiled/ro-RO.json';
|
||||||
import nbNOMessages from 'lang-compiled/nb-NO.json';
|
import nbNOMessages from 'lang-compiled/nb-NO.json';
|
||||||
import idMessages from 'lang-compiled/id-ID.json';
|
import idMessages from 'lang-compiled/id-ID.json';
|
||||||
|
@ -49,6 +53,8 @@ import csMessages from 'lang-compiled/cs-CZ.json';
|
||||||
import plMessages from 'lang-compiled/pl-PL.json';
|
import plMessages from 'lang-compiled/pl-PL.json';
|
||||||
import taMessages from 'lang-compiled/ta-IN.json';
|
import taMessages from 'lang-compiled/ta-IN.json';
|
||||||
import hiMessages from 'lang-compiled/hi-IN.json';
|
import hiMessages from 'lang-compiled/hi-IN.json';
|
||||||
|
import heMessages from 'lang-compiled/he-IL.json';
|
||||||
|
import itMessages from 'lang-compiled/it-IT.json';
|
||||||
|
|
||||||
export const messages = {
|
export const messages = {
|
||||||
'en-US': enMessages,
|
'en-US': enMessages,
|
||||||
|
@ -67,6 +73,7 @@ export const messages = {
|
||||||
'el-GR': grMessages,
|
'el-GR': grMessages,
|
||||||
'fo-FO': foMessages,
|
'fo-FO': foMessages,
|
||||||
'pt-PT': ptMessages,
|
'pt-PT': ptMessages,
|
||||||
|
'pt-BR': ptBRMessages,
|
||||||
'ro-RO': roMessages,
|
'ro-RO': roMessages,
|
||||||
'nb-NO': nbNOMessages,
|
'nb-NO': nbNOMessages,
|
||||||
'id-ID': idMessages,
|
'id-ID': idMessages,
|
||||||
|
@ -76,6 +83,8 @@ export const messages = {
|
||||||
'pl-PL': plMessages,
|
'pl-PL': plMessages,
|
||||||
'ta-IN': taMessages,
|
'ta-IN': taMessages,
|
||||||
'hi-IN': hiMessages,
|
'hi-IN': hiMessages,
|
||||||
|
'he-IL': heMessages,
|
||||||
|
'it-IT': itMessages,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const dateLocales = {
|
export const dateLocales = {
|
||||||
|
@ -95,6 +104,7 @@ export const dateLocales = {
|
||||||
'el-GR': el,
|
'el-GR': el,
|
||||||
'fo-FO': da,
|
'fo-FO': da,
|
||||||
'pt-PT': pt,
|
'pt-PT': pt,
|
||||||
|
'pt-BR': ptBR,
|
||||||
'ro-RO': ro,
|
'ro-RO': ro,
|
||||||
'nb-NO': nb,
|
'nb-NO': nb,
|
||||||
'id-ID': id,
|
'id-ID': id,
|
||||||
|
@ -104,6 +114,8 @@ export const dateLocales = {
|
||||||
'pl-PL': pl,
|
'pl-PL': pl,
|
||||||
'ta-In': ta,
|
'ta-In': ta,
|
||||||
'hi-IN': hi,
|
'hi-IN': hi,
|
||||||
|
'he-IL': he,
|
||||||
|
'it-IT': it,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const menuOptions = [
|
export const menuOptions = [
|
||||||
|
@ -117,7 +129,9 @@ export const menuOptions = [
|
||||||
{ label: 'Føroyskt', value: 'fo-FO', display: 'fo' },
|
{ label: 'Føroyskt', value: 'fo-FO', display: 'fo' },
|
||||||
{ label: 'Français', value: 'fr-FR', display: 'fr' },
|
{ label: 'Français', value: 'fr-FR', display: 'fr' },
|
||||||
{ label: 'Ελληνικά', value: 'el-GR', display: 'el' },
|
{ label: 'Ελληνικά', value: 'el-GR', display: 'el' },
|
||||||
|
{ label: 'עברית', value: 'he-IL', display: 'he' },
|
||||||
{ label: 'हिन्दी', value: 'hi-IN', display: 'hi' },
|
{ label: 'हिन्दी', value: 'hi-IN', display: 'hi' },
|
||||||
|
{ label: 'Italiano', value: 'it-IT', display: 'it' },
|
||||||
{ label: 'Bahasa Indonesia', value: 'id-ID', display: 'id' },
|
{ label: 'Bahasa Indonesia', value: 'id-ID', display: 'id' },
|
||||||
{ label: '日本語', value: 'ja-JP', display: 'ja' },
|
{ label: '日本語', value: 'ja-JP', display: 'ja' },
|
||||||
{ label: 'Монгол', value: 'mn-MN', display: 'mn' },
|
{ label: 'Монгол', value: 'mn-MN', display: 'mn' },
|
||||||
|
@ -125,6 +139,7 @@ export const menuOptions = [
|
||||||
{ label: 'Norsk Bokmål', value: 'nb-NO', display: 'nb' },
|
{ label: 'Norsk Bokmål', value: 'nb-NO', display: 'nb' },
|
||||||
{ label: 'Polski', value: 'pl-PL', display: 'pl' },
|
{ label: 'Polski', value: 'pl-PL', display: 'pl' },
|
||||||
{ label: 'Português', value: 'pt-PT', display: 'pt' },
|
{ label: 'Português', value: 'pt-PT', display: 'pt' },
|
||||||
|
{ label: 'Português do Brasil', value: 'pt-BR', display: 'pt-BR' },
|
||||||
{ label: 'Русский', value: 'ru-RU', display: 'ru' },
|
{ label: 'Русский', value: 'ru-RU', display: 'ru' },
|
||||||
{ label: 'Română', value: 'ro-RO', display: 'ro' },
|
{ label: 'Română', value: 'ro-RO', display: 'ro' },
|
||||||
{ label: 'Suomi', value: 'fi-FI', display: 'fi' },
|
{ label: 'Suomi', value: 'fi-FI', display: 'fi' },
|
||||||
|
|
|
@ -68,7 +68,7 @@ export function getTimestampInterval(field) {
|
||||||
|
|
||||||
export async function getWebsiteById(website_id) {
|
export async function getWebsiteById(website_id) {
|
||||||
return runQuery(
|
return runQuery(
|
||||||
prisma.website.findOne({
|
prisma.website.findUnique({
|
||||||
where: {
|
where: {
|
||||||
website_id,
|
website_id,
|
||||||
},
|
},
|
||||||
|
@ -78,7 +78,7 @@ export async function getWebsiteById(website_id) {
|
||||||
|
|
||||||
export async function getWebsiteByUuid(website_uuid) {
|
export async function getWebsiteByUuid(website_uuid) {
|
||||||
return runQuery(
|
return runQuery(
|
||||||
prisma.website.findOne({
|
prisma.website.findUnique({
|
||||||
where: {
|
where: {
|
||||||
website_uuid,
|
website_uuid,
|
||||||
},
|
},
|
||||||
|
@ -88,7 +88,7 @@ export async function getWebsiteByUuid(website_uuid) {
|
||||||
|
|
||||||
export async function getWebsiteByShareId(share_id) {
|
export async function getWebsiteByShareId(share_id) {
|
||||||
return runQuery(
|
return runQuery(
|
||||||
prisma.website.findOne({
|
prisma.website.findUnique({
|
||||||
where: {
|
where: {
|
||||||
share_id,
|
share_id,
|
||||||
},
|
},
|
||||||
|
@ -168,7 +168,7 @@ export async function createSession(website_id, data) {
|
||||||
|
|
||||||
export async function getSessionByUuid(session_uuid) {
|
export async function getSessionByUuid(session_uuid) {
|
||||||
return runQuery(
|
return runQuery(
|
||||||
prisma.session.findOne({
|
prisma.session.findUnique({
|
||||||
where: {
|
where: {
|
||||||
session_uuid,
|
session_uuid,
|
||||||
},
|
},
|
||||||
|
@ -225,7 +225,7 @@ export async function getAccounts() {
|
||||||
|
|
||||||
export async function getAccountById(user_id) {
|
export async function getAccountById(user_id) {
|
||||||
return runQuery(
|
return runQuery(
|
||||||
prisma.account.findOne({
|
prisma.account.findUnique({
|
||||||
where: {
|
where: {
|
||||||
user_id,
|
user_id,
|
||||||
},
|
},
|
||||||
|
@ -235,7 +235,7 @@ export async function getAccountById(user_id) {
|
||||||
|
|
||||||
export async function getAccountByUsername(username) {
|
export async function getAccountByUsername(username) {
|
||||||
return runQuery(
|
return runQuery(
|
||||||
prisma.account.findOne({
|
prisma.account.findUnique({
|
||||||
where: {
|
where: {
|
||||||
username,
|
username,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,6 +5,7 @@ module.exports = {
|
||||||
VERSION: pkg.version,
|
VERSION: pkg.version,
|
||||||
FORCE_SSL: !!process.env.FORCE_SSL,
|
FORCE_SSL: !!process.env.FORCE_SSL,
|
||||||
},
|
},
|
||||||
|
basePath: process.env.BASE_PATH,
|
||||||
webpack(config) {
|
webpack(config) {
|
||||||
config.module.rules.push({
|
config.module.rules.push({
|
||||||
test: /\.svg$/,
|
test: /\.svg$/,
|
||||||
|
|
52
package.json
52
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "umami",
|
"name": "umami",
|
||||||
"version": "1.8.0",
|
"version": "1.12.0",
|
||||||
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
|
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
|
||||||
"author": "Mike Cao <mike@mikecao.com>",
|
"author": "Mike Cao <mike@mikecao.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "npm-run-all build-tracker build-lang build-geo build-db build-app",
|
"build": "npm-run-all build-tracker build-lang build-geo build-db build-app",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"start-env": "node scripts/start-env.js",
|
"start-env": "node -r dotenv/config scripts/start-env.js",
|
||||||
"build-app": "next build",
|
"build-app": "next build",
|
||||||
"build-tracker": "rollup -c rollup.tracker.config.js",
|
"build-tracker": "rollup -c rollup.tracker.config.js",
|
||||||
"build-db": "npm-run-all copy-db-schema build-db-client",
|
"build-db": "npm-run-all copy-db-schema build-db-client",
|
||||||
|
@ -56,8 +56,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@prisma/client": "2.12.1",
|
"@prisma/client": "2.15.0",
|
||||||
"@reduxjs/toolkit": "^1.4.0",
|
"@reduxjs/toolkit": "^1.5.0",
|
||||||
"bcrypt": "^5.0.0",
|
"bcrypt": "^5.0.0",
|
||||||
"chalk": "^4.1.0",
|
"chalk": "^4.1.0",
|
||||||
"chart.js": "^2.9.4",
|
"chart.js": "^2.9.4",
|
||||||
|
@ -68,18 +68,18 @@
|
||||||
"date-fns-tz": "^1.0.12",
|
"date-fns-tz": "^1.0.12",
|
||||||
"detect-browser": "^5.2.0",
|
"detect-browser": "^5.2.0",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"formik": "^2.2.5",
|
"formik": "^2.2.6",
|
||||||
"immer": "^7.0.14",
|
"immer": "^8.0.1",
|
||||||
"is-localhost-ip": "^1.4.0",
|
"is-localhost-ip": "^1.4.0",
|
||||||
"isbot-fast": "^1.2.0",
|
"isbot-fast": "^1.2.0",
|
||||||
"jose": "^2.0.3",
|
"jose": "2.0.3",
|
||||||
"maxmind": "^4.3.1",
|
"maxmind": "^4.3.1",
|
||||||
"moment-timezone": "^0.5.32",
|
"moment-timezone": "^0.5.32",
|
||||||
"next": "^10.0.3",
|
"next": "^10.0.6",
|
||||||
"prompts": "2.4.0",
|
"prompts": "2.4.0",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^17.0.1",
|
"react-dom": "^17.0.1",
|
||||||
"react-intl": "^5.10.6",
|
"react-intl": "^5.12.0",
|
||||||
"react-redux": "^7.2.2",
|
"react-redux": "^7.2.2",
|
||||||
"react-simple-maps": "^2.3.0",
|
"react-simple-maps": "^2.3.0",
|
||||||
"react-spring": "^8.0.27",
|
"react-spring": "^8.0.27",
|
||||||
|
@ -89,41 +89,41 @@
|
||||||
"redux": "^4.0.5",
|
"redux": "^4.0.5",
|
||||||
"redux-thunk": "^2.3.0",
|
"redux-thunk": "^2.3.0",
|
||||||
"request-ip": "^2.1.3",
|
"request-ip": "^2.1.3",
|
||||||
"semver": "^7.3.2",
|
"semver": "^7.3.4",
|
||||||
"thenby": "^1.3.4",
|
"thenby": "^1.3.4",
|
||||||
"timezone-support": "^2.0.2",
|
"timezone-support": "^2.0.2",
|
||||||
"tinycolor2": "^1.4.2",
|
"tinycolor2": "^1.4.2",
|
||||||
"uuid": "^8.3.1"
|
"uuid": "^8.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@formatjs/cli": "^2.13.15",
|
"@formatjs/cli": "^2.13.16",
|
||||||
"@prisma/cli": "2.12.1",
|
"@prisma/cli": "2.15.0",
|
||||||
"@rollup/plugin-buble": "^0.21.3",
|
"@rollup/plugin-buble": "^0.21.3",
|
||||||
"@rollup/plugin-node-resolve": "^10.0.0",
|
"@rollup/plugin-node-resolve": "^11.1.1",
|
||||||
"@rollup/plugin-replace": "^2.3.4",
|
"@rollup/plugin-replace": "^2.3.4",
|
||||||
"@svgr/webpack": "^5.4.0",
|
"@svgr/webpack": "^5.5.0",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.3",
|
||||||
"del": "^6.0.0",
|
"del": "^6.0.0",
|
||||||
"dotenv-cli": "^4.0.0",
|
"dotenv-cli": "^4.0.0",
|
||||||
"eslint": "^7.14.0",
|
"eslint": "^7.19.0",
|
||||||
"eslint-config-prettier": "^6.15.0",
|
"eslint-config-prettier": "^7.2.0",
|
||||||
"eslint-plugin-prettier": "^3.1.3",
|
"eslint-plugin-prettier": "^3.3.1",
|
||||||
"eslint-plugin-react": "^7.21.5",
|
"eslint-plugin-react": "^7.22.0",
|
||||||
"eslint-plugin-react-hooks": "^4.2.0",
|
"eslint-plugin-react-hooks": "^4.2.0",
|
||||||
"extract-react-intl-messages": "^4.1.1",
|
"extract-react-intl-messages": "^4.1.1",
|
||||||
"husky": "^4.3.0",
|
"husky": "^4.3.8",
|
||||||
"lint-staged": "^10.5.2",
|
"lint-staged": "^10.5.3",
|
||||||
"loadtest": "5.1.0",
|
"loadtest": "5.1.2",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"postcss-flexbugs-fixes": "^4.2.1",
|
"postcss-flexbugs-fixes": "^5.0.2",
|
||||||
"postcss-import": "^13.0.0",
|
"postcss-import": "^13.0.0",
|
||||||
"postcss-preset-env": "^6.7.0",
|
"postcss-preset-env": "^6.7.0",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"prettier-eslint": "^12.0.0",
|
"prettier-eslint": "^12.0.0",
|
||||||
"rollup": "^2.34.0",
|
"rollup": "^2.38.3",
|
||||||
"rollup-plugin-hashbang": "^2.2.2",
|
"rollup-plugin-hashbang": "^2.2.2",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"stylelint": "^13.8.0",
|
"stylelint": "^13.9.0",
|
||||||
"stylelint-config-css-modules": "^2.2.0",
|
"stylelint-config-css-modules": "^2.2.0",
|
||||||
"stylelint-config-prettier": "^8.0.1",
|
"stylelint-config-prettier": "^8.0.1",
|
||||||
"stylelint-config-recommended": "^3.0.0",
|
"stylelint-config-recommended": "^3.0.0",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Head from "next/head";
|
import Head from 'next/head';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { IntlProvider } from 'react-intl';
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
import { useStore } from 'redux/store';
|
import { useStore } from 'redux/store';
|
||||||
|
@ -10,7 +10,6 @@ import 'styles/variables.css';
|
||||||
import 'styles/bootstrap-grid.css';
|
import 'styles/bootstrap-grid.css';
|
||||||
import 'styles/index.css';
|
import 'styles/index.css';
|
||||||
|
|
||||||
|
|
||||||
const Intl = ({ children }) => {
|
const Intl = ({ children }) => {
|
||||||
const [locale] = useLocale();
|
const [locale] = useLocale();
|
||||||
|
|
||||||
|
@ -29,15 +28,15 @@ export default function App({ Component, pageProps }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<Head>
|
<Head>
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png" />
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png" />
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/>
|
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png" />
|
||||||
<link rel="manifest" href="/site.webmanifest" />
|
<link rel="manifest" href="site.webmanifest" />
|
||||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
|
<link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5" />
|
||||||
<meta name="msapplication-TileColor" content="#da532c" />
|
<meta name="msapplication-TileColor" content="#da532c" />
|
||||||
<meta name="theme-color" content="#ffffff" />
|
<meta name="theme-color" content="#ffffff" />
|
||||||
</Head>
|
</Head>
|
||||||
<Intl>
|
<Intl>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
</Intl>
|
</Intl>
|
||||||
|
|
|
@ -20,7 +20,7 @@ function getTable(type) {
|
||||||
|
|
||||||
function getColumn(type) {
|
function getColumn(type) {
|
||||||
if (type === 'event') {
|
if (type === 'event') {
|
||||||
return `concat(event_type, ':', event_value)`;
|
return `concat(event_type, '\t', event_value)`;
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
{"AF":"Afghanistan","AL":"Albania","DZ":"Algeria","UM":"Altre isole americane del Pacifico","AD":"Andorra","AO":"Angola","AI":"Anguilla","AQ":"Antartide","AG":"Antigua e Barbuda","SA":"Arabia Saudita","AR":"Argentina","AM":"Armenia","AW":"Aruba","AU":"Australia","AT":"Austria","AZ":"Azerbaigian","BS":"Bahamas","BH":"Bahrein","BD":"Bangladesh","BB":"Barbados","BE":"Belgio","BZ":"Belize","BJ":"Benin","BM":"Bermuda","BT":"Bhutan","BY":"Bielorussia","BO":"Bolivia","BA":"Bosnia ed Erzegovina","BW":"Botswana","BR":"Brasile","BN":"Brunei","BG":"Bulgaria","BF":"Burkina Faso","BI":"Burundi","KH":"Cambogia","CM":"Camerun","CA":"Canada","CV":"Capo Verde","BQ":"Caraibi olandesi","CZ":"Cechia","TD":"Ciad","CL":"Cile","CN":"Cina","CY":"Cipro","VA":"Citt\u00e0 del Vaticano","CO":"Colombia","KM":"Comore","CD":"Congo - Kinshasa","CG":"Congo-Brazzaville","KP":"Corea del Nord","KR":"Corea del Sud","CI":"Costa d\u2019Avorio","CR":"Costa Rica","HR":"Croazia","CU":"Cuba","CW":"Cura\u00e7ao","DK":"Danimarca","DM":"Dominica","EC":"Ecuador","EG":"Egitto","SV":"El Salvador","AE":"Emirati Arabi Uniti","ER":"Eritrea","EE":"Estonia","ET":"Etiopia","FJ":"Figi","PH":"Filippine","FI":"Finlandia","FR":"Francia","GA":"Gabon","GM":"Gambia","GE":"Georgia","GS":"Georgia del Sud e Sandwich australi","DE":"Germania","GH":"Ghana","JM":"Giamaica","JP":"Giappone","GI":"Gibilterra","DJ":"Gibuti","JO":"Giordania","GR":"Grecia","GD":"Grenada","GL":"Groenlandia","GP":"Guadalupa","GU":"Guam","GT":"Guatemala","GG":"Guernsey","GN":"Guinea","GQ":"Guinea Equatoriale","GW":"Guinea-Bissau","GY":"Guyana","GF":"Guyana francese","HT":"Haiti","HN":"Honduras","IN":"India","ID":"Indonesia","IR":"Iran","IQ":"Iraq","IE":"Irlanda","IS":"Islanda","BV":"Isola Bouvet","CX":"Isola Christmas","IM":"Isola di Man","NF":"Isola Norfolk","AX":"Isole \u00c5land","KY":"Isole Cayman","CC":"Isole Cocos (Keeling)","CK":"Isole Cook","FO":"Isole F\u00e6r \u00d8er","FK":"Isole Falkland","HM":"Isole Heard e McDonald","MP":"Isole Marianne settentrionali","MH":"Isole Marshall","PN":"Isole Pitcairn","SB":"Isole Salomone","TC":"Isole Turks e Caicos","VI":"Isole Vergini Americane","VG":"Isole Vergini Britanniche","IL":"Israele","IT":"Italia","JE":"Jersey","KZ":"Kazakistan","KE":"Kenya","KG":"Kirghizistan","KI":"Kiribati","KW":"Kuwait","LA":"Laos","LS":"Lesotho","LV":"Lettonia","LB":"Libano","LR":"Liberia","LY":"Libia","LI":"Liechtenstein","LT":"Lituania","LU":"Lussemburgo","MK":"Macedonia del Nord","MG":"Madagascar","MW":"Malawi","MY":"Malaysia","MV":"Maldive","ML":"Mali","MT":"Malta","MA":"Marocco","MQ":"Martinica","MR":"Mauritania","MU":"Mauritius","YT":"Mayotte","MX":"Messico","FM":"Micronesia","MD":"Moldavia","MC":"Monaco","MN":"Mongolia","ME":"Montenegro","MS":"Montserrat","MZ":"Mozambico","MM":"Myanmar (Birmania)","NA":"Namibia","NR":"Nauru","NP":"Nepal","NI":"Nicaragua","NE":"Niger","NG":"Nigeria","NU":"Niue","NO":"Norvegia","NC":"Nuova Caledonia","NZ":"Nuova Zelanda","OM":"Oman","NL":"Paesi Bassi","PK":"Pakistan","PW":"Palau","PA":"Panam\u00e1","PG":"Papua Nuova Guinea","PY":"Paraguay","PE":"Per\u00f9","PF":"Polinesia francese","PL":"Polonia","PT":"Portogallo","PR":"Portorico","QA":"Qatar","HK":"RAS di Hong Kong","MO":"RAS di Macao","GB":"Regno Unito","CF":"Repubblica Centrafricana","DO":"Repubblica Dominicana","RE":"Riunione","RO":"Romania","RW":"Ruanda","RU":"Russia","EH":"Sahara occidentale","KN":"Saint Kitts e Nevis","LC":"Saint Lucia","MF":"Saint Martin","VC":"Saint Vincent e Grenadine","BL":"Saint-Barth\u00e9lemy","PM":"Saint-Pierre e Miquelon","WS":"Samoa","AS":"Samoa americane","SM":"San Marino","SH":"Sant\u2019Elena","ST":"S\u00e3o Tom\u00e9 e Pr\u00edncipe","SN":"Senegal","RS":"Serbia","SC":"Seychelles","SL":"Sierra Leone","SG":"Singapore","SX":"Sint Maarten","SY":"Siria","SK":"Slovacchia","SI":"Slovenia","SO":"Somalia","ES":"Spagna","LK":"Sri Lanka","US":"Stati Uniti","SS":"Sud Sudan","ZA":"Sudafrica","SD":"Sudan","SR":"Suriname","SJ":"Svalbard e Jan Mayen","SE":"Svezia","CH":"Svizzera","SZ":"Swaziland","TJ":"Tagikistan","TW":"Taiwan","TZ":"Tanzania","TF":"Terre australi francesi","PS":"Territori palestinesi","IO":"Territorio britannico dell\u2019Oceano Indiano","TH":"Thailandia","TL":"Timor Est","TG":"Togo","TK":"Tokelau","TO":"Tonga","TT":"Trinidad e Tobago","TN":"Tunisia","TR":"Turchia","TM":"Turkmenistan","TV":"Tuvalu","UA":"Ucraina","UG":"Uganda","HU":"Ungheria","UY":"Uruguay","UZ":"Uzbekistan","VU":"Vanuatu","VE":"Venezuela","VN":"Vietnam","WF":"Wallis e Futuna","YE":"Yemen","ZM":"Zambia","ZW":"Zimbabwe"}
|
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,7 @@ const commandlineOptions = {
|
||||||
maxRequests: 1,
|
maxRequests: 1,
|
||||||
},
|
},
|
||||||
// Heavy can saturate CPU which leads to requests stalling depending on machine
|
// Heavy can saturate CPU which leads to requests stalling depending on machine
|
||||||
// Keep an eye if --verbose logs pause, or if node CPU in top is > 100.
|
// Keep an eye if --verbose logs pause, or if node CPU in top is > 100.
|
||||||
// https://github.com/alexfernandez/loadtest#usage-donts
|
// https://github.com/alexfernandez/loadtest#usage-donts
|
||||||
heavy: {
|
heavy: {
|
||||||
concurrency: 10,
|
concurrency: 10,
|
||||||
|
@ -51,7 +51,6 @@ const options = {
|
||||||
const message = JSON.stringify(mockPageView());
|
const message = JSON.stringify(mockPageView());
|
||||||
options.headers['Content-Length'] = message.length;
|
options.headers['Content-Length'] = message.length;
|
||||||
options.headers['Content-Type'] = 'application/json';
|
options.headers['Content-Type'] = 'application/json';
|
||||||
options.headers['user-agent'] = 'User-Agent: Mozilla/5.0 LoadTest';
|
|
||||||
options.body = message;
|
options.body = message;
|
||||||
options.path = '/api/collect';
|
options.path = '/api/collect';
|
||||||
const request = client(options, callback);
|
const request = client(options, callback);
|
||||||
|
@ -95,15 +94,14 @@ loadtest.loadTest(options, (error, results) => {
|
||||||
if (results.errorCodes && Object.keys(results.errorCodes).length) {
|
if (results.errorCodes && Object.keys(results.errorCodes).length) {
|
||||||
console.log(chalk.redBright('*'), chalk.red('Error Codes:'), results.errorCodes);
|
console.log(chalk.redBright('*'), chalk.red('Error Codes:'), results.errorCodes);
|
||||||
}
|
}
|
||||||
// console.log(results);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new object for each request. Note, we could randomize values here if desired.
|
* Create a new object for each request. Note, we could randomize values here if desired.
|
||||||
*
|
*
|
||||||
* TODO: Need a better way of passing in websiteId, hostname, URL.
|
* TODO: Need a better way of passing in websiteId, hostname, URL.
|
||||||
*
|
*
|
||||||
* @param {object} payload pageview payload same as sent via tracker
|
* @param {object} payload pageview payload same as sent via tracker
|
||||||
*/
|
*/
|
||||||
function mockPageView(
|
function mockPageView(
|
||||||
payload = {
|
payload = {
|
||||||
|
@ -121,6 +119,9 @@ function mockPageView(
|
||||||
|
|
||||||
// If you pass in --verbose, this function is called
|
// If you pass in --verbose, this function is called
|
||||||
function statusCallback(error, result, latency) {
|
function statusCallback(error, result, latency) {
|
||||||
|
if (error) {
|
||||||
|
return console.error(chalk.redBright(error));
|
||||||
|
}
|
||||||
console.log(
|
console.log(
|
||||||
chalk.yellowBright(`\n## req #${result.requestIndex + 1} of ${latency.totalRequests}`),
|
chalk.yellowBright(`\n## req #${result.requestIndex + 1} of ${latency.totalRequests}`),
|
||||||
);
|
);
|
||||||
|
|
|
@ -28,6 +28,11 @@ body {
|
||||||
font-family: 'Noto Sans JP', sans-serif !important;
|
font-family: 'Noto Sans JP', sans-serif !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.he-IL {
|
||||||
|
display: inline-block;
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
|
||||||
*,
|
*,
|
||||||
*:before,
|
*:before,
|
||||||
*:after {
|
*:after {
|
||||||
|
|
|
@ -35,7 +35,7 @@ import { removeTrailingSlash } from '../lib/url';
|
||||||
|
|
||||||
const root = hostUrl
|
const root = hostUrl
|
||||||
? removeTrailingSlash(hostUrl)
|
? removeTrailingSlash(hostUrl)
|
||||||
: new URL(script.src).href.split('/').slice(0, -1).join('/');
|
: script.src.split('/').slice(0, -1).join('/');
|
||||||
const screen = `${width}x${height}`;
|
const screen = `${width}x${height}`;
|
||||||
const listeners = [];
|
const listeners = [];
|
||||||
let currentUrl = `${pathname}${search}`;
|
let currentUrl = `${pathname}${search}`;
|
||||||
|
@ -133,19 +133,22 @@ import { removeTrailingSlash } from '../lib/url';
|
||||||
/* Handle history changes */
|
/* Handle history changes */
|
||||||
|
|
||||||
const handlePush = (state, title, url) => {
|
const handlePush = (state, title, url) => {
|
||||||
|
if (!url) return;
|
||||||
|
|
||||||
removeEvents();
|
removeEvents();
|
||||||
|
|
||||||
currentRef = currentUrl;
|
currentRef = currentUrl;
|
||||||
const newUrl = url.toString();
|
const newUrl = url.toString();
|
||||||
|
|
||||||
if (newUrl.substring(0, 4) === 'http') {
|
if (newUrl.substring(0, 4) === 'http') {
|
||||||
const { pathname, search } = new URL(newUrl);
|
currentUrl = '/' + newUrl.split('/').splice(3).join('/');
|
||||||
currentUrl = `${pathname}${search}`;
|
|
||||||
} else {
|
} else {
|
||||||
currentUrl = newUrl;
|
currentUrl = newUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
trackView(currentUrl, currentRef);
|
if (currentUrl !== currentRef) {
|
||||||
|
trackView(currentUrl, currentRef);
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(addEvents, 300);
|
setTimeout(addEvents, 300);
|
||||||
};
|
};
|
||||||
|
@ -156,6 +159,8 @@ import { removeTrailingSlash } from '../lib/url';
|
||||||
const umami = event_value => trackEvent(event_value);
|
const umami = event_value => trackEvent(event_value);
|
||||||
umami.trackView = trackView;
|
umami.trackView = trackView;
|
||||||
umami.trackEvent = trackEvent;
|
umami.trackEvent = trackEvent;
|
||||||
|
umami.addEvents = addEvents;
|
||||||
|
umami.removeEvents = removeEvents;
|
||||||
|
|
||||||
window.umami = umami;
|
window.umami = umami;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue