update source code
This commit is contained in:
parent
4b06fbed96
commit
56fc427eae
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@ -7,7 +7,7 @@
|
|||||||
"editor.inlayHints.enabled": "offUnlessPressed",
|
"editor.inlayHints.enabled": "offUnlessPressed",
|
||||||
"javascript.inlayHints.parameterNames.enabled": "all",
|
"javascript.inlayHints.parameterNames.enabled": "all",
|
||||||
"editor.formatOnSaveMode": "modificationsIfAvailable",
|
"editor.formatOnSaveMode": "modificationsIfAvailable",
|
||||||
"eslint.workingDirectories": ["./fuware-fe"],
|
"eslint.workingDirectories": ["./frontend"],
|
||||||
"editor.insertSpaces": true,
|
"editor.insertSpaces": true,
|
||||||
"editor.tabSize": 2,
|
"editor.tabSize": 2,
|
||||||
"python.analysis.autoImportCompletions": true,
|
"python.analysis.autoImportCompletions": true,
|
||||||
@ -15,11 +15,9 @@
|
|||||||
"python.analysis.fixAll": ["source.unusedImports"],
|
"python.analysis.fixAll": ["source.unusedImports"],
|
||||||
"python.analysis.packageIndexDepths": [
|
"python.analysis.packageIndexDepths": [
|
||||||
{
|
{
|
||||||
"name": "fuware",
|
"name": "backend",
|
||||||
"depth": 3,
|
"depth": 3,
|
||||||
"includeAllSymbols": false
|
"includeAllSymbols": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// "python.analysis.extraPaths": ["./fuware"],
|
|
||||||
// "python.autoComplete.extraPaths": ["./fuware"]
|
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ from backend.core.config import get_app_settings
|
|||||||
from backend.db.db_setup import session_context
|
from backend.db.db_setup import session_context
|
||||||
from backend.repos.repository_users import RepositoryUsers
|
from backend.repos.repository_users import RepositoryUsers
|
||||||
from backend.repos.seeder import default_users_init
|
from backend.repos.seeder import default_users_init
|
||||||
# from fuware.db.models import User
|
|
||||||
|
|
||||||
PROJECT_DIR = Path(__file__).parent.parent.parent
|
PROJECT_DIR = Path(__file__).parent.parent.parent
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ class SearchType(Enum):
|
|||||||
fuzzy = "fuzzy"
|
fuzzy = "fuzzy"
|
||||||
tokenized = "tokenized"
|
tokenized = "tokenized"
|
||||||
|
|
||||||
class FuwareModel(BaseModel):
|
class MainModel(BaseModel):
|
||||||
_searchable_properties: ClassVar[list[str]] = []
|
_searchable_properties: ClassVar[list[str]] = []
|
||||||
"""
|
"""
|
||||||
Searchable properties for the search API.
|
Searchable properties for the search API.
|
@ -3,9 +3,9 @@ from uuid import UUID
|
|||||||
from pydantic import ConfigDict
|
from pydantic import ConfigDict
|
||||||
from fastapi import Form
|
from fastapi import Form
|
||||||
|
|
||||||
from backend.schemas.fuware_model import FuwareModel
|
from backend.schemas.main_model import MainModel
|
||||||
|
|
||||||
class UserBase(FuwareModel):
|
class UserBase(MainModel):
|
||||||
username: str = Form(...)
|
username: str = Form(...)
|
||||||
|
|
||||||
class UserRequest(UserBase):
|
class UserRequest(UserBase):
|
||||||
@ -34,7 +34,7 @@ class ProfileResponse(UserBase):
|
|||||||
updated_at: datetime
|
updated_at: datetime
|
||||||
model_config = ConfigDict(from_attributes=True)
|
model_config = ConfigDict(from_attributes=True)
|
||||||
|
|
||||||
class LoginResponse(FuwareModel):
|
class LoginResponse(MainModel):
|
||||||
access_token: str
|
access_token: str
|
||||||
exp: int
|
exp: int
|
||||||
name: str
|
name: str
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
#root {
|
#root {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
|
--white: #fff;
|
||||||
|
--black: #212121;
|
||||||
|
--primary: #03c9d7;
|
||||||
|
--green: #05b187;
|
||||||
|
--orange: #fb9678;
|
||||||
|
--yellow: #fec90f;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
@ -1,5 +1,5 @@
|
|||||||
import { getProfile } from '@api/user'
|
import { getProfile } from '@api/user'
|
||||||
import fuwareLogo from '@assets/logo-fuware.svg'
|
import Logo from '@assets/logo.svg'
|
||||||
import { useSiteContext } from '@context/SiteContext'
|
import { useSiteContext } from '@context/SiteContext'
|
||||||
import useAuth from '@hooks/useAuth'
|
import useAuth from '@hooks/useAuth'
|
||||||
import useToast from '@hooks/useToast'
|
import useToast from '@hooks/useToast'
|
||||||
@ -43,7 +43,7 @@ export default function Header() {
|
|||||||
<header class="w-full navbar py-3 px-4 items-center justify-between bg-emerald-500">
|
<header class="w-full navbar py-3 px-4 items-center justify-between bg-emerald-500">
|
||||||
<div class="flex items-center justify-end">
|
<div class="flex items-center justify-end">
|
||||||
<A href="/" class="text-white flex items-center hover:text-white">
|
<A href="/" class="text-white flex items-center hover:text-white">
|
||||||
<img src={fuwareLogo} class="w-8" alt="Fuware logo" />
|
<img src={Logo} class="w-8" alt="Logo" />
|
||||||
<span class="ml-2 text-2xl">Fuware</span>
|
<span class="ml-2 text-2xl">Fuware</span>
|
||||||
</A>
|
</A>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,7 +48,7 @@ export default function Navbar() {
|
|||||||
<IconTriangle size={30} />
|
<IconTriangle size={30} />
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<ul class="scrollnavbar menu p-4 w-80 text-base-content bg-transparent py-6 px-4">
|
<ul class="scrollnavbar menu p-4 w-80 text-base-content py-6 px-4">
|
||||||
<For each={NAV_ROUTES}>
|
<For each={NAV_ROUTES}>
|
||||||
{(item) =>
|
{(item) =>
|
||||||
item.show && (
|
item.show && (
|
||||||
|
@ -1,21 +1,17 @@
|
|||||||
$color-white: #fff;
|
|
||||||
$color-black: #212121;
|
|
||||||
$primary: #03c9d7;
|
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
li {
|
li {
|
||||||
a {
|
a {
|
||||||
color: $color-black;
|
color: var(--black);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
|
||||||
&:not(ul, .menu-title, details, .btn).active {
|
&:not(ul, .menu-title, details, .btn).active {
|
||||||
background-color: $primary;
|
background-color: var(--primary);
|
||||||
color: $color-white;
|
color: var(--white);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba($primary, 0.05);
|
background-color: rgba(var(--primary), 0.05);
|
||||||
color: $primary;
|
color: var(--primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import { Show, onMount } from 'solid-js'
|
|||||||
import * as yup from 'yup'
|
import * as yup from 'yup'
|
||||||
import './login.scss'
|
import './login.scss'
|
||||||
|
|
||||||
import logo from '@assets/logo-fuware.svg'
|
import Logo from '@assets/logo.svg'
|
||||||
import useAuth from '@hooks/useAuth'
|
import useAuth from '@hooks/useAuth'
|
||||||
import useToast from '@hooks/useToast'
|
import useToast from '@hooks/useToast'
|
||||||
|
|
||||||
@ -59,8 +59,8 @@ export default function Login() {
|
|||||||
<div class="card glass card-compact login-wrap shadow-xl">
|
<div class="card glass card-compact login-wrap shadow-xl">
|
||||||
<div class="h-44">
|
<div class="h-44">
|
||||||
<picture class="logo">
|
<picture class="logo">
|
||||||
<source srcSet={logo} type="image/png" media="(min-width: 600px)" />
|
<source srcSet={Logo} type="image/png" media="(min-width: 600px)" />
|
||||||
<img src={logo} alt="logo" />
|
<img src={Logo} alt="logo" />
|
||||||
</picture>
|
</picture>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
@ -1,16 +1,29 @@
|
|||||||
import daisyui from 'daisyui'
|
import daisyui from 'daisyui'
|
||||||
|
import themes from 'daisyui/src/theming/themes'
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
content: ['./src/**/*.{js,jsx}'],
|
content: ['./src/**/*.{js,jsx}'],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {},
|
extend: {
|
||||||
|
colors: {
|
||||||
|
fu: {
|
||||||
|
white: '#fff',
|
||||||
|
black: '#212121',
|
||||||
|
primary: '#03c9d7',
|
||||||
|
green: '#05b187',
|
||||||
|
orange: '#fb9678',
|
||||||
|
yellow: '#fec90f',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
plugins: [daisyui],
|
plugins: [daisyui],
|
||||||
daisyui: {
|
daisyui: {
|
||||||
themes: [
|
themes: [
|
||||||
{
|
{
|
||||||
light: {
|
light: {
|
||||||
|
...themes['light'],
|
||||||
primary: '#03c9d7',
|
primary: '#03c9d7',
|
||||||
'primary-content': '#ffff',
|
'primary-content': '#ffff',
|
||||||
secondary: '#fb9678',
|
secondary: '#fb9678',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user