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
f8c0d73d
Unverified
Commit
f8c0d73d
authored
Nov 01, 2022
by
boojack
Committed by
GitHub
Nov 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update resource dialog style (#395)
parent
006cb56d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
66 deletions
+27
-66
ResourcesDialog.tsx
web/src/components/ResourcesDialog.tsx
+11
-18
resources-dialog.less
web/src/less/resources-dialog.less
+16
-48
No files found.
web/src/components/ResourcesDialog.tsx
View file @
f8c0d73d
...
@@ -168,16 +168,18 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
...
@@ -168,16 +168,18 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
</
button
>
</
button
>
</
div
>
</
div
>
<
div
className=
"dialog-content-container"
>
<
div
className=
"dialog-content-container"
>
<
div
className=
"upload-resource-container"
onClick=
{
()
=>
handleUploadFileBtnClick
()
}
>
<
div
className=
"action-buttons-container"
>
<
div
className=
"upload-resource-btn"
>
<
div
className=
"buttons-wrapper"
>
<
Icon
.
File
className=
"icon-img"
/>
<
div
className=
"upload-resource-btn"
onClick=
{
()
=>
handleUploadFileBtnClick
()
}
>
<
span
>
{
t
(
"resources.upload"
)
}
</
span
>
<
Icon
.
File
className=
"icon-img"
/>
<
span
>
{
t
(
"resources.upload"
)
}
</
span
>
</
div
>
</
div
>
<
div
className=
"buttons-wrapper"
>
<
button
className=
"delete-unused-resource-btn"
onClick=
{
handleDeleteUnusedResourcesBtnClick
}
>
{
t
(
"resources.clear-unused-resources"
)
}
</
button
>
</
div
>
</
div
>
</
div
>
<
div
className=
"delete-unused-resource-container"
>
<
button
className=
"delete-unused-resource-btn"
onClick=
{
handleDeleteUnusedResourcesBtnClick
}
>
{
t
(
"resources.clear-unused-resources"
)
}
</
button
>
</
div
>
</
div
>
{
loadingState
.
isLoading
?
(
{
loadingState
.
isLoading
?
(
<
div
className=
"loading-text-container"
>
<
div
className=
"loading-text-container"
>
...
@@ -188,7 +190,6 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
...
@@ -188,7 +190,6 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
<
div
className=
"fields-container"
>
<
div
className=
"fields-container"
>
<
span
className=
"field-text id-text"
>
ID
</
span
>
<
span
className=
"field-text id-text"
>
ID
</
span
>
<
span
className=
"field-text name-text"
>
NAME
</
span
>
<
span
className=
"field-text name-text"
>
NAME
</
span
>
<
span
className=
"field-text type-text"
>
TYPE
</
span
>
<
span
></
span
>
<
span
></
span
>
</
div
>
</
div
>
{
resources
.
length
===
0
?
(
{
resources
.
length
===
0
?
(
...
@@ -205,14 +206,6 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
...
@@ -205,14 +206,6 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
{
resource
.
filename
}
{
resource
.
filename
}
</
span
>
</
span
>
</
span
>
</
span
>
<
span
className=
"field-text type-text"
>
<
span
onMouseEnter=
{
(
e
)
=>
handleResourceNameOrTypeMouseEnter
(
e
,
resource
.
type
)
}
onMouseLeave=
{
handleResourceNameOrTypeMouseLeave
}
>
{
resource
.
type
}
</
span
>
</
span
>
<
div
className=
"buttons-container"
>
<
div
className=
"buttons-container"
>
<
Dropdown
<
Dropdown
actionsClassName=
"!w-28"
actionsClassName=
"!w-28"
...
...
web/src/less/resources-dialog.less
View file @
f8c0d73d
...
@@ -4,28 +4,28 @@
...
@@ -4,28 +4,28 @@
@apply px-4;
@apply px-4;
> .dialog-container {
> .dialog-container {
@apply w-1
80
max-w-full mb-8;
@apply w-1
12
max-w-full mb-8;
> .dialog-content-container {
> .dialog-content-container {
@apply flex flex-col justify-start items-start w-full;
@apply flex flex-col justify-start items-start w-full;
> .
upload-resource
-container {
> .
action-buttons
-container {
@apply
mt-2 mb-4 py-8 cursor-pointer w-full rounded flex flex-row justify-center items-center bg-blue-50 border border-blue-600 hover:opacity-80
;
@apply
w-full flex flex-row justify-between items-center mb-2
;
> .
upload-resource-btn
{
> .
buttons-wrapper
{
@apply
px-3 py-1 rounded flex flex-row justify-center items-center border border-dashed border-blue-600 text-blue-600 bg-blue-50
;
@apply
flex flex-row justify-start items-center
;
> .icon-img {
> .upload-resource-btn {
@apply w-4 h-auto mr-1;
@apply text-sm cursor-pointer px-3 py-1 rounded flex flex-row justify-center items-center border border-blue-600 text-blue-600 bg-blue-50 hover:opacity-80;
}
}
}
> .delete-unused-resource-container {
> .icon-img {
@apply flex w-full justify-end;
@apply w-4 h-auto mr-1;
}
}
> .delete-unused-resource-btn {
> .delete-unused-resource-btn {
@apply text-sm py-1 px-3 mr-2 rounded-md hover:opacity-80 bg-red-100 border border-solid border-red-600 text-red-600;
@apply text-sm py-1 px-3 mr-2 rounded bg-red-100 border border-solid border-red-600 text-red-600 hover:opacity-80;
}
}
}
}
}
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
@apply flex flex-col justify-start items-start w-full;
@apply flex flex-col justify-start items-start w-full;
> .fields-container {
> .fields-container {
@apply px-2 py-2 w-full grid grid-cols-
10
border-b;
@apply px-2 py-2 w-full grid grid-cols-
7
border-b;
> .field-text {
> .field-text {
@apply font-mono text-gray-400;
@apply font-mono text-gray-400;
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
}
}
> .resource-container {
> .resource-container {
@apply px-2 py-2 w-full grid grid-cols-
10
;
@apply px-2 py-2 w-full grid grid-cols-
7
;
> .buttons-container {
> .buttons-container {
@apply w-full flex flex-row justify-end items-center;
@apply w-full flex flex-row justify-end items-center;
...
@@ -66,38 +66,6 @@
...
@@ -66,38 +66,6 @@
&.name-text {
&.name-text {
@apply col-span-4;
@apply col-span-4;
}
}
&.type-text {
@apply col-span-3;
}
> .form-label {
min-height: 28px;
&.filename-label {
@apply w-full flex flex-row justify-between;
> input {
@apply grow-0 w-40 shadow-inner px-2 mr-2 border rounded leading-7 bg-transparent focus:border-black;
}
> .btns-container {
@apply shrink-0 grow flex flex-row justify-end items-center;
> .btn {
@apply text-sm shadow px-2 leading-7 rounded border hover:opacity-80 bg-gray-50;
&.cancel-btn {
@apply shadow-none border-none bg-transparent;
}
&.confirm-btn {
@apply bg-green-600 border-green-600 text-white;
}
}
}
}
}
}
}
}
}
}
}
...
...
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