Skip to content

Commit

Permalink
Merge branch 'rustdesk:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbo8418 authored Apr 2, 2024
2 parents 315081b + edefa5f commit 44a62bb
Show file tree
Hide file tree
Showing 9 changed files with 369 additions and 262 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/flutter-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ jobs:
shell: bash
run: |
BASE_URL=${{ secrets.SIGN_BASE_URL }} SECRET_KEY=${{ secrets.SIGN_SECRET_KEY }} python3 res/job.py sign_files ./SignOutput
sha256sum ./SignOutput/rustdesk-*.exe ./rustdesk-*.tar.gz
- name: Publish Release
uses: softprops/action-gh-release@v1
Expand Down Expand Up @@ -286,7 +285,6 @@ jobs:
mv ./target/release/rustdesk-portable-packer.exe ./SignOutput/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.exe
mv ./Release ./rustdesk
tar czf rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.tar.gz rustdesk
sha256sum ./SignOutput/rustdesk-*.exe ./rustdesk-*.tar.gz
- name: Sign rustdesk self-extracted file
if: env.UPLOAD_ARTIFACT == 'true' && env.SIGN_BASE_URL != ''
Expand Down Expand Up @@ -360,7 +358,6 @@ jobs:
codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep --strict rustdesk-${{ env.VERSION }}.dmg -vvv
# notarize the rustdesk-${{ env.VERSION }}.dmg
rcodesign notary-submit --api-key-path ~/.p12/api-key.json --staple rustdesk-${{ env.VERSION }}.dmg
sha256sum rustdesk*-aarch64.dmg
- name: Rename rustdesk
if: env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -519,7 +516,6 @@ jobs:
codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep --strict rustdesk-${{ env.VERSION }}.dmg -vvv
# notarize the rustdesk-${{ env.VERSION }}.dmg
rcodesign notary-submit --api-key-path ${{ github.workspace }}/rustdesk.json --staple rustdesk-${{ env.VERSION }}.dmg
sha256sum rustdesk*-${{ matrix.job.arch }}.dmg
- name: Rename rustdesk
if: env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -559,7 +555,6 @@ jobs:
- name: Combine unsigned macos app
run: |
tar czf rustdesk-${{ env.VERSION }}-macos-unsigned.tar.gz *.dmg
sha256sum rustdesk-${{ env.VERSION }}-macos-unsigned.tar.gz
- name: Publish unsigned macos app
uses: softprops/action-gh-release@v1
Expand Down Expand Up @@ -843,11 +838,6 @@ jobs:
# override default build-tools version (29.0.3) -- optional
BUILD_TOOLS_VERSION: "30.0.2"

