added help screen

This commit is contained in:
Matic Ivešić 2026-02-08 20:51:13 +01:00
parent 7c47298cd7
commit c2ca8b59a3
7 changed files with 93 additions and 16 deletions

View File

@ -1,3 +1,12 @@
import java.util.Properties
import java.io.FileInputStream
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
plugins {
id("com.android.application")
id("kotlin-android")
@ -6,7 +15,7 @@ plugins {
}
android {
namespace = "com.example.quick_ssh"
namespace = "com.moxibit.quick_ssh"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
@ -21,7 +30,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.quick_ssh"
applicationId = "com.moxibit.quick_ssh"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
@ -30,11 +39,18 @@ android {
versionName = flutter.versionName
}
signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = keystoreProperties["storeFile"]?.let { file(it as String) }
storePassword = keystoreProperties["storePassword"] as String
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
signingConfig = signingConfigs.getByName("release")
}
}
}

View File

@ -2,6 +2,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<application
android:label="QuickSSH"

View File

@ -1,4 +1,4 @@
package com.example.quick_ssh
package com.moxibit.quick_ssh
import io.flutter.embedding.android.FlutterFragmentActivity

45
lib/screens/help.dart Normal file
View File

@ -0,0 +1,45 @@
import 'package:flutter/material.dart';
class HelpScreen extends StatelessWidget {
const HelpScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Help')),
body: ListView(
padding: const EdgeInsets.all(16),
children: [
_buildSectionTitle('Adding command'),
_buildContent(
'Click the bottom right + button to add a new command.',
),
_buildContent(
'Enter the command name, host IP, username and the actual command to execute.',
),
const SizedBox(height: 24),
_buildSectionTitle('Editing command'),
_buildContent('Hold the command you want to edit.'),
_buildContent('Change and update the data.'),
const SizedBox(height: 24),
_buildSectionTitle('Executing command'),
_buildContent('Double tap the command you want to execute.'),
],
),
);
}
Widget _buildSectionTitle(String title) {
return Text(
title,
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
);
}
Widget _buildContent(String text) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: Text(text),
);
}
}

View File

@ -8,6 +8,7 @@ import 'package:QuickSSH/screens/settings.dart';
import 'package:flutter/services.dart';
import 'package:QuickSSH/main.dart';
import 'package:QuickSSH/widgets/ad_banner.dart';
import 'package:QuickSSH/screens/help.dart';
class HomeScreen extends StatefulWidget {
const HomeScreen({super.key});
@ -75,8 +76,12 @@ class _HomeScreenState extends State<HomeScreen> {
),
),
),
ListTile(
title: Text(
InkWell(
borderRadius: BorderRadius.circular(16),
onTap: _openHelp,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Help",
style: TextStyle(
color: theme.onSurface,
@ -85,6 +90,7 @@ class _HomeScreenState extends State<HomeScreen> {
),
),
),
),
],
),
),
@ -169,4 +175,13 @@ class _HomeScreenState extends State<HomeScreen> {
setState(() {});
});
}
_openHelp() {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => HelpScreen()),
).then((_) {
setState(() {});
});
}
}

View File

@ -12,7 +12,6 @@ class MyBannerAd extends StatefulWidget {
class _MyBannerAdState extends State<MyBannerAd> {
BannerAd? _bannerAd;
bool _isLoaded = false;
bool _isInitializing = false;
@override
void initState() {
@ -24,7 +23,8 @@ class _MyBannerAdState extends State<MyBannerAd> {
void _loadAd() async {
_bannerAd = BannerAd(
adUnitId: 'ca-app-pub-2626773788355001/7557216229',
adUnitId:
'ca-app-pub-2626773788355001/7557216229', //adUnitId: 'ca-app-pub-2626773788355001/7557216229',
request: const AdRequest(),
size: AdSize.banner,
listener: BannerAdListener(

View File

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
version: 1.0.3+3
environment:
sdk: ^3.9.2