Consistent background card

This commit is contained in:
Beingpax 2025-06-30 11:27:45 +05:45
parent 6f3cef665c
commit 8c44efad64
13 changed files with 35 additions and 92 deletions

View File

@ -7,9 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
E131EA9E2DFEF894009E79D8 /* whisper.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E11CB51D2DB1F8AF00F9F3ED /* whisper.xcframework */; };
E131EA9F2DFEF894009E79D8 /* whisper.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E11CB51D2DB1F8AF00F9F3ED /* whisper.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
E1A261122CC143AC00B233D1 /* KeyboardShortcuts in Frameworks */ = {isa = PBXBuildFile; productRef = E1A261112CC143AC00B233D1 /* KeyboardShortcuts */; };
E1A8C8CB2E1257B7003E58EC /* whisper.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1A8C8CA2E1257B7003E58EC /* whisper.xcframework */; };
E1A8C8CC2E1257B7003E58EC /* whisper.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E1A8C8CA2E1257B7003E58EC /* whisper.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
E1ADD45A2CC5352A00303ECB /* LaunchAtLogin in Frameworks */ = {isa = PBXBuildFile; productRef = E1ADD4592CC5352A00303ECB /* LaunchAtLogin */; };
E1ADD45F2CC544F100303ECB /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = E1ADD45E2CC544F100303ECB /* Sparkle */; };
E1F5FA7A2DA6CBF900B1FD8A /* Zip in Frameworks */ = {isa = PBXBuildFile; productRef = E1F5FA792DA6CBF900B1FD8A /* Zip */; };
@ -33,13 +33,13 @@
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
E131EAA02DFEF894009E79D8 /* Embed Frameworks */ = {
E1A8C8CD2E1257B7003E58EC /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
E131EA9F2DFEF894009E79D8 /* whisper.xcframework in Embed Frameworks */,
E1A8C8CC2E1257B7003E58EC /* whisper.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@ -50,8 +50,7 @@
E11473B02CBE0F0A00318EE4 /* VoiceInk.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VoiceInk.app; sourceTree = BUILT_PRODUCTS_DIR; };
E11473C32CBE0F0B00318EE4 /* VoiceInkTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VoiceInkTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
E11473CD2CBE0F0B00318EE4 /* VoiceInkUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VoiceInkUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
E11CB51D2DB1F8AF00F9F3ED /* whisper.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = whisper.xcframework; path = "../build-apple/whisper.xcframework"; sourceTree = "<group>"; };
E136D0102DA3EE57000E1E8A /* whisper.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = whisper.xcframework; path = "../Downloads/build-apple/whisper.xcframework"; sourceTree = "<group>"; };
E1A8C8CA2E1257B7003E58EC /* whisper.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = whisper.xcframework; path = "../whisper.cpp/build-apple/whisper.xcframework"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
@ -80,7 +79,7 @@
E1ADD45A2CC5352A00303ECB /* LaunchAtLogin in Frameworks */,
E1ADD45F2CC544F100303ECB /* Sparkle in Frameworks */,
E1A261122CC143AC00B233D1 /* KeyboardShortcuts in Frameworks */,
E131EA9E2DFEF894009E79D8 /* whisper.xcframework in Frameworks */,
E1A8C8CB2E1257B7003E58EC /* whisper.xcframework in Frameworks */,
E1F5FA7A2DA6CBF900B1FD8A /* Zip in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -126,8 +125,7 @@
E114741C2CBE1DE200318EE4 /* Frameworks */ = {
isa = PBXGroup;
children = (
E11CB51D2DB1F8AF00F9F3ED /* whisper.xcframework */,
E136D0102DA3EE57000E1E8A /* whisper.xcframework */,
E1A8C8CA2E1257B7003E58EC /* whisper.xcframework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -142,7 +140,7 @@
E11473AC2CBE0F0A00318EE4 /* Sources */,
E11473AD2CBE0F0A00318EE4 /* Frameworks */,
E11473AE2CBE0F0A00318EE4 /* Resources */,
E131EAA02DFEF894009E79D8 /* Embed Frameworks */,
E1A8C8CD2E1257B7003E58EC /* Embed Frameworks */,
);
buildRules = (
);

View File

@ -172,10 +172,7 @@ struct AudioTranscribeView: View {
}
.padding(.horizontal, 12)
.padding(.vertical, 8)
.background(
RoundedRectangle(cornerRadius: 8)
.fill(Color(.windowBackgroundColor).opacity(0.4))
)
.background(CardBackground(isSelected: false))
}
.frame(maxWidth: .infinity, alignment: .center)
.onAppear {

View File

@ -95,12 +95,10 @@ struct DictionarySettingsView: View {
switch selectedSection {
case .spellings:
DictionaryView(whisperPrompt: whisperPrompt)
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(10)
.background(CardBackground(isSelected: false))
case .replacements:
WordReplacementView()
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(10)
.background(CardBackground(isSelected: false))
}
}
}
@ -131,15 +129,7 @@ struct SectionCard: View {
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding()
.background(
RoundedRectangle(cornerRadius: 16)
.fill(Color(.windowBackgroundColor).opacity(0.4))
.shadow(color: isSelected ? .blue.opacity(0.2) : .clear, radius: 8, y: 4)
.overlay(
RoundedRectangle(cornerRadius: 16)
.stroke(isSelected ? .blue.opacity(0.5) : .clear, lineWidth: 2)
)
)
.background(CardBackground(isSelected: isSelected))
}
.buttonStyle(.plain)
}

