diff --git a/web/index.html b/web/index.html index c7714cfe..536c5a4a 100644 --- a/web/index.html +++ b/web/index.html @@ -6,6 +6,7 @@ Memos +
diff --git a/web/public/github.webp b/web/public/github.webp deleted file mode 100644 index 0c293911..00000000 Binary files a/web/public/github.webp and /dev/null differ diff --git a/web/public/icons/add.svg b/web/public/icons/add.svg deleted file mode 100644 index 05a02317..00000000 --- a/web/public/icons/add.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/arrow-left.svg b/web/public/icons/arrow-left.svg deleted file mode 100644 index f49ea29a..00000000 --- a/web/public/icons/arrow-left.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/arrow-right.svg b/web/public/icons/arrow-right.svg deleted file mode 100644 index b0428e20..00000000 --- a/web/public/icons/arrow-right.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/checkbox-active.svg b/web/public/icons/checkbox-active.svg deleted file mode 100644 index e9fccd6b..00000000 --- a/web/public/icons/checkbox-active.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/checkbox.svg b/web/public/icons/checkbox.svg deleted file mode 100644 index a6fe5262..00000000 --- a/web/public/icons/checkbox.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/close-fullscreen.svg b/web/public/icons/close-fullscreen.svg deleted file mode 100644 index 6c9d1b12..00000000 --- a/web/public/icons/close-fullscreen.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/close.svg b/web/public/icons/close.svg deleted file mode 100644 index 5f1267d7..00000000 --- a/web/public/icons/close.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/download.svg b/web/public/icons/download.svg deleted file mode 100644 index efc0c465..00000000 --- a/web/public/icons/download.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/edit.svg b/web/public/icons/edit.svg deleted file mode 100644 index 768af960..00000000 --- a/web/public/icons/edit.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/image.svg b/web/public/icons/image.svg deleted file mode 100644 index 4d5f44c8..00000000 --- a/web/public/icons/image.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/invisibility.svg b/web/public/icons/invisibility.svg deleted file mode 100644 index 396cb2a6..00000000 --- a/web/public/icons/invisibility.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/menu.svg b/web/public/icons/menu.svg deleted file mode 100644 index 133160e5..00000000 --- a/web/public/icons/menu.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/more-white.svg b/web/public/icons/more-white.svg deleted file mode 100644 index 23516572..00000000 --- a/web/public/icons/more-white.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/more.svg b/web/public/icons/more.svg deleted file mode 100644 index 40cfa5c3..00000000 --- a/web/public/icons/more.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/open-fullscreen.svg b/web/public/icons/open-fullscreen.svg deleted file mode 100644 index 86df2c53..00000000 --- a/web/public/icons/open-fullscreen.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/pin.svg b/web/public/icons/pin.svg deleted file mode 100644 index a91b98a0..00000000 --- a/web/public/icons/pin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/pinned.svg b/web/public/icons/pinned.svg deleted file mode 100644 index eb965af1..00000000 --- a/web/public/icons/pinned.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/search.svg b/web/public/icons/search.svg deleted file mode 100644 index 55b78ea0..00000000 --- a/web/public/icons/search.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/share.svg b/web/public/icons/share.svg deleted file mode 100644 index 4c5fa323..00000000 --- a/web/public/icons/share.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/tag.svg b/web/public/icons/tag.svg deleted file mode 100644 index 8cf477e7..00000000 --- a/web/public/icons/tag.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/public/icons/visibility.svg b/web/public/icons/visibility.svg deleted file mode 100644 index ca40f728..00000000 --- a/web/public/icons/visibility.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/AboutSiteDialog.tsx b/web/src/components/AboutSiteDialog.tsx index a5d26bfd..0f9915e1 100644 --- a/web/src/components/AboutSiteDialog.tsx +++ b/web/src/components/AboutSiteDialog.tsx @@ -37,7 +37,7 @@ const AboutSiteDialog: React.FC = ({ destroy }: Props) => { 🤠About Memos

diff --git a/web/src/components/ArchivedMemoDialog.tsx b/web/src/components/ArchivedMemoDialog.tsx index a485a5fe..8b61fbb2 100644 --- a/web/src/components/ArchivedMemoDialog.tsx +++ b/web/src/components/ArchivedMemoDialog.tsx @@ -37,7 +37,7 @@ const ArchivedMemoDialog: React.FC = (props: Props) => { Archived Memos

diff --git a/web/src/components/ChangePasswordDialog.tsx b/web/src/components/ChangePasswordDialog.tsx index 7aa924c1..8bb2ee7b 100644 --- a/web/src/components/ChangePasswordDialog.tsx +++ b/web/src/components/ChangePasswordDialog.tsx @@ -70,7 +70,7 @@ const ChangePasswordDialog: React.FC = ({ destroy }: Props) => {

Change Password

diff --git a/web/src/components/ConfirmResetOpenIdDialog.tsx b/web/src/components/ConfirmResetOpenIdDialog.tsx index 7efdbbbc..517da141 100644 --- a/web/src/components/ConfirmResetOpenIdDialog.tsx +++ b/web/src/components/ConfirmResetOpenIdDialog.tsx @@ -41,7 +41,7 @@ const ConfirmResetOpenIdDialog: React.FC = ({ destroy }: Props) => {

Reset Open API

diff --git a/web/src/components/CreateShortcutDialog.tsx b/web/src/components/CreateShortcutDialog.tsx index 6bf5d173..b88fcc47 100644 --- a/web/src/components/CreateShortcutDialog.tsx +++ b/web/src/components/CreateShortcutDialog.tsx @@ -100,7 +100,7 @@ const CreateShortcutDialog: React.FC = (props: Props) => { {shortcutId ? "Edit Shortcut" : "Create Shortcut"}

@@ -296,7 +296,7 @@ const FilterInputer: React.FC = (props: MemoFilterInpute /> {inputElements} - +
); }; diff --git a/web/src/components/DailyReviewDialog.tsx b/web/src/components/DailyReviewDialog.tsx index 2314111d..92b636ee 100644 --- a/web/src/components/DailyReviewDialog.tsx +++ b/web/src/components/DailyReviewDialog.tsx @@ -64,16 +64,16 @@ const DailyReviewDialog: React.FC = (props: Props) => {

-
= () => { return (
- + Star
diff --git a/web/src/components/Memo.tsx b/web/src/components/Memo.tsx index f475cfc0..983ddab3 100644 --- a/web/src/components/Memo.tsx +++ b/web/src/components/Memo.tsx @@ -23,7 +23,6 @@ interface Props { } interface State { - createdAtStr: string; expandButtonStatus: ExpandButtonStatus; } @@ -38,9 +37,9 @@ export const getFormatedMemoCreatedAtStr = (createdTs: number): string => { const Memo: React.FC = (props: Props) => { const memo = props.memo; const [state, setState] = useState({ - createdAtStr: getFormatedMemoCreatedAtStr(memo.createdTs), expandButtonStatus: -1, }); + const [createdAtStr, setCreatedAtStr] = useState(getFormatedMemoCreatedAtStr(memo.createdTs)); const memoContainerRef = useRef(null); const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []).map((s) => s.replace(IMAGE_URL_REG, "$1")); @@ -58,10 +57,7 @@ const Memo: React.FC = (props: Props) => { if (Date.now() - memo.createdTs < 1000 * 60 * 60 * 24) { setInterval(() => { - setState({ - ...state, - createdAtStr: dayjs(memo.createdTs).fromNow(), - }); + setCreatedAtStr(dayjs(memo.createdTs).fromNow()); }, 1000 * 1); } }, []); @@ -166,7 +162,6 @@ const Memo: React.FC = (props: Props) => { const handleExpandBtnClick = () => { setState({ - ...state, expandButtonStatus: Number(Boolean(!state.expandButtonStatus)) as ExpandButtonStatus, }); }; @@ -175,7 +170,7 @@ const Memo: React.FC = (props: Props) => {
- {state.createdAtStr} + {createdAtStr} PINNED @@ -185,21 +180,21 @@ const Memo: React.FC = (props: Props) => {
- +
- + {memo.pinned ? "Unpin" : "Pin"}
- + Edit
- + Share
@@ -226,7 +221,7 @@ const Memo: React.FC = (props: Props) => {
{state.expandButtonStatus === 0 ? "Expand" : "Fold"} - +
)} diff --git a/web/src/components/MemoCardDialog.tsx b/web/src/components/MemoCardDialog.tsx index 4314fa28..ce738001 100644 --- a/web/src/components/MemoCardDialog.tsx +++ b/web/src/components/MemoCardDialog.tsx @@ -135,19 +135,19 @@ const MemoCardDialog: React.FC = (props: Props) => {
<> - -
diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index a76b337b..1bfbf5d1 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -231,7 +231,7 @@ const MemoEditor: React.FC = () => { tools={ <>
- +
{tags.map((t) => { return {t}; @@ -239,11 +239,11 @@ const MemoEditor: React.FC = () => {
} diff --git a/web/src/components/MemosHeader.tsx b/web/src/components/MemosHeader.tsx index 6d6e6683..a07f3508 100644 --- a/web/src/components/MemosHeader.tsx +++ b/web/src/components/MemosHeader.tsx @@ -40,7 +40,7 @@ const MemosHeader: React.FC = () => {
- +
{titleText} diff --git a/web/src/components/PreviewImageDialog.tsx b/web/src/components/PreviewImageDialog.tsx index fc1b2374..f61f09b7 100644 --- a/web/src/components/PreviewImageDialog.tsx +++ b/web/src/components/PreviewImageDialog.tsx @@ -22,10 +22,10 @@ const PreviewImageDialog: React.FC = ({ destroy, imgUrl }: Props) => { <>
diff --git a/web/src/components/SearchBar.tsx b/web/src/components/SearchBar.tsx index 8a071707..38afab77 100644 --- a/web/src/components/SearchBar.tsx +++ b/web/src/components/SearchBar.tsx @@ -24,7 +24,7 @@ const SearchBar: React.FC = () => { return (
- +
diff --git a/web/src/components/SettingDialog.tsx b/web/src/components/SettingDialog.tsx index 8a014032..6df44b27 100644 --- a/web/src/components/SettingDialog.tsx +++ b/web/src/components/SettingDialog.tsx @@ -30,7 +30,7 @@ const SettingDialog: React.FC = (props: Props) => { return (
Basic diff --git a/web/src/components/ShareMemoImageDialog.tsx b/web/src/components/ShareMemoImageDialog.tsx index 0474dfc2..d59824fd 100644 --- a/web/src/components/ShareMemoImageDialog.tsx +++ b/web/src/components/ShareMemoImageDialog.tsx @@ -75,7 +75,7 @@ const ShareMemoImageDialog: React.FC = (props: Props) => { 🌄Share Memo

diff --git a/web/src/components/ShortcutList.tsx b/web/src/components/ShortcutList.tsx index a89762c3..fc23ef63 100644 --- a/web/src/components/ShortcutList.tsx +++ b/web/src/components/ShortcutList.tsx @@ -39,7 +39,7 @@ const ShortcutList: React.FC = () => {

Shortcuts

@@ -113,7 +113,7 @@ const ShortcutContainer: React.FC = (props: ShortcutCont
- +
diff --git a/web/src/components/Sidebar.tsx b/web/src/components/Sidebar.tsx index f9a236fb..b7bc3d48 100644 --- a/web/src/components/Sidebar.tsx +++ b/web/src/components/Sidebar.tsx @@ -27,7 +27,7 @@ const Sidebar: React.FC = () => {
diff --git a/web/src/components/common/DatePicker.tsx b/web/src/components/common/DatePicker.tsx index c6eb68df..6ab3d788 100644 --- a/web/src/components/common/DatePicker.tsx +++ b/web/src/components/common/DatePicker.tsx @@ -55,13 +55,13 @@ const DatePicker: React.FC = (props: DatePickerProps) => {
handleChangeMonthBtnClick(-1)}> - + {firstDate.getFullYear()}/{firstDate.getMonth() + 1} handleChangeMonthBtnClick(1)}> - +
diff --git a/web/src/components/common/Selector.tsx b/web/src/components/common/Selector.tsx index 7a21a2c6..c9071153 100644 --- a/web/src/components/common/Selector.tsx +++ b/web/src/components/common/Selector.tsx @@ -64,7 +64,7 @@ const Selector: React.FC = (props: Props) => {
{currentItem.text} - +
diff --git a/web/src/less/common/date-picker.less b/web/src/less/common/date-picker.less index 69daa1cd..17e5bfe6 100644 --- a/web/src/less/common/date-picker.less +++ b/web/src/less/common/date-picker.less @@ -1,33 +1,17 @@ @import "../mixin.less"; .date-picker-wrapper { - .flex(column, flex-start, flex-start); - padding: 16px; + @apply flex flex-col justify-start items-start p-4; > .date-picker-header { - .flex(row, center, center); - width: 100%; + @apply flex flex-row justify-center items-center w-full mb-2; > .btn-text { - width: 24px; - height: 24px; - border-radius: 4px; - cursor: pointer; - user-select: none; - - > .icon-img { - width: 100%; - height: auto; - } - - &:hover { - background-color: @bg-whitegray; - } + @apply w-6 h-6 rounded cursor-pointer select-none flex flex-col justify-center items-center opacity-40 hover:bg-gray-200; } > .normal-text { - margin: 0 4px; - line-height: 24px; + @apply mx-1 leading-6 font-mono; } } diff --git a/web/src/less/editor.less b/web/src/less/editor.less index 496c2971..d1ec1f4d 100644 --- a/web/src/less/editor.less +++ b/web/src/less/editor.less @@ -28,10 +28,10 @@ @apply flex flex-row justify-start items-center; > .action-btn { - @apply flex flex-row justify-start items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer opacity-60 hover:opacity-90 hover:bg-gray-300 hover:shadow; + @apply flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer opacity-60 hover:opacity-90 hover:bg-gray-300 hover:shadow; > .icon-img { - @apply w-5 h-auto; + @apply w-5 h-5 mx-auto flex flex-row justify-center items-center; } > .tip-text { diff --git a/web/src/less/github-badge.less b/web/src/less/github-badge.less index 920ab8d0..07e9fbf1 100644 --- a/web/src/less/github-badge.less +++ b/web/src/less/github-badge.less @@ -5,7 +5,7 @@ @apply w-auto h-full px-2 border-r rounded-l flex flex-row justify-center items-center text-xs font-bold text-gray-800 bg-gray-100; > .icon-img { - @apply w-4 h-auto mr-1; + @apply mr-1; } } diff --git a/web/src/less/memo.less b/web/src/less/memo.less index ccb87879..bc5776a3 100644 --- a/web/src/less/memo.less +++ b/web/src/less/memo.less @@ -73,18 +73,16 @@ } .btn { - @apply flex flex-row justify-center items-center px-2 leading-6 text-sm rounded hover:bg-gray-100; + @apply flex flex-row justify-center items-center px-2 leading-6 text-sm rounded hover:bg-gray-200; &.more-action-btn { - @apply w-8 -mr-2 opacity-60 cursor-default; + @apply w-8 -mr-2 opacity-60 cursor-default hover:bg-transparent; > .icon-img { @apply w-4 h-auto; } &:hover { - background-color: unset; - & + .more-action-btns-wrapper { display: flex; } @@ -130,7 +128,7 @@ } > .icon-img { - @apply w-4 h-auto transition-all; + @apply w-4 h-auto ml-1 transition-all; } } } diff --git a/web/src/less/search-bar.less b/web/src/less/search-bar.less index d016a508..1953e823 100644 --- a/web/src/less/search-bar.less +++ b/web/src/less/search-bar.less @@ -8,7 +8,7 @@ @apply w-full py-2 px-4 rounded-lg flex flex-row justify-start items-center bg-zinc-200; > .icon-img { - @apply mr-2 w-4 h-auto opacity-80; + @apply mr-2 h-auto opacity-30; } > .text-input { diff --git a/web/src/less/shortcut-list.less b/web/src/less/shortcut-list.less index 190d86f2..a107b358 100644 --- a/web/src/less/shortcut-list.less +++ b/web/src/less/shortcut-list.less @@ -12,10 +12,10 @@ } > .btn { - @apply flex flex-col justify-center items-center w-5 h-5 bg-gray-200 rounded ml-2 shadow hover:opacity-80; + @apply flex flex-col justify-center items-center w-5 p-1 h-5 bg-gray-200 rounded ml-2 shadow hover:opacity-80; - > img { - @apply w-4 h-4 opacity-80; + > .icon-img { + @apply opacity-60; } } } @@ -66,14 +66,11 @@ @apply flex-row justify-end items-center hidden shrink-0; > .action-btn { - .flex(row, center, center); - @apply w-6 h-6 shrink-0; - - > .icon-img { - @apply w-4 h-auto; - } + @apply flex flex-row justify-center items-center w-6 h-6 shrink-0; &.toggle-btn { + @apply opacity-60; + &:hover { & + .action-btns-wrapper { @apply flex;