feat(app,viewer): WeChat card share + 'Share to...' label + site og tags
- 按钮文字「分享到微信/其他应用」→「分享到...」(用户需求) - 微信卡片分享(fluwx 6):WECHAT_APPID 经 --dart-define 注入;已配置且 装微信 → WXWebpage 卡片(标题=相册名、描述=日期·地点、缩略图=封面压缩 240px PNG ≤32KB、点击进观众链接);未配置/未装 → 回退系统分享面板 - viewer index.html 加站点级 og 标签(微信/QQ 抓取链接预览用;每相册动态 og 需服务端注入,登记后续增强) - 397/397 全绿、analyze 0 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:fluwx/fluwx.dart';
|
||||
|
||||
import 'app/app.dart';
|
||||
import 'app/locale_controller.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
// 微信 SDK(卡片分享):WECHAT_APPID 经 --dart-define 注入(微信开放平台
|
||||
// 注册的应用 ID);未配置(空)时跳过注册——分享回退系统分享面板。
|
||||
// Android 需保证打包签名与微信平台注册签名一致,否则拉不起微信。
|
||||
const wechatAppId = String.fromEnvironment('WECHAT_APPID');
|
||||
if (wechatAppId.isNotEmpty) {
|
||||
await Fluwx().registerApi(appId: wechatAppId, doOnIOS: false);
|
||||
}
|
||||
// 启动先读语言偏好再 runApp:首帧即正确语言(无「system 闪变」,
|
||||
// P3 Task 10)。读取失败由 readPersisted 内部兜底为 system。
|
||||
final localeChoice = await LocaleSettings.readPersisted();
|
||||
|
||||
Reference in New Issue
Block a user