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
72d36b96
Commit
72d36b96
authored
May 03, 2022
by
boojack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update styles
parent
b1adaf9c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
114 deletions
+25
-114
MemoCardDialog.tsx
web/src/components/MemoCardDialog.tsx
+1
-0
MyAccountSection.tsx
web/src/components/MyAccountSection.tsx
+0
-10
ShortcutList.tsx
web/src/components/ShortcutList.tsx
+0
-8
memo-card-dialog.less
web/src/less/memo-card-dialog.less
+18
-90
signin.less
web/src/less/signin.less
+2
-2
Signin.tsx
web/src/pages/Signin.tsx
+4
-4
No files found.
web/src/components/MemoCardDialog.tsx
View file @
72d36b96
...
@@ -9,6 +9,7 @@ import { showDialog } from "./Dialog";
...
@@ -9,6 +9,7 @@ import { showDialog } from "./Dialog";
import
Only
from
"./common/OnlyWhen"
;
import
Only
from
"./common/OnlyWhen"
;
import
Image
from
"./Image"
;
import
Image
from
"./Image"
;
import
"../less/memo-card-dialog.less"
;
import
"../less/memo-card-dialog.less"
;
import
"../less/memo-content.less"
;
interface
LinkedMemo
extends
FormattedMemo
{
interface
LinkedMemo
extends
FormattedMemo
{
dateStr
:
string
;
dateStr
:
string
;
...
...
web/src/components/MyAccountSection.tsx
View file @
72d36b96
...
@@ -29,11 +29,6 @@ const MyAccountSection: React.FC<Props> = () => {
...
@@ -29,11 +29,6 @@ const MyAccountSection: React.FC<Props> = () => {
};
};
const
handleConfirmEditUsernameBtnClick
=
async
()
=>
{
const
handleConfirmEditUsernameBtnClick
=
async
()
=>
{
if
(
user
.
name
===
"guest"
)
{
toastHelper
.
info
(
"Do not change my username"
);
return
;
}
if
(
username
===
user
.
name
)
{
if
(
username
===
user
.
name
)
{
return
;
return
;
}
}
...
@@ -61,11 +56,6 @@ const MyAccountSection: React.FC<Props> = () => {
...
@@ -61,11 +56,6 @@ const MyAccountSection: React.FC<Props> = () => {
};
};
const
handleChangePasswordBtnClick
=
()
=>
{
const
handleChangePasswordBtnClick
=
()
=>
{
if
(
user
.
name
===
"guest"
)
{
toastHelper
.
info
(
"Do not change my password"
);
return
;
}
showChangePasswordDialog
();
showChangePasswordDialog
();
};
};
...
...
web/src/components/ShortcutList.tsx
View file @
72d36b96
...
@@ -4,7 +4,6 @@ import appContext from "../stores/appContext";
...
@@ -4,7 +4,6 @@ import appContext from "../stores/appContext";
import
useToggle
from
"../hooks/useToggle"
;
import
useToggle
from
"../hooks/useToggle"
;
import
useLoading
from
"../hooks/useLoading"
;
import
useLoading
from
"../hooks/useLoading"
;
import
utils
from
"../helpers/utils"
;
import
utils
from
"../helpers/utils"
;
import
Only
from
"./common/OnlyWhen"
;
import
toastHelper
from
"./Toast"
;
import
toastHelper
from
"./Toast"
;
import
showCreateShortcutDialog
from
"./CreateShortcutDialog"
;
import
showCreateShortcutDialog
from
"./CreateShortcutDialog"
;
import
"../less/shortcut-list.less"
;
import
"../less/shortcut-list.less"
;
...
@@ -46,13 +45,6 @@ const ShortcutList: React.FC<Props> = () => {
...
@@ -46,13 +45,6 @@ const ShortcutList: React.FC<Props> = () => {
<
img
src=
"/icons/add.svg"
alt=
"add shortcut"
/>
<
img
src=
"/icons/add.svg"
alt=
"add shortcut"
/>
</
span
>
</
span
>
</
p
>
</
p
>
<
Only
when=
{
loadingState
.
isSucceed
&&
sortedShortcuts
.
length
===
0
}
>
<
div
className=
"create-shortcut-btn-container"
>
<
span
className=
"btn"
onClick=
{
()
=>
showCreateShortcutDialog
()
}
>
New shortcut
</
span
>
</
div
>
</
Only
>
<
div
className=
"shortcuts-container"
>
<
div
className=
"shortcuts-container"
>
{
sortedShortcuts
.
map
((
s
)
=>
{
{
sortedShortcuts
.
map
((
s
)
=>
{
return
<
ShortcutContainer
key=
{
s
.
id
}
shortcut=
{
s
}
isActive=
{
s
.
id
===
shortcutId
}
/>;
return
<
ShortcutContainer
key=
{
s
.
id
}
shortcut=
{
s
}
isActive=
{
s
.
id
===
shortcutId
}
/>;
...
...
web/src/less/memo-card-dialog.less
View file @
72d36b96
...
@@ -2,23 +2,15 @@
...
@@ -2,23 +2,15 @@
.dialog-wrapper.memo-card-dialog {
.dialog-wrapper.memo-card-dialog {
> .dialog-container {
> .dialog-container {
padding: 0;
@apply p-0 bg-transparent;
background-color: transparent;
> * {
> * {
flex-shrink:
0;
@apply shrink-
0;
}
}
> .memo-card-container {
> .memo-card-container {
position: relative;
.flex(column, flex-start, flex-start);
.flex(column, flex-start, flex-start);
width: 512px;
@apply relative w-128 max-w-full py-3 px-6 mb-3 rounded-lg bg-yellow-200;
min-height: 64px;
max-width: 100%;
padding: 12px 24px;
margin-bottom: 12px;
border-radius: 8px;
background-color: @bg-paper-yellow;
> * {
> * {
z-index: 1;
z-index: 1;
...
@@ -26,16 +18,10 @@
...
@@ -26,16 +18,10 @@
> .header-container {
> .header-container {
.flex(row, space-between, center);
.flex(row, space-between, center);
width: 100%;
@apply w-full h-auto pb-0 my-0;
height: auto;
padding-bottom: 0;
margin-bottom: 0;
margin-top: 0;
> .time-text {
> .time-text {
font-size: 14px;
@apply text-sm text-gray-500 font-mono;
color: gray;
@apply font-mono;
}
}
> .btns-container {
> .btns-container {
...
@@ -43,18 +29,10 @@
...
@@ -43,18 +29,10 @@
> .btn {
> .btn {
.flex(row, center, center);
.flex(row, center, center);
width: 24px;
@apply w-6 h-6 ml-1 rounded hover:bg-white;
height: 24px;
margin-left: 4px;
border-radius: 4px;
&:hover {
background-color: white;
}
> .icon-img {
> .icon-img {
width: 20px;
@apply w-5 h-5;
height: 20px;
}
}
}
}
}
}
...
@@ -62,65 +40,36 @@
...
@@ -62,65 +40,36 @@
> .memo-container {
> .memo-container {
.flex(column, flex-start, flex-start);
.flex(column, flex-start, flex-start);
width: 100%;
@apply w-full pt-2;
padding-top: 8px;
> .memo-content-text {
> .memo-content-text {
width: 100%;
@apply w-full text-base leading-6;
font-size: 16px;
line-height: 1.6;
word-wrap: break-word;
word-break: break-all;
.tag-span {
.tag-span {
margin: 0;
@apply p-0 text-blue-600 text-base bg-transparent cursor-auto;
padding: 0;
font-size: 14px;
color: @text-blue;
background-color: unset;
cursor: unset;
}
}
}
}
> .images-wrapper {
> .images-wrapper {
.flex(row, flex-start, flex-start);
.flex(row, flex-start, flex-start);
margin-top: 8px;
@apply w-full mt-2 overflow-x-auto overflow-y-hidden;
width: 100%;
overflow-x: auto;
overflow-y: hidden;
padding-bottom: 2px;
padding-bottom: 2px;
.pretty-scroll-bar(0, 2px);
.pretty-scroll-bar(0, 2px);
> .memo-img {
> .memo-img {
margin-right: 8px;
@apply mr-2 w-auto h-32 shrink-0 grow-0 overflow-y-hidden hover:border-gray-400 last:mr-0;
width: auto;
height: 128px;
flex-shrink: 0;
flex-grow: 0;
overflow-y: hidden;
.hide-scroll-bar();
.hide-scroll-bar();
&:hover {
border-color: lightgray;
}
&:last-child {
margin-right: 0;
}
> img {
> img {
width: auto
;
@apply w-auto rounded-lg
;
max-height: 128px;
max-height: 128px;
border-radius: 8px;
}
}
}
}
}
}
}
}
> .normal-text {
> .normal-text {
margin-top: 8px;
@apply mt-2 text-sm text-gray-500;
font-size: 13px;
color: gray;
}
}
> .layer-container,
> .layer-container,
...
@@ -150,38 +99,17 @@
...
@@ -150,38 +99,17 @@
> .linked-memos-wrapper {
> .linked-memos-wrapper {
.flex(column, flex-start, flex-start);
.flex(column, flex-start, flex-start);
width: 512px;
@apply w-128 max-w-full mt-2 py-3 px-6 rounded-lg bg-white last:mb-8;
max-width: 100%;
margin-top: 8px;
padding: 12px 24px;
border-radius: 8px;
background-color: white;
&:last-child {
margin-bottom: 36px;
}
> .normal-text {
> .normal-text {
font-size: 13px
;
@apply text-sm
;
}
}
> .linked-memo-container {
> .linked-memo-container {
font-size: 13px;
@apply text-sm leading-6 mt-2 cursor-pointer max-w-full truncate hover:opacity-80;
line-height: 24px;
margin-top: 8px;
cursor: pointer;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&:hover {
opacity: 0.8;
}
> .time-text {
> .time-text {
color: gray;
@apply font-mono text-gray-500;
@apply font-mono;
}
}
}
}
}
}
...
...
web/src/less/signin.less
View file @
72d36b96
...
@@ -25,10 +25,10 @@
...
@@ -25,10 +25,10 @@
@apply relative w-full text-base m-2;
@apply relative w-full text-base m-2;
> .normal-text {
> .normal-text {
@apply absolute top-3 left-3 p
l
-1 leading-10 flex-shrink-0 text-base cursor-text text-gray-400 bg-transparent transition-all select-none;
@apply absolute top-3 left-3 p
x
-1 leading-10 flex-shrink-0 text-base cursor-text text-gray-400 bg-transparent transition-all select-none;
&.not-null {
&.not-null {
@apply text-sm top-0 leading-4 bg-white;
@apply text-sm top-0 leading-4 bg-white
rounded
;
}
}
}
}
...
...
web/src/pages/Signin.tsx
View file @
72d36b96
...
@@ -132,13 +132,13 @@ const Signin: React.FC<Props> = () => {
...
@@ -132,13 +132,13 @@ const Signin: React.FC<Props> = () => {
className=
{
`btn guest-signin ${signinBtnsClickLoadingState.isLoading ? "requesting" : ""}`
}
className=
{
`btn guest-signin ${signinBtnsClickLoadingState.isLoading ? "requesting" : ""}`
}
onClick=
{
handleAutoSigninAsGuestBtnClick
}
onClick=
{
handleAutoSigninAsGuestBtnClick
}
>
>
👉
Login as Guest quickly
👉
Quick login as a guest
</
div
>
</
div
>
<
div
<
div
className=
{
`btn ${signinBtnsClickLoadingState.isLoading ? "requesting" : ""}`
}
className=
{
`btn ${signinBtnsClickLoadingState.isLoading ? "requesting" : ""}`
}
onClick=
{
handleSwitchAccountSigninBtnClick
}
onClick=
{
handleSwitchAccountSigninBtnClick
}
>
>
I have an
account
Sign in/up with
account
</
div
>
</
div
>
</
div
>
</
div
>
</>
</>
...
@@ -165,7 +165,7 @@ const Signin: React.FC<Props> = () => {
...
@@ -165,7 +165,7 @@ const Signin: React.FC<Props> = () => {
</
button
>
</
button
>
<
span
className=
"split-text"
>
/
</
span
>
<
span
className=
"split-text"
>
/
</
span
>
<
button
<
button
className=
{
`btn sign
in
-btn ${signinBtnsClickLoadingState.isLoading ? "requesting" : ""}`
}
className=
{
`btn sign
up
-btn ${signinBtnsClickLoadingState.isLoading ? "requesting" : ""}`
}
onClick=
{
()
=>
handleSigninBtnsClick
(
"signup"
)
}
onClick=
{
()
=>
handleSigninBtnsClick
(
"signup"
)
}
>
>
Sign up
Sign up
...
@@ -176,7 +176,7 @@ const Signin: React.FC<Props> = () => {
...
@@ -176,7 +176,7 @@ const Signin: React.FC<Props> = () => {
className=
{
`btn signin-btn ${signinBtnsClickLoadingState.isLoading ? "requesting" : ""}`
}
className=
{
`btn signin-btn ${signinBtnsClickLoadingState.isLoading ? "requesting" : ""}`
}
onClick=
{
()
=>
handleSigninBtnsClick
(
"signin"
)
}
onClick=
{
()
=>
handleSigninBtnsClick
(
"signin"
)
}
>
>
Log
in
Sign
in
</
button
>
</
button
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
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