Skip to content

Commit

Permalink
chore: upgrade version to 0.11.2 (#1336)
Browse files Browse the repository at this point in the history
  • Loading branch information
boojack authored Mar 11, 2023
1 parent ca6839f commit 50f36e3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
4 changes: 2 additions & 2 deletions server/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

// Version is the service current released version.
// Semantic versioning: https://semver.org/
var Version = "0.11.1"
var Version = "0.11.2"

// DevVersion is the service current development version.
var DevVersion = "0.11.1"
var DevVersion = "0.11.2"

func GetCurrentVersion(mode string) string {
if mode == "dev" || mode == "demo" {
Expand Down
6 changes: 1 addition & 5 deletions web/src/components/AboutSiteDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => {
/>
<span>Sticky notes</span>
</a>
<a
href="https://github.com/boojack/sticky-notes"
target="_blank"
className="flex items-center underline text-blue-600 hover:opacity-80"
>
<a href="https://star-history.com" target="_blank" className="flex items-center underline text-blue-600 hover:opacity-80">
<img className="w-4 h-auto mr-1" src="https://star-history.com/icon.png" alt="" />
<span>Star history</span>
</a>
Expand Down
4 changes: 2 additions & 2 deletions web/src/less/daily-memo.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
}

> .split-line {
@apply h-full px-px bg-gray-50 dark:bg-zinc-600 absolute top-1 left-6 z-0 -ml-px;
@apply h-full px-px bg-gray-50 dark:bg-zinc-600 absolute top-1 left-6 -ml-px;
}

> .time-wrapper {
@apply mt-px mr-4 w-12 h-7 shrink-0 text-xs leading-6 text-center font-mono rounded-lg bg-gray-100 dark:bg-zinc-600 border-2 border-white dark:border-zinc-700 text-gray-600 dark:text-gray-300 z-10;
@apply mt-px mr-4 w-12 h-7 shrink-0 text-xs leading-6 text-center font-mono rounded-lg bg-gray-100 dark:bg-zinc-600 border-2 border-white z-1 dark:border-zinc-700 text-gray-600 dark:text-gray-300;
}

> .memo-container {
Expand Down
30 changes: 25 additions & 5 deletions web/src/pages/DailyReview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useRef, useState } from "react";
import { last } from "lodash-es";
import { useEffect, useRef, useState } from "react";
import toast from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { useMemoStore, useUserStore } from "../store/module";
import { DAILY_TIMESTAMP } from "../helpers/consts";
import { DAILY_TIMESTAMP, DEFAULT_MEMO_LIMIT } from "../helpers/consts";
import * as utils from "../helpers/utils";
import MobileHeader from "../components/MobileHeader";
import useToggle from "../hooks/useToggle";
Expand Down Expand Up @@ -37,6 +39,24 @@ const DailyReview = () => {
})
.sort((a, b) => utils.getTimeStampByDate(a.createdTs) - utils.getTimeStampByDate(b.createdTs));

useEffect(() => {
const fetchMoreMemos = async () => {
try {
const fetchedMemos = await memoStore.fetchMemos();
if (fetchedMemos.length === DEFAULT_MEMO_LIMIT) {
const lastMemo = last(fetchedMemos);
if (lastMemo && lastMemo.createdTs > currentDateStamp) {
await fetchMoreMemos();
}
}
} catch (error: any) {
console.error(error);
toast.error(error.response.data.message);
}
};
fetchMoreMemos();
}, [currentDateStamp]);

const handleShareBtnClick = () => {
if (!memosElRef.current) {
return;
Expand Down Expand Up @@ -99,8 +119,8 @@ const DailyReview = () => {
handleDateStampChange={handleDataPickerChange}
/>
</div>
<div className="w-full h-auto flex flex-col justify-start items-start p-12 pt-26" ref={memosElRef}>
<div className="flex flex-col justify-center items-center mx-auto pb-6 select-none">
<div className="w-full h-auto flex flex-col justify-start items-start px-2 sm:px-12 pt-14 pb-8" ref={memosElRef}>
<div className="flex flex-col justify-center items-center mx-auto pb-10 select-none">
<div className="mx-auto font-bold text-gray-600 dark:text-gray-300 text-center leading-6 mb-2">{currentDate.getFullYear()}</div>
<div className="flex flex-col justify-center items-center m-auto w-24 h-24 shadow rounded-3xl dark:bg-zinc-800">
<div className="text-center w-full leading-6 text-sm text-white bg-blue-700 rounded-t-3xl">
Expand All @@ -113,7 +133,7 @@ const DailyReview = () => {
</div>
</div>
{dailyMemos.length === 0 ? (
<div className="mx-auto py-6 pb-12 px-0">
<div className="mx-auto pt-4 pb-5 px-0">
<p className="italic text-gray-400">{t("daily-review.oops-nothing")}</p>
</div>
) : (
Expand Down

0 comments on commit 50f36e3

Please sign in to comment.