mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
set WP8 as a grade-b device
This commit is contained in:
@@ -116,6 +116,8 @@
|
||||
|
||||
if(this.isAndroid() && version < 4.4) {
|
||||
this.grade = (version < 4 ? 'c' : 'b');
|
||||
} else if(this.isWindowsPhone()) {
|
||||
this.grade = 'b';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
.platform-android2:not(.enable-transitions) * {
|
||||
// disable transitions on Android 2
|
||||
.platform-c:not(.enable-transitions) * {
|
||||
// disable transitions on grade-c devices (Android 2)
|
||||
-webkit-transition: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
@@ -276,6 +276,14 @@ describe('Ionic Platform Service', function() {
|
||||
expect(ionic.Platform.grade).toEqual('a');
|
||||
});
|
||||
|
||||
it('sets grade b from Windows Phone platform', function() {
|
||||
window.cordova = {};
|
||||
ionic.Platform.setPlatform('windowsphone');
|
||||
ionic.Platform.setVersion('8.0');
|
||||
ionic.Platform._checkPlatforms();
|
||||
expect(ionic.Platform.grade).toEqual('b');
|
||||
});
|
||||
|
||||
it('sets grade a from unknown platform', function() {
|
||||
window.cordova = {};
|
||||
ionic.Platform.setPlatform('whatever');
|
||||
|
||||
Reference in New Issue
Block a user