mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
revert prisma schema to latest, add global css for scroll-bar, fix css
This commit is contained in:
parent
c479a20cc0
commit
9b814aa1ca
13 changed files with 76 additions and 24 deletions
|
|
@ -10,7 +10,7 @@ datasource db {
|
||||||
}
|
}
|
||||||
|
|
||||||
model User {
|
model User {
|
||||||
id String @id @unique @map("user_id") @db.Uuid
|
id String @id() @map("user_id") @db.Uuid
|
||||||
username String @unique @db.VarChar(255)
|
username String @unique @db.VarChar(255)
|
||||||
password String @db.VarChar(60)
|
password String @db.VarChar(60)
|
||||||
role String @map("role") @db.VarChar(50)
|
role String @map("role") @db.VarChar(50)
|
||||||
|
|
@ -32,7 +32,7 @@ model User {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Session {
|
model Session {
|
||||||
id String @id @unique @map("session_id") @db.Uuid
|
id String @id() @map("session_id") @db.Uuid
|
||||||
websiteId String @map("website_id") @db.Uuid
|
websiteId String @map("website_id") @db.Uuid
|
||||||
browser String? @db.VarChar(20)
|
browser String? @db.VarChar(20)
|
||||||
os String? @db.VarChar(20)
|
os String? @db.VarChar(20)
|
||||||
|
|
@ -64,7 +64,7 @@ model Session {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Website {
|
model Website {
|
||||||
id String @id @unique @map("website_id") @db.Uuid
|
id String @id() @map("website_id") @db.Uuid
|
||||||
name String @db.VarChar(100)
|
name String @db.VarChar(100)
|
||||||
domain String? @db.VarChar(500)
|
domain String? @db.VarChar(500)
|
||||||
resetAt DateTime? @map("reset_at") @db.Timestamptz(6)
|
resetAt DateTime? @map("reset_at") @db.Timestamptz(6)
|
||||||
|
|
@ -185,7 +185,7 @@ model SessionData {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Team {
|
model Team {
|
||||||
id String @id() @unique() @map("team_id") @db.Uuid
|
id String @id() @map("team_id") @db.Uuid
|
||||||
name String @db.VarChar(50)
|
name String @db.VarChar(50)
|
||||||
accessCode String? @unique @map("access_code") @db.VarChar(50)
|
accessCode String? @unique @map("access_code") @db.VarChar(50)
|
||||||
logoUrl String? @map("logo_url") @db.VarChar(2183)
|
logoUrl String? @map("logo_url") @db.VarChar(2183)
|
||||||
|
|
@ -197,14 +197,14 @@ model Team {
|
||||||
members TeamUser[]
|
members TeamUser[]
|
||||||
links Link[]
|
links Link[]
|
||||||
pixels Pixel[]
|
pixels Pixel[]
|
||||||
boards Board[]
|
boards Board[]
|
||||||
|
|
||||||
@@index([accessCode])
|
@@index([accessCode])
|
||||||
@@map("team")
|
@@map("team")
|
||||||
}
|
}
|
||||||
|
|
||||||
model TeamUser {
|
model TeamUser {
|
||||||
id String @id() @unique() @map("team_user_id") @db.Uuid
|
id String @id() @map("team_user_id") @db.Uuid
|
||||||
teamId String @map("team_id") @db.Uuid
|
teamId String @map("team_id") @db.Uuid
|
||||||
userId String @map("user_id") @db.Uuid
|
userId String @map("user_id") @db.Uuid
|
||||||
role String @db.VarChar(50)
|
role String @db.VarChar(50)
|
||||||
|
|
@ -220,7 +220,7 @@ model TeamUser {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Report {
|
model Report {
|
||||||
id String @id() @unique() @map("report_id") @db.Uuid
|
id String @id() @map("report_id") @db.Uuid
|
||||||
userId String @map("user_id") @db.Uuid
|
userId String @map("user_id") @db.Uuid
|
||||||
websiteId String @map("website_id") @db.Uuid
|
websiteId String @map("website_id") @db.Uuid
|
||||||
type String @db.VarChar(50)
|
type String @db.VarChar(50)
|
||||||
|
|
@ -241,7 +241,7 @@ model Report {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Segment {
|
model Segment {
|
||||||
id String @id() @unique() @map("segment_id") @db.Uuid
|
id String @id() @map("segment_id") @db.Uuid
|
||||||
websiteId String @map("website_id") @db.Uuid
|
websiteId String @map("website_id") @db.Uuid
|
||||||
type String @db.VarChar(50)
|
type String @db.VarChar(50)
|
||||||
name String @db.VarChar(200)
|
name String @db.VarChar(200)
|
||||||
|
|
@ -256,7 +256,7 @@ model Segment {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Revenue {
|
model Revenue {
|
||||||
id String @id() @unique() @map("revenue_id") @db.Uuid
|
id String @id() @map("revenue_id") @db.Uuid
|
||||||
websiteId String @map("website_id") @db.Uuid
|
websiteId String @map("website_id") @db.Uuid
|
||||||
sessionId String @map("session_id") @db.Uuid
|
sessionId String @map("session_id") @db.Uuid
|
||||||
eventId String @map("event_id") @db.Uuid
|
eventId String @map("event_id") @db.Uuid
|
||||||
|
|
@ -276,7 +276,7 @@ model Revenue {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Link {
|
model Link {
|
||||||
id String @id() @unique() @map("link_id") @db.Uuid
|
id String @id() @map("link_id") @db.Uuid
|
||||||
name String @db.VarChar(100)
|
name String @db.VarChar(100)
|
||||||
url String @db.VarChar(500)
|
url String @db.VarChar(500)
|
||||||
slug String @unique() @db.VarChar(100)
|
slug String @unique() @db.VarChar(100)
|
||||||
|
|
@ -297,7 +297,7 @@ model Link {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Pixel {
|
model Pixel {
|
||||||
id String @id() @unique() @map("pixel_id") @db.Uuid
|
id String @id() @map("pixel_id") @db.Uuid
|
||||||
name String @db.VarChar(100)
|
name String @db.VarChar(100)
|
||||||
slug String @unique() @db.VarChar(100)
|
slug String @unique() @db.VarChar(100)
|
||||||
userId String? @map("user_id") @db.Uuid
|
userId String? @map("user_id") @db.Uuid
|
||||||
|
|
@ -317,7 +317,7 @@ model Pixel {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Board {
|
model Board {
|
||||||
id String @id() @unique() @map("board_id") @db.Uuid
|
id String @id() @map("board_id") @db.Uuid
|
||||||
type String @db.VarChar(50)
|
type String @db.VarChar(50)
|
||||||
name String @db.VarChar(200)
|
name String @db.VarChar(200)
|
||||||
description String @db.VarChar(500)
|
description String @db.VarChar(500)
|
||||||
|
|
@ -339,8 +339,9 @@ model Board {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Share {
|
model Share {
|
||||||
id String @id() @unique() @map("share_id") @db.Uuid
|
id String @id() @map("share_id") @db.Uuid
|
||||||
entityId String @map("entity_id") @db.Uuid
|
entityId String @map("entity_id") @db.Uuid
|
||||||
|
name String @db.VarChar(200)
|
||||||
shareType Int @map("share_type") @db.Integer
|
shareType Int @map("share_type") @db.Integer
|
||||||
slug String @unique() @db.VarChar(100)
|
slug String @unique() @db.VarChar(100)
|
||||||
parameters Json
|
parameters Json
|
||||||
|
|
@ -349,4 +350,4 @@ model Share {
|
||||||
|
|
||||||
@@index([entityId])
|
@@index([entityId])
|
||||||
@@map("share")
|
@@map("share")
|
||||||
}
|
}
|
||||||
|
|
@ -49,8 +49,8 @@ export function App({ children }) {
|
||||||
<Column display={{ base: 'none', lg: 'flex' }}>
|
<Column display={{ base: 'none', lg: 'flex' }}>
|
||||||
<SideNav />
|
<SideNav />
|
||||||
</Column>
|
</Column>
|
||||||
<Column alignItems="center" overflowY="auto" overflowX="hidden" position="relative">
|
<Column overflowX="hidden" position="relative">
|
||||||
{children}
|
<Column alignItems="center">{children}</Column>
|
||||||
</Column>
|
</Column>
|
||||||
<UpdateNotice user={user} config={config} />
|
<UpdateNotice user={user} config={config} />
|
||||||
{process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && (
|
{process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && (
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ export function SettingsLayout({ children }: { children: ReactNode }) {
|
||||||
width="240px"
|
width="240px"
|
||||||
height="100%"
|
height="100%"
|
||||||
border="right"
|
border="right"
|
||||||
backgroundColor
|
backgroundColor={'surface-raised'}
|
||||||
marginRight="2"
|
marginRight="2"
|
||||||
padding="3"
|
padding="3"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,12 @@ export function DateRangeSetting() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row gap="3">
|
<Row gap="3">
|
||||||
<DateFilter value={date} onChange={handleChange} placement="bottom start" />
|
<DateFilter
|
||||||
|
value={date}
|
||||||
|
onChange={handleChange}
|
||||||
|
placement="bottom start"
|
||||||
|
style={{ minWidth: '250px' }}
|
||||||
|
/>
|
||||||
<Button onPress={handleReset}>{formatMessage(labels.reset)}</Button>
|
<Button onPress={handleReset}>{formatMessage(labels.reset)}</Button>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ export function LanguageSetting() {
|
||||||
onSearch={setSearch}
|
onSearch={setSearch}
|
||||||
onOpenChange={handleOpen}
|
onOpenChange={handleOpen}
|
||||||
listProps={{ style: { maxHeight: 300 } }}
|
listProps={{ style: { maxHeight: 300 } }}
|
||||||
|
style={{ minWidth: '250px' }}
|
||||||
>
|
>
|
||||||
{items.map(item => (
|
{items.map(item => (
|
||||||
<ListItem key={item} id={item}>
|
<ListItem key={item} id={item}>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export function PreferenceSettings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column width="400px" gap="6">
|
<Column gap="6">
|
||||||
<Column>
|
<Column>
|
||||||
<Label>{formatMessage(labels.defaultDateRange)}</Label>
|
<Label>{formatMessage(labels.defaultDateRange)}</Label>
|
||||||
<DateRangeSetting />
|
<DateRangeSetting />
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ export function TimezoneSetting() {
|
||||||
onSearch={setSearch}
|
onSearch={setSearch}
|
||||||
onOpenChange={handleOpen}
|
onOpenChange={handleOpen}
|
||||||
listProps={{ style: { maxHeight: 300 } }}
|
listProps={{ style: { maxHeight: 300 } }}
|
||||||
|
style={{ minWidth: '250px' }}
|
||||||
>
|
>
|
||||||
{items.map((item: any) => (
|
{items.map((item: any) => (
|
||||||
<ListItem key={item} id={item}>
|
<ListItem key={item} id={item}>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ export function ProfileSettings() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column width="400px" gap="6">
|
<Column gap="6">
|
||||||
<Column>
|
<Column>
|
||||||
<Label>{formatMessage(labels.username)}</Label>
|
<Label>{formatMessage(labels.username)}</Label>
|
||||||
{username}
|
{username}
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ export function SessionActivity({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column key={eventId} gap>
|
<Column key={eventId} gap>
|
||||||
{showHeader && <Heading size="sm">{formatTimezoneDate(createdAt, 'PPPP')}</Heading>}
|
{showHeader && <Heading size="lg">{formatTimezoneDate(createdAt, 'PPPP')}</Heading>}
|
||||||
<Row alignItems="center" gap="6" height="40px">
|
<Row alignItems="center" gap="6" height="40px">
|
||||||
<StatusLight color={`#${visitId?.substring(0, 6)}`}>
|
<StatusLight color={`#${visitId?.substring(0, 6)}`}>
|
||||||
<Text wrap="nowrap">{formatTimezoneDate(createdAt, 'pp')}</Text>
|
<Text wrap="nowrap">{formatTimezoneDate(createdAt, 'pp')}</Text>
|
||||||
|
|
|
||||||
|
|
@ -24,3 +24,41 @@ a:hover {
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 15px;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
border: 7px solid rgba(0, 0, 0, 0);
|
||||||
|
background-color: var(--border-default);
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
border: 7px solid rgba(0, 0, 0, 0);
|
||||||
|
background-color: var(--text-disabled);
|
||||||
|
border-radius: var(--border-radius-full);
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
border: 4px solid rgba(0, 0, 0, 0);
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix autofill background color to match dark theme */
|
||||||
|
input:-webkit-autofill,
|
||||||
|
input:-webkit-autofill:hover,
|
||||||
|
input:-webkit-autofill:focus,
|
||||||
|
input:-webkit-autofill:active,
|
||||||
|
textarea:-webkit-autofill,
|
||||||
|
textarea:-webkit-autofill:hover,
|
||||||
|
textarea:-webkit-autofill:focus,
|
||||||
|
select:-webkit-autofill,
|
||||||
|
select:-webkit-autofill:hover,
|
||||||
|
select:-webkit-autofill:focus {
|
||||||
|
-webkit-box-shadow: 0 0 0 1000px var(--background-color) inset !important;
|
||||||
|
transition: color 5000s ease-in-out 0s;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,13 @@ import { LoginForm } from './LoginForm';
|
||||||
|
|
||||||
export function LoginPage() {
|
export function LoginPage() {
|
||||||
return (
|
return (
|
||||||
<Column alignItems="center" height="100vh" backgroundColor="surface-raised" paddingTop="12">
|
<Column
|
||||||
|
alignItems="center"
|
||||||
|
justifyContent="flex-start"
|
||||||
|
height="100vh"
|
||||||
|
backgroundColor="surface-raised"
|
||||||
|
style={{ paddingTop: '15vh' }}
|
||||||
|
>
|
||||||
<LoginForm />
|
<LoginForm />
|
||||||
</Column>
|
</Column>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export function NavMenu({
|
||||||
<Column gap overflowY="auto" justifyContent="space-between" position="sticky">
|
<Column gap overflowY="auto" justifyContent="space-between" position="sticky">
|
||||||
{title && (
|
{title && (
|
||||||
<Row padding>
|
<Row padding>
|
||||||
<Heading size="sm">{title}</Heading>
|
<Heading size="lg">{title}</Heading>
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
<Column gap="6" {...props}>
|
<Column gap="6" {...props}>
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ export function WeeklyTraffic({ websiteId }: { websiteId: string }) {
|
||||||
</Row>
|
</Row>
|
||||||
</Focusable>
|
</Focusable>
|
||||||
<Tooltip placement="right">
|
<Tooltip placement="right">
|
||||||
<Text size="sm">{`${formatMessage(labels.visitors)}: ${count}`}</Text>
|
<Text size="base">{`${formatMessage(labels.visitors)}: ${count}`}</Text>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue