Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/LinwoodDev/Qeck into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
CodeDoctorDE committed Nov 13, 2024
2 parents 9becc11 + 412745e commit 7a3594f
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 119 deletions.
30 changes: 15 additions & 15 deletions app/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
revision: "603104015dd692ea3403755b55d07813d5cf8965"
channel: "stable"

project_type: app
Expand All @@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
- platform: android
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
- platform: ios
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
- platform: linux
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
- platform: macos
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
- platform: web
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
- platform: windows
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965

# User provided section

Expand Down
2 changes: 1 addition & 1 deletion app/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gradle-wrapper.jar
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
16 changes: 8 additions & 8 deletions app/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.996.0)
aws-sdk-core (3.211.0)
aws-partitions (1.1002.0)
aws-sdk-core (3.212.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.95.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.169.0)
aws-sdk-s3 (1.170.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand Down Expand Up @@ -154,14 +154,14 @@ GEM
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.4)
json (2.8.1)
jwt (2.9.3)
base64
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.1)
nanaimo (0.3.0)
nanaimo (0.4.0)
naturally (2.2.1)
nkf (0.2.0)
optparse (0.5.0)
Expand Down Expand Up @@ -201,12 +201,12 @@ GEM
uber (0.1.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.25.1)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
Expand All @@ -224,4 +224,4 @@ DEPENDENCIES
screengrab

BUNDLED WITH
2.5.21
2.5.23
11 changes: 8 additions & 3 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "dev.linwood.setonix"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
versionCode = flutter.versionCode
versionName = flutter.versionName
}


Expand Down
2 changes: 1 addition & 1 deletion app/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
Expand Down
4 changes: 2 additions & 2 deletions app/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.7.1' apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id "com.android.application" version '8.7.2' apply false
id "org.jetbrains.kotlin.android" version "2.0.21" apply false
}

include ":app"
175 changes: 96 additions & 79 deletions app/lib/pages/game/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ class GameDialogOverlay extends StatelessWidget {
);
}

final image = state.world.images[dialog.image];

final header = image == null ? null : Image.memory(image, height: 200);

final isMobile =
MediaQuery.of(context).size.width < LeapBreakpoints.medium;

