diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 602b51387d0..d75c1b73a02 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -23,66 +23,8 @@ on: type: choice options: - dockerhub - - fit2cloud-registry - - dockerhub, fit2cloud-registry jobs: - build-and-push-to-fit2cloud-registry: - if: ${{ contains(github.event.inputs.registry, 'fit2cloud') }} - runs-on: ubuntu-latest - steps: - - name: Check Disk Space - run: df -h - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: true - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - name: Check Disk Space - run: df -h - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.ref_name }} - - name: Prepare - id: prepare - run: | - DOCKER_IMAGE=registry-hkproxy.fit2cloud.com/maxkb/maxkb - DOCKER_PLATFORMS=${{ github.event.inputs.architecture }} - TAG_NAME=${{ github.event.inputs.dockerImageTag }} - if [[ ${TAG_NAME} == *dev* ]]; then - DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}" - else - DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest" - fi - echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ - --build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=${GITHUB_SHA::8} --no-cache \ - ${DOCKER_IMAGE_TAGS} . - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GH_TOKEN }} - - name: Login to FIT2CLOUD Registry - uses: docker/login-action@v3 - with: - registry: registry-hkproxy.fit2cloud.com - username: ${{ secrets.FIT2CLOUD_REGISTRY_USERNAME }} - password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }} - - name: Docker Buildx (build-and-push) - run: | - docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile - build-and-push-to-dockerhub: if: ${{ contains(github.event.inputs.registry, 'dockerhub') }} runs-on: ubuntu-latest @@ -108,7 +50,7 @@ jobs: - name: Prepare id: prepare run: | - DOCKER_IMAGE=1panel/maxkb + DOCKER_IMAGE=your-dockerhub-username/maxkb DOCKER_PLATFORMS=${{ github.event.inputs.architecture }} TAG_NAME=${{ github.event.inputs.dockerImageTag }} if [[ ${TAG_NAME} == *dev* ]]; then @@ -123,12 +65,6 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GH_TOKEN }} - name: Login to Docker Hub uses: docker/login-action@v3 with: diff --git a/.github/workflows/sync2gitee.yml b/.github/workflows/sync2gitee.yml deleted file mode 100644 index 186cf1570c0..00000000000 --- a/.github/workflows/sync2gitee.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: sync2gitee -on: [push] - -jobs: - repo-sync: - runs-on: ubuntu-latest - steps: - - name: Mirror the Github organization repos to Gitee. - uses: Yikun/hub-mirror-action@master - with: - src: 'github/1Panel-dev' - dst: 'gitee/fit2cloud-feizhiyun' - dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} - dst_token: ${{ secrets.GITEE_TOKEN }} - static_list: "MaxKB" - force_update: true \ No newline at end of file diff --git a/.github/workflows/typos_check.yml b/.github/workflows/typos_check.yml deleted file mode 100644 index 099b219d3e8..00000000000 --- a/.github/workflows/typos_check.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Typos Check -on: [push, pull_request] - -jobs: - run: - name: Spell Check with Typos - runs-on: ubuntu-latest - steps: - - name: Checkout Actions Repository - uses: actions/checkout@v2 - - - name: Check spelling - uses: crate-ci/typos@master diff --git a/README.md b/README.md index 1e98165173b..322474338b3 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ docker run -d --name=maxkb -p 8080:8080 -v ~/.maxkb:/var/lib/postgresql/data cr2 - [演示视频](https://www.bilibili.com/video/BV1BE421M7YM/) - [论坛求助](https://bbs.fit2cloud.com/c/mk/11) - 技术交流群 - + diff --git a/apps/application/template/embed.js b/apps/application/template/embed.js index ec4e6b9f29b..c1f1642ee92 100644 --- a/apps/application/template/embed.js +++ b/apps/application/template/embed.js @@ -8,7 +8,7 @@ const guideHtml=` - +
🌟 遇见问题,不再有障碍!

你好,我是你的智能小助手。
点我,开启高效解答模式,让问题变成过去式。

@@ -49,27 +49,24 @@ const chatButtonHtml= ` - + const getChatContainerHtml=(protocol,host,token)=>{ return `
- -
- -
+ +
- - -
-
- - + +
+
+ +
` } /** * 初始化引导 - * @param {*} root + * @param {*} root */ const initGuide=(root)=>{ root.insertAdjacentHTML("beforeend",guideHtml) @@ -97,7 +94,6 @@ const initChat=(root)=>{ const closeviewport=root.querySelector('.maxkb-closeviewport') const close_func=()=>{ chat_container.style['display']=chat_container.style['display']=='block'?'none':'block' - chat_button.style['display']=chat_container.style['display']=='block'?'none':'block' } close_icon=chat_container.querySelector('.maxkb-chat-close') chat_button.onclick = close_func @@ -133,7 +129,7 @@ function initMaxkb(){ initChat(root) } - + // 初始化全局样式 function initMaxkbStyle(root){ style=document.createElement('style') @@ -154,12 +150,12 @@ function initMaxkbStyle(root){ bottom: 0!important; } } - + /* 引导 */ - + #maxkb .maxkb-mask { position: fixed; - z-index: 999; + z-index: 99999; background-color: transparent; height: 100%; width: 100%; @@ -174,7 +170,7 @@ function initMaxkbStyle(root){ position: absolute; right: 0; bottom: 38px; - z-index: 1000; + z-index: 100000; } #maxkb .maxkb-tips { position: fixed; @@ -185,7 +181,7 @@ function initMaxkbStyle(root){ color: #ffffff; font-size: 14px; background: #3370FF; - z-index: 1000; + z-index: 100000; } #maxkb .maxkb-tips .maxkb-arrow { position: absolute; @@ -227,7 +223,7 @@ function initMaxkbStyle(root){ right: 20px; top: 20px; cursor: pointer; - + } #maxkb-chat-container { width: 420px; @@ -241,25 +237,26 @@ function initMaxkbStyle(root){ right: 0 !important; } } - + #maxkb .maxkb-chat-button{ position: fixed; bottom: 30px; right: 0; cursor: pointer; + z-index: 100000 } #maxkb #maxkb-chat-container{ - z-index:10000;position: relative; + z-index:1000000;position: relative; border-radius: 8px; border: 1px solid #ffffff; background: linear-gradient(188deg, rgba(235, 241, 255, 0.20) 39.6%, rgba(231, 249, 255, 0.20) 94.3%), #EFF0F1; box-shadow: 0px 4px 8px 0px rgba(31, 35, 41, 0.10); - position: fixed;bottom: 16px;right: 16px;overflow: hidden; + position: fixed;bottom: 20px;right: 45px;overflow: hidden; } #maxkb #maxkb-chat-container .maxkb-operate{ - top: 18px; - right: 15px; + top: 15px; + right: 10px; position: absolute; display: flex; align-items: center; @@ -291,7 +288,7 @@ function initMaxkbStyle(root){ from { height: 0;; } - + to { height: 600px; } @@ -308,4 +305,5 @@ function embedChatbot() { initMaxkb() } else console.error('invalid parameter') } -window.onload = embedChatbot +// window.onload = embedChatbot // 生产环境会触发不了 +setTimeout(()=>embedChatbot(),4000)