mirror of
https://github.com/usememos/memos.git
synced 2024-12-19 09:02:49 +03:00
chore: add beta badge
This commit is contained in:
parent
2f33eceada
commit
dd04bc9e1d
13
web/src/components/BetaBadge.tsx
Normal file
13
web/src/components/BetaBadge.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import "../less/beta-badge.less";
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const BetaBadge: React.FC<Props> = (props: Props) => {
|
||||
const { className } = props;
|
||||
|
||||
return <span className={`beta-badge ${className ?? ""}`}>beta</span>;
|
||||
};
|
||||
|
||||
export default BetaBadge;
|
@ -2,6 +2,7 @@ import { globalService, userService } from "../../services";
|
||||
import { useAppSelector } from "../../store";
|
||||
import { VISIBILITY_SELECTOR_ITEMS } from "../../helpers/consts";
|
||||
import useI18n from "../../hooks/useI18n";
|
||||
import BetaBadge from "../BetaBadge";
|
||||
import Selector from "../common/Selector";
|
||||
import "../../less/settings/preferences-section.less";
|
||||
|
||||
@ -36,11 +37,12 @@ const PreferencesSection: React.FC<Props> = () => {
|
||||
<label className="form-label">
|
||||
<span className="normal-text">{t("common.language")}:</span>
|
||||
<Selector className="ml-2 w-28" value={setting.locale} dataSource={localeSelectorItems} handleValueChanged={handleLocaleChanged} />
|
||||
<BetaBadge className="ml-2" />
|
||||
</label>
|
||||
<label className="form-label">
|
||||
<span className="normal-text">{t("setting.preference-section.default-memo-visibility")}:</span>
|
||||
<Selector
|
||||
className="ml-2 w-28"
|
||||
className="ml-2 w-32"
|
||||
value={setting.memoVisibility}
|
||||
dataSource={VISIBILITY_SELECTOR_ITEMS}
|
||||
handleValueChanged={handleDefaultMemoVisibilityChanged}
|
||||
|
3
web/src/less/beta-badge.less
Normal file
3
web/src/less/beta-badge.less
Normal file
@ -0,0 +1,3 @@
|
||||
.beta-badge {
|
||||
@apply px-2 text-xs border rounded-lg text-gray-400;
|
||||
}
|
@ -1,12 +1,11 @@
|
||||
@import "../mixin.less";
|
||||
|
||||
.preferences-section-container {
|
||||
> .btns-container {
|
||||
.flex(row, flex-start, center);
|
||||
@apply w-full;
|
||||
> .form-label {
|
||||
@apply mb-2;
|
||||
|
||||
> .btn {
|
||||
@apply border text-sm py-1 px-3 mr-2 rounded leading-6 shadow hover:opacity-80;
|
||||
> .normal-text {
|
||||
@apply mr-2 text-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user