feat: upgrade dev version to 0.8.1 (#656)

* feat: upgrade version to `0.8.1`

* chore: update
This commit is contained in:
boojack 2022-12-02 21:09:11 +08:00 committed by GitHub
parent 14f9f29348
commit a467a7c173
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 28 additions and 68 deletions

View file

@ -61,6 +61,9 @@ func NewServer(profile *profile.Profile) *Server {
rootGroup := e.Group("")
s.registerRSSRoutes(rootGroup)
webhookGroup := e.Group("/h")
s.registerResourcePublicRoutes(webhookGroup)
publicGroup := e.Group("/o")
s.registerResourcePublicRoutes(publicGroup)
s.registerGetterPublicRoutes(publicGroup)

View file

@ -7,10 +7,10 @@ import (
// Version is the service current released version.
// Semantic versioning: https://semver.org/
var Version = "0.8.0"
var Version = "0.8.1"
// DevVersion is the service current development version.
var DevVersion = "0.8.0"
var DevVersion = "0.8.1"
func GetCurrentVersion(mode string) string {
if mode == "dev" {

View file

@ -158,12 +158,10 @@ const PreferencesSection = () => {
<span className="tip-text">{t("common.yourself")}</span>
) : (
<Dropdown
actionsClassName="!w-24"
positionClassName="bottom-full right-0 mb-1"
actions={
<>
<button
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
className="w-full text-left text-sm whitespace-nowrap leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
onClick={() => handleChangePasswordClick(user)}
>
{t("setting.account-section.change-password")}
@ -184,7 +182,7 @@ const PreferencesSection = () => {
{t("common.restore")}
</button>
<button
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded text-red-600 hover:bg-gray-100"
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded text-red-600 hover:bg-gray-100 dark:hover:bg-zinc-600"
onClick={() => handleDeleteUserClick(user)}
>
{t("common.delete")}

View file

@ -8,14 +8,14 @@ export const ANIMATION_DURATION = 200;
export const DAILY_TIMESTAMP = 3600 * 24 * 1000;
export const VISIBILITY_SELECTOR_ITEMS = [
{ text: "PUBLIC", value: "PUBLIC" },
{ text: "PROTECTED", value: "PROTECTED" },
{ text: "PRIVATE", value: "PRIVATE" },
{ text: "PROTECTED", value: "PROTECTED" },
{ text: "PUBLIC", value: "PUBLIC" },
];
export const MEMO_DISPLAY_TS_OPTION_SELECTOR_ITEMS = [
{ text: "created_ts", value: "created_ts" },
{ text: "created_ts", value: "updated_ts" },
{ text: "updated_ts", value: "updated_ts" },
];
export const TAB_SPACE_WIDTH = 2;

View file

@ -40,7 +40,7 @@
@apply relative flex-grow max-w-2xl w-full min-h-full flex flex-col justify-start items-start px-4;
> .memo-container {
@apply flex flex-col justify-start items-start w-full p-4 mt-2 bg-white dark:bg-zinc-800 rounded-lg border border-white dark:border-zinc-800 hover:border-gray-200 dark:hover:border-zinc-700;
@apply flex flex-col justify-start items-start w-full p-4 mt-2 bg-white dark:bg-zinc-700 rounded-lg border border-white dark:border-zinc-800 hover:border-gray-200 dark:hover:border-zinc-700;
> .memo-header {
@apply mb-2 w-full flex flex-row justify-between items-center;
@ -55,7 +55,7 @@
}
> .memo-content {
@apply cursor-default dark:text-zinc-50;
@apply cursor-default;
> * {
@apply cursor-default;

View file

@ -2,7 +2,7 @@
@apply relative w-full flex flex-col justify-start items-start bg-white dark:bg-zinc-700 px-4 rounded-lg border-2 border-gray-200 dark:border-zinc-600;
&.fullscreen {
@apply transition-all fixed w-full h-full top-0 left-0 z-1000 border-none rounded-none sm:p-8;
@apply transition-all fixed w-full h-full top-0 left-0 z-1000 border-none rounded-none sm:p-8 dark:bg-zinc-800;
> .memo-editor {
@apply p-4 mb-4 rounded-lg border shadow-lg flex flex-col flex-grow justify-start items-start relative w-full h-full bg-white dark:bg-zinc-700 dark:border-zinc-600;
@ -146,7 +146,7 @@
@apply grow-0 shrink-0 flex flex-row justify-end items-center;
> .cancel-btn {
@apply mr-4 text-sm text-gray-600 hover:opacity-80;
@apply mr-4 text-sm text-gray-500 hover:opacity-80 dark:text-gray-300;
}
> .confirm-btn {

View file

@ -7,30 +7,6 @@
> .dialog-content-container {
@apply flex flex-col justify-start items-start w-full;
> .action-buttons-container {
@apply w-full flex flex-row justify-between items-center mb-2;
> .buttons-wrapper {
@apply flex flex-row justify-start items-center;
> .upload-resource-btn {
@apply text-sm cursor-pointer px-3 py-1 rounded flex flex-row justify-center items-center border border-blue-600 text-blue-600 bg-blue-50 hover:opacity-80;
> .icon-img {
@apply w-4 h-auto mr-1;
}
}
> .delete-unused-resource-btn {
@apply text-sm cursor-pointer px-3 py-1 rounded flex flex-row justify-center items-center border border-red-600 text-red-600 bg-red-100 hover:opacity-80;
> .icon-img {
@apply w-4 h-auto mr-1;
}
}
}
}
> .loading-text-container {
@apply flex flex-col justify-center items-center w-full h-32;
}
@ -39,7 +15,7 @@
@apply flex flex-col justify-start items-start w-full;
> .fields-container {
@apply px-2 py-2 w-full grid grid-cols-7 border-b;
@apply px-2 py-2 w-full grid grid-cols-7 border-b dark:border-b-gray-500;
> .field-text {
@apply font-mono text-gray-400;
@ -51,7 +27,7 @@
}
> .resource-container {
@apply px-2 py-2 w-full grid grid-cols-7;
@apply px-2 py-2 w-full grid grid-cols-7 dark:bg-zinc-700;
> .buttons-container {
@apply w-full flex flex-row justify-end items-center;

View file

@ -21,11 +21,11 @@
}
> .quickly-action-wrapper {
@apply hidden absolute top-9 -right-2 p-2 w-80 z-10;
@apply hidden absolute top-9 -right-2 p-2 w-60 z-10;
> .quickly-action-container {
@apply flex flex-col justify-start items-start w-full bg-white dark:bg-zinc-700 px-4 py-3 rounded-lg;
box-shadow: 0 0 8px 0 rgb(0 0 0 / 20%);
box-shadow: 0 0 8px 0 rgb(0 0 0 / 40%);
> .title-text {
@apply text-gray-600 dark:text-gray-400 text-xs;
@ -45,7 +45,7 @@
@apply flex flex-row justify-start items-center leading-6;
.type-item {
@apply cursor-pointer px-1 rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-600;
@apply cursor-pointer px-2 rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-600;
&.selected {
@apply !bg-green-600 text-white;

View file

@ -31,7 +31,7 @@
&.active {
> .shortcut-text-container {
@apply text-green-600;
@apply !text-green-600;
}
}

View file

@ -23,7 +23,7 @@
&.active {
> .tag-text-container {
@apply text-green-600;
@apply !text-green-600;
}
}

View file

@ -96,7 +96,7 @@
"view-detail": "View Detail",
"copy": "Copy",
"visibility": {
"private": "Private",
"private": "Only visible to you",
"protected": "Visible to members",
"public": "Everyone can see"
}

View file

@ -136,7 +136,7 @@ const Auth = () => {
<div className="action-btns-container">
{systemStatus?.host ? (
<>
{actionBtnLoadingState.isLoading && <Icon.Loader className="w-4 h-auto mr-2 animate-spin" />}
{actionBtnLoadingState.isLoading && <Icon.Loader className="w-4 h-auto mr-2 animate-spin dark:text-gray-300" />}
{systemStatus?.allowSignUp && (
<>
<button

View file

@ -1,4 +1,3 @@
import copy from "copy-to-clipboard";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
@ -7,9 +6,7 @@ import { memoService } from "../services";
import { UNKNOWN_ID } from "../helpers/consts";
import { useAppSelector } from "../store";
import useLoading from "../hooks/useLoading";
import Icon from "../components/Icon";
import toastHelper from "../components/Toast";
import Dropdown from "../components/common/Dropdown";
import MemoContent from "../components/MemoContent";
import MemoResources from "../components/MemoResources";
import "../less/memo-detail.less";
@ -48,11 +45,6 @@ const MemoDetail = () => {
}
}, [location]);
const handleCopyContent = () => {
copy(state.memo.content);
toastHelper.success(t("message.succeed-copy-content"));
};
return (
<section className="page-wrapper memo-detail">
<div className="page-container">
@ -87,20 +79,6 @@ const MemoDetail = () => {
@{state.memo.creator.nickname || state.memo.creator.username}
</a>
</div>
<Dropdown
trigger={<Icon.MoreHorizontal className="ml-2 w-4 h-auto cursor-pointer text-gray-500" />}
actionsClassName="!w-32"
actions={
<>
<button
className="w-full flex flex-row justify-start items-center px-3 whitespace-nowrap text-sm text-left leading-8 cursor-pointer rounded hover:bg-gray-100"
onClick={handleCopyContent}
>
{t("memo.copy")}
</button>
</>
}
/>
</div>
<MemoContent className="memo-content" content={state.memo.content} onMemoContentClick={() => undefined} />
<MemoResources resourceList={state.memo.resourceList} />

View file

@ -2,6 +2,11 @@ import { extendTheme } from "@mui/joy";
const theme = extendTheme({
components: {
JoyButton: {
defaultProps: {
size: "sm",
},
},
JoySelect: {
defaultProps: {
size: "sm",