refactor(config): comment out text-translate feature configuration in GetConfig and TextShareDrawer for future implementation

This commit is contained in:
keven1024
2026-05-23 22:50:14 +08:00
parent cf92a50c82
commit a8f504f377
2 changed files with 15 additions and 15 deletions

View File

@@ -32,8 +32,8 @@ func GetConfig(c *echo.Context) error {
featureConfig = lo.Assign(defaultFeatureConfig, featureConfig)
features := getEnabledKeys(featureConfig)
textTranslateProviderConfig := u.GetEnvMap("features.text-translate.provider")
textTranslateProviders := getEnabledKeys(textTranslateProviderConfig)
// textTranslateProviderConfig := u.GetEnvMap("features.text-translate.provider")
// textTranslateProviders := getEnabledKeys(textTranslateProviderConfig)
return utils.HTTPSuccessHandler(c, map[string]any{
"site_title": u.GetEnvMap("site.title"),
@@ -45,10 +45,10 @@ func GetConfig(c *echo.Context) error {
"version": u.GetEnvWithDefault("VERSION", "dev"),
"build_time": cast.ToInt(u.GetEnvWithDefault("BUILD_TIME", cast.ToString(time.Now().Unix()))),
"features": features,
"config": map[string]any{
"text-translate": map[string]any{
"provider": textTranslateProviders,
},
"config": map[string]any{
// "text-translate": map[string]any{
// "provider": textTranslateProviders,
// },
},
})
}

View File

@@ -20,15 +20,15 @@ const actionHandlers: Partial<Record<FeatureKey, ActionHandler>> = {
'text-share': {
onClick: () => showDrawer({ render: ({ hide }) => h(TextShareHandle, { ...props, hide }) }),
},
'text-translate': {
onClick: () =>
props.onTextHandle({
type: 'text-translate',
config: {
source: 'auto',
},
}),
},
// 'text-translate': {
// onClick: () =>
// props.onTextHandle({
// type: 'text-translate',
// config: {
// source: 'auto',
// },
// }),
// },
// 'text-image-generate': {
// label: '生成配图', icon: LucideImage, className: 'bg-red-300',
// onClick: () => { console.log('复制链接') }