Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 8, 2025

This PR adds a configuration option that allows users to choose whether articles should be published immediately after importing or remain as drafts.

Changes Made

UI Changes

  • Added a "导入后发布文章" (Publish articles after import) checkbox to both Markdown and Word import tabs
  • The option is enabled by default to maintain backward compatibility
  • When unchecked, the help text indicates "取消选择时,导入的文章将保存为草稿" (When unchecked, imported articles will be saved as drafts)

Backend Logic

  • Modified the createPost function in both MarkdownImport.vue and WordImport.vue
  • Publishing is now conditional - articles are only published if the checkbox is checked
  • When unchecked, articles are created as drafts and remain unpublished

Behavior

  • Default behavior: Articles are published after import (maintains backward compatibility)
  • When option is unchecked: Articles are imported as drafts and can be published manually later
  • The setting is independent for each import session and can be toggled per import operation

This addresses the user request to have control over the publishing status of imported articles, providing flexibility for users who prefer to review content before publishing.

Fixes #4.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • s01.oss.sonatype.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/gradle-daemon-main-8.9.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/agents/gradle-instrumentation-agent-8.9.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.9 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
Contributor Author

Copilot AI commented Aug 8, 2025

@ruibaby 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI and others added 2 commits August 8, 2025 16:01
Co-authored-by: ruibaby <21301288+ruibaby@users.noreply.github.com>
Co-authored-by: ruibaby <21301288+ruibaby@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] 能否增加配置选项,可以选择导入后是否发布文章 Add configuration option to control article publishing after import Aug 8, 2025
@Copilot Copilot AI requested a review from ruibaby August 8, 2025 16:10
Copilot finished work on behalf of ruibaby August 8, 2025 16:10
@ruibaby
Copy link
Owner

ruibaby commented Aug 8, 2025

Awesome

Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this file, we use pnpm

@ruibaby ruibaby marked this pull request as ready for review August 9, 2025 06:07
Signed-off-by: Ryan Wang <i@ryanc.cc>
@ruibaby ruibaby merged commit d955cbd into main Aug 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

能否增加配置选项,可以选择导入后是否发布文章
2 participants