This repository has been archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add `SubmitReportView` * Fix success dialogue on submit webcompat report view * Hide cancel button on submit report view upon submit * Add webcompat report button to settings * Add email content type to webcompat report text field * Fix navigation view * Fix for review * Push web-compat report success * Updated for review * Fix for review * Fix for review
- Loading branch information
Showing
14 changed files
with
371 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
Sources/Brave/Frontend/Share/ReportWebcompatIssueActivity.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2023 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import Foundation | ||
import Strings | ||
import UIKit | ||
import SwiftUI | ||
|
||
class ReportWebCompatibilityIssueActivity: UIActivity, MenuActivity { | ||
private let callback: () -> Void | ||
|
||
init(callback: @escaping () -> Void) { | ||
self.callback = callback | ||
} | ||
|
||
override var activityTitle: String? { | ||
Strings.Shields.reportABrokenSite | ||
} | ||
|
||
private var imageName: String { | ||
"leo.warning.triangle-outline" | ||
} | ||
|
||
override var activityImage: UIImage? { | ||
UIImage(braveSystemNamed: imageName)?.applyingSymbolConfiguration(.init(scale: .large)) | ||
} | ||
|
||
var menuImage: Image { | ||
Image(braveSystemName: imageName) | ||
} | ||
|
||
override func perform() { | ||
callback() | ||
activityDidFinish(true) | ||
} | ||
|
||
override func canPerform(withActivityItems activityItems: [Any]) -> Bool { | ||
return true | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
Sources/Brave/Frontend/Shields/SubmitReportSuccessView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2023 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import SwiftUI | ||
import Strings | ||
import BraveUI | ||
import DesignSystem | ||
import SnapKit | ||
|
||
struct SubmitReportSuccessView: View { | ||
var body: some View { | ||
VStack(alignment: .center, spacing: 16) { | ||
Image(braveSystemName: "leo.check.circle-outline") | ||
.font(.system(size: 48)) | ||
.foregroundStyle(Color(braveSystemName: .systemfeedbackSuccessIcon)) | ||
Text(Strings.Shields.siteReportedTitle) | ||
.font(.title) | ||
Text(Strings.Shields.siteReportedBody) | ||
} | ||
.padding(32) | ||
.multilineTextAlignment(.center) | ||
.foregroundStyle(Color(braveSystemName: .textTertiary)) | ||
} | ||
} | ||
|
||
#if swift(>=5.9) | ||
#Preview { | ||
SubmitReportSuccessView() | ||
} | ||
#endif |
Oops, something went wrong.