Skip to content

Commit

Permalink
update v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stilleshan committed Dec 13, 2023
1 parent 6a4078c commit ae7a53b
Show file tree
Hide file tree
Showing 119 changed files with 29,490 additions and 18,633 deletions.
14 changes: 8 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ module.exports = {
root: true,
env: {
node: true,
'vue/setup-compiler-macros': true,
},
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"plugin:prettier/recommended",
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/prettier', //使用 prettier airbnb standard
],
parserOptions: {
parser: "@babel/eslint-parser",
parser: '@babel/eslint-parser',
requireConfigFile: false,
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// 'max-len': ['error', { code: 120 }],
},
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
/shell


# local env files
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
singleQuote: true,
printWidth: 120,
};
3 changes: 0 additions & 3 deletions .prettierrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:14-alpine AS build
LABEL maintainer="Stille <stille@ioiox.com>"

ENV VERSION 1.0
ENV VERSION 2.0

WORKDIR /app
COPY . /app
RUN /app/vercel.sh
RUN npm install
RUN npm run build

Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ docker run -d --name subweb --restart always \
访问 `http://127.0.0.1:18080`
> *推荐使用 nginx 反向代理部署*
### Vercel 快速部署
为方便 docker 用户方便挂载或环境变量部署,默认`main`分支不支持`Vercel`,需要`fork`仓库少许设置才能部署至`Vercel`.
1. fork 本仓库, 注意**取消**勾选`Copy the main branch only`
2. Vercel 中创建项目使用`subweb`首次部署.
3. 部署完毕后,在`Vercel`项目 - Settings - Git - Production Branch 设置为`vercel`.
4. 修改环境变量 - Settings - Environment Variables 中修改环境变量,具体参考仓库中`.env`文件.
5. Vercel 部署如需修改导航栏信息,需自行修改`src/layouts/components/header/navBarItem.js`文件.

### subweb + subconverter + myurls 合并进阶版
详情查看 [stilleshan/sub](https://github.com/stilleshan/dockerfiles/tree/main/sub)

Expand Down
4,019 changes: 2,137 additions & 1,882 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,30 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.27.2",
"axios": "^1.5.0",
"core-js": "^3.8.3",
"element-plus": "^2.1.4",
"mitt": "^3.0.0",
"element-plus": "^2.3.14",
"moment": "^2.29.4",
"perfect-scrollbar": "^1.5.5",
"vue": "^3.2.13",
"vue-router": "^4.0.3"
"vue-router": "^4.0.3",
"vuex": "^4.0.0"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/eslint-config-prettier": "^7.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.0.3",
"prettier": "^2.4.1",
"unplugin-auto-import": "^0.9.1",
"unplugin-vue-components": "^0.20.1"
"unplugin-auto-import": "^0.16.6",
"unplugin-vue-components": "^0.25.2"
}
}
37 changes: 32 additions & 5 deletions public/conf/config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,49 @@
window.config = {
// 网站标题
siteName: 'Subconverter Web',
// API 地址
apiUrl: 'http://127.0.0.1:25500',
// 短域名服务地址
shortUrl: 'https://s.ops.ci',
// 首页菜单
menuItem: [
{
title: '首页',
link: '/',
target: '',
},
{
title: '短链接',
link: 'https://s.ops.ci',
target: '_blank',
},
{
title: 'GitHub',
link: 'https://github.com/stilleshan/subweb',
target: '_blank',
},
],
// 远程配置地址
remoteConfigOptions: [
{
value: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online.ini',
text: 'ACL4SSR Online',
},
{
value: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full.ini',
text: 'ACL4SSR Online Full',
},
],
// 订阅方式
targetOptions: [
{ value: 'clash', text: 'Clash' },
{ value: 'clashr', text: 'ClashR' },
{ value: 'v2ray', text: 'V2Ray' },
{ value: 'quan', text: 'Quantumult' },
{ value: 'quanx', text: 'Quantumult X' },
{ value: 'surge&ver=2', text: 'SurgeV2' },
{ value: 'surge&ver=3', text: 'SurgeV3' },
{ value: 'surge&ver=4', text: 'SurgeV4' },
{ value: 'surfboard', text: 'Surfboard' },
{ value: 'ss', text: 'SS (SIP002)' },
{ value: 'sssub', text: 'SS Android' },
{ value: 'ssd', text: 'SSD' },
{ value: 'ssr', text: 'SSR' },
{ value: 'loon', text: 'Loon' },
],
};
Binary file modified public/favicon.ico
Binary file not shown.
12 changes: 10 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
<title>Subconverter Web</title>
<script type="text/javascript" src="<%= BASE_URL %>conf/config.js"></script>
</head>
<body>
Expand All @@ -14,5 +15,12 @@
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->

<link rel="preconnect" href="https://fonts.loli.net">
<link rel="preconnect" href="https://fonts.loli.net" crossorigin="">
<link href="https://fonts.loli.net/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.loli.net/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap" rel="stylesheet">
<link href="https://fonts.loli.net/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet" />
<link href="https://fonts.loli.net/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
</body>
</html>
5 changes: 4 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div id="app">
<router-view />
<dialog-view v-if="$store.state.app.dialog.active"></dialog-view>
</div>
</template>

Expand All @@ -11,5 +12,7 @@ export default {
</script>

<style>
@import 'assets/css/main.css';
@import '@/assets/vendor/css/rtl/core.css';
@import '@/assets/vendor/css/rtl/theme-default.css';
@import 'element-plus/theme-chalk/index.css';
</style>

1 comment on commit ae7a53b

@vercel
Copy link

@vercel vercel bot commented on ae7a53b Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

subweb – ./

subweb-git-main-stille.vercel.app
subweb-stille.vercel.app
subweb-demo.vercel.app

Please sign in to comment.