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
072851e3
Unverified
Commit
072851e3
authored
Nov 25, 2022
by
boojack
Committed by
GitHub
Nov 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update dialog style (#574)
* chore: update tests * chore: update dialog styles
parent
e2cbea20
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
97 deletions
+43
-97
ArchivedMemo.tsx
web/src/components/ArchivedMemo.tsx
+2
-2
ChangeMemoCreatedTsDialog.tsx
web/src/components/ChangeMemoCreatedTsDialog.tsx
+9
-5
ChangeResourceFilenameDialog.tsx
web/src/components/ChangeResourceFilenameDialog.tsx
+5
-7
CreateShortcutDialog.tsx
web/src/components/CreateShortcutDialog.tsx
+3
-10
DailyMemo.tsx
web/src/components/DailyMemo.tsx
+1
-1
MyAccountSection.tsx
web/src/components/Settings/MyAccountSection.tsx
+3
-3
UpdateAccountDialog.tsx
web/src/components/UpdateAccountDialog.tsx
+10
-3
tailwind.css
web/src/css/tailwind.css
+10
-2
change-memo-created-ts-dialog.less
web/src/less/change-memo-created-ts-dialog.less
+0
-28
change-resource-filename-dialog.less
web/src/less/change-resource-filename-dialog.less
+0
-32
my-account-section.less
web/src/less/settings/my-account-section.less
+0
-4
No files found.
web/src/components/ArchivedMemo.tsx
View file @
072851e3
...
@@ -57,10 +57,10 @@ const ArchivedMemo: React.FC<Props> = (props: Props) => {
...
@@ -57,10 +57,10 @@ const ArchivedMemo: React.FC<Props> = (props: Props) => {
{
t
(
"common.archived-at"
)
}
{
utils
.
getDateTimeString
(
memo
.
updatedTs
)
}
{
t
(
"common.archived-at"
)
}
{
utils
.
getDateTimeString
(
memo
.
updatedTs
)
}
</
span
>
</
span
>
<
div
className=
"btns-container"
>
<
div
className=
"btns-container"
>
<
span
className=
"btn
restore-btn
"
onClick=
{
handleRestoreMemoClick
}
>
<
span
className=
"btn
-text
"
onClick=
{
handleRestoreMemoClick
}
>
{
t
(
"common.restore"
)
}
{
t
(
"common.restore"
)
}
</
span
>
</
span
>
<
span
className=
{
`btn
delete-btn
${showConfirmDeleteBtn ? "final-confirm" : ""}`
}
onClick=
{
handleDeleteMemoClick
}
>
<
span
className=
{
`btn
-text
${showConfirmDeleteBtn ? "final-confirm" : ""}`
}
onClick=
{
handleDeleteMemoClick
}
>
{
t
(
"common.delete"
)
}
{
t
(
"common.delete"
)
}
{
showConfirmDeleteBtn
?
"!"
:
""
}
{
showConfirmDeleteBtn
?
"!"
:
""
}
</
span
>
</
span
>
...
...
web/src/components/ChangeMemoCreatedTsDialog.tsx
View file @
072851e3
...
@@ -72,14 +72,18 @@ const ChangeMemoCreatedTsDialog: React.FC<Props> = (props: Props) => {
...
@@ -72,14 +72,18 @@ const ChangeMemoCreatedTsDialog: React.FC<Props> = (props: Props) => {
<
p
className=
"w-full bg-yellow-100 border border-yellow-400 rounded p-2 text-xs leading-4"
>
<
p
className=
"w-full bg-yellow-100 border border-yellow-400 rounded p-2 text-xs leading-4"
>
THIS IS NOT A NORMAL BEHAVIOR. PLEASE MAKE SURE YOU REALLY NEED IT.
THIS IS NOT A NORMAL BEHAVIOR. PLEASE MAKE SURE YOU REALLY NEED IT.
</
p
>
</
p
>
<
label
className=
"form-label input-form-label"
>
<
input
<
input
type=
"datetime-local"
value=
{
createdAt
}
max=
{
maxDatetimeValue
}
onChange=
{
handleDatetimeInputChange
}
/>
className=
"input-text mt-2"
</
label
>
type=
"datetime-local"
value=
{
createdAt
}
max=
{
maxDatetimeValue
}
onChange=
{
handleDatetimeInputChange
}
/>
<
div
className=
"btns-container"
>
<
div
className=
"btns-container"
>
<
span
className=
"btn
cancel-btn
"
onClick=
{
handleCloseBtnClick
}
>
<
span
className=
"btn
-text
"
onClick=
{
handleCloseBtnClick
}
>
{
t
(
"common.cancel"
)
}
{
t
(
"common.cancel"
)
}
</
span
>
</
span
>
<
span
className=
"btn
confirm-btn
"
onClick=
{
handleSaveBtnClick
}
>
<
span
className=
"btn
-primary
"
onClick=
{
handleSaveBtnClick
}
>
{
t
(
"common.save"
)
}
{
t
(
"common.save"
)
}
</
span
>
</
span
>
</
div
>
</
div
>
...
...
web/src/components/ChangeResourceFilenameDialog.tsx
View file @
072851e3
...
@@ -68,16 +68,14 @@ const ChangeResourceFilenameDialog: React.FC<Props> = (props: Props) => {
...
@@ -68,16 +68,14 @@ const ChangeResourceFilenameDialog: React.FC<Props> = (props: Props) => {
</
button
>
</
button
>
</
div
>
</
div
>
<
div
className=
"dialog-content-container"
>
<
div
className=
"dialog-content-container"
>
<
label
className=
"form-label input-form-label"
>
<
input
className=
"input-text"
type=
"text"
value=
{
filename
}
onChange=
{
handleFilenameChanged
}
/>
<
input
type=
"text"
value=
{
filename
}
onChange=
{
handleFilenameChanged
}
/>
</
label
>
<
div
className=
"btns-container"
>
<
div
className=
"btns-container"
>
<
span
className=
"btn cancel-btn
"
onClick=
{
handleCloseBtnClick
}
>
<
button
className=
"btn-text
"
onClick=
{
handleCloseBtnClick
}
>
{
t
(
"common.cancel"
)
}
{
t
(
"common.cancel"
)
}
</
spa
n
>
</
butto
n
>
<
span
className=
"btn confirm-btn
"
onClick=
{
handleSaveBtnClick
}
>
<
button
className=
"btn-primary
"
onClick=
{
handleSaveBtnClick
}
>
{
t
(
"common.save"
)
}
{
t
(
"common.save"
)
}
</
spa
n
>
</
butto
n
>
</
div
>
</
div
>
</
div
>
</
div
>
</>
</>
...
...
web/src/components/CreateShortcutDialog.tsx
View file @
072851e3
import
dayjs
from
"dayjs"
;
import
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
{
memoService
,
shortcutService
}
from
"../services"
;
import
{
memoService
,
shortcutService
}
from
"../services"
;
import
{
checkShouldShowMemoWithFilters
,
filterConsts
,
getDefaultFilter
,
relationConsts
}
from
"../helpers/filter"
;
import
{
filterConsts
,
getDefaultFilter
,
relationConsts
}
from
"../helpers/filter"
;
import
useLoading
from
"../hooks/useLoading"
;
import
useLoading
from
"../hooks/useLoading"
;
import
Icon
from
"./Icon"
;
import
Icon
from
"./Icon"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
toastHelper
from
"./Toast"
;
import
toastHelper
from
"./Toast"
;
import
Selector
from
"./common/Selector"
;
import
Selector
from
"./common/Selector"
;
import
"../less/create-shortcut-dialog.less"
;
import
"../less/create-shortcut-dialog.less"
;
import
dayjs
from
"dayjs"
;
interface
Props
extends
DialogProps
{
interface
Props
extends
DialogProps
{
shortcutId
?:
ShortcutId
;
shortcutId
?:
ShortcutId
;
...
@@ -21,10 +21,6 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
...
@@ -21,10 +21,6 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
const
requestState
=
useLoading
(
false
);
const
requestState
=
useLoading
(
false
);
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
const
shownMemoLength
=
memoService
.
getState
().
memos
.
filter
((
memo
)
=>
{
return
checkShouldShowMemoWithFilters
(
memo
,
filters
);
}).
length
;
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
shortcutId
)
{
if
(
shortcutId
)
{
const
shortcutTemp
=
shortcutService
.
getShortcutById
(
shortcutId
);
const
shortcutTemp
=
shortcutService
.
getShortcutById
(
shortcutId
);
...
@@ -146,10 +142,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
...
@@ -146,10 +142,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
<
div
className=
"dialog-footer-container"
>
<
div
className=
"dialog-footer-container"
>
<
div
></
div
>
<
div
></
div
>
<
div
className=
"btns-container"
>
<
div
className=
"btns-container"
>
<
span
className=
{
`tip-text ${filters.length === 0 && "hidden"}`
}
>
<
button
className=
{
`btn-primary ${requestState.isLoading ? "requesting" : ""}`
}
onClick=
{
handleSaveBtnClick
}
>
<
strong
>
{
shownMemoLength
}
</
strong
>
{
t
(
"shortcut-list.eligible-memo"
)
}
</
span
>
<
button
className=
{
`btn save-btn ${requestState.isLoading ? "requesting" : ""}`
}
onClick=
{
handleSaveBtnClick
}
>
{
t
(
"common.save"
)
}
{
t
(
"common.save"
)
}
</
button
>
</
button
>
</
div
>
</
div
>
...
...
web/src/components/DailyMemo.tsx
View file @
072851e3
...
@@ -21,7 +21,7 @@ const DailyMemo: React.FC<Props> = (props: Props) => {
...
@@ -21,7 +21,7 @@ const DailyMemo: React.FC<Props> = (props: Props) => {
</
div
>
</
div
>
<
div
className=
"memo-container"
>
<
div
className=
"memo-container"
>
<
MemoContent
content=
{
memo
.
content
}
displayConfig=
{
displayConfig
}
/>
<
MemoContent
content=
{
memo
.
content
}
displayConfig=
{
displayConfig
}
/>
<
MemoResources
resourceList=
{
memo
.
resourceList
}
/>
<
MemoResources
resourceList=
{
memo
.
resourceList
}
style=
"col"
/>
</
div
>
</
div
>
<
div
className=
"split-line"
></
div
>
<
div
className=
"split-line"
></
div
>
</
div
>
</
div
>
...
...
web/src/components/Settings/MyAccountSection.tsx
View file @
072851e3
...
@@ -35,10 +35,10 @@ const MyAccountSection = () => {
...
@@ -35,10 +35,10 @@ const MyAccountSection = () => {
</
div
>
</
div
>
<
div
className=
"flex flex-row justify-start items-center text-base text-gray-600"
>
{
user
.
email
}
</
div
>
<
div
className=
"flex flex-row justify-start items-center text-base text-gray-600"
>
{
user
.
email
}
</
div
>
<
div
className=
"w-full flex flex-row justify-start items-center mt-2 space-x-2"
>
<
div
className=
"w-full flex flex-row justify-start items-center mt-2 space-x-2"
>
<
button
className=
"
px-2 py-1 border rounded-md text-sm hover:bg-gray-100
"
onClick=
{
showUpdateAccountDialog
}
>
<
button
className=
"
btn-normal
"
onClick=
{
showUpdateAccountDialog
}
>
Update Information
Update Information
</
button
>
</
button
>
<
button
className=
"
px-2 py-1 border rounded-md text-sm hover:bg-gray-100
"
onClick=
{
showChangePasswordDialog
}
>
<
button
className=
"
btn-normal
"
onClick=
{
showChangePasswordDialog
}
>
Change Password
Change Password
</
button
>
</
button
>
</
div
>
</
div
>
...
@@ -46,7 +46,7 @@ const MyAccountSection = () => {
...
@@ -46,7 +46,7 @@ const MyAccountSection = () => {
<
div
className=
"section-container openapi-section-container"
>
<
div
className=
"section-container openapi-section-container"
>
<
p
className=
"title-text"
>
Open API
</
p
>
<
p
className=
"title-text"
>
Open API
</
p
>
<
p
className=
"value-text"
>
{
openAPIRoute
}
</
p
>
<
p
className=
"value-text"
>
{
openAPIRoute
}
</
p
>
<
span
className=
"
reset-btn
"
onClick=
{
handleResetOpenIdBtnClick
}
>
<
span
className=
"
btn-danger mt-2
"
onClick=
{
handleResetOpenIdBtnClick
}
>
{
t
(
"common.reset"
)
}
API
{
t
(
"common.reset"
)
}
API
</
span
>
</
span
>
<
div
className=
"usage-guide-container"
>
<
div
className=
"usage-guide-container"
>
...
...
web/src/components/UpdateAccountDialog.tsx
View file @
072851e3
...
@@ -87,11 +87,18 @@ const UpdateAccountDialog: React.FC<Props> = ({ destroy }: Props) => {
...
@@ -87,11 +87,18 @@ const UpdateAccountDialog: React.FC<Props> = ({ destroy }: Props) => {
</
button
>
</
button
>
</
div
>
</
div
>
<
div
className=
"dialog-content-container"
>
<
div
className=
"dialog-content-container"
>
<
p
className=
"text-sm mb-1"
>
Nickname
</
p
>
<
p
className=
"text-sm mb-1"
>
Nickname
<
span
className=
"text-sm text-gray-400 ml-1"
>
(Display in the banner)
</
span
>
</
p
>
<
input
type=
"text"
className=
"input-text"
value=
{
state
.
nickname
}
onChange=
{
handleNicknameChanged
}
/>
<
input
type=
"text"
className=
"input-text"
value=
{
state
.
nickname
}
onChange=
{
handleNicknameChanged
}
/>
<
p
className=
"text-sm mb-1 mt-2"
>
Username
</
p
>
<
p
className=
"text-sm mb-1 mt-2"
>
Username
<
span
className=
"text-sm text-gray-400 ml-1"
>
(Using to sign in)
</
span
>
</
p
>
<
input
type=
"text"
className=
"input-text"
value=
{
state
.
username
}
onChange=
{
handleUsernameChanged
}
/>
<
input
type=
"text"
className=
"input-text"
value=
{
state
.
username
}
onChange=
{
handleUsernameChanged
}
/>
<
p
className=
"text-sm mb-1 mt-2"
>
Email
</
p
>
<
p
className=
"text-sm mb-1 mt-2"
>
Email
<
span
className=
"text-sm text-gray-400 ml-1"
>
(Optional)
</
span
>
</
p
>
<
input
type=
"text"
className=
"input-text"
value=
{
state
.
email
}
onChange=
{
handleEmailChanged
}
/>
<
input
type=
"text"
className=
"input-text"
value=
{
state
.
email
}
onChange=
{
handleEmailChanged
}
/>
<
div
className=
"mt-4 w-full flex flex-row justify-end items-center space-x-2"
>
<
div
className=
"mt-4 w-full flex flex-row justify-end items-center space-x-2"
>
<
span
className=
"btn-text"
onClick=
{
handleCloseBtnClick
}
>
<
span
className=
"btn-text"
onClick=
{
handleCloseBtnClick
}
>
...
...
web/src/css/tailwind.css
View file @
072851e3
...
@@ -14,12 +14,20 @@
...
@@ -14,12 +14,20 @@
}
}
}
}
.btn-normal
{
@apply
select-none
inline-flex
border
cursor-pointer
px-3
text-sm
leading-8
rounded-md
hover
:
opacity-80
hover
:
shadow
;
}
.btn-primary
{
.btn-primary
{
@apply
select-none
inline-flex
border
border-transparent
cursor-pointer
px-3
bg-green-600
text-sm
leading-8
text-white
rounded-md
hover
:
opacity-80
;
@apply
btn-normal
border-transparent
bg-green-600
text-white;
}
.btn-danger
{
@apply
btn-normal
border-red-600
bg-red-50
text-red-600;
}
}
.btn-text
{
.btn-text
{
@apply
select-none
inline-flex
border
border-transparent
cursor-pointer
px-2
text-sm
text-gray-600
leading-8
hover
:
opacity-80
;
@apply
btn-normal
text-gray-600
border-none
hover
:
shadow-none
;
}
}
.input-text
{
.input-text
{
...
...
web/src/less/change-memo-created-ts-dialog.less
View file @
072851e3
...
@@ -9,36 +9,8 @@
...
@@ -9,36 +9,8 @@
@apply bg-gray-400 text-xs p-2 rounded-lg;
@apply bg-gray-400 text-xs p-2 rounded-lg;
}
}
> .form-label {
@apply flex flex-col justify-start items-start relative w-full leading-relaxed;
&.input-form-label {
@apply py-3 pb-1;
> input {
@apply w-full p-2 text-sm leading-6 rounded border border-gray-400 bg-transparent;
}
}
}
> .btns-container {
> .btns-container {
@apply flex flex-row justify-end items-center mt-2 w-full;
@apply flex flex-row justify-end items-center mt-2 w-full;
> .btn {
@apply text-sm px-4 py-2 rounded ml-2 bg-gray-400;
&:hover {
@apply opacity-80;
}
&.confirm-btn {
@apply bg-green-600 text-white shadow-inner;
}
&.cancel-btn {
background-color: unset;
}
}
}
}
}
}
}
}
...
...
web/src/less/change-resource-filename-dialog.less
View file @
072851e3
...
@@ -5,40 +5,8 @@
...
@@ -5,40 +5,8 @@
> .dialog-content-container {
> .dialog-content-container {
@apply flex flex-col justify-start items-start;
@apply flex flex-col justify-start items-start;
> .tip-text {
@apply bg-gray-400 text-xs p-2 rounded-lg;
}
> .form-label {
@apply flex flex-col justify-start items-start relative w-full leading-relaxed;
&.input-form-label {
@apply py-3 pb-1;
> input {
@apply w-full p-2 text-sm leading-6 rounded border border-gray-400 bg-transparent;
}
}
}
> .btns-container {
> .btns-container {
@apply flex flex-row justify-end items-center mt-2 w-full;
@apply flex flex-row justify-end items-center mt-2 w-full;
> .btn {
@apply text-sm px-4 py-2 rounded ml-2 bg-gray-400;
&:hover {
@apply opacity-80;
}
&.confirm-btn {
@apply bg-green-600 text-white shadow-inner;
}
&.cancel-btn {
background-color: unset;
}
}
}
}
}
}
}
}
...
...
web/src/less/settings/my-account-section.less
View file @
072851e3
...
@@ -3,10 +3,6 @@
...
@@ -3,10 +3,6 @@
@apply w-full font-mono text-sm shadow-inner border py-2 px-3 rounded leading-6 break-all whitespace-pre-wrap;
@apply w-full font-mono text-sm shadow-inner border py-2 px-3 rounded leading-6 break-all whitespace-pre-wrap;
}
}
> .reset-btn {
@apply mt-2 py-1 px-2 text-sm shadow bg-red-50 border border-red-500 text-red-600 rounded cursor-pointer select-none hover:opacity-80;
}
> .usage-guide-container {
> .usage-guide-container {
@apply flex flex-col justify-start items-start mt-2 w-full;
@apply flex flex-col justify-start items-start mt-2 w-full;
...
...
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