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
29966451
Unverified
Commit
29966451
authored
Oct 30, 2022
by
boojack
Committed by
GitHub
Oct 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: unpin button in the corner (#374)
* feat: unpin button in corner * chore: update
parent
64f0662a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
Memo.tsx
web/src/components/Memo.tsx
+7
-0
memo.less
web/src/less/memo.less
+19
-1
No files found.
web/src/components/Memo.tsx
View file @
29966451
...
@@ -184,6 +184,13 @@ const Memo: React.FC<Props> = (props: Props) => {
...
@@ -184,6 +184,13 @@ const Memo: React.FC<Props> = (props: Props) => {
return
(
return
(
<
div
className=
{
`memo-wrapper ${"memos-" + memo.id} ${memo.pinned ? "pinned" : ""}`
}
ref=
{
memoContainerRef
}
>
<
div
className=
{
`memo-wrapper ${"memos-" + memo.id} ${memo.pinned ? "pinned" : ""}`
}
ref=
{
memoContainerRef
}
>
{
memo
.
pinned
&&
(
<
div
className=
"corner-container"
>
<
span
className=
"tip-text"
onClick=
{
handleTogglePinMemoBtnClick
}
>
{
t
(
"common.unpin"
)
}
</
span
>
</
div
>
)
}
<
div
className=
"memo-top-wrapper"
>
<
div
className=
"memo-top-wrapper"
>
<
div
className=
"status-text-container"
>
<
div
className=
"status-text-container"
>
<
span
className=
"time-text"
onClick=
{
handleShowMemoStoryDialog
}
>
<
span
className=
"time-text"
onClick=
{
handleShowMemoStoryDialog
}
>
...
...
web/src/less/memo.less
View file @
29966451
@import "./mixin.less";
@import "./mixin.less";
.memo-wrapper {
.memo-wrapper {
@apply flex flex-col justify-start items-start w-full p-4 pt-3 mt-2 bg-white rounded-lg border border-white hover:border-gray-200;
@apply
relative
flex flex-col justify-start items-start w-full p-4 pt-3 mt-2 bg-white rounded-lg border border-white hover:border-gray-200;
&.archived-memo {
&.archived-memo {
@apply border-gray-200;
@apply border-gray-200;
...
@@ -11,6 +11,24 @@
...
@@ -11,6 +11,24 @@
@apply border-gray-200 border-2;
@apply border-gray-200 border-2;
}
}
> .corner-container {
@apply absolute top-0 right-0 z-1;
&:hover > .tip-text {
@apply block;
}
&::after {
@apply rounded-tr-md absolute top-0 right-0 border-transparent border-t-green-600 border-r-green-600;
content: "";
border-width: 6px;
}
> .tip-text {
@apply hidden absolute top-0 right-0 z-1 whitespace-nowrap p-1 px-2 rounded-md text-xs leading-6 bg-black text-white shadow cursor-pointer hover:opacity-80;
}
}
> .memo-top-wrapper {
> .memo-top-wrapper {
@apply flex flex-row justify-between items-center w-full h-6 mb-1;
@apply flex flex-row justify-between items-center w-full h-6 mb-1;
...
...
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