Skip to content

Commit

Permalink
Merge pull request #1000 from crossroads/master
Browse files Browse the repository at this point in the history
[Release] v0.21.3
  • Loading branch information
patrixr authored Mar 5, 2021
2 parents 7583208 + e63797f commit 28fede1
Show file tree
Hide file tree
Showing 34 changed files with 627 additions and 409 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ jobs:
name: Upload coverage results to Code Climate
command: |
yarn run codeclimate-test-reporter < coverage*/lcov.info
www_build:
<<: *defaults
environment:
Expand Down Expand Up @@ -195,7 +194,6 @@ jobs:
exit 1
esac
curl https://api.rollbar.com/api/1/sourcemap/download -F access_token="${ROLLBAR_KEY}" -F version="${APP_VERSION}" -F minified_url=$ASSET_HOST_URL/$SOURCE_MAP
ember_cordova_build:
<<: *defaults
environment:
Expand Down
31 changes: 17 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.417.0)
aws-sdk-core (3.111.2)
aws-partitions (1.429.0)
aws-sdk-core (3.112.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.41.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sdk-kms (1.42.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.87.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sdk-s3 (1.89.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.2)
Expand Down Expand Up @@ -83,9 +83,9 @@ GEM
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.2.1)
emoji_regex (3.2.2)
escape (0.0.4)
excon (0.78.1)
excon (0.79.0)
faraday (1.3.0)
faraday-net_http (~> 1.0)
multipart-post (>= 1.2, < 3)
Expand All @@ -96,8 +96,8 @@ GEM
faraday-net_http (1.0.1)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.1)
fastlane (2.172.0)
fastimage (2.2.3)
fastlane (2.176.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0)
Expand All @@ -121,6 +121,7 @@ GEM
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
naturally (~> 2.2)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
Expand All @@ -145,7 +146,7 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-apis-core (0.2.0)
google-apis-core (0.2.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.14)
httpclient (>= 2.8.1, < 3.0)
Expand All @@ -154,9 +155,10 @@ GEM
retriable (>= 2.0, < 4.0)
rexml
signet (~> 0.14)
webrick
google-apis-iamcredentials_v1 (0.1.0)
google-apis-core (~> 0.1)
google-apis-storage_v1 (0.1.0)
google-apis-storage_v1 (0.2.0)
google-apis-core (~> 0.1)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
Expand All @@ -172,7 +174,7 @@ GEM
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.14.0)
googleauth (0.15.1)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand Down Expand Up @@ -220,7 +222,7 @@ GEM
ruby2_keywords (0.0.4)
rubyzip (2.3.0)
security (0.1.3)
signet (0.14.0)
signet (0.14.1)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
Expand All @@ -247,6 +249,7 @@ GEM
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
webrick (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.19.0)
CFPropertyList (>= 2.3.3, < 4.0)
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ namespace :cordova do
if platform == 'android'
add_plugin('phonegap-plugin-push', '2.1.2')
elsif platform == 'ios'
add_plugin('phonegap-plugin-push', '1.9.2', { SENDER_ID: 'XXXXXXX' })
add_plugin('phonegap-plugin-push', '2.3.0', { SENDER_ID: 'XXXXXXX' })
end

log("Preparing app for #{platform}")
Expand Down
93 changes: 93 additions & 0 deletions app/components/camera-detect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import Ember from "ember";
import AjaxPromise from "stock/utils/ajax-promise";
import AsyncMixin, { ERROR_STRATEGIES } from "stock/mixins/async";

export default Ember.Component.extend(AsyncMixin, {
packageService: Ember.inject.service(),
store: Ember.inject.service(),
dataUri: null,

videoStream: "",
useFrontCamera: true,

constraints: {
video: {
width: {
min: 1280,
ideal: 1920,
max: 2560
},
height: {
min: 720,
ideal: 1080,
max: 1440
}
}
},

async initializeCamera() {
this.stopVideoStream();
const cameraType = this.get("useFrontCamera") ? "user" : "environment";
this.set("constraints.video.facingMode", cameraType);

const vStream = await navigator.mediaDevices.getUserMedia(
this.get("constraints")
);
this.set("videoStream", vStream);
this.set("video.srcObject", this.get("videoStream"));
},

stopVideoStream() {
const videoStream = this.get("videoStream");
if (videoStream) {
videoStream.getTracks().forEach(track => {
track.stop();
});
}
},

displayWebcam: Ember.computed.alias("packageService.openImageOverlay"),

didRender() {
if (this.get("packageService.openImageOverlay")) {
let video = this.element.children[0];
video.play();
this.set("video", video);
this.initializeCamera();
}
},

actions: {
snap() {
const canvas = document.getElementById("canvas");
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
canvas.getContext("2d").drawImage(video, 0, 0);
canvas.toDataURL("image/png");
this.send("didSnap", canvas.toDataURL("image/png"));
},

changeCamera() {
this.toggleProperty("useFrontCamera");
this.initializeCamera();
},

async didSnap(dataUri) {
this.set("packageService.openImageOverlay", false);
this.runTask(async () => {
const signature = await this.get("packageService").generateSignature();
signature.file = dataUri;
const image = await this.get("packageService").uploadToCloudinary(
signature
);
this.get("getImageCallback")(image);
this.stopVideoStream();
});
},

closeOverlay() {
this.stopVideoStream();
this.set("packageService.openImageOverlay", false);
}
}
});
48 changes: 0 additions & 48 deletions app/components/order-inline-number-input.js

This file was deleted.

85 changes: 0 additions & 85 deletions app/components/order-inline-textarea-input.js

This file was deleted.

Loading

0 comments on commit 28fede1

Please sign in to comment.