fix: icon permissions and GTK single instance
- Use GTK default flags for single instance - Fix icon path to absolute /usr/share/icons - Add postinstall chmod 644 for icon - Remove Dart-level single instance code
This commit is contained in:
@@ -50,26 +50,26 @@ GoRouter router(RouterRef ref) {
|
||||
}
|
||||
|
||||
final tabLocations = [
|
||||
const HomeRoute().location, // 0: Главная
|
||||
const ProxiesRoute().location, // 1: Локации
|
||||
const PerAppProxyRoute().location, // 2: Исключения
|
||||
const SettingsRoute().location, // 3: Настройки
|
||||
const AboutRoute().location, // 4: О программе
|
||||
const HomeRoute().location, // 0: Главная
|
||||
const ProxiesRoute().location, // 1: Локации
|
||||
const PerAppProxyRoute().location, // 2: Исключения
|
||||
const SettingsRoute().location, // 3: Настройки
|
||||
const AboutRoute().location, // 4: О программе
|
||||
];
|
||||
|
||||
int getCurrentIndex(BuildContext context) {
|
||||
final String location = GoRouterState.of(context).uri.path;
|
||||
|
||||
|
||||
// Проверяем точное совпадение для главной
|
||||
if (location == const HomeRoute().location) return 0;
|
||||
|
||||
|
||||
// Проверяем остальные маршруты по порядку
|
||||
// ВАЖНО: более длинные пути проверяем раньше!
|
||||
if (location.startsWith(const PerAppProxyRoute().location)) return 2; // /settings/per-app-proxy
|
||||
if (location.startsWith(const ProxiesRoute().location)) return 1; // /proxies
|
||||
if (location.startsWith(const SettingsRoute().location)) return 3; // /settings
|
||||
if (location.startsWith(const AboutRoute().location)) return 4; // /about
|
||||
|
||||
if (location.startsWith(const ProxiesRoute().location)) return 1; // /proxies
|
||||
if (location.startsWith(const SettingsRoute().location)) return 3; // /settings
|
||||
if (location.startsWith(const AboutRoute().location)) return 4; // /about
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user