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
fa93d0fd
Commit
fa93d0fd
authored
Jul 27, 2022
by
boojack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update visibility selector style
parent
dc436490
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
14 deletions
+32
-14
Memo.tsx
web/src/components/Memo.tsx
+1
-4
MemoCardDialog.tsx
web/src/components/MemoCardDialog.tsx
+12
-6
memo-card-dialog.less
web/src/less/memo-card-dialog.less
+10
-3
memo.less
web/src/less/memo.less
+9
-1
No files found.
web/src/components/Memo.tsx
View file @
fa93d0fd
...
@@ -172,11 +172,8 @@ const Memo: React.FC<Props> = (props: Props) => {
...
@@ -172,11 +172,8 @@ const Memo: React.FC<Props> = (props: Props) => {
<
div
className=
"memo-top-wrapper"
>
<
div
className=
"memo-top-wrapper"
>
<
div
className=
"status-text-container"
onClick=
{
handleShowMemoStoryDialog
}
>
<
div
className=
"status-text-container"
onClick=
{
handleShowMemoStoryDialog
}
>
<
span
className=
"time-text"
>
{
createdAtStr
}
</
span
>
<
span
className=
"time-text"
>
{
createdAtStr
}
</
span
>
<
Only
when=
{
memo
.
pinned
}
>
<
span
className=
"status-text"
>
PINNED
</
span
>
</
Only
>
<
Only
when=
{
memo
.
visibility
!==
"PRIVATE"
&&
!
isVisitorMode
}
>
<
Only
when=
{
memo
.
visibility
!==
"PRIVATE"
&&
!
isVisitorMode
}
>
<
span
className=
"status-text"
>
{
memo
.
visibility
}
</
span
>
<
span
className=
{
`status-text ${memo.visibility.toLocaleLowerCase()}`
}
>
{
memo
.
visibility
}
</
span
>
</
Only
>
</
Only
>
</
div
>
</
div
>
<
div
className=
{
`btns-container ${userService.isVisitorMode() ? "!hidden" : ""}`
}
>
<
div
className=
{
`btns-container ${userService.isVisitorMode() ? "!hidden" : ""}`
}
>
...
...
web/src/components/MemoCardDialog.tsx
View file @
fa93d0fd
...
@@ -126,21 +126,27 @@ const MemoCardDialog: React.FC<Props> = (props: Props) => {
...
@@ -126,21 +126,27 @@ const MemoCardDialog: React.FC<Props> = (props: Props) => {
return
(
return
(
<>
<>
<
div
className=
"memo-card-container"
>
<
div
className=
"header-container"
>
<
p
className=
"time-text"
>
{
utils
.
getDateTimeString
(
memo
.
createdTs
)
}
</
p
>
<
div
className=
"btns-container"
>
<
Only
when=
{
!
userService
.
isVisitorMode
()
}
>
<
Only
when=
{
!
userService
.
isVisitorMode
()
}
>
<>
<
div
className=
"visibility-selector-container"
>
<
i
className=
"fa-solid fa-eye text-white mr-2"
></
i
>
<
Selector
<
Selector
className=
"w-24
"
className=
"w-32
"
dataSource=
{
visibilityList
}
dataSource=
{
visibilityList
}
value=
{
memo
.
visibility
}
value=
{
memo
.
visibility
}
handleValueChanged=
{
(
value
)
=>
handleVisibilitySelectorChange
(
value
as
Visibility
)
}
handleValueChanged=
{
(
value
)
=>
handleVisibilitySelectorChange
(
value
as
Visibility
)
}
/>
/>
</
div
>
</
Only
>
<
div
className=
"memo-card-container"
>
<
div
className=
"header-container"
>
<
p
className=
"time-text"
>
{
utils
.
getDateTimeString
(
memo
.
createdTs
)
}
</
p
>
<
div
className=
"btns-container"
>
<
Only
when=
{
!
userService
.
isVisitorMode
()
}
>
<>
<
button
className=
"btn edit-btn"
onClick=
{
handleEditMemoBtnClick
}
>
<
button
className=
"btn edit-btn"
onClick=
{
handleEditMemoBtnClick
}
>
<
i
className=
"fa-solid fa-pen-to-square icon-img"
></
i
>
<
i
className=
"fa-solid fa-pen-to-square icon-img"
></
i
>
</
button
>
</
button
>
<
span
className=
"split-line"
>
/
</
span
>
</>
</>
</
Only
>
</
Only
>
<
button
className=
"btn close-btn"
onClick=
{
props
.
destroy
}
>
<
button
className=
"btn close-btn"
onClick=
{
props
.
destroy
}
>
...
...
web/src/less/memo-card-dialog.less
View file @
fa93d0fd
...
@@ -6,16 +6,19 @@
...
@@ -6,16 +6,19 @@
> .dialog-container {
> .dialog-container {
@apply w-full p-0 bg-transparent flex flex-col justify-start items-center;
@apply w-full p-0 bg-transparent flex flex-col justify-start items-center;
> .visibility-selector-container {
@apply z-10 w-128 mb-2 flex flex-row justify-start items-center;
}
> .memo-card-container {
> .memo-card-container {
.flex(column, flex-start, flex-start);
@apply flex flex-col justify-start items-start relative w-128 max-w-full py-3 px-6 mb-3 rounded-lg bg-yellow-200;
@apply relative w-128 max-w-full py-3 px-6 mb-3 rounded-lg bg-yellow-200;
> * {
> * {
z-index: 1;
z-index: 1;
}
}
> .header-container {
> .header-container {
@apply flex flex-row justify-between items-center w-full h-auto
z-10
pb-0 my-0;
@apply flex flex-row justify-between items-center w-full h-auto pb-0 my-0;
> .time-text {
> .time-text {
@apply text-sm text-gray-500 font-mono;
@apply text-sm text-gray-500 font-mono;
...
@@ -28,6 +31,10 @@
...
@@ -28,6 +31,10 @@
.flex(row, center, center);
.flex(row, center, center);
@apply w-6 h-6 ml-2 rounded text-gray-600 hover:bg-white;
@apply w-6 h-6 ml-2 rounded text-gray-600 hover:bg-white;
}
}
> .split-line {
@apply font-mono text-gray-300 ml-2;
}
}
}
}
}
...
...
web/src/less/memo.less
View file @
fa93d0fd
...
@@ -24,7 +24,15 @@
...
@@ -24,7 +24,15 @@
}
}
> .status-text {
> .status-text {
@apply text-xs cursor-pointer ml-2 rounded border border-green-600 px-1 text-green-600;
@apply text-xs cursor-pointer ml-2 rounded border px-1;
&.public {
@apply border-green-600 text-green-600;
}
&.protected {
@apply border-gray-400 text-gray-400;
}
}
}
}
}
...
...
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