Skip to content

Commit

Permalink
Merge pull request #448 from penguin-statistics/dev
Browse files Browse the repository at this point in the history
Release v3.5.2
  • Loading branch information
AlvISsReimu authored May 9, 2021
2 parents d9692ea + 29a2c53 commit 96a91a9
Show file tree
Hide file tree
Showing 45 changed files with 625 additions and 481 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"vue/no-v-html": "off",
"vue/no-template-shadow": "off",
"vue/valid-template-root": "off",
"vue/no-unused-vars": "off",
"no-tabs": [
"error",
{
Expand Down
71 changes: 26 additions & 45 deletions ios/App/App.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

55 changes: 28 additions & 27 deletions ios/App/App/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
debuggerBtn.setTitleColor(UIColor.blue, for: .normal)
debuggerBtn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 12.0)
debuggerBtn.layer.cornerRadius = 4
debuggerBtn.layer.shadowRadius = 4
debuggerBtn.layer.shadowRadius = 8
debuggerBtn.layer.shadowOffset = CGSize(width: 0, height: 0)
debuggerBtn.layer.shadowColor = CGColor.init(gray: 0.0, alpha: 1.0)
debuggerBtn.layer.shadowOpacity = 0.8
debuggerBtn.layer.shadowOpacity = 0.6
debuggerBtn.layer.shouldRasterize = true
debuggerBtn.layer.rasterizationScale = UIScreen.main.scale

Expand All @@ -108,6 +108,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

root?.view.addSubview(debuggerBtn)
}

#endif

if #available(iOS 12.0, *) {
Expand Down Expand Up @@ -139,31 +140,31 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

// MARK: CSSearchableItemAttributeSet for CSSearchableItem

var searchableItemAttributeSet: CSSearchableItemAttributeSet
if #available(iOS 14.0, *) {
searchableItemAttributeSet = CSSearchableItemAttributeSet(contentType: .url)
} else {
searchableItemAttributeSet = CSSearchableItemAttributeSet()
}
let url = URL(string: "https://penguin-stats.io/report")
searchableItemAttributeSet.url = url
searchableItemAttributeSet.title = "PenguinTestReport"
searchableItemAttributeSet.contentDescription = "Penguin Test Report!"
// MARK: CSSearchableItem
let item = CSSearchableItem(uniqueIdentifier: "PenguinTest", domainIdentifier: "io.penguinstats.app.PenguinTest", attributeSet: searchableItemAttributeSet)
CSSearchableIndex.default().deleteAllSearchableItems()
CSSearchableIndex.default().indexSearchableItems([item]) { error in
if let error = error {
print("Indexing error: \(error.localizedDescription)")
} else {
print("Search item successfully indexed!")
}
}
// var searchableItemAttributeSet: CSSearchableItemAttributeSet
// if #available(iOS 14.0, *) {
// searchableItemAttributeSet = CSSearchableItemAttributeSet(contentType: .url)
// } else {
// searchableItemAttributeSet = CSSearchableItemAttributeSet()
// }
//
//
// let url = URL(string: "https://penguin-stats.io/report")
// searchableItemAttributeSet.url = url
// searchableItemAttributeSet.title = "PenguinTestReport"
// searchableItemAttributeSet.contentDescription = "Penguin Test Report!"
//
// // MARK: CSSearchableItem
//
// let item = CSSearchableItem(uniqueIdentifier: "PenguinTest", domainIdentifier: "io.penguinstats.app.PenguinTest", attributeSet: searchableItemAttributeSet)
//
// CSSearchableIndex.default().deleteAllSearchableItems()
// CSSearchableIndex.default().indexSearchableItems([item]) { error in
// if let error = error {
// print("Indexing error: \(error.localizedDescription)")
// } else {
// print("Search item successfully indexed!")
// }
// }

#endif

Expand Down
1 change: 1 addition & 0 deletions ios/App/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<key>NSUserActivityTypes</key>
<array>
<string>SelectServerIntent</string>
<string>StatisticsOverviewIntent</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ios/App/App/Views/HapticButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct HapticButton<Content: View> : View {

var body: some View {
Button(action: {
UIImpactFeedbackGenerator.init(style: .soft).impactOccurred()
UIImpactFeedbackGenerator.init(style: .rigid).impactOccurred()
self.action()
}) {
content()
Expand Down
7 changes: 4 additions & 3 deletions ios/App/App/Views/WelcomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ struct WelcomeView: View {
}
}) {
HStack {
Text("Get Started")
Image(systemName: "checkmark.circle.fill")
.imageScale(.medium)

Text(NSLocalizedString("done", comment: ""))
.font(.system(size: 20))
.bold()

Image(systemName: "chevron.right")
}
.foregroundColor(.white)
.padding()
Expand Down
32 changes: 32 additions & 0 deletions ios/App/App/en.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17132" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17105"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<imageView key="view" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Splash" id="snD-IY-ifK">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</imageView>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="Splash" width="1366" height="1366"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
1 change: 1 addition & 0 deletions ios/App/App/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
"feature.performance.subtitle" = "Get your desired data without the frustration of page buffering";
"welcome.title" = "Welcome to";
"welcome.subtitle" = "Penguin Statistics";
"done" = "Done";
19 changes: 19 additions & 0 deletions ios/App/App/en.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14111" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
</dependencies>
<scenes>
<!--Bridge View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="CAPBridgeViewController" customModule="Capacitor" sceneMemberID="viewController"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
1 change: 1 addition & 0 deletions ios/App/App/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
"feature.performance.subtitle" = "快速获得所需数据而无需等待网页缓冲";
"welcome.title" = "欢迎使用";
"welcome.subtitle" = "企鹅物流 App";
"done" = "开始使用";
2 changes: 1 addition & 1 deletion ios/App/PenguinWidget/PenguinWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct PenguinWidget: Widget {
var body: some WidgetConfiguration {
IntentConfiguration(
kind: kind,
intent: SelectServerIntent.self,
intent: StatisticsOverviewIntent.self,
provider: SiteStatsProvider()
) { entry in
WidgetEntry(entry: entry)
Expand Down
1 change: 0 additions & 1 deletion ios/App/PenguinWidget/Views/StageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ struct StageView: View {
.frame(minHeight: 0, maxHeight: 36)
.minimumScaleFactor(0.3)
.lineLimit(3)
.unredacted()

if showRecentTimes {
Text("× " + String(stage.recentTimes))
Expand Down
4 changes: 2 additions & 2 deletions ios/App/PenguinWidget/WidgetEntry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct SiteStatsProvider: IntentTimelineProvider {
)
}

func getSnapshot(for configuration: SelectServerIntent, in context: Context, completion: @escaping (WidgetTimelineEntry) -> ()) {
func getSnapshot(for configuration: StatisticsOverviewIntent, in context: Context, completion: @escaping (WidgetTimelineEntry) -> ()) {
print("serverSelection snapshot", configuration)

let entry = WidgetTimelineEntry(
Expand All @@ -29,7 +29,7 @@ struct SiteStatsProvider: IntentTimelineProvider {
completion(entry)
}

func getTimeline(for configuration: SelectServerIntent, in context: Context, completion: @escaping (Timeline<WidgetTimelineEntry>) -> ()) {
func getTimeline(for configuration: StatisticsOverviewIntent, in context: Context, completion: @escaping (Timeline<WidgetTimelineEntry>) -> ()) {
print("serverSelection timeline with configured server:", configuration.server.string())

print("doing network request")
Expand Down
Loading

0 comments on commit 96a91a9

Please sign in to comment.