diff --git a/android/app/build.gradle b/android/app/build.gradle index 8ac821d1..9b601606 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,7 +6,7 @@ android { applicationId "de.reedu.origaminext" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1 + versionCode 2 versionName "0.22" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/android/app/src/main/assets/capacitor.config.json b/android/app/src/main/assets/capacitor.config.json index ef5b7c98..9f665823 100644 --- a/android/app/src/main/assets/capacitor.config.json +++ b/android/app/src/main/assets/capacitor.config.json @@ -6,7 +6,8 @@ "webDir": "www", "server": { "iosScheme": "https", - "androidScheme": "https" + "androidScheme": "https", + "url": "http://192.168.0.87:8100" }, "ios": { "hideLogs": true diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index 909c3814..9ea09e42 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -29,6 +29,8 @@ 50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = SOURCE_ROOT; }; AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; }; AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = ""; }; + DCD0FED425A4915A00CE032C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = ""; }; + DCD0FED525A4915A00CE032C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/LaunchScreen.strings; sourceTree = ""; }; DCD30EDB2433A890007ABCBF /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = ""; }; FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -141,6 +143,7 @@ knownRegions = ( en, Base, + de, ); mainGroup = 504EC2FB1FED79650016851F; productRefGroup = 504EC3051FED79650016851F /* Products */; @@ -220,6 +223,7 @@ isa = PBXVariantGroup; children = ( 504EC30C1FED79650016851F /* Base */, + DCD0FED425A4915A00CE032C /* de */, ); name = Main.storyboard; sourceTree = ""; @@ -228,6 +232,7 @@ isa = PBXVariantGroup; children = ( 504EC3111FED79650016851F /* Base */, + DCD0FED525A4915A00CE032C /* de */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -287,7 +292,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -342,7 +347,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; diff --git a/ios/App/App/capacitor.config.json b/ios/App/App/capacitor.config.json index ef5b7c98..9f665823 100644 --- a/ios/App/App/capacitor.config.json +++ b/ios/App/App/capacitor.config.json @@ -6,7 +6,8 @@ "webDir": "www", "server": { "iosScheme": "https", - "androidScheme": "https" + "androidScheme": "https", + "url": "http://192.168.0.87:8100" }, "ios": { "hideLogs": true diff --git a/src/app/pages/create-game/create-info-modal/create-info-modal.component.html b/src/app/pages/create-game/create-info-modal/create-info-modal.component.html index 2fc94ac5..748197da 100644 --- a/src/app/pages/create-game/create-info-modal/create-info-modal.component.html +++ b/src/app/pages/create-game/create-info-modal/create-info-modal.component.html @@ -1,16 +1,17 @@ - + - Information + + Information - + @@ -18,7 +19,6 @@ - @@ -29,22 +29,31 @@
Informationstext
- +
Audiobotschaft
- +
Fotos und Grafiken
- +
Weitere Einstellungen
- - Kartenfeatures - + Kartenfeatures -
\ No newline at end of file + diff --git a/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.html b/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.html index d0f6be3d..2e8018cc 100644 --- a/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.html +++ b/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.html @@ -7,20 +7,47 @@
{{ config.label }} + - + - + - + + + + + + + - - - \ No newline at end of file +
+ + + + +
+ diff --git a/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.scss b/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.scss index b5ddeb09..438efca9 100644 --- a/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.scss +++ b/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.scss @@ -1,23 +1,28 @@ .preview { - position: relative; + position: relative; - > ion-spinner { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } + > ion-spinner { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } } ion-thumbnail { - --size: 150px !important; + --size: 150px !important; } .photo-wrapper { - display: flex; - align-items: center; + display: flex; + align-items: center; - img { - border-radius: 1rem; - } + img { + border-radius: 1rem; + } +} + +video { + width: auto; + max-height: 200px; } diff --git a/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.ts b/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.ts index b62393a8..982d38d0 100644 --- a/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.ts +++ b/src/app/pages/create-game/form-elements/photo-upload/photo-upload.component.ts @@ -13,10 +13,12 @@ import { Plugins, CameraResultType, CameraSource } from '@capacitor/core'; }) export class PhotoUploadComponent implements OnInit { @Input() photo: SafeResourceUrl = ''; + @Input() video: SafeResourceUrl = ''; @Input() taskType = ''; @Input() theme = 'secondary'; @Output() photoChange: EventEmitter = new EventEmitter(); + @Output() videoChange: EventEmitter = new EventEmitter(); uploading = false uploadingProgress = 100; @@ -37,6 +39,12 @@ export class PhotoUploadComponent implements OnInit { this.photoChange.emit(this.photo) } + deleteVideo() { + this.video = '' + this.changeRef.detectChanges(); + this.videoChange.emit(this.video) + } + async capturePhoto(library: boolean = false) { const cameraOptions = { quality: 50, @@ -76,6 +84,31 @@ export class PhotoUploadComponent implements OnInit { this.photoChange.emit(this.photo) } + async handleVideoInput(event) { + const videoFile: File = event.target.files[0]; + + const formData = new FormData(); + formData.append('file', videoFile); + + const options = { + method: 'POST', + body: formData + }; + + const postResponse = await fetch(`${environment.apiURL}/file/upload`, options) + + if (!postResponse.ok) { + throw Error('File upload failed') + } + this.uploading = false; + + const postResponseText = await postResponse.json() + const filename = postResponseText.filename + this.video = `${environment.apiURL}/file/video/${filename}` + this.changeRef.detectChanges(); + this.videoChange.emit(this.video) + } + async showPopover(ev: any, text: string) { const popover = await this.popoverController.create({ component: PopoverComponent, diff --git a/src/app/pages/create-game/form-elements/question-types/question-type.component.html b/src/app/pages/create-game/form-elements/question-types/question-type.component.html index 98060ff1..f99a3113 100644 --- a/src/app/pages/create-game/form-elements/question-types/question-type.component.html +++ b/src/app/pages/create-game/form-elements/question-types/question-type.component.html @@ -1,124 +1,275 @@
-
Aufgabenstellung - - -
- + *ngIf=" + question.type != questionTypeEnum.NAV_INSTRUCTION && + question.type != questionTypeEnum.NAV_INSTRUCTION_PHOTO + " +> +
+ Aufgabenstellung + + +
+
-
Navigationsanweisung - - -
- +
+ Navigationsanweisung + + +
+
-
Foto - -
- -
Navigationsanweisung - - -
- +
+ Foto + + +
+ +
+ Navigationsanweisung + + +
+
-
Audiobotschaft - - -
- +
+ Audiobotschaft + + +
+
-
Objektposition - - -
- +
+ Objektposition + + +
+
-
Kartenmarkierung - - -
- +
+ Kartenmarkierung + + +
+
-
Objektposition - - -
- +
+ Objektposition + + +
+
-
Foto des zu suchenden Objekts - - -
- -
Objektposition - - -
- +
+ Foto des zu suchenden Objekts + + +
+ +
+ Objektposition + + +
+
-
Gewünschte Blickrichtung - - -
- +
+ Gewünschte Blickrichtung + + +
+
-
Richtung auf der Karte - - -
- +
+ Richtung auf der Karte + + +
+
-
Foto der zu suchenden Richtung - - -
- -
Richtung auf der Karte - - -
- +
+ Foto der zu suchenden Richtung + + +
+ +
+ Richtung auf der Karte + + +
+
-
Foto zur Frage - - -
- -
\ No newline at end of file +
+ Foto zur Frage + + +
+ + diff --git a/src/app/pages/play-game/playing-game/playing-game.page.html b/src/app/pages/play-game/playing-game/playing-game.page.html index 1101d73c..038bad5a 100644 --- a/src/app/pages/play-game/playing-game/playing-game.page.html +++ b/src/app/pages/play-game/playing-game/playing-game.page.html @@ -1,13 +1,13 @@ - + {{ game.name }} - + @@ -17,53 +17,81 @@
-
+
- + - + - + - + - + - +
- - +
@@ -83,21 +111,40 @@  Info
- - - + + +
- -

Zum Ziel:
{{ Math.round(targetDistance) }} m

+ }" + /> +

Zum Ziel:
{{ Math.round(targetDistance) }} m

-
-
- +
+ - + + }" + />
-
+
+
-
- - +
+ +
- - -
+
-
-
+
+

{{item.value}}

- +
@@ -155,11 +239,15 @@ - +
-

@@ -170,14 +258,27 @@

- + - OK + OK - OK + OK