Skip to content

Commit

Permalink
Refine and clean files and variables (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
AceDataCloud committed Jan 1, 2024
1 parent 0e6018e commit 6e980c7
Show file tree
Hide file tree
Showing 45 changed files with 98 additions and 522 deletions.
6 changes: 5 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
node_modules/
dist/
docker-compose.yaml
docker-compose.yaml
.env
.env.local
.env.production
.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "refine and clean files",
"packageName": "@zhishuyun/hub",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ services:
build: ./
image: 'ghcr.io/zhishuyun/hub-frontend:${BUILD_NUMBER}'
ports:
- '8000:80'
- '8080:80'
14 changes: 1 addition & 13 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,10 @@ server {
proxy_http_version 1.1;

location /api/v1/ {
proxy_pass http://data-backend:8000;
proxy_pass https://data.zhishuyun.com;
client_max_body_size 20m;
}

location /oauth2/v1/ {
proxy_pass http://auth-backend:8000;
}

location /api/v1/me {
proxy_pass http://auth-backend:8000;
}

location /static/ {
proxy_pass http://data-backend:8000;
}

location / {
root /usr/share/nginx/html;
index index.html index.htm;
Expand Down
16 changes: 3 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
"dist/"
],
"scripts": {
"start": "cross-env NODE_ENV=$npm_config_env vite --host",
"start:local": "npm run start --env=local",
"start:test": "npm run start --env=test",
"start:production": "npm run start --env=production",
"start": "vite --host",
"build": "vite build --mode=development",
"serve": "vite preview",
"lint": "eslint src --fix --ext .ts,.tsx,.vue,.js,.jsx",
Expand All @@ -36,11 +33,6 @@
"@fortawesome/free-regular-svg-icons": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
"@fortawesome/vue-fontawesome": "^3.0.2",
"@sentry/tracing": "^7.34.0",
"@sentry/vue": "^7.34.0",
"@types/mustache": "^4.2.2",
"@types/qs": "^6.9.9",
"@types/uuid": "^8.3.4",
"axios": "^1.6.0",
"codemirror": "^6.0.1",
"copy-to-clipboard": "^3.3.3",
Expand All @@ -50,8 +42,6 @@
"highlight.js": "^11.7.0",
"mac-scrollbar": "^0.13.5",
"markdown-it": "^13.0.1",
"mustache": "^4.2.0",
"programming-languages-logos": "^0.0.3",
"qrcode.vue": "^3.3.3",
"qs": "^6.11.2",
"query-string": "^8.1.0",
Expand All @@ -70,6 +60,8 @@
"@types/lodash": "^4.14.172",
"@types/markdown-it": "^12.2.3",
"@types/node": "^16.7.4",
"@types/qs": "^6.9.9",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"@vitejs/plugin-vue": "^2.3.0",
Expand All @@ -87,14 +79,12 @@
"eslint-plugin-promise": "^5.0.0",
"eslint-plugin-vue": "^8.5.0",
"husky": "^7.0.2",
"mkcert": "^1.4.0",
"postcss": "^8.3.6",
"prettier": "^2.6.2",
"rollup-plugin-string": "^3.0.0",
"sass": "^1.38.1",
"tailwindcss": "^2.2.8",
"typescript": "^4.9.5",
"unplugin-vue-components": "^0.26.0",
"vite": "^2.9.16",
"vue-tsc": "^1.2.0"
},
Expand Down
Binary file removed src/assets/images/bg.png
Binary file not shown.
Binary file removed src/assets/images/chatgpt.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/assets/images/logo2.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/common/Navigator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default defineComponent({
},
methods: {
onLogout() {
this.$store.dispatch('common/resetToken');
this.$store.dispatch('resetToken');
this.$router.push({ name: ROUTE_AUTH_LOGIN });
},
onConsole() {
Expand Down
74 changes: 0 additions & 74 deletions src/components/common/SettingPanel.vue

This file was deleted.

3 changes: 1 addition & 2 deletions src/components/console/SidePanel.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="side-panel">
<div>
<img src="@/assets/images/logo2.svg" class="logo" @click="onHome" />
<img src="@/assets/images/logo.svg" class="logo" @click="onHome" />
</div>
<div class="links">
<a
Expand Down Expand Up @@ -109,7 +109,6 @@ $padding-left: 10px;
padding-left: $padding-left;
width: $width;
padding-top: 50px;
// border-right: 1px solid var(--el-border-color);
height: 100%;
}
Expand Down
7 changes: 5 additions & 2 deletions src/constants/endpoint.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export const ENDPOINT = 'https://api.zhishuyun.com';
export const ENDPOINT2 = 'https://api2.zhishuyun.com';
export const BASE_URL_DATA = 'https://data.zhishuyun.com';
export const BASE_URL_HUB = 'https://hub.zhishuyun.com';
export const BASE_URL_AUTH = 'https://auth.zhishuyun.com';
export const BASE_URL_API = 'https://api.zhishuyun.com';
export const BASE_URL_API2 = 'https://api2.zhishuyun.com';
4 changes: 0 additions & 4 deletions src/constants/image.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from './errorCode';
export * from './env';
export * from './endpoint';
export * from './image';
// export * from './api';
2 changes: 0 additions & 2 deletions src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ declare module '*.vue' {
const component: DefineComponent<{}, {}, {}>;
export default component;
}

declare module 'vue-plyr';
17 changes: 5 additions & 12 deletions src/i18n/zh/chat/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@ export default {
question1: '写一段 JavaScript 代码,输出 Hello World',
question2: '写一封邮件给晓伟,告诉他我刚刚搬家了',
question3: '用简单的术语解释量子计算的基本原理',
question4: '数字媒体和虚拟现实对艺术创作和表现形式产生了怎样的影响?',
question5: '在数字时代,隐私保护和数据安全如何影响法律实践?',
question6: '作为一名会计师,如何应对复杂的税务法规变化?',
question4: '虚拟现实对艺术创作产生了怎样的影响?',
question5: '隐私保护和数据安全如何影响法律实践?',
question6: '如何应对复杂的税务法规变化?',
question7: '如何结合不同地区的文化背景创作独特美食?',
question8: '如何通过旅行体验汲取文学创作灵感,塑造丰富故事?',
question9: '如何从不同行业的成功案例中获取商业创意,创新经营策略?',
rememberHistory: '可以记住用户说过的话',
supportStream: '支持流式数据传输',
rejectInvalidPrompt: '可以拒绝回答不恰当的提问',
generateInCorrect: '可能偶尔产生不正确的信息',
generateHarmfulInfo: '可能偶尔产生有害的指令或有偏见的内容',
onlyKnowBefore2021: '对2021年之后的世界和事件了解有限',
errorBusy: 'Worker正在忙碌中,请稍后重试',
question8: '如何通过旅行体验汲取文学创作灵感?',
question9: '如何从不同行业的成功案例中获取商业创意?',
errorApiError: '回答失败,请稍后重试',
errorBadRequest: '请求内容不规范,请重新提问',
errorNoConversation: '对话内容不存在或者已经过期,请发起新的会话',
Expand Down
1 change: 0 additions & 1 deletion src/i18n/zh/common/title.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export default {
orderDescription: '知数云课程订单',
documentIntroduction: '文档介绍',
placeholderOfSelect: '请选择',
placeholderOfInput: '请填写',
Expand Down
Loading

0 comments on commit 6e980c7

Please sign in to comment.