diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a0dbeb..229bd24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: distribution: 'temurin' - name: Build project with Maven - run: mvn clean install -DskipTests=true + run: mvn clean install -DskipTests=true -Pcentral-repo - name: Create Release id: create_release @@ -36,19 +36,44 @@ jobs: draft: false prerelease: false - - name: Upload all *.zip artifacts from submodules - run: | - for module in novel-common novel-crawl novel-front novel-admin - do - for file in $(find ./$module/target/build -type f -name "*.zip") - do - asset_path="$file" - asset_name=$(basename "$file") - echo "Uploading $asset_name..." - curl -X POST \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Content-Type: application/zip" \ - --data-binary @"$file" \ - "${{ steps.create_release.outputs.upload_url }}?name=$asset_name" - done - done \ No newline at end of file + + # 使用 action 来替代直接 curl 进行上传 + - name: Upload sql.zip + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/novel-common/target/build/sql.zip + asset_name: sql.zip + asset_content_type: application/zip + + - name: Upload novel-crawl.zip + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/novel-crawl/target/build/novel-crawl.zip + asset_name: novel-crawl.zip + asset_content_type: application/zip + + - name: Upload novel-front.zip + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/novel-front/target/build/novel-front.zip + asset_name: novel-front.zip + asset_content_type: application/zip + + - name: Upload novel-admin.zip + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/novel-admin/target/build/novel-admin.zip + asset_name: novel-admin.zip + asset_content_type: application/zip \ No newline at end of file diff --git a/novel-admin/pom.xml b/novel-admin/pom.xml index b1d9fad..e32cea5 100644 --- a/novel-admin/pom.xml +++ b/novel-admin/pom.xml @@ -5,7 +5,7 @@ com.java2nb novel-admin - 5.0.1-SNAPSHOT + 5.0.1 jar novel-admin @@ -332,4 +332,35 @@ + + + + + central-repo + + + central + https://repo.maven.apache.org/maven2/ + + true + + + false + + + + + + central-plugin + https://repo.maven.apache.org/maven2/ + + true + + + false + + + + + diff --git a/novel-common/pom.xml b/novel-common/pom.xml index 6b4a68b..ed24e2f 100644 --- a/novel-common/pom.xml +++ b/novel-common/pom.xml @@ -5,7 +5,7 @@ novel com.java2nb - 5.0.1-SNAPSHOT + 5.0.1 4.0.0 diff --git a/novel-crawl/pom.xml b/novel-crawl/pom.xml index f0e6a6a..8f63044 100644 --- a/novel-crawl/pom.xml +++ b/novel-crawl/pom.xml @@ -5,7 +5,7 @@ novel com.java2nb - 5.0.1-SNAPSHOT + 5.0.1 4.0.0 diff --git a/novel-front/pom.xml b/novel-front/pom.xml index c5e315a..57c8f18 100644 --- a/novel-front/pom.xml +++ b/novel-front/pom.xml @@ -5,7 +5,7 @@ novel com.java2nb - 5.0.1-SNAPSHOT + 5.0.1 4.0.0 diff --git a/novel-front/src/main/resources/templates/mobile/user/favorites.html b/novel-front/src/main/resources/templates/mobile/user/favorites.html index 44d3d44..793c76f 100644 --- a/novel-front/src/main/resources/templates/mobile/user/favorites.html +++ b/novel-front/src/main/resources/templates/mobile/user/favorites.html @@ -20,6 +20,28 @@ - @@ -95,6 +127,10 @@ +
@@ -105,11 +141,12 @@ -
diff --git a/novel-front/src/main/resources/templates/user/favorites.html b/novel-front/src/main/resources/templates/user/favorites.html index 985bec0..08ebb60 100644 --- a/novel-front/src/main/resources/templates/user/favorites.html +++ b/novel-front/src/main/resources/templates/user/favorites.html @@ -53,7 +53,7 @@ 更新时间 - 书签 + 操作 @@ -94,7 +94,7 @@ var bookShelfListHtml = ""; for (var i = 0; i < bookShelfList.length; i++) { var book = bookShelfList[i]; - bookShelfListHtml += (" \n" + + bookShelfListHtml += (" \n" + " \n" + " [" + book.catName + "]\n" + " \n" + @@ -109,7 +109,8 @@ " " + book.lastIndexUpdateTime + "\n" + " \n" + " \n" + - "继续阅读" + + "
继续阅读
" + + "
移出书架
" + " \n" + " "); } @@ -160,5 +161,21 @@ }) } + + function removeFromBookShelf(bookId) { + + $.ajax({ + type: "delete", + url: "/user/removeFromBookShelf/" + bookId, + data: {}, + dataType: "json", + success: function (data) { + if (data.code == 200) { + $("#shelf" + bookId).remove(); + } + } + }); + + } diff --git a/pom.xml b/pom.xml index 4ac1f58..d03c874 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.java2nb novel - 5.0.1-SNAPSHOT + 5.0.1 novel-common novel-front @@ -113,4 +113,35 @@ + + + + + central-repo + + + central + https://repo.maven.apache.org/maven2/ + + true + + + false + + + + + + central-plugin + https://repo.maven.apache.org/maven2/ + + true + + + false + + + + + diff --git a/templates/green/html/mobile/user/favorites.html b/templates/green/html/mobile/user/favorites.html index 44d3d44..793c76f 100644 --- a/templates/green/html/mobile/user/favorites.html +++ b/templates/green/html/mobile/user/favorites.html @@ -20,6 +20,28 @@ - @@ -95,6 +127,10 @@ +
@@ -105,11 +141,12 @@ -
diff --git a/templates/green/html/user/favorites.html b/templates/green/html/user/favorites.html index 985bec0..08ebb60 100644 --- a/templates/green/html/user/favorites.html +++ b/templates/green/html/user/favorites.html @@ -53,7 +53,7 @@ 更新时间 - 书签 + 操作 @@ -94,7 +94,7 @@ var bookShelfListHtml = ""; for (var i = 0; i < bookShelfList.length; i++) { var book = bookShelfList[i]; - bookShelfListHtml += (" \n" + + bookShelfListHtml += (" \n" + " \n" + " [" + book.catName + "]\n" + " \n" + @@ -109,7 +109,8 @@ " " + book.lastIndexUpdateTime + "\n" + " \n" + " \n" + - "继续阅读" + + "
继续阅读
" + + "
移出书架
" + " \n" + " "); } @@ -160,5 +161,21 @@ }) } + + function removeFromBookShelf(bookId) { + + $.ajax({ + type: "delete", + url: "/user/removeFromBookShelf/" + bookId, + data: {}, + dataType: "json", + success: function (data) { + if (data.code == 200) { + $("#shelf" + bookId).remove(); + } + } + }); + + }