|
258 | 258 | <tr-info-title class="tr-info-title">
|
259 | 259 | <a-tag color="purple">Subscription Link</a-tag>
|
260 | 260 | <a-tooltip title='{{ i18n "copy" }}'>
|
261 |
| - <a-button size="small" icon="snippets" @click="copyToClipboard(infoModal.subLink)"></a-button> |
| 261 | + <a-button size="small" icon="snippets" @click="copy(infoModal.subLink)"></a-button> |
262 | 262 | </a-tooltip>
|
263 | 263 | </tr-info-title>
|
264 | 264 | <a :href="[[ infoModal.subLink ]]" target="_blank">[[ infoModal.subLink ]]</a>
|
|
267 | 267 | <tr-info-title class="tr-info-title">
|
268 | 268 | <a-tag color="purple">Json Link</a-tag>
|
269 | 269 | <a-tooltip title='{{ i18n "copy" }}'>
|
270 |
| - <a-button size="small" icon="snippets" @click="copyToClipboard(infoModal.subJsonLink)"></a-button> |
| 270 | + <a-button size="small" icon="snippets" @click="copy(infoModal.subJsonLink)"></a-button> |
271 | 271 | </a-tooltip>
|
272 | 272 | </tr-info-title>
|
273 | 273 | <a :href="[[ infoModal.subJsonLink ]]" target="_blank">[[ infoModal.subJsonLink ]]</a>
|
|
279 | 279 | <tr-info-title class="tr-info-title">
|
280 | 280 | <a-tag color="blue">[[ infoModal.clientSettings.tgId ]]</a-tag>
|
281 | 281 | <a-tooltip title='{{ i18n "copy" }}'>
|
282 |
| - <a-button size="small" icon="snippets" @click="copyToClipboard(infoModal.clientSettings.tgId)"></a-button> |
| 282 | + <a-button size="small" icon="snippets" @click="copy(infoModal.clientSettings.tgId)"></a-button> |
283 | 283 | </a-tooltip>
|
284 | 284 | </tr-info-title>
|
285 | 285 | </tr-info-row>
|
|
290 | 290 | <tr-info-title class="tr-info-title">
|
291 | 291 | <a-tag class="tr-info-tag" color="green">[[ link.remark ]]</a-tag>
|
292 | 292 | <a-tooltip title='{{ i18n "copy" }}'>
|
293 |
| - <a-button style="min-width: 24px;" size="small" icon="snippets" @click="copyToClipboard(link.link)"></a-button> |
| 293 | + <a-button style="min-width: 24px;" size="small" icon="snippets" @click="copy(link.link)"></a-button> |
294 | 294 | </a-tooltip>
|
295 | 295 | </tr-info-title>
|
296 | 296 | <code>[[ link.link ]]</code>
|
|
304 | 304 | <tr-info-title class="tr-info-title">
|
305 | 305 | <a-tag class="tr-info-tag" color="green">[[ link.remark ]]</a-tag>
|
306 | 306 | <a-tooltip title='{{ i18n "copy" }}'>
|
307 |
| - <a-button style="min-width: 24px;" size="small" icon="snippets" @click="copyToClipboard(link.link)"></a-button> |
| 307 | + <a-button style="min-width: 24px;" size="small" icon="snippets" @click="copy(link.link)"></a-button> |
308 | 308 | </a-tooltip>
|
309 | 309 | </tr-info-title>
|
310 | 310 | <code>[[ link.link ]]</code>
|
|
431 | 431 | <tr-info-title class="tr-info-title">
|
432 | 432 | <a-tag color="blue">Config</a-tag>
|
433 | 433 | <a-tooltip title='{{ i18n "copy" }}'>
|
434 |
| - <a-button style="min-width: 24px;" size="small" icon="snippets" @click="copyToClipboard(infoModal.links[index])"></a-button> |
| 434 | + <a-button style="min-width: 24px;" size="small" icon="snippets" @click="copy(infoModal.links[index])"></a-button> |
435 | 435 | </a-tooltip>
|
436 | 436 | </tr-info-title>
|
437 | 437 | <div v-html="infoModal.links[index].replaceAll(`\n`,`<br />`)" style="border-radius: 1rem; padding: 0.5rem;" class="client-table-odd-row">
|
|
532 | 532 | },
|
533 | 533 | },
|
534 | 534 | methods: {
|
535 |
| - copyToClipboard(content) { |
536 |
| - return copyToClipboard(content).then(() => { |
537 |
| - app.$message.success('{{ i18n "copied" }}') |
538 |
| - }) |
| 535 | + copy(content) { |
| 536 | + ClipboardManager |
| 537 | + .copyText(content) |
| 538 | + .then(() => { |
| 539 | + app.$message.success('{{ i18n "copied" }}') |
| 540 | + }) |
539 | 541 | },
|
540 | 542 | statsColor(stats) {
|
541 | 543 | return usageColor(stats.up + stats.down, app.trafficDiff, stats.total);
|
|
0 commit comments