Browse Source

add copyright

tycoding 11 tháng trước cách đây
mục cha
commit
1891dd1405

+ 53 - 0
langchat-common/src/main/java/cn/tycoding/langchat/common/component/CustomBannerPrinter.java

@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved.
+ *
+ * Licensed under the GNU Affero General Public License, Version 3 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package cn.tycoding.langchat.common.component;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.context.event.ApplicationReadyEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author tycoding
+ * @since 2024/1/2
+ */
+@Slf4j
+@Component
+public class CustomBannerPrinter implements ApplicationListener<ApplicationReadyEvent> {
+
+    @Override
+    public void onApplicationEvent(ApplicationReadyEvent event) {
+        System.out.println("""
+                    
+                    __                         ________          __
+                   / /   ____ _____  ____ _   / ____/ /_  ____ _/ /_
+                  / /   / __ `/ __ \\/ __ `/  / /   / __ \\/ __ `/ __/
+                 / /___/ /_/ / / / / /_/ /  / /___/ / / / /_/ / /_
+                /_____/\\__,_/_/ /_/\\__, /   \\____/_/ /_/\\__,_/\\__/
+                                  /____/
+                    Copyright (c) 2024 LangChat. TyCoding All Rights Reserved.         
+                     LangChat采用AGPL协议,允许个人学习使用,商业化项目请联系作者授权
+                
+                - WebSite: http://langchat.cn
+                - Email: langchat@outlook.com
+                - Author: TyCoding
+                - WeiXin: LangchainChat
+                """);
+
+        log.info("LangChat 启动完成...... 当前环境:{}", event.getApplicationContext().getEnvironment().getActiveProfiles());
+    }
+}

+ 1 - 16
langchat-ui-client/src/layout/Sider.vue

@@ -20,29 +20,14 @@
   import { useDialog } from 'naive-ui';
   import { routesConst } from '@/router';
   import { useRouter } from 'vue-router';
-  import { useAppStore, useUserStore } from '@/store';
-  import type { Language } from '@/store/modules/app/helper';
+  import { useUserStore } from '@/store';
   import defaultAvatar from '@/assets/avatar.jpg';
 
-  const appStore = useAppStore();
   const dialog = useDialog();
   const userStore = useUserStore();
   const router = useRouter();
   const user = computed(() => userStore.user);
 
-  const language = computed({
-    get() {
-      return appStore.language;
-    },
-    set(value: Language) {
-      appStore.setLanguage(value);
-    },
-  });
-  const languageOptions: { label: string; key: Language; value: Language }[] = [
-    { label: '简体中文', key: 'zh-CN', value: 'zh-CN' },
-    { label: 'English', key: 'en-US', value: 'en-US' },
-  ];
-
   async function onLogout() {
     dialog.warning({
       title: '提示',