return Stack(
children: [
GestureDetector(
Expand All @@ -57,89 +64,99 @@ class GameDialogOverlay extends StatelessWidget {
icon: const Icon(PhosphorIconsLight.x),
onPressed: () => submitValue(),
),
constraints:
const BoxConstraints(maxWidth: LeapBreakpoints.medium),
content: ListView.separated(
shrinkWrap: true,
itemCount: dialog.components.length + 1,
separatorBuilder: (context, index) =>
const SizedBox(height: 12),
itemBuilder: (context, cIndex) {
if (cIndex == 0) {
final image = state.world.images[dialog.image];
return Column(
children: [
if (image != null) Image.memory(image, height: 200),
Card.filled(
child: Padding(
padding: const EdgeInsets.all(12),
child: Row(
children: [
Icon(PhosphorIconsLight.warning),
const SizedBox(width: 12),
Expanded(
child: Text(
AppLocalizations.of(context)
.thirdPartyContent,
style: Theme.of(context)
.textTheme
.bodyMedium,
constraints: BoxConstraints(
maxWidth: header == null
? LeapBreakpoints.medium
: LeapBreakpoints.expanded),
content: Row(
children: [
if (!isMobile && header != null) Expanded(child: header),
Expanded(
child: ListView.separated(
shrinkWrap: true,
itemCount: dialog.components.length + 1,
separatorBuilder: (context, index) =>
const SizedBox(height: 12),
itemBuilder: (context, cIndex) {
if (cIndex == 0) {
return Column(
children: [
if (isMobile && header != null) header,
Card.filled(
child: Padding(
padding: const EdgeInsets.all(12),
child: Row(
children: [
Icon(PhosphorIconsLight.warning),
const SizedBox(width: 12),
Expanded(
child: Text(
AppLocalizations.of(context)
.thirdPartyContent,
style: Theme.of(context)
.textTheme
.bodyMedium,
),
),
],
),
),
],
),
),
),
],
);
}
cIndex--;
final component = dialog.components[cIndex];
switch (component) {
case GameDialogMarkdownComponent():
return MarkdownBody(
extensionSet: md.ExtensionSet(
md.ExtensionSet.gitHubWeb.blockSyntaxes,
<md.InlineSyntax>[
md.EmojiSyntax(),
...md.ExtensionSet.gitHubWeb.inlineSyntaxes
],
),
data: component.content,
);
case GameDialogTextFieldComponent():
final multiline =
component.multiline && !component.password;
final initialValue =
value.getValue(component.idOrLabel).getAsString();
void updateComponent(
String text,
) =>
updateValue(
value.copyWith.values.put(
component.idOrLabel,
GameDialogTextFieldValue(
value: text,
component: cIndex,
),
),
],
);
updateComponent(initialValue);
return TextFormField(
decoration: InputDecoration(
labelText: component.label,
hintText: component.placeholder,
filled: !multiline,
border:
multiline ? const OutlineInputBorder() : null,
),
maxLines: multiline ? null : 1,
obscureText: component.password,
initialValue: initialValue,
onChanged: updateComponent,
);
}
}),
}
cIndex--;
final component = dialog.components[cIndex];
switch (component) {
case GameDialogMarkdownComponent():
return MarkdownBody(
extensionSet: md.ExtensionSet(
md.ExtensionSet.gitHubWeb.blockSyntaxes,
<md.InlineSyntax>[
md.EmojiSyntax(),
...md.ExtensionSet.gitHubWeb.inlineSyntaxes
],
),
data: component.content,
);
case GameDialogTextFieldComponent():
final multiline =
component.multiline && !component.password;
final initialValue = value
.getValue(component.idOrLabel)
.getAsString();
void updateComponent(
String text,
) =>
updateValue(
value.copyWith.values.put(
component.idOrLabel,
GameDialogTextFieldValue(
value: text,
component: cIndex,
),
),
);
updateComponent(initialValue);
return TextFormField(
decoration: InputDecoration(
labelText: component.label,
hintText: component.placeholder,
filled: !multiline,
border: multiline
? const OutlineInputBorder()
: null,
),
maxLines: multiline ? null : 1,
obscureText: component.password,
initialValue: initialValue,
onChanged: updateComponent,
);
}
}),
),
],
),
actions: [
TextButton(
onPressed: () {
Expand Down
6 changes: 0 additions & 6 deletions app/lib/pages/home/header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:material_leap/material_leap.dart';
import 'package:phosphor_flutter/phosphor_flutter.dart';
import 'package:setonix/api/open.dart';
import 'package:setonix/api/settings.dart';
import 'package:setonix/bloc/settings.dart';

class HeaderHomeView extends StatefulWidget {
Expand Down Expand Up @@ -46,11 +45,6 @@ class _HeaderHomeViewState extends State<HeaderHomeView> {
icon: const PhosphorIcon(PhosphorIconsLight.bookOpen),
label: Text(AppLocalizations.of(context).documentation),
),
IconButton(
onPressed: () => openSettings(context),
icon: const PhosphorIcon(PhosphorIconsLight.gear),
tooltip: AppLocalizations.of(context).settings,
),
],
);
final style = FilledButton.styleFrom(
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"sharp": "^0.33.5",
"typescript": "^5.6.3"
},
"packageManager": "pnpm@9.12.3",
"packageManager": "pnpm@9.13.0",
"devDependencies": {
"sass": "^1.80.7"
}
Expand Down
3 changes: 2 additions & 1 deletion metadata/en-US/changelogs/3.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* Add protection to cells if they are hidden
* Add image to dialog ([#40](https://github.com/LinwoodDev/Setonix/issues/40))
* Use hash of archive for signature
* Add dialog image support ([#40](https://github.com/LinwoodDev/Setonix/issues/40))
* Fix multiple settings button on home page
* Make build reproducable

Read more here: https://linwood.dev/setonix/0.1.2
Loading

0 comments on commit 7a3594f

Please sign in to comment.