forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New loading animation; fix release script typo. [ci skip]
- Loading branch information
Showing
12 changed files
with
188 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ | |
D105B23F1BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B2361BB5BE4A00A5D850 /* [email protected] */; }; | ||
D105B2401BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B2371BB5BE4A00A5D850 /* [email protected] */; }; | ||
D105B2411BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B2381BB5BE4A00A5D850 /* [email protected] */; }; | ||
D105B2421BB5BE4A00A5D850 /* Logo_1024.png in Resources */ = {isa = PBXBuildFile; fileRef = D105B2391BB5BE4A00A5D850 /* Logo_1024.png */; }; | ||
D105B2431BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B23A1BB5BE4A00A5D850 /* [email protected] */; }; | ||
D105B2441BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B23B1BB5BE4A00A5D850 /* [email protected] */; }; | ||
D121FD651BC5B2AF002101B0 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D121FD641BC5B2AF002101B0 /* Sparkle.framework */; }; | ||
|
@@ -40,6 +39,10 @@ | |
D18853F91BB0D37C00D89803 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D18853F81BB0D37B00D89803 /* WebKit.framework */; }; | ||
D18854041BB0DC2600D89803 /* metabase.jar in Resources */ = {isa = PBXBuildFile; fileRef = D18854021BB0DB6000D89803 /* metabase.jar */; }; | ||
D18855611BB1C8D700D89803 /* jre in Resources */ = {isa = PBXBuildFile; fileRef = D188555E1BB1C86F00D89803 /* jre */; }; | ||
D1CB9FE81BCEDE9A009A61FB /* LoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = D1CB9FE71BCEDE9A009A61FB /* LoadingView.m */; }; | ||
D1CB9FEA1BCEDEA5009A61FB /* LoadingView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D1CB9FE91BCEDEA5009A61FB /* LoadingView.xib */; }; | ||
D1CB9FED1BCEDF02009A61FB /* Loading_View_Inner.png in Resources */ = {isa = PBXBuildFile; fileRef = D1CB9FEB1BCEDF02009A61FB /* Loading_View_Inner.png */; }; | ||
D1CB9FEE1BCEDF02009A61FB /* Loading_View_Outer.png in Resources */ = {isa = PBXBuildFile; fileRef = D1CB9FEC1BCEDF02009A61FB /* Loading_View_Outer.png */; }; | ||
/* End PBXBuildFile section */ | ||
|
||
/* Begin PBXContainerItemProxy section */ | ||
|
@@ -83,7 +86,6 @@ | |
D105B2361BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
D105B2371BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
D105B2381BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
D105B2391BB5BE4A00A5D850 /* Logo_1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Logo_1024.png; sourceTree = "<group>"; }; | ||
D105B23A1BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
D105B23B1BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
D121FD641BC5B2AF002101B0 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; }; | ||
|
@@ -115,6 +117,11 @@ | |
D18853F81BB0D37B00D89803 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; | ||
D18854021BB0DB6000D89803 /* metabase.jar */ = {isa = PBXFileReference; lastKnownFileType = archive.jar; path = metabase.jar; sourceTree = "<group>"; }; | ||
D188555E1BB1C86F00D89803 /* jre */ = {isa = PBXFileReference; lastKnownFileType = folder; name = jre; path = Metabase/jre; sourceTree = "<group>"; }; | ||
D1CB9FE61BCEDE9A009A61FB /* LoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadingView.h; sourceTree = "<group>"; }; | ||
D1CB9FE71BCEDE9A009A61FB /* LoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoadingView.m; sourceTree = "<group>"; }; | ||
D1CB9FE91BCEDEA5009A61FB /* LoadingView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoadingView.xib; sourceTree = "<group>"; }; | ||
D1CB9FEB1BCEDF02009A61FB /* Loading_View_Inner.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Loading_View_Inner.png; sourceTree = "<group>"; }; | ||
D1CB9FEC1BCEDF02009A61FB /* Loading_View_Outer.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Loading_View_Outer.png; sourceTree = "<group>"; }; | ||
/* End PBXFileReference section */ | ||
|
||
/* Begin PBXFrameworksBuildPhase section */ | ||
|
@@ -186,13 +193,14 @@ | |
D105B2321BB5BE4A00A5D850 /* Images */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
D1CB9FEB1BCEDF02009A61FB /* Loading_View_Inner.png */, | ||
D1CB9FEC1BCEDF02009A61FB /* Loading_View_Outer.png */, | ||
D105B2331BB5BE4A00A5D850 /* [email protected] */, | ||
D105B2341BB5BE4A00A5D850 /* [email protected] */, | ||
D105B2351BB5BE4A00A5D850 /* [email protected] */, | ||
D105B2361BB5BE4A00A5D850 /* [email protected] */, | ||
D105B2371BB5BE4A00A5D850 /* [email protected] */, | ||
D105B2381BB5BE4A00A5D850 /* [email protected] */, | ||
D105B2391BB5BE4A00A5D850 /* Logo_1024.png */, | ||
D105B23A1BB5BE4A00A5D850 /* [email protected] */, | ||
D105B23B1BB5BE4A00A5D850 /* [email protected] */, | ||
); | ||
|
@@ -228,6 +236,9 @@ | |
D162C4A51BC87D2B009F678F /* MainMenu.xib */, | ||
D162C4A61BC87D2B009F678F /* MainViewController.h */, | ||
D162C4A71BC87D2B009F678F /* MainViewController.m */, | ||
D1CB9FE61BCEDE9A009A61FB /* LoadingView.h */, | ||
D1CB9FE71BCEDE9A009A61FB /* LoadingView.m */, | ||
D1CB9FE91BCEDEA5009A61FB /* LoadingView.xib */, | ||
); | ||
path = UI; | ||
sourceTree = "<group>"; | ||
|
@@ -388,6 +399,7 @@ | |
isa = PBXResourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
D1CB9FEE1BCEDF02009A61FB /* Loading_View_Outer.png in Resources */, | ||
D105B23D1BB5BE4A00A5D850 /* [email protected] in Resources */, | ||
D121FD691BC5B4E7002101B0 /* dsa_pub.pem in Resources */, | ||
D18855611BB1C8D700D89803 /* jre in Resources */, | ||
|
@@ -399,9 +411,10 @@ | |
D105B23F1BB5BE4A00A5D850 /* [email protected] in Resources */, | ||
D18853D71BB0CEC600D89803 /* Images.xcassets in Resources */, | ||
D105B23E1BB5BE4A00A5D850 /* [email protected] in Resources */, | ||
D1CB9FEA1BCEDEA5009A61FB /* LoadingView.xib in Resources */, | ||
D1CB9FED1BCEDF02009A61FB /* Loading_View_Inner.png in Resources */, | ||
D105B23C1BB5BE4A00A5D850 /* [email protected] in Resources */, | ||
D18853CF1BB0CEC600D89803 /* Credits.rtf in Resources */, | ||
D105B2421BB5BE4A00A5D850 /* Logo_1024.png in Resources */, | ||
D105B2411BB5BE4A00A5D850 /* [email protected] in Resources */, | ||
D105B2441BB5BE4A00A5D850 /* [email protected] in Resources */, | ||
); | ||
|
@@ -439,6 +452,7 @@ | |
buildActionMask = 2147483647; | ||
files = ( | ||
D162C4AB1BC87D2B009F678F /* TaskHealthChecker.m in Sources */, | ||
D1CB9FE81BCEDE9A009A61FB /* LoadingView.m in Sources */, | ||
D105B2261BB378C100A5D850 /* NSDocument+INAppStoreWindowFixes.m in Sources */, | ||
D162C4AA1BC87D2B009F678F /* SettingsManager.m in Sources */, | ||
D105B2251BB378C100A5D850 /* INWindowBackgroundView+CoreUIRendering.m in Sources */, | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// LoadingView.h | ||
// Metabase | ||
// | ||
// Created by Cam Saul on 10/14/15. | ||
// Copyright (c) 2015 Metabase. All rights reserved. | ||
// | ||
|
||
@import Cocoa; | ||
|
||
@interface LoadingView : NSView | ||
|
||
@property (nonatomic) BOOL animate; | ||
|
||
@end |
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,58 @@ | ||
// | ||
// LoadingView.m | ||
// Metabase | ||
// | ||
// Created by Cam Saul on 10/14/15. | ||
// Copyright (c) 2015 Metabase. All rights reserved. | ||
// | ||
|
||
@import QuartzCore; | ||
|
||
#import "LoadingView.h" | ||
|
||
@interface LoadingView () | ||
@property (weak) IBOutlet NSImageView *outerImageView; | ||
@end | ||
|
||
@implementation LoadingView | ||
|
||
#pragma mark - Lifecycle | ||
|
||
- (instancetype)init { | ||
NSArray *objects; | ||
[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil topLevelObjects:&objects]; | ||
for (id obj in objects) { | ||
if ([obj isMemberOfClass:[self class]]) return obj; | ||
} | ||
return nil; | ||
} | ||
|
||
- (void)awakeFromNib { | ||
self.outerImageView.wantsLayer = YES; | ||
} | ||
|
||
|
||
#pragma mark - Getters / Setters | ||
|
||
- (void)setAnimate:(BOOL)animate { | ||
if (_animate == animate) return; | ||
|
||
_animate = animate; | ||
|
||
if (!animate) { | ||
[self.outerImageView.layer removeAllAnimations]; | ||
} else { | ||
self.outerImageView.layer.position = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); | ||
self.outerImageView.layer.anchorPoint = CGPointMake(0.5f, 0.5f); | ||
|
||
CABasicAnimation *rotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; | ||
rotation.fromValue = @0.0f; | ||
rotation.toValue = @(M_PI * 2.0f); | ||
rotation.duration = 2.0f; | ||
rotation.repeatCount = HUGE_VALF; | ||
|
||
[self.outerImageView.layer addAnimation:rotation forKey:@"rotation"]; | ||
} | ||
} | ||
|
||
@end |
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,48 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5053" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5053"/> | ||
</dependencies> | ||
<objects> | ||
<customObject id="-2" userLabel="File's Owner"/> | ||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
<customObject id="-3" userLabel="Application"/> | ||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="c22-O7-iKe" customClass="LoadingView"> | ||
<rect key="frame" x="0.0" y="0.0" width="200" height="200"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> | ||
<subviews> | ||
<imageView canDrawConcurrently="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="cZb-9N-gBv" userLabel="outerImageView"> | ||
<rect key="frame" x="6" y="6" width="188" height="188"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> | ||
<constraints> | ||
<constraint firstAttribute="width" constant="188" id="rhk-Jv-lfh"/> | ||
<constraint firstAttribute="height" constant="188" id="zc5-5V-71M"/> | ||
</constraints> | ||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" image="Loading_View_Outer" id="gdw-zk-O24"/> | ||
</imageView> | ||
<imageView canDrawConcurrently="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ppb-yU-gW5" userLabel="innerImageView"> | ||
<rect key="frame" x="40" y="40" width="121" height="121"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> | ||
<constraints> | ||
<constraint firstAttribute="height" constant="121" id="pAT-Hi-rz9"/> | ||
<constraint firstAttribute="width" constant="121" id="zrZ-xr-I0a"/> | ||
</constraints> | ||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" image="Loading_View_Inner" id="umY-yg-KA6"/> | ||
</imageView> | ||
</subviews> | ||
<constraints> | ||
<constraint firstAttribute="centerY" secondItem="Ppb-yU-gW5" secondAttribute="centerY" id="DZe-EF-QxD"/> | ||
<constraint firstAttribute="centerX" secondItem="Ppb-yU-gW5" secondAttribute="centerX" id="Xtt-Ah-8QM"/> | ||
<constraint firstAttribute="centerY" secondItem="cZb-9N-gBv" secondAttribute="centerY" id="YLx-iu-oop"/> | ||
<constraint firstAttribute="centerX" secondItem="cZb-9N-gBv" secondAttribute="centerX" id="aJ4-b5-5M8"/> | ||
</constraints> | ||
<connections> | ||
<outlet property="outerImageView" destination="cZb-9N-gBv" id="K4s-1M-P8D"/> | ||
</connections> | ||
</customView> | ||
</objects> | ||
<resources> | ||
<image name="Loading_View_Inner" width="121" height="121"/> | ||
<image name="Loading_View_Outer" width="188" height="188"/> | ||
</resources> | ||
</document> |
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
Oops, something went wrong.