feat: add manual and changelog url.
This commit is contained in:
+8
-3
@@ -3,7 +3,10 @@ class Apis {
|
|||||||
static const apiHost = 'home.debuggerx.com';
|
static const apiHost = 'home.debuggerx.com';
|
||||||
static const apiPort = 30000;
|
static const apiPort = 30000;
|
||||||
|
|
||||||
static const appNewVersionUrl = 'https://www.debuggerx.com';
|
static const appNewVersionUrl = 'https://www.debuggerx.com/2022/01/21/dgm-changelog?from=app';
|
||||||
|
|
||||||
|
static appManualUrl(bool isWeb) =>
|
||||||
|
'https://www.debuggerx.com/2022/01/21/dgm-manual?from=app_${isWeb ? 'web' : 'linux'}';
|
||||||
|
|
||||||
static final system = SystemApis();
|
static final system = SystemApis();
|
||||||
static final auth = AuthApis();
|
static final auth = AuthApis();
|
||||||
@@ -35,11 +38,13 @@ class SchemeApis {
|
|||||||
|
|
||||||
String user({required StringParam type}) => [path, 'user', type].joinPath();
|
String user({required StringParam type}) => [path, 'user', type].joinPath();
|
||||||
|
|
||||||
String market({required StringParam type, required IntParam page, required IntParam pageSize}) => [path, 'market', type, page, pageSize].joinPath();
|
String market({required StringParam type, required IntParam page, required IntParam pageSize}) =>
|
||||||
|
[path, 'market', type, page, pageSize].joinPath();
|
||||||
|
|
||||||
String download({required StringParam schemeId}) => [path, 'download', schemeId].joinPath();
|
String download({required StringParam schemeId}) => [path, 'download', schemeId].joinPath();
|
||||||
|
|
||||||
String like({required StringParam schemeId, required StringParam isLike}) => [path, 'like', schemeId, isLike].joinPath();
|
String like({required StringParam schemeId, required StringParam isLike}) =>
|
||||||
|
[path, 'like', schemeId, isLike].joinPath();
|
||||||
|
|
||||||
String get userLikes => [path, 'user-likes'].joinPath();
|
String get userLikes => [path, 'user-likes'].joinPath();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
import 'package:dde_gesture_manager/extensions.dart';
|
import 'package:dde_gesture_manager/extensions.dart';
|
||||||
|
import 'package:dde_gesture_manager_api/apis.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
class HelpButton extends StatelessWidget {
|
class HelpButton extends StatelessWidget {
|
||||||
const HelpButton({Key? key}) : super(key: key);
|
const HelpButton({Key? key}) : super(key: key);
|
||||||
@@ -7,7 +10,11 @@ class HelpButton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {},
|
onTap: () async {
|
||||||
|
if (await canLaunch(Apis.appManualUrl(kIsWeb))) {
|
||||||
|
await launch(Apis.appManualUrl(kIsWeb));
|
||||||
|
}
|
||||||
|
},
|
||||||
child: MouseRegion(
|
child: MouseRegion(
|
||||||
cursor: SystemMouseCursors.click,
|
cursor: SystemMouseCursors.click,
|
||||||
child: Tooltip(
|
child: Tooltip(
|
||||||
|
|||||||
Reference in New Issue
Block a user