Commit 4fee20ec authored by 陈曦's avatar 陈曦
Browse files

去除版本在页面的上的展示

parent 2b4c7986
...@@ -64,7 +64,7 @@ func main() { ...@@ -64,7 +64,7 @@ func main() {
flag.Parse() flag.Parse()
if *showVersion { if *showVersion {
log.Printf("Sub2API %s (commit: %s, built: %s)\n", Version, Commit, Date) log.Printf("TrafficAPI %s (commit: %s, built: %s)\n", Version, Commit, Date)
return return
} }
...@@ -114,7 +114,7 @@ func runSetupServer() { ...@@ -114,7 +114,7 @@ func runSetupServer() {
// This allows users to run setup on a different address if needed // This allows users to run setup on a different address if needed
addr := config.GetServerAddress() addr := config.GetServerAddress()
log.Printf("Setup wizard available at http://%s", addr) log.Printf("Setup wizard available at http://%s", addr)
log.Println("Complete the setup wizard to configure Sub2API") log.Println("Complete the setup wizard to configure TrafficAPI")
server := &http.Server{ server := &http.Server{
Addr: addr, Addr: addr,
......
...@@ -271,7 +271,7 @@ func (s *AuthService) SendVerifyCode(ctx context.Context, email string) error { ...@@ -271,7 +271,7 @@ func (s *AuthService) SendVerifyCode(ctx context.Context, email string) error {
} }
// 获取网站名称 // 获取网站名称
siteName := "Sub2API" siteName := "TrafficAPI"
if s.settingService != nil { if s.settingService != nil {
siteName = s.settingService.GetSiteName(ctx) siteName = s.settingService.GetSiteName(ctx)
} }
...@@ -314,7 +314,7 @@ func (s *AuthService) SendVerifyCodeAsync(ctx context.Context, email string) (*S ...@@ -314,7 +314,7 @@ func (s *AuthService) SendVerifyCodeAsync(ctx context.Context, email string) (*S
} }
// 获取网站名称 // 获取网站名称
siteName := "Sub2API" siteName := "TrafficAPI"
if s.settingService != nil { if s.settingService != nil {
siteName = s.settingService.GetSiteName(ctx) siteName = s.settingService.GetSiteName(ctx)
} }
...@@ -962,7 +962,7 @@ func (s *AuthService) preparePasswordReset(ctx context.Context, email, frontendB ...@@ -962,7 +962,7 @@ func (s *AuthService) preparePasswordReset(ctx context.Context, email, frontendB
} }
// Get site name // Get site name
siteName := "Sub2API" siteName := "TrafficAPI"
if s.settingService != nil { if s.settingService != nil {
siteName = s.settingService.GetSiteName(ctx) siteName = s.settingService.GetSiteName(ctx)
} }
......
...@@ -194,7 +194,7 @@ func (s *SettingService) GetPublicSettings(ctx context.Context) (*PublicSettings ...@@ -194,7 +194,7 @@ func (s *SettingService) GetPublicSettings(ctx context.Context) (*PublicSettings
TotpEnabled: settings[SettingKeyTotpEnabled] == "true", TotpEnabled: settings[SettingKeyTotpEnabled] == "true",
TurnstileEnabled: settings[SettingKeyTurnstileEnabled] == "true", TurnstileEnabled: settings[SettingKeyTurnstileEnabled] == "true",
TurnstileSiteKey: settings[SettingKeyTurnstileSiteKey], TurnstileSiteKey: settings[SettingKeyTurnstileSiteKey],
SiteName: s.getStringOrDefault(settings, SettingKeySiteName, "Sub2API"), SiteName: s.getStringOrDefault(settings, SettingKeySiteName, "TrafficAPI"),
SiteLogo: settings[SettingKeySiteLogo], SiteLogo: settings[SettingKeySiteLogo],
SiteSubtitle: s.getStringOrDefault(settings, SettingKeySiteSubtitle, "Subscription to API Conversion Platform"), SiteSubtitle: s.getStringOrDefault(settings, SettingKeySiteSubtitle, "Subscription to API Conversion Platform"),
APIBaseURL: settings[SettingKeyAPIBaseURL], APIBaseURL: settings[SettingKeyAPIBaseURL],
...@@ -757,7 +757,7 @@ func (s *SettingService) IsTotpEncryptionKeyConfigured() bool { ...@@ -757,7 +757,7 @@ func (s *SettingService) IsTotpEncryptionKeyConfigured() bool {
func (s *SettingService) GetSiteName(ctx context.Context) string { func (s *SettingService) GetSiteName(ctx context.Context) string {
value, err := s.settingRepo.GetValue(ctx, SettingKeySiteName) value, err := s.settingRepo.GetValue(ctx, SettingKeySiteName)
if err != nil || value == "" { if err != nil || value == "" {
return "Sub2API" return "TrafficAPI"
} }
return value return value
} }
...@@ -813,7 +813,7 @@ func (s *SettingService) InitializeDefaultSettings(ctx context.Context) error { ...@@ -813,7 +813,7 @@ func (s *SettingService) InitializeDefaultSettings(ctx context.Context) error {
SettingKeyEmailVerifyEnabled: "false", SettingKeyEmailVerifyEnabled: "false",
SettingKeyRegistrationEmailSuffixWhitelist: "[]", SettingKeyRegistrationEmailSuffixWhitelist: "[]",
SettingKeyPromoCodeEnabled: "true", // 默认启用优惠码功能 SettingKeyPromoCodeEnabled: "true", // 默认启用优惠码功能
SettingKeySiteName: "Sub2API", SettingKeySiteName: "TrafficAPI",
SettingKeySiteLogo: "", SettingKeySiteLogo: "",
SettingKeyPurchaseSubscriptionEnabled: "false", SettingKeyPurchaseSubscriptionEnabled: "false",
SettingKeyPurchaseSubscriptionURL: "", SettingKeyPurchaseSubscriptionURL: "",
...@@ -872,7 +872,7 @@ func (s *SettingService) parseSettings(settings map[string]string) *SystemSettin ...@@ -872,7 +872,7 @@ func (s *SettingService) parseSettings(settings map[string]string) *SystemSettin
TurnstileEnabled: settings[SettingKeyTurnstileEnabled] == "true", TurnstileEnabled: settings[SettingKeyTurnstileEnabled] == "true",
TurnstileSiteKey: settings[SettingKeyTurnstileSiteKey], TurnstileSiteKey: settings[SettingKeyTurnstileSiteKey],
TurnstileSecretKeyConfigured: settings[SettingKeyTurnstileSecretKey] != "", TurnstileSecretKeyConfigured: settings[SettingKeyTurnstileSecretKey] != "",
SiteName: s.getStringOrDefault(settings, SettingKeySiteName, "Sub2API"), SiteName: s.getStringOrDefault(settings, SettingKeySiteName, "TrafficAPI"),
SiteLogo: settings[SettingKeySiteLogo], SiteLogo: settings[SettingKeySiteLogo],
SiteSubtitle: s.getStringOrDefault(settings, SettingKeySiteSubtitle, "Subscription to API Conversion Platform"), SiteSubtitle: s.getStringOrDefault(settings, SettingKeySiteSubtitle, "Subscription to API Conversion Platform"),
APIBaseURL: settings[SettingKeyAPIBaseURL], APIBaseURL: settings[SettingKeyAPIBaseURL],
......
...@@ -83,7 +83,7 @@ const ( ...@@ -83,7 +83,7 @@ const (
totpLoginTTL = 5 * time.Minute totpLoginTTL = 5 * time.Minute
totpAttemptsTTL = 15 * time.Minute totpAttemptsTTL = 15 * time.Minute
maxTotpAttempts = 5 maxTotpAttempts = 5
totpIssuer = "Sub2API" totpIssuer = "TrafficAPI"
) )
// TotpService handles TOTP operations // TotpService handles TOTP operations
......
...@@ -51,7 +51,7 @@ func RunCLI() error { ...@@ -51,7 +51,7 @@ func RunCLI() error {
fmt.Println() fmt.Println()
fmt.Println("╔═══════════════════════════════════════════╗") fmt.Println("╔═══════════════════════════════════════════╗")
fmt.Println("║ Sub2API Installation Wizard ║") fmt.Println("║ TrafficAPI Installation Wizard ║")
fmt.Println("╚═══════════════════════════════════════════╝") fmt.Println("╚═══════════════════════════════════════════╝")
fmt.Println() fmt.Println()
......
-- 将默认站点名称从 "Sub2API" 更新为 "TrafficAPI"
-- 仅更新仍为旧默认值的记录,不覆盖管理员自定义的站点名称
UPDATE settings
SET value = 'TrafficAPI', updated_at = NOW()
WHERE key = 'site_name' AND value = 'Sub2API';
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/logo.png" /> <link rel="icon" type="image/png" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sub2API - AI API Gateway</title> <title>TrafficAPI - AI API Gateway</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
/** /**
* API Client for Sub2API Backend * API Client for TrafficAPI Backend
* Central export point for all API modules * Central export point for all API modules
*/ */
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
{{ siteName }} {{ siteName }}
</span> </span>
<!-- Version Badge --> <!-- Version Badge -->
<VersionBadge :version="siteVersion" /> <!-- <VersionBadge :version="siteVersion" /> -->
</div> </div>
</transition> </transition>
</div> </div>
...@@ -151,7 +151,6 @@ import { computed, h, onMounted, ref, watch } from 'vue' ...@@ -151,7 +151,6 @@ import { computed, h, onMounted, ref, watch } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { useAdminSettingsStore, useAppStore, useAuthStore, useOnboardingStore } from '@/stores' import { useAdminSettingsStore, useAppStore, useAuthStore, useOnboardingStore } from '@/stores'
import VersionBadge from '@/components/common/VersionBadge.vue'
import { sanitizeSvg } from '@/utils/sanitize' import { sanitizeSvg } from '@/utils/sanitize'
interface NavItem { interface NavItem {
...@@ -178,7 +177,6 @@ const isDark = ref(document.documentElement.classList.contains('dark')) ...@@ -178,7 +177,6 @@ const isDark = ref(document.documentElement.classList.contains('dark'))
// Site settings from appStore (cached, no flicker) // Site settings from appStore (cached, no flicker)
const siteName = computed(() => appStore.siteName) const siteName = computed(() => appStore.siteName)
const siteLogo = computed(() => appStore.siteLogo) const siteLogo = computed(() => appStore.siteLogo)
const siteVersion = computed(() => appStore.siteVersion)
const settingsLoaded = computed(() => appStore.publicSettingsLoaded) const settingsLoaded = computed(() => appStore.publicSettingsLoaded)
// SVG Icon Components // SVG Icon Components
......
/** /**
* Vue Router configuration for Sub2API frontend * Vue Router configuration for TrafficAPI frontend
* Defines all application routes with lazy loading and navigation guards * Defines all application routes with lazy loading and navigation guards
*/ */
......
/* Sub2API Interactive Tour Styles - DOM Restructured Version */ /* TrafficAPI Interactive Tour Styles - DOM Restructured Version */
/* 1. Overlay & Highlight */ /* 1. Overlay & Highlight */
.driver-overlay { .driver-overlay {
......
/** /**
* Core Type Definitions for Sub2API Frontend * Core Type Definitions for TrafficAPI Frontend
*/ */
// ==================== Common Types ==================== // ==================== Common Types ====================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment