diff --git a/.github/workflows/code_check.yml b/.github/workflows/code_check.yml index 06a3775..9c229cc 100644 --- a/.github/workflows/code_check.yml +++ b/.github/workflows/code_check.yml @@ -15,6 +15,7 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' + flutter-version-file: 'pubspec.yaml' - run: flutter --version - name: Install dependencies diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index c362e9a..3435849 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -11,9 +11,13 @@ "@pageViews": { "description": "Page views card title and label" }, - "uniques": "Uniques", - "@uniques": { - "description": "Uniques" + "visitors": "Visitors", + "@visitors": { + "description": "Unique visitors" + }, + "visits": "Visits", + "@visitors": { + "description": "Unique sessions" }, "bounces": "Bounces", "@bounces": { diff --git a/lib/models/api/stats.dart b/lib/models/api/stats.dart index 5b4923f..cbd7ca0 100644 --- a/lib/models/api/stats.dart +++ b/lib/models/api/stats.dart @@ -1,16 +1,19 @@ import 'package:halfdot/models/api/common.dart'; class StatsResponse implements ApiModel { - StatsResponse(this.pageViews, this.uniques, this.bounces, this.totalTime); + StatsResponse( + this.pageViews, this.visits, this.visitors, this.bounces, this.totalTime); StatsResponse.fromJson(Map json) : pageViews = json['pageviews']['value'], - uniques = json['uniques']['value'], + visits = json['visits']['value'], + visitors = json['visitors']['value'], bounces = json['bounces']['value'], totalTime = json['totaltime']['value']; final int pageViews; - final int uniques; + final int visits; + final int visitors; final int bounces; final int totalTime; } diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart index 74ed571..924a1ee 100644 --- a/lib/screens/settings.dart +++ b/lib/screens/settings.dart @@ -17,7 +17,7 @@ class SettingsPage extends StatefulWidget { class _SettingsPageState extends State { Storage storage = Storage.instance; - static const String _apiVersion = '2.7.0'; + static const String _apiVersion = '2.11.3'; static const String _repoUrl = 'https://github.com/davquar/halfdot'; static const String _license = 'MIT'; static const String _licenseUrl = diff --git a/lib/screens/website_statistics.dart b/lib/screens/website_statistics.dart index 58ac7ea..9f6d516 100644 --- a/lib/screens/website_statistics.dart +++ b/lib/screens/website_statistics.dart @@ -117,12 +117,22 @@ class _WebsiteStatisticsPageState extends State { ), Column(children: [ Text( - snapshot.data!.uniques.toString(), + snapshot.data!.visits.toString(), style: Theme.of(context) .textTheme .titleLarge, ), - Text(AppLocalizations.of(context)!.uniques), + Text(AppLocalizations.of(context)!.visits), + ]), + Column(children: [ + Text( + snapshot.data!.visitors.toString(), + style: Theme.of(context) + .textTheme + .titleLarge, + ), + Text( + AppLocalizations.of(context)!.visitors), ]), Column( children: [ diff --git a/pubspec.lock b/pubspec.lock index d256b5d..93566ab 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -572,4 +572,4 @@ packages: version: "3.1.2" sdks: dart: ">=3.1.0 <=3.1.2" - flutter: ">=3.13.0" + flutter: ">=3.13.3" diff --git a/pubspec.yaml b/pubspec.yaml index bebf820..6fff128 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,10 +17,11 @@ 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: 2.1.1+7 +version: 2.1.2+8 environment: sdk: '>=3.0.0 <=3.1.2' + flutter: '3.13.3' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions