diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml new file mode 100644 index 0000000..9461f66 --- /dev/null +++ b/.github/workflows/webpack.yml @@ -0,0 +1,28 @@ +name: NodeJS with Webpack + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.8.0] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + npx run release diff --git a/src/views/proxy/index.vue b/src/views/proxy/index.vue index 055337a..989d0e1 100644 --- a/src/views/proxy/index.vue +++ b/src/views/proxy/index.vue @@ -565,14 +565,19 @@ const handleRandomProxyName = () => { `df_${editForm.value.type}_${result}`.toLocaleLowerCase(); }; +import path from "path"; +function normalizePath(filePath: string) { + return path.normalize(filePath).replace(/\\/g, "/"); +} + const handleSelectFile = (type: number, ext: string[]) => { ipcRenderer.invoke("file.selectFile", ext).then(r => { switch (type) { case 1: - editForm.value.https2httpCaFile = r[0]; + editForm.value.https2httpCaFile = normalizePath(r[0]); break; case 2: - editForm.value.https2httpKeyFile = r[0]; + editForm.value.https2httpKeyFile = normalizePath(r[0]); break; } console.log(r);