0.0.4: update css.

This commit is contained in:
2025-08-23 11:35:09 +08:00
parent 458078252f
commit 02eea18ca7
3 changed files with 40 additions and 17 deletions

View File

@@ -12,6 +12,6 @@ git clone https://git.licsber.site/ruby/open_explorer
## ChangeLog ## ChangeLog
``` ```
250823周六0.0.3)修改按钮出现位置 250823周六0.0.4)修改按钮出现位置;优化样式
250823周六0.0.1)基础功能 250823周六0.0.1)基础功能
``` ```

View File

@@ -1,35 +1,58 @@
<% issue = @issue %> <% issue = @issue %>
<% <%
archive_custom_field = issue.custom_field_values.find do |cfv| archive_custom_field = issue.custom_field_values.find do |cfv|
cfv.custom_field.name == "归档地址" cfv.custom_field.name == "归档地址"
end end
%> %>
<% if archive_custom_field && archive_custom_field.value.present? %> <% if archive_custom_field && archive_custom_field.value.present? %>
<% archive_url = archive_custom_field.value.strip %> <% archive_url = archive_custom_field.value.strip %>
<a href="<%= archive_url %>" <a href="<%= archive_url %>"
target="_blank" target="_blank"
class="icon icon-attachment archive-button"> class="archive-button">
📂 一键打开归档地址 <span class="archive-icon">📂</span> 一键打开归档地址
</a> </a>
<% end %> <% end %>
<style> <style>
.archive-button { .archive-button {
font-weight: bold; font-weight: 600;
padding: 5px 10px; padding: 8px 16px;
background: #428bca; background: linear-gradient(135deg, #4a6cf7 0%, #2e4fd0 100%);
color: white; color: white;
text-decoration: none; text-decoration: none;
border-radius: 3px; border-radius: 6px;
display: inline-block; display: inline-flex;
transition: background-color 0.3s ease; align-items: center;
gap: 8px;
transition: all 0.3s ease;
box-shadow: 0 3px 8px rgba(74, 108, 247, 0.25);
border: 1px solid #2e4fd0;
font-size: 14px;
position: relative;
overflow: hidden;
} }
.archive-button:hover { .archive-button:hover {
background-color: #3071a9; background: linear-gradient(135deg, #2e4fd0 0%, #1e3db3 100%);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(74, 108, 247, 0.4);
text-decoration: none; text-decoration: none;
color: white; color: white;
} }
.archive-button:active {
transform: translateY(0);
box-shadow: 0 2px 5px rgba(74, 108, 247, 0.3);
}
.archive-icon {
font-size: 16px;
transition: transform 0.3s ease;
}
.archive-button:hover .archive-icon {
transform: scale(1.2);
}
</style> </style>

View File

@@ -2,7 +2,7 @@ Redmine::Plugin.register :open_explorer do
name 'Open Explorer plugin' name 'Open Explorer plugin'
author 'licsber' author 'licsber'
description 'Open archive path using explorer.' description 'Open archive path using explorer.'
version '0.0.3' version '0.0.4'
url 'https://git.licsber.site/ruby/open_explorer' url 'https://git.licsber.site/ruby/open_explorer'
author_url 'https://licsber.site' author_url 'https://licsber.site'
end end