From 14de673c0c56da84dbf2d0e7885db1241e524e72 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Jul 2024 00:32:28 +0100 Subject: [PATCH] meetup 7/18/2024 --- .github/workflows/release.yaml | 14 ------- capture/App.tsx | 69 +++++++++++++++++++++++++++++++- capture/package-lock.json | 72 +++++++++++++++++++++++++++++++++- capture/package.json | 1 + 4 files changed, 138 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3629100..27bed76 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,10 +32,6 @@ jobs: --paths "$env:GITHUB_WORKSPACE\controller" ` "manage.py" - - name: List/print files in dist folder - run: | - Get-ChildItem -Path dist -Recurse - - name: Copy additional files run: | Copy-Item -Path "sample.env" -Destination "dist\manage\sample.env" @@ -47,18 +43,8 @@ jobs: run: | cd dist Compress-Archive -Path manage -DestinationPath manage-windows.zip - Write-Host "Current Directory: $(Get-Location)" - Get-ChildItem -Path manage-windows.zip Move-Item -Path manage-windows.zip -Destination $env:GITHUB_WORKSPACE - Write-Host "Files in $env:GITHUB_WORKSPACE:" - Get-ChildItem -Path $env:GITHUB_WORKSPACE - - name: Verify current directory and contents - run: | - Write-Host "Current Directory: $(Get-Location)" - Get-ChildItem -Path $env:GITHUB_WORKSPACE - - - name: Upload artifact uses: actions/upload-artifact@v4 with: diff --git a/capture/App.tsx b/capture/App.tsx index 5b21029..1660dc9 100644 --- a/capture/App.tsx +++ b/capture/App.tsx @@ -1,11 +1,14 @@ import React, { useState } from 'react'; -import { TextInput, View, Text, TouchableOpacity, StyleSheet, PermissionsAndroid, Platform } from 'react-native'; +import { TextInput, View, Text, TouchableOpacity, StyleSheet, PermissionsAndroid, Platform, Modal } from 'react-native'; import RNFS from 'react-native-fs'; import { launchCamera, CameraOptions } from 'react-native-image-picker'; import { request, PERMISSIONS, RESULTS } from 'react-native-permissions'; +import { Calendar, DateData } from 'react-native-calendars'; const App = () => { const [inputText, setInputText] = useState(''); + const [isCalendarVisible, setIsCalendarVisible] = useState(false); + const [selectedDate, setSelectedDate] = useState(''); const requestPermissions = async () => { if (Platform.OS === 'android') { @@ -28,7 +31,6 @@ const App = () => { console.warn(err); } } else { - // iOS Permissions const cameraPermission = await request(PERMISSIONS.IOS.CAMERA); const storagePermission = await request(PERMISSIONS.IOS.PHOTO_LIBRARY); if (cameraPermission !== RESULTS.GRANTED || storagePermission !== RESULTS.GRANTED) { @@ -71,6 +73,18 @@ const App = () => { } }; + const schedulePost = () => { + setIsCalendarVisible(true); + }; + + + + const onDayPress = (day: DateData) => { + setSelectedDate(day.dateString); + setIsCalendarVisible(false); + console.log('Selected date: ', day.dateString); + }; + return ( Social media scheduler @@ -86,17 +100,62 @@ const App = () => { + + + SCHEDULE + + + + +{/* Full screen Modal */} + setIsCalendarVisible(false)} +> + + + + + + ); }; const styles = StyleSheet.create({ + fullScreenModal: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: 'rgba(0,0,0,0.5)', + }, + calendarContainer: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + }, container: { flex: 1, justifyContent: 'center', @@ -131,6 +190,12 @@ const styles = StyleSheet.create({ padding: 10, color: 'white', }, + modalContainer: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: 'rgba(0,0,0,0.5)', + }, }); export default App; diff --git a/capture/package-lock.json b/capture/package-lock.json index e477acf..493fd75 100644 --- a/capture/package-lock.json +++ b/capture/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "react": "18.2.0", "react-native": "0.74.1", + "react-native-calendars": "^1.1305.0", "react-native-camera": "^4.2.1", "react-native-fs": "^2.20.0", "react-native-permissions": "^4.1.5" @@ -7889,6 +7890,19 @@ "node": ">= 8" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -10448,8 +10462,7 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -11201,6 +11214,15 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "optional": true, + "engines": { + "node": "*" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -12052,6 +12074,23 @@ } } }, + "node_modules/react-native-calendars": { + "version": "1.1305.0", + "resolved": "https://registry.npmjs.org/react-native-calendars/-/react-native-calendars-1.1305.0.tgz", + "integrity": "sha512-KcT7fhDo8Tx2vx2q6RtyYGHRgKp2siY183czD95U+swytT6m1HAWEX5bZFpl/c4oih0IamAB0qoGOMJCWkYweQ==", + "dependencies": { + "hoist-non-react-statics": "^3.3.1", + "lodash": "^4.17.15", + "memoize-one": "^5.2.1", + "prop-types": "^15.5.10", + "react-native-swipe-gestures": "^1.0.5", + "recyclerlistview": "^4.0.0", + "xdate": "^0.8.0" + }, + "optionalDependencies": { + "moment": "^2.29.4" + } + }, "node_modules/react-native-camera": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/react-native-camera/-/react-native-camera-4.2.1.tgz", @@ -12103,6 +12142,11 @@ } } }, + "node_modules/react-native-swipe-gestures": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.5.tgz", + "integrity": "sha512-Ns7Bn9H/Tyw278+5SQx9oAblDZ7JixyzeOczcBK8dipQk2pD7Djkcfnf1nB/8RErAmMLL9iXgW0QHqiII8AhKw==" + }, "node_modules/react-native/node_modules/@jest/types": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", @@ -12297,6 +12341,20 @@ "node": ">= 4" } }, + "node_modules/recyclerlistview": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/recyclerlistview/-/recyclerlistview-4.2.1.tgz", + "integrity": "sha512-NtVYjofwgUCt1rEsTp6jHQg/47TWjnO92TU2kTVgJ9wsc/ely4HnizHHa+f/dI7qaw4+zcSogElrLjhMltN2/g==", + "dependencies": { + "lodash.debounce": "4.0.8", + "prop-types": "15.8.1", + "ts-object-utils": "0.0.5" + }, + "peerDependencies": { + "react": ">= 15.2.1", + "react-native": ">= 0.30.0" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", @@ -13287,6 +13345,11 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-object-utils": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/ts-object-utils/-/ts-object-utils-0.0.5.tgz", + "integrity": "sha512-iV0GvHqOmilbIKJsfyfJY9/dNHCs969z3so90dQWsO1eMMozvTpnB1MEaUbb3FYtZTGjv5sIy/xmslEz0Rg2TA==" + }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -13812,6 +13875,11 @@ } } }, + "node_modules/xdate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/xdate/-/xdate-0.8.2.tgz", + "integrity": "sha512-sNBlLfOC8S3V0vLDEUianQOXcTsc9j4lfeKU/klHe0RjHAYn0CXsSttumTot8dzalboV8gZbH38B+WcCIBjhFQ==" + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/capture/package.json b/capture/package.json index 04cb08c..d9eada4 100644 --- a/capture/package.json +++ b/capture/package.json @@ -12,6 +12,7 @@ "dependencies": { "react": "18.2.0", "react-native": "0.74.1", + "react-native-calendars": "^1.1305.0", "react-native-camera": "^4.2.1", "react-native-fs": "^2.20.0", "react-native-permissions": "^4.1.5"