mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
refactor(config): comment out text-translate feature configuration in GetConfig and TextShareDrawer for future implementation
This commit is contained in:
@@ -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,
|
||||
// },
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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('复制链接') }
|
||||
|
||||
Reference in New Issue
Block a user