diff --git a/app/Mole/Sources/Mole/PasswordSheetView.swift b/app/Mole/Sources/Mole/PasswordSheetView.swift index 4faca0f..b4a4173 100644 --- a/app/Mole/Sources/Mole/PasswordSheetView.swift +++ b/app/Mole/Sources/Mole/PasswordSheetView.swift @@ -42,12 +42,23 @@ struct PasswordSheetView: View { VStack(alignment: .leading, spacing: 14) { // Icon ZStack(alignment: .bottomTrailing) { - Image(nsImage: NSApp.applicationIconImage) - .resizable() - .interpolation(.high) - .aspectRatio(contentMode: .fit) - .frame(width: 48, height: 48) - .shadow(radius: 2) + if let url = Bundle.module.url(forResource: "mole", withExtension: "png"), + let customIcon = NSImage(contentsOf: url) + { + Image(nsImage: customIcon) + .resizable() + .interpolation(.high) + .aspectRatio(contentMode: .fit) + .frame(width: 48, height: 48) + .shadow(radius: 2) + } else { + Image(nsImage: NSApp.applicationIconImage) + .resizable() + .interpolation(.high) + .aspectRatio(contentMode: .fit) + .frame(width: 48, height: 48) + .shadow(radius: 2) + } } .padding(.leading, 6) diff --git a/app/Mole/Sources/Mole/Resources/mole.icon/Assets/mole.png b/app/Mole/Sources/Mole/Resources/mole.icon/Assets/mole.png new file mode 100644 index 0000000..861cbdd Binary files /dev/null and b/app/Mole/Sources/Mole/Resources/mole.icon/Assets/mole.png differ diff --git a/app/Mole/Sources/Mole/Resources/mole.icon/icon.json b/app/Mole/Sources/Mole/Resources/mole.icon/icon.json new file mode 100644 index 0000000..ff03357 --- /dev/null +++ b/app/Mole/Sources/Mole/Resources/mole.icon/icon.json @@ -0,0 +1,38 @@ +{ + "fill" : { + "solid" : "display-p3:0.97607,0.94922,0.90625,1.00000" + }, + "groups" : [ + { + "layers" : [ + { + "blend-mode" : "normal", + "glass" : false, + "image-name" : "mole.png", + "name" : "mole", + "position" : { + "scale" : 1.76, + "translation-in-points" : [ + 0, + 0 + ] + } + } + ], + "shadow" : { + "kind" : "neutral", + "opacity" : 0.5 + }, + "translucency" : { + "enabled" : true, + "value" : 0.5 + } + } + ], + "supported-platforms" : { + "circles" : [ + "watchOS" + ], + "squares" : "shared" + } +}