Skip to content

Commit

Permalink
fix: sse should not connect when token no exist
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Mar 8, 2024
1 parent 19eda95 commit d4837c6
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 15 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build
shell: bash
run: pnpm --filter "./packages/*" build
run: pnpm build:pkg

- name: Publish 🚀
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"dev": "vite dev",
"build": "rimraf dist && cross-env NODE_ENV=production vite build",
"build:watch": "rimraf dist && cross-env NODE_ENV=production vite build --watch",
"build:pkg": "pnpm -r --filter='./packages/*' run build",
"preview": "npm run build --watch && vite preview",
"preview:dist": "vite preview",
"deploy": "bash deploy.sh",
Expand Down Expand Up @@ -96,7 +97,7 @@
"lightningcss": "^1.24.0",
"lint-staged": "~15.2.2",
"mockjs": "~1.1.0",
"msw": "^2.2.2",
"msw": "^2.2.3",
"postcss": "~8.4.35",
"postcss-html": "~1.6.0",
"postcss-less": "~6.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/vite-plugin-tinymce-resource/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { cp, readFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import { resolve, dirname } from 'node:path';
import type { PluginOption } from 'vite';

// const require = createRequire(import.meta.url);

const tinymceDir = resolve(require.resolve('tinymce'), '../');
const tinymceDir = dirname(require.resolve('tinymce'));
let outDir: string;
let base: string;

Expand Down
48 changes: 40 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/store/modules/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const useUserStore = defineStore('user', () => {
const serverConnected = ref(true);

watch(serverConnected, (val) => {
if (val) {
if (val && token.value) {
initServerMsgListener();
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
<a-form layout="horizontal" :model="state.formInline" @submit.prevent="handleSubmit">
<a-form-item>
<a-input v-model:value="state.formInline.username" size="large" placeholder="rootadmin">
<a-input v-model:value="state.formInline.username" size="large" placeholder="admin">
<template #prefix><user-outlined type="user" /></template>
</a-input>
</a-form-item>
Expand Down

0 comments on commit d4837c6

Please sign in to comment.