- name: Print sha256sum
shell: bash
run: |
sha256sum ${{steps.sign-rustdesk.outputs.signedReleaseFile}} signed-apk/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk
- name: Upload Artifacts
if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true'
uses: actions/upload-artifact@master
Expand Down Expand Up @@ -1453,7 +1443,6 @@ jobs:
# use cp to duplicate deb files to fit other packages.
cp "$name" "${name%%.deb}-${{ matrix.job.arch }}-sciter.deb"
done
sha256sum rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.deb
- name: Publish debian package
if: matrix.job.extra-build-features == '' && env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -1645,15 +1634,13 @@ jobs:
for name in rustdesk*??.rpm; do
mv "$name" "/opt/artifacts/rpm/${name%%.rpm}-suse.rpm"
done
sha256sum /opt/artifacts/rpm/*.rpm
- name: Rename rustdesk
shell: bash
run: |
for name in rustdesk*??.deb; do
cp "$name" "${name%%.deb}-${{ matrix.job.arch }}.deb"
done
sha256sum rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb
- name: Publish debian package
if: matrix.job.extra-build-features == '' && env.UPLOAD_ARTIFACT == 'true'
Expand All @@ -1677,7 +1664,6 @@ jobs:
# run appimage-builder
pushd appimage
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml
sha256sum ./rustdesk-${{ env.VERSION }}-*.AppImage
- name: Publish appimage package
if: matrix.job.extra-build-features == 'appimage' && env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -1890,7 +1876,6 @@ jobs:
for name in rustdesk*??.rpm; do
mv "$name" "/opt/artifacts/rpm/${name%%.rpm}-suse.rpm"
done
sha256sum /opt/artifacts/rpm/*.rpm
- name: Rename rustdesk
shell: bash
Expand All @@ -1899,7 +1884,6 @@ jobs:
# use cp to duplicate deb files to fit other packages.
cp "$name" "${name%%.deb}-${{ matrix.job.arch }}.deb"
done
sha256sum rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb
- name: Publish debian package
if: matrix.job.extra-build-features == '' && env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -1958,7 +1942,6 @@ jobs:
gst-plugin-pipewire
scripts: |
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
sha256sum rustdesk-${{ env.VERSION }}*.zst
- name: Publish archlinux package
if: matrix.job.extra-build-features == '' && env.UPLOAD_ARTIFACT == 'true'
Expand All @@ -1982,7 +1965,6 @@ jobs:
# run appimage-builder
pushd appimage
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-x86_64.yml
sha256sum ./rustdesk-${{ env.VERSION }}-*.AppImage
- name: Publish appimage package
if: matrix.job.extra-build-features == 'appimage' && env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -2144,7 +2126,6 @@ jobs:
git clone https://github.com/flathub/shared-modules.git --depth=1
flatpak-builder --user --force-clean --repo=repo ./build ./rustdesk.json
flatpak build-bundle ./repo rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.flatpak com.rustdesk.RustDesk
sha256sum rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.flatpak
- name: Publish flatpak package
uses: softprops/action-gh-release@v1
Expand Down
153 changes: 95 additions & 58 deletions flutter/lib/common/widgets/address_book.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ class _AddressBookState extends State<AddressBook> {
child: Column(
children: [
_buildAbDropdown(),
_buildTagHeader().marginOnly(left: 8.0, right: 0),
_buildTagHeader().marginOnly(
left: 8.0,
right: gFFI.abModel.legacyMode.value ? 8.0 : 0,
top: gFFI.abModel.legacyMode.value ? 8.0 : 0),
Expanded(
child: Container(
width: double.infinity,
Expand Down Expand Up @@ -415,6 +418,7 @@ class _AddressBookState extends State<AddressBook> {
return;
}
var isInProgress = false;
var passwordVisible = false;
IDTextEditingController idController = IDTextEditingController(text: '');
TextEditingController aliasController = TextEditingController(text: '');
TextEditingController passwordController = TextEditingController(text: '');
Expand Down Expand Up @@ -460,82 +464,115 @@ class _AddressBookState extends State<AddressBook> {
}

double marginBottom = 4;

row({required Widget lable, required Widget input}) {
return Row(
children: [
!isMobile
? ConstrainedBox(
constraints: const BoxConstraints(minWidth: 100),
child: lable.marginOnly(right: 10))
: SizedBox.shrink(),
Expanded(
child: ConstrainedBox(
constraints: const BoxConstraints(minWidth: 200),
child: input),
),
],
).marginOnly(bottom: !isMobile ? 8 : 0);
}

return CustomAlertDialog(
title: Text(translate("Add ID")),
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
children: [
Align(
alignment: Alignment.centerLeft,
child: Row(
children: [
Text(
'*',
style: TextStyle(color: Colors.red, fontSize: 14),
),
Text(
'ID',
style: style,
),
],
),
).marginOnly(bottom: marginBottom),
TextField(
controller: idController,
inputFormatters: [IDTextInputFormatter()],
decoration:
InputDecoration(errorText: errorMsg, errorMaxLines: 5),
),
Align(
alignment: Alignment.centerLeft,
child: Text(
row(
lable: Row(
children: [
Text(
'*',
style: TextStyle(color: Colors.red, fontSize: 14),
),
Text(
'ID',
style: style,
),
],
),
input: TextField(
controller: idController,
inputFormatters: [IDTextInputFormatter()],
decoration: InputDecoration(
labelText: !isMobile ? null : translate('ID'),
errorText: errorMsg,
errorMaxLines: 5),
)),
row(
lable: Text(
translate('Alias'),
style: style,
),
).marginOnly(top: 8, bottom: marginBottom),
TextField(
controller: aliasController,
input: TextField(
controller: aliasController,
decoration: InputDecoration(
labelText: !isMobile ? null : translate('Alias'),
)),
),
if (isCurrentAbShared)
row(
lable: Text(
translate('Password'),
style: style,
),
input: TextField(
controller: passwordController,
obscureText: !passwordVisible,
decoration: InputDecoration(
labelText: !isMobile ? null : translate('Password'),
suffixIcon: IconButton(
icon: Icon(
passwordVisible
? Icons.visibility
: Icons.visibility_off,
color: MyTheme.lightTheme.primaryColor),
onPressed: () {
setState(() {
passwordVisible = !passwordVisible;
});
},
),
),
)),
if (gFFI.abModel.currentAbTags.isNotEmpty)
Align(
alignment: Alignment.centerLeft,
child: Text(
translate('Password'),
translate('Tags'),
style: style,
),
).marginOnly(top: 8, bottom: marginBottom),
if (isCurrentAbShared)
TextField(
controller: passwordController,
obscureText: true,
),
Align(
alignment: Alignment.centerLeft,
child: Text(
translate('Tags'),
style: style,
),
).marginOnly(top: 8, bottom: marginBottom),
Align(
alignment: Alignment.centerLeft,
child: Wrap(
children: tags
.map((e) => AddressBookTag(
name: e,
tags: selectedTag,
onTap: () {
if (selectedTag.contains(e)) {
selectedTag.remove(e);
} else {
selectedTag.add(e);
}
},
showActionMenu: false))
.toList(growable: false),
if (gFFI.abModel.currentAbTags.isNotEmpty)
Align(
alignment: Alignment.centerLeft,
child: Wrap(
children: tags
.map((e) => AddressBookTag(
name: e,
tags: selectedTag,
onTap: () {
if (selectedTag.contains(e)) {
selectedTag.remove(e);
} else {
selectedTag.add(e);
}
},
showActionMenu: false))
.toList(growable: false),
),
),
),
],
),
const SizedBox(
Expand Down
Loading

0 comments on commit 44a62bb

Please sign in to comment.