Bläddra i källkod

that stuff

pull/1/head
Burrit0z 4 år sedan
förälder
incheckning
62a9aecec1
8 ändrade filer med 28 tillägg och 8 borttagningar
  1. +12
    -2
      Kai.xm
  2. +1
    -1
      Layout/DEBIAN/control
  3. +9
    -0
      Layout/DEBIAN/postinst
  4. +6
    -5
      kaiprefs/KAIRootListController.m
  5. Binär
      kaiprefs/Resources/icon.png
  6. Binär
      kaiprefs/Resources/icon@2x.png
  7. Binär
      kaiprefs/Resources/icon@3x.png
  8. Binär
      kaiprefs/Resources/kai.png

+ 12
- 2
Kai.xm Visa fil

@@ -123,7 +123,7 @@
}
%end

%hook CSCoverSheetViewController
%hook KAICSTarget //Again, not a class

-(void)_transitionChargingViewToVisible:(BOOL)arg1 showBattery:(BOOL)arg2 animated:(BOOL)arg3 {
if(hideChargingAnimation) {
@@ -132,6 +132,13 @@
}
}

-(void)_transitionChargingViewToVisible:(BOOL)arg1 showBattery:(BOOL)arg2 animated:(BOOL)arg3 force:(BOOL)arg4 { //might just be ios12
if(hideChargingAnimation) {
//Same idea
%orig(NO,NO,NO,NO);
}
}

%end

%ctor {
@@ -147,7 +154,10 @@

//Bro Muirey helped me figure out a logical way to do this because iOS 12-13 classes have changed
Class cls = kCFCoreFoundationVersionNumber > 1600 ? ([objc_getClass("CSAdjunctListView") class]) : ([objc_getClass("SBDashBoardAdjunctListView") class]);

Class CSCls = kCFCoreFoundationVersionNumber > 1600 ? ([objc_getClass("CSCoverSheetViewController") class]) : ([objc_getClass("SBDashBoardViewController") class]);

if(enabled) {
%init(KAITarget = cls);
%init(KAITarget = cls, KAICSTarget = CSCls); //BIG BRAIN BRO!!
}
}

control → Layout/DEBIAN/control Visa fil

@@ -1,6 +1,6 @@
Package: com.burritoz.kai
Name: Kai
Version: 0.1.3~alpha
Version: 0.1.4~alpha
Architecture: iphoneos-arm
Description: Show charging banners on your lock screen!
Maintainer: burrit0z

+ 9
- 0
Layout/DEBIAN/postinst Visa fil

@@ -0,0 +1,9 @@
echo ""
echo ""
echo "You've installed kai."
echo "Special thanks to:"
echo "Thomz -- The icon, banner, and for being awesome"
echo "@KorfiDiscord -- Design, and motivating me"
echo "Devvix -- Being there to help"
echo ""
echo ""

+ 6
- 5
kaiprefs/KAIRootListController.m Visa fil

@@ -13,7 +13,7 @@ NSBundle *tweakBundle;
}

-(void)viewWillAppear:(BOOL)arg1 {
self.navigationController.navigationController.navigationBar.barTintColor = [UIColor colorWithRed: 0.00 green: 0.77 blue: 0.95 alpha: 1.00];
self.navigationController.navigationController.navigationBar.barTintColor = [UIColor colorWithRed: 0.00 green: 0.735 blue: 0.965 alpha: 1.00];
[self.navigationController.navigationController.navigationBar setShadowImage: [UIImage new]];
self.navigationController.navigationController.navigationBar.tintColor = [UIColor whiteColor];
self.navigationController.navigationController.navigationBar.translucent = NO;
@@ -67,10 +67,10 @@ NSBundle *tweakBundle;
}

-(void)respring:(id)sender {
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.burritoz.kaiprefs/reload"), nil, nil, true);
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.burritoz.kaiPrefs/reload"), nil, nil, true);

UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Kai"
message:@"Your settings have been applied. You can now go back to your lockscreen (CoverSheet) to see the changes. \n Note the option to put kai below music requires a respring, as well as option to hide CoverSheet charge animations."
message:@"Your settings have been applied. You can now go back to your lockscreen (CoverSheet) to see the changes. \n \n If some of your options did not apply, a respring might be necessary."
preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"Amazing!" style:UIAlertActionStyleDefault
@@ -126,10 +126,11 @@ NSBundle *tweakBundle;
versionLabel.alpha = 0.8;
versionLabel.text = @"alpha";

NSBundle *bundle = [[NSBundle alloc]initWithPath:@"/Library/PreferenceBundles/KaiPrefs.bundle"];
NSBundle *bundle = [[NSBundle alloc]initWithPath:@"/Library/PreferenceBundles/kaiPrefs.bundle"];
UIImage *phone = [UIImage imageWithContentsOfFile:[bundle pathForResource:@"kai" ofType:@"png"]];
UIImageView *phoneImage = [[UIImageView alloc]initWithImage:phone];
[phoneImage setFrame:self.frame];
[phoneImage setFrame:CGRectMake(40,40,190,160)];
phoneImage.clipsToBounds = YES;
bgView.backgroundColor = [UIColor colorWithRed: 0.00 green: 0.82 blue: 1.00 alpha: 1.00];

Binär
kaiprefs/Resources/icon.png Visa fil

Before After
Width: 27  |  Height: 27  |  Size: 1.5KB

Binär
kaiprefs/Resources/icon@2x.png Visa fil

Before After
Width: 54  |  Height: 54  |  Size: 3.4KB

Binär
kaiprefs/Resources/icon@3x.png Visa fil

Before After
Width: 87  |  Height: 87  |  Size: 8.3KB

Binär
kaiprefs/Resources/kai.png Visa fil

Before After
Width: 400  |  Height: 96  |  Size: 3.7KB Width: 551  |  Height: 441  |  Size: 20KB

Laddar…
Avbryt
Spara