View File

@ -172,7 +172,7 @@ struct AddReplacementSheet: View {
}
.padding(.horizontal)
.padding(.vertical, 12)
.background(Color(.windowBackgroundColor).opacity(0.4))
.background(CardBackground(isSelected: false))
Divider()

View File

@ -60,14 +60,7 @@ struct EnhancementSettingsView: View {
}
}
.padding()
.background(
RoundedRectangle(cornerRadius: 10)
.fill(Color(.windowBackgroundColor).opacity(0.4))
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(Color.blue.opacity(0.2), lineWidth: 1)
)
)
.background(CardBackground(isSelected: false))
// 1. AI Provider Integration Section
VStack(alignment: .leading, spacing: 16) {
@ -75,8 +68,7 @@ struct EnhancementSettingsView: View {
.font(.headline)
APIKeyManagementView()
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(10)
.background(CardBackground(isSelected: false))
}
.padding()
.background(Color(.windowBackgroundColor).opacity(0.4))
@ -109,8 +101,7 @@ struct EnhancementSettingsView: View {
}
}
.padding()
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(10)
.background(CardBackground(isSelected: false))
.opacity(enhancementService.isEnhancementEnabled ? 1.0 : 0.6)
}
}

View File

@ -50,7 +50,7 @@ struct LicenseManagementView: View {
Text(licenseViewModel.licenseState == .licensed ?
"Thank you for supporting VoiceInk" :
"Transform your voice into text with advanced features")
"Transform your voice into text with instantly with AI")
.font(.title3)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
@ -138,8 +138,7 @@ struct LicenseManagementView: View {
.frame(maxWidth: .infinity, alignment: .center)
}
.padding(32)
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(16)
.background(CardBackground(isSelected: false))
.shadow(color: .black.opacity(0.05), radius: 10)
// License Activation
@ -175,8 +174,7 @@ struct LicenseManagementView: View {
}
}
.padding(32)
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(16)
.background(CardBackground(isSelected: false))
.shadow(color: .black.opacity(0.05), radius: 10)
}
}
@ -213,8 +211,7 @@ struct LicenseManagementView: View {
}
}
.padding(32)
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(16)
.background(CardBackground(isSelected: false))
.shadow(color: .black.opacity(0.05), radius: 10)
// Deactivation Card
@ -232,8 +229,7 @@ struct LicenseManagementView: View {
.buttonStyle(.bordered)
}
.padding(32)
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(16)
.background(CardBackground(isSelected: false))
.shadow(color: .black.opacity(0.05), radius: 10)
}
}

View File

@ -48,7 +48,7 @@ struct ModelManagementView: View {
}
.padding()
.frame(maxWidth: .infinity, alignment: .leading)
.background(Color(.windowBackgroundColor).opacity(0.4))
.background(CardBackground(isSelected: false))
.cornerRadius(10)
}

View File

