Skip to content

Commit

Permalink
Merge pull request #357 from Darock-Studio/feat/fb-mv
Browse files Browse the repository at this point in the history
feat: Move feedback
  • Loading branch information
WindowsMEMZ authored Apr 27, 2024
2 parents b4fb011 + d9684e3 commit 2f270ca
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 44 deletions.
36 changes: 18 additions & 18 deletions DarockBili.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SafariExtension/Info.plist;
Expand Down Expand Up @@ -1672,7 +1672,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SafariExtension/Info.plist;
Expand Down Expand Up @@ -1769,7 +1769,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBiliAlternative.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B38QUJMY47;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1814,7 +1814,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B38QUJMY47;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1854,7 +1854,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Vision App.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1890,7 +1890,7 @@
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Mac App.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -1919,7 +1919,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
Expand All @@ -1943,7 +1943,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_TEAM = B38QUJMY47;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SafariExtension/Info.plist;
Expand Down Expand Up @@ -2010,7 +2010,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Vision App.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -2045,7 +2045,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Vision App.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -2082,7 +2082,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -2129,7 +2129,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -2174,7 +2174,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -2210,7 +2210,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -2250,7 +2250,7 @@
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Mac App.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -2283,7 +2283,7 @@
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Mac App.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -2312,7 +2312,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
Expand All @@ -2335,7 +2335,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1183;
CURRENT_PROJECT_VERSION = 1208;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
Expand Down
12 changes: 12 additions & 0 deletions MeowBili/Assets.xcassets/particles.dataset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"data" : [
{
"filename" : "particles.caar",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
38 changes: 38 additions & 0 deletions MeowBili/Extension/UIExt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import UIKit
import SwiftUI
import Dynamic
import DarockKit
import Alamofire
import Foundation
Expand Down Expand Up @@ -630,3 +631,40 @@ func Label(_ titleKey: LocalizedStringKey, privateSystemImage systemName: String
Text(titleKey)
}
}

func PresentVisualPairingView(withCode: String) {
// let codeSize: CGFloat = 50
//
// let codeContainer = Dynamic.UIView()
// codeContainer.translatesAutoresizingMaskIntoConstraints = false
// codeContainer.clipsToBounds = true
//
// codeContainer.backgroundColor = UIColor.white
// codeContainer.layer.cornerRadius = codeSize / 2
// codeContainer.layer.borderColor = UIColor(red: 0.00, green: 0.49, blue: 1.00, alpha: 1.00).cgColor
// codeContainer.layer.borderWidth = 1
//
// codeContainer.widthAnchor.constraintEqualToConstant(codeSize).active = true
// codeContainer.heightAnchor.constraintEqualToConstant(codeSize).active = true
//// codeContainer.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor].active = true;
//// codeContainer.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor].active = YES;
// Bundle(path: "/System/Library/PrivateFrameworks/VisualPairing.framework")!.load()
// let codeView = Dynamic.VPPresenterView().initWithFrame(CGRect(x: 0, y: 0, width: 100, height: 100))
// codeView.setFrame(CGRect(x: 0, y: 0, width: 100, height: 100))
// codeView.translatesAutoresizingMaskIntoConstraints = false
// codeView.setVerificationCode(withCode)
// codeView.start()
// codeContainer.setFrame(CGRect(x: 0, y: 0, width: 100, height: 100))
// let assetData = NSDataAsset(name: "particles")!.data
// let caar = NSKeyedUnarchiver.unarchiveObject(with: assetData)! as! NSDictionary
// let rootLayer = caar["rootLayer"]
// codeContainer.layer.addSublayer(rootLayer)
// codeContainer.addSubview(codeView)
// codeView.widthAnchor.constraintEqualToAnchor(codeContainer.widthAnchor.asObject!).active = true
// codeView.heightAnchor.constraintEqualToAnchor(codeContainer.heightAnchor.asObject!).active = true
// codeView.centerXAnchor.constraintEqualToAnchor(codeContainer.centerXAnchor.asObject!).active = true
// codeView.centerYAnchor.constraintEqualToAnchor(codeContainer.centerYAnchor.asObject!).active = true
// let vc = Dynamic.UIViewController()
// vc.view = codeContainer
// Dynamic.UIApplication.sharedApplication.keyWindow.rootViewController.presentViewController(vc, animated: true, completion: nil)
}
2 changes: 1 addition & 1 deletion MeowBili/InMain/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ struct MainView: View {
Section {
if debug {
Button(action: {
tipWithText("Test", symbol: "hammer.fill")
PresentVisualPairingView(withCode: "Test")
}, label: {
Text("Home.debug")
})
Expand Down
25 changes: 0 additions & 25 deletions MeowBili/Others/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,6 @@ struct SettingsView: View {
Text("Settings.sleep")
}
})
NavigationLink(destination: { FeedbackView().navigationTitle("Settings.feedback") }, label: {
HStack {
ZStack {
Color.purple
.frame(width: 26, height: 26)
.clipShape(RoundedRectangle(cornerRadius: 5))
Image(systemName: "exclamationmark")
.font(.system(size: 16))
.foregroundColor(.white)
}
Text("Settings.feedback")
}
})
NavigationLink(destination: { PrivacySettingsView().navigationTitle("隐私与安全性") }, label: {
HStack {
ZStack {
Expand Down Expand Up @@ -318,18 +305,6 @@ struct SettingsView: View {
Text("Settings.sleep")
}
})
NavigationLink(destination: { FeedbackView().navigationTitle("Settings.feedback") }, label: {
HStack {
ZStack {
Color.purple
.frame(width: 20, height: 20)
.clipShape(Circle())
Image(systemName: "exclamationmark")
.font(.system(size: 12))
}
Text("Settings.feedback")
}
})
NavigationLink(destination: { PrivacySettingsView().navigationTitle("隐私与安全性") }, label: {
HStack {
ZStack {
Expand Down
11 changes: 11 additions & 0 deletions MeowBili/PersonalCenter/PersonAccountView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,17 @@ struct PersonAccountView: View {
})
}
}
#if os(watchOS)
Section {
NavigationLink(destination: { InAppFeedbackView() }, label: {
HStack {
Image(systemName: "exclamationmark.bubble")
.font(.system(size: 12))
Text("反馈助理")
}
})
}
#endif
}
}
}
Expand Down

0 comments on commit 2f270ca

Please sign in to comment.