Skip to content

Commit

Permalink
Merge pull request #2 from jonathonklem/v1.5
Browse files Browse the repository at this point in the history
V1.5
  • Loading branch information
jonathonklem authored Feb 12, 2024
2 parents 569c5b8 + 0da538a commit b72bb79
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.jonathonklem.rangecompanion"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2
versionName "1.1"
versionCode 3
versionName "1.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
10 changes: 6 additions & 4 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,13 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 4;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Range Companion";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 1.5;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.jonathonklem.rangecompanion;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -367,13 +368,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = NW8CKYYKZY;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Range Companion";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 1.5;
PRODUCT_BUNDLE_IDENTIFIER = com.jonathonklem.rangecompanion;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
Expand Down
2 changes: 1 addition & 1 deletion ios/App/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def capacitor_pods
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
end

target 'App' do
target 'Range Companion' do
capacitor_pods
# Add your Pods here
end
Expand Down
14 changes: 11 additions & 3 deletions src/pages/beeper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ const Beeper = () => {
useEffect(() => {
audio.load();
}, []);

useEffect(() => {
if (minRandomPause > maxRandomPause) {
const temp = maxRandomPause;
setMaxRandomPause(minRandomPause);
setMinRandomPause(temp);
}
}, [maxRandomPause, minRandomPause])

const startTimer = () => {
const randomPause = Math.round((Math.random() * (maxRandomPause - minRandomPause) + minRandomPause)*1000)/1000;
Expand Down Expand Up @@ -54,15 +62,15 @@ const Beeper = () => {
<form className="w-5/6 mx-auto">
<label className="block my-2 mx-auto">
<div className="block text-sm font-extralight tracking-wider">Max Random Pause</div>
<div className="block w-full p-2 mx-auto"><input type="number" step=".01" value={maxRandomPause} onChange={(e) => setMaxRandomPause(Number(e.target.value))} name="max_random_pause" /></div>
<div className="block w-full p-2 mx-auto"><input type="number" step=".01" value={maxRandomPause ? maxRandomPause : ''} onChange={(e) => setMaxRandomPause(Number(e.target.value))} name="max_random_pause" /></div>
</label>
<label className="block my-2 mx-auto">
<div className="block text-sm font-extralight tracking-wider">Min Random Pause</div>
<div className="block w-full p-2 mx-auto"><input type="number" step=".01" value={minRandomPause} onChange={(e) => setMinRandomPause(Number(e.target.value))} name="min_random_pause" /></div>
<div className="block w-full p-2 mx-auto"><input type="number" step=".01" value={minRandomPause ? minRandomPause : '' } onChange={(e) => setMinRandomPause(Number(e.target.value))} name="min_random_pause" /></div>
</label>
<label className="block my-2 mx-auto">
<div className="block text-sm font-extralight tracking-wider">Par Time (leave blank for none)</div>
<div className="block w-full p-2 mx-auto"><input type="number" step=".01" value={parTime} onChange={(e) => setParTime(Number(e.target.value))} name="par_time" /></div>
<div className="block w-full p-2 mx-auto"><input type="number" step=".01" value={parTime ? parTime : ''} onChange={(e) => setParTime(Number(e.target.value))} name="par_time" /></div>
</label>
</form>
<button onClick={startTimer} className="rounded-3xl tracking-wider text-lg bg-redbg drop-shadow-lg text-white py-2 px-4 w-1/4 block mx-auto text-center mt-4">Beep</button>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/moa_calculator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ const MoaCalculator = () => {
<form className="w-5/6 mx-auto">
<label className="block my-2 mx-auto">
<div className="block text-sm font-extralight tracking-wider">Range</div>
<div className="block w-full p-2 mx-auto"><input type="number" step=".0001" value={range} onChange={(e) => setRange(Number(e.target.value))} name="range" /></div>
<div className="block w-full p-2 mx-auto"><input type="number" step=".0001" value={range ? range : ''} onChange={(e) => setRange(Number(e.target.value))} name="range" /></div>
<div className="block w-full p-2 mx-auto"><select value={rangeUnit} onChange={(e) => {setRangeUnit(Number(e.target.value))}}><option value="914.4">Yards</option><option value="304.8">Feet</option><option value="1000">Meters</option></select></div>
</label>
<label className="block my-2 mx-auto">
<div className="block text-sm font-extralight tracking-wider">Length</div>
<div className="block w-full p-2 w-1/2 mx-auto"><input value={length} onChange={(e) => setLength(Number(e.target.value))} type="number" step=".0001" name="length" /></div>
<div className="block w-full p-2 w-1/2 mx-auto"><input value={length ? length : '' } onChange={(e) => setLength(Number(e.target.value))} type="number" step=".0001" name="length" /></div>
<div className="block w-full p-2 mx-auto"><select value={lengthUnit} onChange={(e) => {setLengthUnit(Number(e.target.value))}}><option value="25.4">Inches</option><option value="10">CM</option><option value="1">MM</option></select></div>
</label>
<label className="block my-2 mx-auto">
<div className="block text-sm font-extralight tracking-wider">MOA</div>
<div className="block w-full p-2 w-1/2 mx-auto"><input value={moa} onChange={(e) => setMoa(Number(e.target.value))} type="number" step=".0001" name="moa" /></div>
<div className="block w-full p-2 w-1/2 mx-auto"><input value={moa ? moa : '' } onChange={(e) => setMoa(Number(e.target.value))} type="number" step=".0001" name="moa" /></div>
<div className="block w-full p-2 mx-auto"><select value={moaUnit} onChange={(e) => {setMoaUnit(Number(e.target.value))}}><option value="25.4">Inches</option><option value="10">CM</option><option value="1">MM</option></select></div>
</label>
<div className="text-center">
Expand Down

0 comments on commit b72bb79

Please sign in to comment.