Skip to content

Commit

Permalink
Web 端增加 App 下载菜单,社交媒体链接更新
Browse files Browse the repository at this point in the history
  • Loading branch information
mylxsw committed Dec 20, 2023
1 parent 9d3efb7 commit 7b39254
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
23 changes: 17 additions & 6 deletions lib/page/component/social_icon.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:askaide/helper/env.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart';
Expand All @@ -19,12 +20,22 @@ class SocialIconGroup extends StatelessWidget {
final bool isSettingTiles;

final List<SocialItem> items = [
SocialItem(
image: 'assets/app-256-transparent.png',
name: '官方网站',
onTap: () {
launchUrlString(
'https://ai.aicode.cc/social/home',
mode: LaunchMode.externalApplication,
);
},
),
SocialItem(
image: 'assets/weibo.png',
name: '官方微博',
name: '新浪微博',
onTap: () {
launchUrlString(
'https://weibo.com/code404',
'https://ai.aicode.cc/social/weibo',
mode: LaunchMode.externalApplication,
);
},
Expand All @@ -34,7 +45,7 @@ class SocialIconGroup extends StatelessWidget {
name: '微信公众号',
onTap: () {
launchUrlString(
'https://mp.weixin.qq.com/s/4CHh_rKxBqi-npDEnmLWmA',
'https://ai.aicode.cc/social/wechat-platform',
mode: LaunchMode.externalApplication,
);
},
Expand All @@ -44,7 +55,7 @@ class SocialIconGroup extends StatelessWidget {
name: 'Twitter(X)',
onTap: () {
launchUrlString(
'https://twitter.com/mylxsw',
'https://ai.aicode.cc/social/x',
mode: LaunchMode.externalApplication,
);
},
Expand All @@ -54,7 +65,7 @@ class SocialIconGroup extends StatelessWidget {
name: 'Github',
onTap: () {
launchUrlString(
'http://github.com/mylxsw/aidea',
'https://ai.aicode.cc/social/github',
mode: LaunchMode.externalApplication,
);
},
Expand All @@ -64,7 +75,7 @@ class SocialIconGroup extends StatelessWidget {
name: '小红书',
onTap: () {
launchUrlString(
'https://www.xiaohongshu.com/user/profile/63c65968000000002702abcd?xhsshare=CopyLink&appuid=63c65968000000002702abcd&apptime=1696648278',
'https://ai.aicode.cc/social/xiaohongshu',
mode: LaunchMode.externalApplication,
);
},
Expand Down
16 changes: 16 additions & 0 deletions lib/page/setting/setting_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@ class _SettingScreenState extends State<SettingScreen> {
SettingsSection(
title: Text(AppLocale.systemInfo.getString(context)),
tiles: [
// 只有 Web 端才展示 App 下载
if (PlatformTool.isWeb())
SettingsTile(
title: const Text('APP 下载'),
trailing: Icon(
Icons.download,
size: MediaQuery.of(context).textScaleFactor * 18,
color: Colors.grey,
),
onPressed: (context) {
launchUrlString(
'https://aidea.aicode.cc',
mode: LaunchMode.externalApplication,
);
},
),
// 服务状态
if (Ability().serviceStatusPage != '')
SettingsTile(
Expand Down

0 comments on commit 7b39254

Please sign in to comment.