fix: default summary to false, allow trial user to update settings, close #3629
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { useMobile } from "@follow/components/hooks/useMobile.js"
|
||||
import { ResponsiveSelect } from "@follow/components/ui/select/responsive.js"
|
||||
import { UserRole } from "@follow/constants"
|
||||
import { useTypeScriptHappyCallback } from "@follow/hooks"
|
||||
import { ACTION_LANGUAGE_MAP } from "@follow/shared"
|
||||
import { IN_ELECTRON } from "@follow/shared/constants"
|
||||
@@ -21,7 +20,6 @@ import {
|
||||
useGeneralSettingSelector,
|
||||
useGeneralSettingValue,
|
||||
} from "~/atoms/settings/general"
|
||||
import { useUserRole } from "~/atoms/user"
|
||||
import { useProxyValue, useSetProxy } from "~/hooks/biz/useProxySetting"
|
||||
import { useMinimizeToTrayValue, useSetMinimizeToTray } from "~/hooks/biz/useTraySetting"
|
||||
import { fallbackLanguage } from "~/i18n"
|
||||
@@ -60,8 +58,6 @@ export const SettingGeneral = () => {
|
||||
)
|
||||
|
||||
const isMobile = useMobile()
|
||||
const role = useUserRole()
|
||||
const isTrialUser = role === UserRole.Trial
|
||||
|
||||
const reRenderKey = useGeneralSettingKey("enhancedSettings")
|
||||
|
||||
@@ -89,15 +85,12 @@ export const SettingGeneral = () => {
|
||||
{
|
||||
type: "title",
|
||||
value: t("general.action.title"),
|
||||
disabled: isTrialUser,
|
||||
},
|
||||
defineSettingItem("summary", {
|
||||
label: t("general.action.summary"),
|
||||
disabled: isTrialUser,
|
||||
}),
|
||||
defineSettingItem("translation", {
|
||||
label: t("general.action.translation"),
|
||||
disabled: isTrialUser,
|
||||
}),
|
||||
TranslationModeSelector,
|
||||
ActionLanguageSelector,
|
||||
@@ -284,10 +277,6 @@ export const LanguageSelector = ({
|
||||
const TranslationModeSelector = () => {
|
||||
const { t } = useTranslation("settings")
|
||||
const translationMode = useGeneralSettingKey("translationMode")
|
||||
const role = useUserRole()
|
||||
if (role === UserRole.Trial) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<SettingItemGroup>
|
||||
@@ -315,10 +304,6 @@ const TranslationModeSelector = () => {
|
||||
const ActionLanguageSelector = () => {
|
||||
const { t } = useTranslation("settings")
|
||||
const actionLanguage = useGeneralSettingKey("actionLanguage")
|
||||
const role = useUserRole()
|
||||
if (role === UserRole.Trial) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mb-3 mt-4 flex items-center justify-between">
|
||||
|
||||
@@ -6,7 +6,7 @@ export const defaultGeneralSettings: GeneralSettings = {
|
||||
language: "en",
|
||||
translation: false,
|
||||
translationMode: "bilingual",
|
||||
summary: true,
|
||||
summary: false,
|
||||
actionLanguage: "default",
|
||||
|
||||
// mobile app
|
||||
|
||||
Reference in New Issue
Block a user