From d2625039e99f9333046191210f843a83fee1e63d Mon Sep 17 00:00:00 2001 From: licsber Date: Sun, 23 Nov 2025 11:43:11 +0800 Subject: [PATCH] 0.2.0: change behavior copy or href. --- README.md | 1 + .../_view_issues_show_details_bottom.html.erb | 24 +++++++++++++------ init.rb | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7c8a5af..f5b6ce1 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ git clone https://git.licsber.site/ruby/open_explorer ## ChangeLog ``` +251123周日:(0.2.0)对复制和打开功能作区分 250824周六:(0.1.2)增加复制功能 250823周六:(0.0.9)修改按钮出现位置;优化样式 250823周六:(0.0.1)基础功能 diff --git a/app/views/hooks/_view_issues_show_details_bottom.html.erb b/app/views/hooks/_view_issues_show_details_bottom.html.erb index 7a0c86d..ebf7f1c 100644 --- a/app/views/hooks/_view_issues_show_details_bottom.html.erb +++ b/app/views/hooks/_view_issues_show_details_bottom.html.erb @@ -8,13 +8,23 @@ <% if archive_custom_field && archive_custom_field.value.present? %> <% archive_url = archive_custom_field.value.strip %> - - 📂 - 一键打开 - + <% is_valid_url = archive_url.start_with?('http://', 'https://') %> + + <% if is_valid_url %> + + 📂 + 一键打开 + + <% else %> + + <% end %> <% end %>