File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Swiftcord/Views/User/Profile Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import CachedAsyncImage
12
12
13
13
struct MiniUserProfileView < RichContentSlot: View > : View {
14
14
let user : User
15
+ let pasteboard = NSPasteboard . general
15
16
@Binding var profile : UserProfile ?
16
17
var guildRoles : [ Role ] ?
17
18
var isWebhook : Bool = false
@@ -90,6 +91,15 @@ struct MiniUserProfileView<RichContentSlot: View>: View {
90
91
NonUserBadge ( flags: user. public_flags, isWebhook: isWebhook)
91
92
}
92
93
Spacer ( )
94
+ Button ( action: {
95
+ pasteboard. declareTypes ( [ . string] , owner: nil )
96
+ pasteboard. setString ( " \( user. username) # \( user. discriminator) " , forType: . string)
97
+ } , label: {
98
+ Image ( systemName: " square.on.square " )
99
+ } )
100
+ . buttonStyle ( . plain)
101
+ . padding ( )
102
+ . frame ( width: 20 , height: 20 )
93
103
}
94
104
95
105
// Custom status
You can’t perform that action at this time.
0 commit comments