@ -176,7 +176,7 @@ struct PermissionCard: View {
}
}
.padding()
.background(Color(.windowBackgroundColor).opacity(0.9))
.background(CardBackground(isSelected: false))
.cornerRadius(16)
.shadow(color: Color.black.opacity(0.05), radius: 5, y: 2)
}

View File

@ -105,6 +105,7 @@ struct RecordView: View {
}
}
.padding(24)
.background(CardBackground(isSelected: false))
}
private var shortcutSection: some View {
@ -193,11 +194,7 @@ struct RecordView: View {
}
}
.padding(28)
.background(
RoundedRectangle(cornerRadius: 16)
.fill(Color(.windowBackgroundColor).opacity(0.4))
)
.background(CardBackground(isSelected: false))
}
private var afterRecordingSection: some View {

View File

@ -167,10 +167,7 @@ struct AudioInputSettingsView: View {
}
.frame(maxWidth: .infinity)
.padding(40)
.background(
RoundedRectangle(cornerRadius: 16)
.fill(Color(.windowBackgroundColor).opacity(0.4))
)
.background(CardBackground(isSelected: false))
}
private var prioritizedDevicesList: some View {
@ -295,15 +292,7 @@ struct InputModeCard: View {
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding()
.background(
RoundedRectangle(cornerRadius: 16)
.fill(Color(.windowBackgroundColor).opacity(0.4))
.shadow(color: isSelected ? .blue.opacity(0.2) : .clear, radius: 8, y: 4)
.overlay(
RoundedRectangle(cornerRadius: 16)
.stroke(isSelected ? .blue.opacity(0.5) : .clear, lineWidth: 2)
)
)
.background(CardBackground(isSelected: isSelected))
}
.buttonStyle(.plain)
}
@ -341,10 +330,7 @@ struct DeviceSelectionCard: View {
}
}
.padding()
.background(
RoundedRectangle(cornerRadius: 12)
.fill(Color(.windowBackgroundColor).opacity(0.4))
)
.background(CardBackground(isSelected: isSelected))
}
.buttonStyle(.plain)
}
@ -435,10 +421,6 @@ struct DevicePriorityCard: View {
.buttonStyle(.plain)
}
.padding()
.background(
RoundedRectangle(cornerRadius: 16)
.fill(Color(.windowBackgroundColor).opacity(0.4))
.opacity(isAvailable ? 1 : 0.8)
)
.background(CardBackground(isSelected: false))
}
}
}

View File

@ -336,10 +336,7 @@ struct SettingsSection<Content: View>: View {
}
.padding(16)
.frame(maxWidth: .infinity, alignment: .leading)
.background(
RoundedRectangle(cornerRadius: 12)
.fill(Color(.windowBackgroundColor).opacity(0.4))
)
.background(CardBackground(isSelected: showWarning, useAccentGradientWhenSelected: true))
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(showWarning ? Color.red.opacity(0.5) : Color.clear, lineWidth: 1)

View File

@ -99,10 +99,7 @@ struct TranscriptionCard: View {
}
}
.padding(16)
.background(
RoundedRectangle(cornerRadius: 12)
.fill(Color(.windowBackgroundColor).opacity(0.4))
)
.background(CardBackground(isSelected: false))
.cornerRadius(12)
.shadow(color: Color.black.opacity(0.05), radius: 3, x: 0, y: 2)
.contextMenu {

View File

@ -98,8 +98,7 @@ struct TranscriptionHistoryView: View {
}
.frame(maxWidth: .infinity)
.padding(.vertical, 12)
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(8)
.background(CardBackground(isSelected: false))
}
.buttonStyle(.plain)
.disabled(isLoading)
@ -177,8 +176,7 @@ struct TranscriptionHistoryView: View {
.textFieldStyle(PlainTextFieldStyle())
}
.padding(12)
.background(Color(.windowBackgroundColor).opacity(0.4))
.cornerRadius(10)
.background(CardBackground(isSelected: false))
.padding(.horizontal, 24)
.padding(.vertical, 16)
}
@ -195,7 +193,7 @@ struct TranscriptionHistoryView: View {
.foregroundColor(.secondary)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color(.windowBackgroundColor).opacity(0.4))
.background(CardBackground(isSelected: false))
.padding(24)
}