chore: upgrade version to 0.11.2 (#1336)

This commit is contained in:
boojack 2023-03-11 13:20:24 +08:00 committed by GitHub
parent ca6839f593
commit 50f36e3ed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 14 deletions

View File

@ -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" {

View File

@ -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>

View File

@ -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 {

View File

@ -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";
@ -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;
@ -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">
@ -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>
) : (