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
372fc365
Commit
372fc365
authored
Mar 02, 2025
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: retire less
parent
4ed68624
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
65 additions
and
148 deletions
+65
-148
.prettierrc.js
web/.prettierrc.js
+1
-1
package.json
web/package.json
+0
-1
pnpm-lock.yaml
web/pnpm-lock.yaml
+6
-5
ChangeMemberPasswordDialog.tsx
web/src/components/ChangeMemberPasswordDialog.tsx
+5
-5
CreateAccessTokenDialog.tsx
web/src/components/CreateAccessTokenDialog.tsx
+5
-5
CreateIdentityProviderDialog.tsx
web/src/components/CreateIdentityProviderDialog.tsx
+4
-4
CreateShortcutDialog.tsx
web/src/components/CreateShortcutDialog.tsx
+4
-4
CreateWebhookDialog.tsx
web/src/components/CreateWebhookDialog.tsx
+4
-4
BaseDialog.tsx
web/src/components/Dialog/BaseDialog.tsx
+8
-3
PreviewImageDialog.tsx
web/src/components/PreviewImageDialog.tsx
+8
-7
RenameTagDialog.tsx
web/src/components/RenameTagDialog.tsx
+4
-4
UpdateAccountDialog.tsx
web/src/components/UpdateAccountDialog.tsx
+4
-4
UpdateCustomizedProfileDialog.tsx
web/src/components/UpdateCustomizedProfileDialog.tsx
+4
-4
highlight.css
web/src/css/highlight.css
+7
-0
base-dialog.less
web/src/less/base-dialog.less
+0
-29
common-dialog.less
web/src/less/common-dialog.less
+0
-29
highlight.less
web/src/less/highlight.less
+0
-7
preview-image-dialog.less
web/src/less/preview-image-dialog.less
+0
-31
main.tsx
web/src/main.tsx
+1
-1
No files found.
web/.prettierrc.js
View file @
372fc365
...
@@ -4,5 +4,5 @@ module.exports = {
...
@@ -4,5 +4,5 @@ module.exports = {
semi
:
true
,
semi
:
true
,
singleQuote
:
false
,
singleQuote
:
false
,
plugins
:
[
require
.
resolve
(
"@trivago/prettier-plugin-sort-imports"
)],
plugins
:
[
require
.
resolve
(
"@trivago/prettier-plugin-sort-imports"
)],
importOrder
:
[
"<BUILTIN_MODULES>"
,
"<THIRD_PARTY_MODULES>"
,
"^
@/((?!less).+)"
,
"^[./]"
,
"^(.+).le
ss"
],
importOrder
:
[
"<BUILTIN_MODULES>"
,
"<THIRD_PARTY_MODULES>"
,
"^
[./]"
,
"^(.+).c
ss"
],
};
};
web/package.json
View file @
372fc365
...
@@ -73,7 +73,6 @@
...
@@ -73,7 +73,6 @@
"eslint-config-prettier"
:
"^9.1.0"
,
"eslint-config-prettier"
:
"^9.1.0"
,
"eslint-plugin-prettier"
:
"^5.2.1"
,
"eslint-plugin-prettier"
:
"^5.2.1"
,
"eslint-plugin-react"
:
"^7.37.3"
,
"eslint-plugin-react"
:
"^7.37.3"
,
"less"
:
"^4.2.2"
,
"long"
:
"^5.2.3"
,
"long"
:
"^5.2.3"
,
"nice-grpc-web"
:
"^3.3.5"
,
"nice-grpc-web"
:
"^3.3.5"
,
"postcss"
:
"^8.4.49"
,
"postcss"
:
"^8.4.49"
,
...
...
web/pnpm-lock.yaml
View file @
372fc365
...
@@ -195,9 +195,6 @@ importers:
...
@@ -195,9 +195,6 @@ importers:
eslint-plugin-react
:
eslint-plugin-react
:
specifier
:
^7.37.3
specifier
:
^7.37.3
version
:
7.37.3(eslint@8.57.1)
version
:
7.37.3(eslint@8.57.1)
less
:
specifier
:
^4.2.2
version
:
4.2.2
long
:
long
:
specifier
:
^5.2.3
specifier
:
^5.2.3
version
:
5.2.3
version
:
5.2.3
...
@@ -5074,6 +5071,7 @@ snapshots:
...
@@ -5074,6 +5071,7 @@ snapshots:
copy-anything@2.0.6
:
copy-anything@2.0.6
:
dependencies
:
dependencies
:
is-what
:
3.14.1
is-what
:
3.14.1
optional
:
true
copy-to-clipboard@3.3.3
:
copy-to-clipboard@3.3.3
:
dependencies
:
dependencies
:
...
@@ -6020,7 +6018,8 @@ snapshots:
...
@@ -6020,7 +6018,8 @@ snapshots:
call-bound
:
1.0.3
call-bound
:
1.0.3
get-intrinsic
:
1.2.6
get-intrinsic
:
1.2.6
is-what@3.14.1
:
{}
is-what@3.14.1
:
optional
:
true
isarray@2.0.5
:
{}
isarray@2.0.5
:
{}
...
@@ -6130,6 +6129,7 @@ snapshots:
...
@@ -6130,6 +6129,7 @@ snapshots:
mime
:
1.6.0
mime
:
1.6.0
needle
:
3.3.1
needle
:
3.3.1
source-map
:
0.6.1
source-map
:
0.6.1
optional
:
true
levn@0.4.1
:
levn@0.4.1
:
dependencies
:
dependencies
:
...
@@ -6380,7 +6380,8 @@ snapshots:
...
@@ -6380,7 +6380,8 @@ snapshots:
json-parse-even-better-errors
:
2.3.1
json-parse-even-better-errors
:
2.3.1
lines-and-columns
:
1.2.4
lines-and-columns
:
1.2.4
parse-node-version@1.0.1
:
{}
parse-node-version@1.0.1
:
optional
:
true
path-data-parser@0.1.0
:
{}
path-data-parser@0.1.0
:
{}
...
...
web/src/components/ChangeMemberPasswordDialog.tsx
View file @
372fc365
...
@@ -64,16 +64,16 @@ const ChangeMemberPasswordDialog: React.FC<Props> = (props: Props) => {
...
@@ -64,16 +64,16 @@ const ChangeMemberPasswordDialog: React.FC<Props> = (props: Props) => {
};
};
return
(
return
(
<>
<
div
className=
"max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg"
>
<
div
className=
"
dialog-header-container !w-64
"
>
<
div
className=
"
flex flex-row justify-between items-center mb-4 gap-2 w-full
"
>
<
p
className=
"title-text"
>
<
p
>
{
t
(
"setting.account-section.change-password"
)
}
(
{
user
.
nickname
}
)
{
t
(
"setting.account-section.change-password"
)
}
(
{
user
.
nickname
}
)
</
p
>
</
p
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
handleCloseBtnClick
}
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
handleCloseBtnClick
}
>
<
XIcon
className=
"w-5 h-auto"
/>
<
XIcon
className=
"w-5 h-auto"
/>
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"
dialog-content-container
"
>
<
div
className=
"
flex flex-col justify-start items-start !w-80
"
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"auth.new-password"
)
}
</
p
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"auth.new-password"
)
}
</
p
>
<
Input
<
Input
className=
"w-full"
className=
"w-full"
...
@@ -99,7 +99,7 @@ const ChangeMemberPasswordDialog: React.FC<Props> = (props: Props) => {
...
@@ -99,7 +99,7 @@ const ChangeMemberPasswordDialog: React.FC<Props> = (props: Props) => {
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</>
</
div
>
);
);
};
};
...
...
web/src/components/CreateAccessTokenDialog.tsx
View file @
372fc365
...
@@ -84,14 +84,14 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
...
@@ -84,14 +84,14 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
};
};
return
(
return
(
<>
<
div
className=
"max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg"
>
<
div
className=
"
dialog-header-container
"
>
<
div
className=
"
flex flex-row justify-between items-center w-full mb-4 gap-2
"
>
<
p
className=
"title-text"
>
{
t
(
"setting.access-token-section.create-dialog.create-access-token"
)
}
</
p
>
<
p
>
{
t
(
"setting.access-token-section.create-dialog.create-access-token"
)
}
</
p
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
()
=>
destroy
()
}
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
()
=>
destroy
()
}
>
<
XIcon
className=
"w-5 h-auto"
/>
<
XIcon
className=
"w-5 h-auto"
/>
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"
dialog-content-container
!w-80"
>
<
div
className=
"
flex flex-col justify-start items-start
!w-80"
>
<
div
className=
"w-full flex flex-col justify-start items-start mb-3"
>
<
div
className=
"w-full flex flex-col justify-start items-start mb-3"
>
<
span
className=
"mb-2"
>
<
span
className=
"mb-2"
>
{
t
(
"setting.access-token-section.create-dialog.description"
)
}
<
span
className=
"text-red-600"
>
*
</
span
>
{
t
(
"setting.access-token-section.create-dialog.description"
)
}
<
span
className=
"text-red-600"
>
*
</
span
>
...
@@ -127,7 +127,7 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
...
@@ -127,7 +127,7 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</>
</
div
>
);
);
};
};
...
...
web/src/components/CreateIdentityProviderDialog.tsx
View file @
372fc365
...
@@ -242,14 +242,14 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
...
@@ -242,14 +242,14 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
};
};
return
(
return
(
<>
<
div
className=
"max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg"
>
<
div
className=
"
dialog-header-container
"
>
<
div
className=
"
flex flex-row justify-between items-center mb-4 gap-2 w-full
"
>
<
p
>
{
t
(
isCreating
?
"setting.sso-section.create-sso"
:
"setting.sso-section.update-sso"
)
}
</
p
>
<
p
>
{
t
(
isCreating
?
"setting.sso-section.create-sso"
:
"setting.sso-section.update-sso"
)
}
</
p
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
handleCloseBtnClick
}
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
handleCloseBtnClick
}
>
<
XIcon
className=
"w-5 h-auto"
/>
<
XIcon
className=
"w-5 h-auto"
/>
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"
dialog-content-container min-w-[19rem]
"
>
<
div
className=
"
flex flex-col justify-start items-start w-80
"
>
{
isCreating
&&
(
{
isCreating
&&
(
<>
<>
<
Typography
className=
"!mb-1"
level=
"body-md"
>
<
Typography
className=
"!mb-1"
level=
"body-md"
>
...
@@ -429,7 +429,7 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
...
@@ -429,7 +429,7 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</>
</
div
>
);
);
};
};
...
...
web/src/components/CreateShortcutDialog.tsx
View file @
372fc365
...
@@ -62,14 +62,14 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
...
@@ -62,14 +62,14 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
};
};
return
(
return
(
<>
<
div
className=
"max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg"
>
<
div
className=
"
dialog-header-container
"
>
<
div
className=
"
flex flex-row justify-between items-center mb-4 gap-2 w-full
"
>
<
p
className=
"title-text"
>
{
`${isCreating ? t("common.create") : t("common.edit")} ${t("common.shortcuts")}`
}
</
p
>
<
p
className=
"title-text"
>
{
`${isCreating ? t("common.create") : t("common.edit")} ${t("common.shortcuts")}`
}
</
p
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
()
=>
destroy
()
}
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
()
=>
destroy
()
}
>
<
XIcon
className=
"w-5 h-auto"
/>
<
XIcon
className=
"w-5 h-auto"
/>
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"
dialog-content-container
max-w-md min-w-72"
>
<
div
className=
"
flex flex-col justify-start items-start
max-w-md min-w-72"
>
<
div
className=
"w-full flex flex-col justify-start items-start mb-3"
>
<
div
className=
"w-full flex flex-col justify-start items-start mb-3"
>
<
span
className=
"text-sm whitespace-nowrap mb-1"
>
{
t
(
"common.title"
)
}
</
span
>
<
span
className=
"text-sm whitespace-nowrap mb-1"
>
{
t
(
"common.title"
)
}
</
span
>
<
Input
className=
"w-full"
type=
"text"
placeholder=
""
value=
{
shortcut
.
title
}
onChange=
{
onShortcutTitleChange
}
/>
<
Input
className=
"w-full"
type=
"text"
placeholder=
""
value=
{
shortcut
.
title
}
onChange=
{
onShortcutTitleChange
}
/>
...
@@ -116,7 +116,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
...
@@ -116,7 +116,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</>
</
div
>
);
);
};
};
...
...
web/src/components/CreateWebhookDialog.tsx
View file @
372fc365
...
@@ -93,8 +93,8 @@ const CreateWebhookDialog: React.FC<Props> = (props: Props) => {
...
@@ -93,8 +93,8 @@ const CreateWebhookDialog: React.FC<Props> = (props: Props) => {
};
};
return
(
return
(
<>
<
div
className=
"max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg"
>
<
div
className=
"
dialog-header-container
"
>
<
div
className=
"
flex flex-row justify-between items-center mb-4 gap-2 w-full
"
>
<
p
className=
"title-text"
>
<
p
className=
"title-text"
>
{
isCreating
?
t
(
"setting.webhook-section.create-dialog.create-webhook"
)
:
t
(
"setting.webhook-section.create-dialog.edit-webhook"
)
}
{
isCreating
?
t
(
"setting.webhook-section.create-dialog.create-webhook"
)
:
t
(
"setting.webhook-section.create-dialog.edit-webhook"
)
}
</
p
>
</
p
>
...
@@ -102,7 +102,7 @@ const CreateWebhookDialog: React.FC<Props> = (props: Props) => {
...
@@ -102,7 +102,7 @@ const CreateWebhookDialog: React.FC<Props> = (props: Props) => {
<
XIcon
className=
"w-5 h-auto"
/>
<
XIcon
className=
"w-5 h-auto"
/>
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"
dialog-content-container
!w-80"
>
<
div
className=
"
flex flex-col justify-start items-start
!w-80"
>
<
div
className=
"w-full flex flex-col justify-start items-start mb-3"
>
<
div
className=
"w-full flex flex-col justify-start items-start mb-3"
>
<
span
className=
"mb-2"
>
<
span
className=
"mb-2"
>
{
t
(
"setting.webhook-section.create-dialog.title"
)
}
<
span
className=
"text-red-600"
>
*
</
span
>
{
t
(
"setting.webhook-section.create-dialog.title"
)
}
<
span
className=
"text-red-600"
>
*
</
span
>
...
@@ -140,7 +140,7 @@ const CreateWebhookDialog: React.FC<Props> = (props: Props) => {
...
@@ -140,7 +140,7 @@ const CreateWebhookDialog: React.FC<Props> = (props: Props) => {
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</>
</
div
>
);
);
};
};
...
...
web/src/components/Dialog/BaseDialog.tsx
View file @
372fc365
...
@@ -5,7 +5,6 @@ import { createRoot } from "react-dom/client";
...
@@ -5,7 +5,6 @@ import { createRoot } from "react-dom/client";
import
dialogStore
from
"@/store/v2/dialog"
;
import
dialogStore
from
"@/store/v2/dialog"
;
import
theme
from
"@/theme"
;
import
theme
from
"@/theme"
;
import
{
cn
}
from
"@/utils"
;
import
{
cn
}
from
"@/utils"
;
import
"@/less/base-dialog.less"
;
interface
DialogConfig
{
interface
DialogConfig
{
dialogName
:
string
;
dialogName
:
string
;
...
@@ -53,8 +52,14 @@ const BaseDialog = observer((props: Props) => {
...
@@ -53,8 +52,14 @@ const BaseDialog = observer((props: Props) => {
};
};
return
(
return
(
<
div
className=
{
cn
(
"dialog-wrapper"
,
className
)
}
onMouseDown=
{
handleSpaceClicked
}
>
<
div
<
div
ref=
{
dialogContainerRef
}
className=
{
cn
(
"dialog-container"
)
}
onMouseDown=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
className=
{
cn
(
"fixed top-0 left-0 flex flex-col justify-start items-center w-full h-full pt-16 pb-8 px-4 z-1000 overflow-x-hidden overflow-y-scroll bg-transparent transition-all hide-scrollbar bg-black bg-opacity-60"
,
className
,
)
}
onMouseDown=
{
handleSpaceClicked
}
>
<
div
ref=
{
dialogContainerRef
}
onMouseDown=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
{
children
}
{
children
}
</
div
>
</
div
>
</
div
>
</
div
>
...
...
web/src/components/PreviewImageDialog.tsx
View file @
372fc365
import
{
Button
}
from
"@usememos/mui"
;
import
{
XIcon
}
from
"lucide-react"
;
import
{
XIcon
}
from
"lucide-react"
;
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
"@/less/preview-image-dialog.less"
;
const
MIN_SCALE
=
0.5
;
const
MIN_SCALE
=
0.5
;
const
MAX_SCALE
=
5
;
const
MAX_SCALE
=
5
;
...
@@ -154,13 +154,14 @@ const PreviewImageDialog: React.FC<Props> = ({ destroy, imgUrls, initialIndex }:
...
@@ -154,13 +154,14 @@ const PreviewImageDialog: React.FC<Props> = ({ destroy, imgUrls, initialIndex }:
return
(
return
(
<>
<>
<
div
className=
"
btns-contain
er"
>
<
div
className=
"
fixed top-8 right-8 flex flex-col justify-start items-cent
er"
>
<
button
className=
"btn"
onClick=
{
handleCloseBtnClick
}
>
<
Button
onClick=
{
handleCloseBtnClick
}
>
<
XIcon
className=
"
icon-img
"
/>
<
XIcon
className=
"
w-6 h-auto
"
/>
</
b
utton
>
</
B
utton
>
</
div
>
</
div
>
<
div
className=
"
img-containe
r"
onClick=
{
handleImgContainerClick
}
>
<
div
className=
"
w-full h-full p-4 sm:p-20 flex flex-col justify-center items-center hide-scrollba
r"
onClick=
{
handleImgContainerClick
}
>
<
img
<
img
className=
"h-auto w-auto max-w-full max-h-full shadow"
style=
{
imageComputedStyle
}
style=
{
imageComputedStyle
}
src=
{
imgUrls
[
currentIndex
]
}
src=
{
imgUrls
[
currentIndex
]
}
onClick=
{
(
e
)
=>
e
.
stopPropagation
()
}
onClick=
{
(
e
)
=>
e
.
stopPropagation
()
}
...
@@ -179,7 +180,7 @@ const PreviewImageDialog: React.FC<Props> = ({ destroy, imgUrls, initialIndex }:
...
@@ -179,7 +180,7 @@ const PreviewImageDialog: React.FC<Props> = ({ destroy, imgUrls, initialIndex }:
export
default
function
showPreviewImageDialog
(
imgUrls
:
string
[]
|
string
,
initialIndex
?:
number
):
void
{
export
default
function
showPreviewImageDialog
(
imgUrls
:
string
[]
|
string
,
initialIndex
?:
number
):
void
{
generateDialog
(
generateDialog
(
{
{
className
:
"preview-image-dialog"
,
className
:
"preview-image-dialog
p-0 z-[1001]
"
,
dialogName
:
"preview-image-dialog"
,
dialogName
:
"preview-image-dialog"
,
},
},
PreviewImageDialog
,
PreviewImageDialog
,
...
...
web/src/components/RenameTagDialog.tsx
View file @
372fc365
...
@@ -47,14 +47,14 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
...
@@ -47,14 +47,14 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
};
};
return
(
return
(
<>
<
div
className=
"max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg"
>
<
div
className=
"
dialog-header-container
"
>
<
div
className=
"
flex flex-row justify-between items-center mb-4 gap-2 w-full
"
>
<
p
className=
"title-text"
>
{
"Rename tag"
}
</
p
>
<
p
className=
"title-text"
>
{
"Rename tag"
}
</
p
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
()
=>
destroy
()
}
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
()
=>
destroy
()
}
>
<
XIcon
className=
"w-5 h-auto"
/>
<
XIcon
className=
"w-5 h-auto"
/>
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"
dialog-content-container
max-w-xs"
>
<
div
className=
"
flex flex-col justify-start items-start
max-w-xs"
>
<
div
className=
"w-full flex flex-col justify-start items-start mb-3"
>
<
div
className=
"w-full flex flex-col justify-start items-start mb-3"
>
<
div
className=
"relative w-full mb-2 flex flex-row justify-start items-center space-x-2"
>
<
div
className=
"relative w-full mb-2 flex flex-row justify-start items-center space-x-2"
>
<
span
className=
"w-20 text-sm whitespace-nowrap shrink-0 text-right"
>
Old Name
</
span
>
<
span
className=
"w-20 text-sm whitespace-nowrap shrink-0 text-right"
>
Old Name
</
span
>
...
@@ -79,7 +79,7 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
...
@@ -79,7 +79,7 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</>
</
div
>
);
);
};
};
...
...
web/src/components/UpdateAccountDialog.tsx
View file @
372fc365
...
@@ -140,14 +140,14 @@ const UpdateAccountDialog = ({ destroy }: Props) => {
...
@@ -140,14 +140,14 @@ const UpdateAccountDialog = ({ destroy }: Props) => {
};
};
return
(
return
(
<>
<
div
className=
"max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg"
>
<
div
className=
"
dialog-header-container !w-64
"
>
<
div
className=
"
flex flex-row justify-between items-center mb-4 gap-2 w-full
"
>
<
p
className=
"title-text"
>
{
t
(
"setting.account-section.update-information"
)
}
</
p
>
<
p
className=
"title-text"
>
{
t
(
"setting.account-section.update-information"
)
}
</
p
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
handleCloseBtnClick
}
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
handleCloseBtnClick
}
>
<
XIcon
className=
"w-5 h-auto"
/>
<
XIcon
className=
"w-5 h-auto"
/>
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"
dialog-content-container
space-y-2"
>
<
div
className=
"
flex flex-col justify-start items-start !w-64
space-y-2"
>
<
div
className=
"w-full flex flex-row justify-start items-center"
>
<
div
className=
"w-full flex flex-row justify-start items-center"
>
<
span
className=
"text-sm mr-2"
>
{
t
(
"common.avatar"
)
}
</
span
>
<
span
className=
"text-sm mr-2"
>
{
t
(
"common.avatar"
)
}
</
span
>
<
label
className=
"relative cursor-pointer hover:opacity-80"
>
<
label
className=
"relative cursor-pointer hover:opacity-80"
>
...
@@ -208,7 +208,7 @@ const UpdateAccountDialog = ({ destroy }: Props) => {
...
@@ -208,7 +208,7 @@ const UpdateAccountDialog = ({ destroy }: Props) => {
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</>
</
div
>
);
);
};
};
...
...
web/src/components/UpdateCustomizedProfileDialog.tsx
View file @
372fc365
...
@@ -97,14 +97,14 @@ const UpdateCustomizedProfileDialog = ({ destroy }: Props) => {
...
@@ -97,14 +97,14 @@ const UpdateCustomizedProfileDialog = ({ destroy }: Props) => {
};
};
return
(
return
(
<>
<
div
className=
"max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg"
>
<
div
className=
"
dialog-header-container
"
>
<
div
className=
"
flex flex-row justify-between items-center mb-4 gap-2 w-full
"
>
<
p
className=
"title-text"
>
{
t
(
"setting.system-section.customize-server.title"
)
}
</
p
>
<
p
className=
"title-text"
>
{
t
(
"setting.system-section.customize-server.title"
)
}
</
p
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
handleCloseButtonClick
}
>
<
Button
size=
"sm"
variant=
"plain"
onClick=
{
handleCloseButtonClick
}
>
<
XIcon
className=
"w-5 h-auto"
/>
<
XIcon
className=
"w-5 h-auto"
/>
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"
dialog-content-container
min-w-[16rem]"
>
<
div
className=
"
flex flex-col justify-start items-start
min-w-[16rem]"
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"setting.system-section.server-name"
)
}
</
p
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"setting.system-section.server-name"
)
}
</
p
>
<
Input
className=
"w-full"
type=
"text"
value=
{
customProfile
.
title
}
onChange=
{
handleNameChanged
}
/>
<
Input
className=
"w-full"
type=
"text"
value=
{
customProfile
.
title
}
onChange=
{
handleNameChanged
}
/>
<
p
className=
"text-sm mb-1 mt-2"
>
{
t
(
"setting.system-section.customize-server.icon-url"
)
}
</
p
>
<
p
className=
"text-sm mb-1 mt-2"
>
{
t
(
"setting.system-section.customize-server.icon-url"
)
}
</
p
>
...
@@ -131,7 +131,7 @@ const UpdateCustomizedProfileDialog = ({ destroy }: Props) => {
...
@@ -131,7 +131,7 @@ const UpdateCustomizedProfileDialog = ({ destroy }: Props) => {
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</>
</
div
>
);
);
};
};
...
...
web/src/css/highlight.css
0 → 100644
View file @
372fc365
html
.dark
{
@import
"highlight.js/styles/atom-one-dark.css";
}
html
:not
(
.dark
)
{
@import
"highlight.js/styles/github.css";
}
web/src/less/base-dialog.less
deleted
100644 → 0
View file @
4ed68624
.dialog-wrapper {
@apply fixed top-0 left-0 flex flex-col justify-start items-center w-full h-full pt-16 pb-8 px-4 z-1000 overflow-x-hidden overflow-y-scroll bg-transparent transition-all hide-scrollbar bg-black bg-opacity-60;
> .dialog-container {
@apply max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg;
> .dialog-header-container {
@apply flex flex-row justify-between items-center w-full mb-4;
> .title-text {
> .icon-text {
@apply mr-2 text-base dark:text-gray-300;
}
}
.btn {
@apply flex flex-col justify-center items-center w-6 h-6 rounded hover:bg-gray-100 dark:hover:bg-zinc-900 hover:shadow;
}
}
> .dialog-content-container {
@apply flex flex-col justify-start items-start w-full;
}
> .dialog-footer-container {
@apply flex flex-row justify-end items-center w-full mt-4;
}
}
}
web/src/less/common-dialog.less
deleted
100644 → 0
View file @
4ed68624
.common-dialog {
> .dialog-container {
@apply w-80;
> .dialog-content-container {
@apply flex flex-col justify-start items-start;
> .btns-container {
@apply flex flex-row justify-end items-center w-full mt-4;
> .btn {
@apply text-sm py-1 px-3 mr-2 rounded-md hover:opacity-80 cursor-pointer;
&.confirm-btn {
@apply bg-red-100 border border-solid border-blue-600 text-blue-600;
&.warning {
@apply border-red-600 text-red-600;
}
}
}
}
> .content-text{
@apply whitespace-pre-wrap;
}
}
}
}
web/src/less/highlight.less
deleted
100644 → 0
View file @
4ed68624
html.dark {
@import (less) "highlight.js/styles/atom-one-dark.css";
}
html:not(.dark) {
@import (less) "highlight.js/styles/github.css";
}
web/src/less/preview-image-dialog.less
deleted
100644 → 0
View file @
4ed68624
.preview-image-dialog {
@apply p-0;
z-index: 1001;
background-color: rgba(0, 0, 0, 0.6);
> .dialog-container {
@apply flex flex-col justify-center items-center relative w-full h-full p-0;
background-color: unset;
> .btns-container {
@apply fixed top-8 right-8 flex flex-col justify-start items-center;
> .btn {
@apply mb-3 last:mb-0 w-8 h-8 p-1 cursor-pointer rounded opacity-90 bg-gray-300 dark:bg-zinc-600 z-10 shadow-md hover:opacity-70;
> .icon-img {
@apply w-6 h-auto;
}
}
}
> .img-container {
@apply w-full h-full p-4 sm:p-20 flex flex-col justify-center items-center hide-scrollbar;
background-color: unset;
> img {
@apply h-auto w-auto max-w-full max-h-full shadow;
}
}
}
}
web/src/main.tsx
View file @
372fc365
...
@@ -6,9 +6,9 @@ import { observer } from "mobx-react-lite";
...
@@ -6,9 +6,9 @@ import { observer } from "mobx-react-lite";
import
{
createRoot
}
from
"react-dom/client"
;
import
{
createRoot
}
from
"react-dom/client"
;
import
{
Toaster
}
from
"react-hot-toast"
;
import
{
Toaster
}
from
"react-hot-toast"
;
import
{
RouterProvider
}
from
"react-router-dom"
;
import
{
RouterProvider
}
from
"react-router-dom"
;
import
"./css/highlight.css"
;
import
"./css/tailwind.css"
;
import
"./css/tailwind.css"
;
import
"./i18n"
;
import
"./i18n"
;
import
"./less/highlight.less"
;
import
router
from
"./router"
;
import
router
from
"./router"
;
import
{
initialUserStore
}
from
"./store/v2/user"
;
import
{
initialUserStore
}
from
"./store/v2/user"
;
import
{
initialWorkspaceStore
}
from
"./store/v2/workspace"
;
import
{
initialWorkspaceStore
}
from
"./store/v2/workspace"
;
...
...
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