Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
55f37664
Unverified
Commit
55f37664
authored
Nov 29, 2022
by
boojack
Committed by
GitHub
Nov 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: add theme file for joyui (#635)
parent
ab8e3473
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
10 deletions
+25
-10
App.tsx
web/src/App.tsx
+2
-1
ApperanceSelect.tsx
web/src/components/ApperanceSelect.tsx
+1
-1
SearchBar.tsx
web/src/components/SearchBar.tsx
+1
-1
UserBanner.tsx
web/src/components/UserBanner.tsx
+0
-1
search-bar.less
web/src/less/search-bar.less
+1
-5
Auth.tsx
web/src/pages/Auth.tsx
+5
-1
index.ts
web/src/theme/index.ts
+15
-0
No files found.
web/src/App.tsx
View file @
55f37664
...
@@ -6,6 +6,7 @@ import { locationService } from "./services";
...
@@ -6,6 +6,7 @@ import { locationService } from "./services";
import
{
useAppSelector
}
from
"./store"
;
import
{
useAppSelector
}
from
"./store"
;
import
router
from
"./router"
;
import
router
from
"./router"
;
import
*
as
storage
from
"./helpers/storage"
;
import
*
as
storage
from
"./helpers/storage"
;
import
theme
from
"./theme"
;
function
App
()
{
function
App
()
{
const
{
i18n
}
=
useTranslation
();
const
{
i18n
}
=
useTranslation
();
...
@@ -41,7 +42,7 @@ function App() {
...
@@ -41,7 +42,7 @@ function App() {
},
[
locale
]);
},
[
locale
]);
return
(
return
(
<
CssVarsProvider
>
<
CssVarsProvider
theme=
{
theme
}
>
<
RouterProvider
router=
{
router
}
/>
<
RouterProvider
router=
{
router
}
/>
</
CssVarsProvider
>
</
CssVarsProvider
>
);
);
...
...
web/src/components/ApperanceSelect.tsx
View file @
55f37664
...
@@ -21,7 +21,7 @@ const ApperanceSelect = () => {
...
@@ -21,7 +21,7 @@ const ApperanceSelect = () => {
return
(
return
(
<
Select
<
Select
className=
"!min-w-[1
2
rem] w-auto text-sm"
className=
"!min-w-[1
0
rem] w-auto text-sm"
value=
{
apperance
}
value=
{
apperance
}
onChange=
{
(
_
,
value
)
=>
{
onChange=
{
(
_
,
value
)
=>
{
setApperance
(
value
as
Apperance
);
setApperance
(
value
as
Apperance
);
...
...
web/src/components/SearchBar.tsx
View file @
55f37664
...
@@ -34,7 +34,7 @@ const SearchBar = () => {
...
@@ -34,7 +34,7 @@ const SearchBar = () => {
<
div
className=
"search-bar-container"
>
<
div
className=
"search-bar-container"
>
<
div
className=
"search-bar-inputer"
>
<
div
className=
"search-bar-inputer"
>
<
Icon
.
Search
className=
"icon-img"
/>
<
Icon
.
Search
className=
"icon-img"
/>
<
input
className=
"text-input"
type=
"text"
placeholder=
""
value=
{
queryText
}
onChange=
{
handleTextQueryInput
}
/>
<
input
className=
"text-input"
autoComplete=
"off"
type=
"text"
placeholder=
""
value=
{
queryText
}
onChange=
{
handleTextQueryInput
}
/>
</
div
>
</
div
>
<
div
className=
"quickly-action-wrapper"
>
<
div
className=
"quickly-action-wrapper"
>
<
div
className=
"quickly-action-container"
>
<
div
className=
"quickly-action-container"
>
...
...
web/src/components/UserBanner.tsx
View file @
55f37664
...
@@ -63,7 +63,6 @@ const UserBanner = () => {
...
@@ -63,7 +63,6 @@ const UserBanner = () => {
};
};
const
handleSignOutBtnClick
=
async
()
=>
{
const
handleSignOutBtnClick
=
async
()
=>
{
userService
.
doSignOut
().
catch
();
navigate
(
"/auth"
);
navigate
(
"/auth"
);
};
};
...
...
web/src/less/search-bar.less
View file @
55f37664
...
@@ -3,10 +3,6 @@
...
@@ -3,10 +3,6 @@
&:hover,
&:hover,
&:active {
&:active {
> .search-bar-inputer > .text-input {
@apply flex;
}
> .quickly-action-wrapper {
> .quickly-action-wrapper {
@apply flex;
@apply flex;
}
}
...
@@ -20,7 +16,7 @@
...
@@ -20,7 +16,7 @@
}
}
> .text-input {
> .text-input {
@apply
hidden sm:
flex ml-2 w-24 grow text-sm outline-none bg-transparent;
@apply flex ml-2 w-24 grow text-sm outline-none bg-transparent;
}
}
}
}
...
...
web/src/pages/Auth.tsx
View file @
55f37664
import
{
Option
,
Select
}
from
"@mui/joy"
;
import
{
Option
,
Select
}
from
"@mui/joy"
;
import
{
useState
}
from
"react"
;
import
{
use
Effect
,
use
State
}
from
"react"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
{
useNavigate
}
from
"react-router-dom"
;
import
{
useNavigate
}
from
"react-router-dom"
;
import
{
useAppSelector
}
from
"../store"
;
import
{
useAppSelector
}
from
"../store"
;
...
@@ -28,6 +28,10 @@ const Auth = () => {
...
@@ -28,6 +28,10 @@ const Auth = () => {
const
[
username
,
setUsername
]
=
useState
(
mode
===
"dev"
?
"demohero"
:
""
);
const
[
username
,
setUsername
]
=
useState
(
mode
===
"dev"
?
"demohero"
:
""
);
const
[
password
,
setPassword
]
=
useState
(
mode
===
"dev"
?
"secret"
:
""
);
const
[
password
,
setPassword
]
=
useState
(
mode
===
"dev"
?
"secret"
:
""
);
useEffect
(()
=>
{
userService
.
doSignOut
().
catch
();
},
[]);
const
handleUsernameInputChanged
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
const
handleUsernameInputChanged
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
const
text
=
e
.
target
.
value
as
string
;
const
text
=
e
.
target
.
value
as
string
;
setUsername
(
text
);
setUsername
(
text
);
...
...
web/src/theme/index.ts
0 → 100644
View file @
55f37664
import
{
extendTheme
}
from
"@mui/joy"
;
const
theme
=
extendTheme
({
components
:
{
JoySelect
:
{
styleOverrides
:
{
root
:
{
fontSize
:
"0.875rem"
,
},
},
},
},
});
export
default
theme
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment