0.1.0: copy feat.
This commit is contained in:
@@ -12,6 +12,7 @@ git clone https://git.licsber.site/ruby/open_explorer
|
|||||||
## ChangeLog
|
## ChangeLog
|
||||||
|
|
||||||
```
|
```
|
||||||
|
250824周六:(0.1.0)增加复制功能
|
||||||
250823周六:(0.0.9)修改按钮出现位置;优化样式
|
250823周六:(0.0.9)修改按钮出现位置;优化样式
|
||||||
250823周六:(0.0.1)基础功能
|
250823周六:(0.0.1)基础功能
|
||||||
```
|
```
|
||||||
|
@@ -10,12 +10,23 @@
|
|||||||
<% 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"
|
||||||
|
onclick="copyLink(<%= archive_url %>)"
|
||||||
class="archive-button">
|
class="archive-button">
|
||||||
<span class="archive-icon">📂</span>
|
<span class="archive-icon">📂</span>
|
||||||
一键打开
|
一键打开
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function copyLink(link) {
|
||||||
|
navigator.clipboard.writeText(link)
|
||||||
|
.catch(err => {
|
||||||
|
console.error('复制失败:', err)
|
||||||
|
alert('复制失败,请手动复制!')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.archive-button {
|
.archive-button {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
2
init.rb
2
init.rb
@@ -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.9'
|
version '0.1.0'
|
||||||
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
|
||||||
|
Reference in New Issue
Block a user