0.1.0: copy feat.

This commit is contained in:
2025-08-23 14:30:06 +08:00
parent 29d9964d8f
commit be48b4e1d3
3 changed files with 13 additions and 1 deletions

View File

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

View File

@@ -10,12 +10,23 @@
<% archive_url = archive_custom_field.value.strip %>
<a href="<%= archive_url %>"
target="_blank"
onclick="copyLink(<%= archive_url %>)"
class="archive-button">
<span class="archive-icon">📂</span>
一键打开
</a>
<% end %>
<script>
function copyLink(link) {
navigator.clipboard.writeText(link)
.catch(err => {
console.error('复制失败:', err)
alert('复制失败,请手动复制!')
});
}
</script>
<style>
.archive-button {
font-weight: 600;

View File

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