feat: add permission-denied dialog for macOS network/mic access
When macOS denies network access (PermissionDenied), show a localized dialog explaining how to grant permission in System Settings, with an 'Open System Settings' button that opens directly to the Local Network privacy pane. Also adds author info (Edison Jwa) to About dialog and moves diagnostics button from AppBar into About dialog.
This commit is contained in:
@@ -181,6 +181,12 @@ abstract class AppL10n {
|
||||
/// **'Version {version}'**
|
||||
String aboutVersion(String version);
|
||||
|
||||
/// No description provided for @aboutAuthor.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Author: Edison Jwa'**
|
||||
String get aboutAuthor;
|
||||
|
||||
/// No description provided for @aboutNonAffiliation.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -684,6 +690,42 @@ abstract class AppL10n {
|
||||
/// In en, this message translates to:
|
||||
/// **'Could not join channel: {message}'**
|
||||
String channelJoinFailedGeneric(String message);
|
||||
|
||||
/// No description provided for @networkPermissionTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Network Permission Required'**
|
||||
String get networkPermissionTitle;
|
||||
|
||||
/// No description provided for @networkPermissionBody.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Chanora needs permission to access the network. On macOS, go to System Settings → Privacy & Security → Local Network and enable Chanora, then try again.'**
|
||||
String get networkPermissionBody;
|
||||
|
||||
/// No description provided for @networkPermissionOpenSettings.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Open System Settings'**
|
||||
String get networkPermissionOpenSettings;
|
||||
|
||||
/// No description provided for @microphonePermissionTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Microphone Permission Required'**
|
||||
String get microphonePermissionTitle;
|
||||
|
||||
/// No description provided for @microphonePermissionBody.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Chanora needs permission to access the microphone. On macOS, go to System Settings → Privacy & Security → Microphone and enable Chanora.'**
|
||||
String get microphonePermissionBody;
|
||||
|
||||
/// No description provided for @permissionDenied.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Permission Denied'**
|
||||
String get permissionDenied;
|
||||
}
|
||||
|
||||
class _AppL10nDelegate extends LocalizationsDelegate<AppL10n> {
|
||||
|
||||
@@ -54,6 +54,9 @@ class AppL10nEn extends AppL10n {
|
||||
return 'Version $version';
|
||||
}
|
||||
|
||||
@override
|
||||
String get aboutAuthor => 'Author: Edison Jwa';
|
||||
|
||||
@override
|
||||
String get aboutNonAffiliation =>
|
||||
'Chanora is independent and is not affiliated with, endorsed by, sponsored by, or officially associated with TeamSpeak.';
|
||||
@@ -339,4 +342,24 @@ class AppL10nEn extends AppL10n {
|
||||
String channelJoinFailedGeneric(String message) {
|
||||
return 'Could not join channel: $message';
|
||||
}
|
||||
|
||||
@override
|
||||
String get networkPermissionTitle => 'Network Permission Required';
|
||||
|
||||
@override
|
||||
String get networkPermissionBody =>
|
||||
'Chanora needs permission to access the network. On macOS, go to System Settings → Privacy & Security → Local Network and enable Chanora, then try again.';
|
||||
|
||||
@override
|
||||
String get networkPermissionOpenSettings => 'Open System Settings';
|
||||
|
||||
@override
|
||||
String get microphonePermissionTitle => 'Microphone Permission Required';
|
||||
|
||||
@override
|
||||
String get microphonePermissionBody =>
|
||||
'Chanora needs permission to access the microphone. On macOS, go to System Settings → Privacy & Security → Microphone and enable Chanora.';
|
||||
|
||||
@override
|
||||
String get permissionDenied => 'Permission Denied';
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ class AppL10nZh extends AppL10n {
|
||||
return '版本 $version';
|
||||
}
|
||||
|
||||
@override
|
||||
String get aboutAuthor => '作者: Edison Jwa';
|
||||
|
||||
@override
|
||||
String get aboutNonAffiliation =>
|
||||
'Chanora 是独立项目,与 TeamSpeak 之间不存在任何附属、认可、赞助或官方关联关系。';
|
||||
@@ -331,4 +334,24 @@ class AppL10nZh extends AppL10n {
|
||||
String channelJoinFailedGeneric(String message) {
|
||||
return '无法加入频道:$message';
|
||||
}
|
||||
|
||||
@override
|
||||
String get networkPermissionTitle => '需要网络权限';
|
||||
|
||||
@override
|
||||
String get networkPermissionBody =>
|
||||
'Chanora 需要网络访问权限。请前往系统设置 → 隐私与安全性 → 本地网络,启用 Chanora,然后重试。';
|
||||
|
||||
@override
|
||||
String get networkPermissionOpenSettings => '打开系统设置';
|
||||
|
||||
@override
|
||||
String get microphonePermissionTitle => '需要麦克风权限';
|
||||
|
||||
@override
|
||||
String get microphonePermissionBody =>
|
||||
'Chanora 需要麦克风访问权限。请前往系统设置 → 隐私与安全性 → 麦克风,启用 Chanora。';
|
||||
|
||||
@override
|
||||
String get permissionDenied => '权限被拒绝';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user