@samitouri / QOSami-HFS / commits / 6f4432c2

plugin/list-uploader: display icon option

Massimo Melina committed Sep 17, 2023 at 17:24 UTC 6f4432c2a4a44edc5a4c45cfaa9620c9e0745f89
2 files changed +4 -2
plugins/list-uploader/plugin.js
+1
@@ -14,6 +14,7 @@ exports.config = {
14 "IP only": 'ip',
15 "Username only": 'user',
16 "IP + username": 'ip+user',
17 + "Icon + text on mouse over": 'tooltip',
18 },
19 defaultValue: 'ip+user',
20 frontend: true,
plugins/list-uploader/public/main.js
+3 -2
@@ -15,8 +15,9 @@
15 : display === 'ip' || !x.username ? x.ip
16 : x.ip + ' (' + x.username + ')'
17 }, [data])
18 - return text && HFS.h('span', { className: 'uploader', title: HFS.t`Uploader` },
19 - HFS.hIcon('upload'), ' ', text, ' – ')
18 + const iconOnly = display === 'tooltip'
19 + return text && HFS.h('span', { className: 'uploader', title: HFS.t`Uploader` + (iconOnly ? ' ' + text : '') },
20 + HFS.hIcon('upload'), ' ', !iconOnly && text, ' – ')
21 }
22
23 function getDetails(batched) {