Skip to content

Commit

Permalink
Fix hotkey;Update debian build meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert committed Sep 14, 2024
1 parent c436ae6 commit 93ae819
Show file tree
Hide file tree
Showing 10 changed files with 341 additions and 293 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,30 +191,14 @@ jobs:
mkdir -p usr/share/applications
mkdir -p usr/share/icons/hicolor/scalable/apps
cp -r ../x64/release/bundle/* opt/CloudOTP
cp -r ../../../assets/linux/DEBIAN .
cp -r ../../../tools/linux_tools/DEBIAN .
chmod 0755 DEBIAN/postinst
chmod 0755 DEBIAN/postrm
cp ../../../tools/linux/com.cloudchewie.cloudotp.desktop usr/share/applications
cp ../../../assets/logo-transparent.svg usr/share/icons/hicolor/scalable/apps/com.cloudchewie.cloudotp.svg
cat>DEBIAN/control<<EOF
Maintainer: Cloudchewie <[email protected]>
Package: CloudOTP
Version: ${{ steps.get_version.outputs.version }}
Section: x11
Priority: optional
Architecture: amd64
Essential: no
Installed-Size: 34648
Description: An awesome two-factor authenticator which supports cloud backup.
Homepage: https://github.com/Robert-Stackflow/CloudOTP
Depends: libayatana-appindicator3-1,
gir1.2-keybinder-3.0,
libsecret-1-0,
gir1.2-notify-0.7,
sqlcipher
EOF
cp ../../../assets/linux/com.cloudchewie.cloudotp.desktop usr/share/applications
cp ../../../assets/logo.svg usr/share/icons/hicolor/scalable/apps/com.cloudchewie.cloudotp.svg
sed -i "s/Version: .*/Version: ${{ steps.get_version.outputs.version }}/g" DEBIAN/control
cd ..
dpkg-deb --build --root-owner-group CloudOTP-${{ steps.get_version.outputs.version }}-linux-amd64
Expand Down
2 changes: 1 addition & 1 deletion lib/Screens/Setting/update_log_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class _UpdateLogScreenState extends State<UpdateLogScreen>
await fetchReleases();
},
child: ListView.builder(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
itemBuilder: (context, index) => _buildItem(releaseItems[index]),
itemCount: releaseItems.length,
),
Expand Down
11 changes: 6 additions & 5 deletions lib/Screens/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ class MainScreenState extends State<MainScreen>

focusSearch() {
searchFocusNode.requestFocus();
searchFocusNode.addListener(() {
if (!searchFocusNode.hasFocus) {
keyboardHandlerState?.focus();
}
});
// searchFocusNode.addListener(() {
// if (!searchFocusNode.hasFocus) {
// keyboardHandlerState?.focus();
// }
// });
}

@override
Expand All @@ -206,6 +206,7 @@ class MainScreenState extends State<MainScreen>
}
windowManager.addListener(this);
WidgetsBinding.instance.addObserver(this);
keyboardHandlerState?.focus();
HiveUtil.showCloudEntry().then((value) {
appProvider.canShowCloudBackupButton = value;
});
Expand Down
19 changes: 9 additions & 10 deletions lib/Utils/shortcuts_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,15 @@ final defaultCloudOTPShortcuts = [
),
CloudOTPShortcut.all(
key: HotKey(
key: LogicalKeyboardKey.keyP,
key: LogicalKeyboardKey.keyS,
modifiers: [HotKeyModifier.control, HotKeyModifier.alt],
).singleActivator,
intent: const SettingIntent(),
labelProvider: (s) => s.setting,
),
CloudOTPShortcut.all(
key: HotKey(
key: LogicalKeyboardKey.keyS,
modifiers: [HotKeyModifier.control, HotKeyModifier.alt],
key: LogicalKeyboardKey.slash,
).singleActivator,
intent: const SearchIntent(),
labelProvider: (s) => s.searchToken,
Expand All @@ -140,13 +139,13 @@ final defaultCloudOTPShortcuts = [
intent: const LockIntent(),
labelProvider: (s) => s.lock,
),
CloudOTPShortcut.all(
key: HotKey(
key: LogicalKeyboardKey.escape,
).singleActivator,
intent: const EscapeIntent(),
labelProvider: (s) => s.escape,
),
// CloudOTPShortcut.all(
// key: HotKey(
// key: LogicalKeyboardKey.escape,
// ).singleActivator,
// intent: const EscapeIntent(),
// labelProvider: (s) => s.escape,
// ),
CloudOTPShortcut.all(
key: HotKey(
key: LogicalKeyboardKey.f1,
Expand Down
Loading

0 comments on commit 93ae819

Please sign in to comment.