diff --git a/CHANGELOG.md b/CHANGELOG.md index 25bdbe31..0db797bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # OnionShare Changelog +## 2.3.3 + +* New feature: Setting for light or dark theme +* Updated Tor to 0.4.6.7 for Linux, 0.4.5.10 for Windows and macOS +* Various bug fixes + ## 2.3.2 * New feature: Custom titles can be set for OnionShare's various modes diff --git a/RELEASE.md b/RELEASE.md index e69a8184..3409cf5c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -14,7 +14,7 @@ Before making a release, you must update the version in these places: - [ ] `docs/source/conf.py` (`version` at the top, and the `versions` list too) - [ ] `snap/snapcraft.yaml` -If you update flask-socketio, ensure that you also update the [socket.io.min.js](https://github.com/micahflee/onionshare/blob/develop/cli/onionshare_cli/resources/static/js/socket.io.min.js) file to a version that is [supported](https://flask-socketio.readthedocs.io/en/latest/#version-compatibility) by the updated version of flask-socketio. +If you update `flask-socketio`, ensure that you also update the [socket.io.min.js](https://github.com/micahflee/onionshare/blob/develop/cli/onionshare_cli/resources/static/js/socket.io.min.js) file to a version that is [supported](https://flask-socketio.readthedocs.io/en/latest/#version-compatibility) by the updated version of `flask-socketio`. Use tor binaries from the latest Tor Browser: @@ -28,6 +28,7 @@ Update the documentation: Finalize localization: - [ ] Merge all the translations from weblate +- [ ] In `docs` run `poetry run ./check-weblate.py [API_KEY]` to see which translations are >90% in the app and docs - [ ] Edit `cli/onionshare_cli/settings.py`, make sure `self.available_locales` lists only locales that are >90% translated - [ ] Edit `docs/source/conf.py`, make sure `languages` lists only languages that are >90% translated - [ ] Edit `docs/build.sh` and make sure `LOCALES=` lists the same languages as above, in `docs/source/conf.py` @@ -179,7 +180,7 @@ After following all of the previous steps, gather these files: Create a PGP signature for each of these files, e.g: ```sh -gpg -a --detach-sign OnionShare-$VERSION.flatpak +gpg -a --detach-sign OnionShare-$VERSION.tar.gz gpg -a --detach-sign [... and so on] ``` @@ -202,6 +203,7 @@ After there's a new release tag, make the Flathub package work here: https://git You must have `flatpak` and `flatpak-builder` installed, with flathub remote added (`flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo`). +- [ ] Change the tag (for both `onionshare` and `onionshare-cli`) to match the new git tag - [ ] Update `tor`, `libevent`, and `obfs4` dependencies, if necessary - [ ] Built the latest python dependencies using [this tool](https://github.com/flatpak/flatpak-builder-tools/blob/master/pip/flatpak-pip-generator) (see below) - [ ] Test the Flatpak package, ensure it works @@ -212,20 +214,21 @@ pip3 install --user toml # clone flatpak-build-tools git clone https://github.com/flatpak/flatpak-builder-tools.git -cd flatpak-builder-tools/pip # get onionshare-cli dependencies -./flatpak-pip-generator $(python3 -c 'import toml; print("\n".join([x for x in toml.loads(open("../../onionshare/cli/pyproject.toml").read())["tool"]["poetry"]["dependencies"]]))' |grep -v "^python$" |tr "\n" " ") -mv python3-modules.json onionshare-cli.json +cd poetry +./flatpak-poetry-generator.py ../../onionshare/cli/poetry.lock +cd .. # get onionshare dependencies +cd pip ./flatpak-pip-generator $(python3 -c 'import toml; print("\n".join(toml.loads(open("../../onionshare/desktop/pyproject.toml").read())["tool"]["briefcase"]["app"]["onionshare"]["requires"]))' |grep -v "./onionshare_cli" |grep -v -i "pyside2" |tr "\n" " ") mv python3-modules.json onionshare.json # use something like https://www.json2yaml.com/ to convert to yaml and update the manifest # add all of the modules in both onionshare-cli and onionshare to the submodules of "onionshare" -# - onionshare-cli.json -# - onionshare.json +# - poetry/generated-poetry-sources.json (onionshare-cli) +# - pip/python3-modules.json (onionshare) ``` Build and test the Flatpak package before publishing: @@ -235,6 +238,20 @@ flatpak-builder build --force-clean --install-deps-from=flathub --install --user flatpak run org.onionshare.OnionShare ``` +Create a [single-file bundle](https://docs.flatpak.org/en/latest/single-file-bundles.html): + +```sh +flatpak build-bundle ~/.local/share/flatpak/repo OnionShare-$VERSION.flatpak org.onionshare.OnionShare --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo +``` + +Create a PGP signature for the flatpak single-file bundle: + +```sh +gpg -a --detach-sign OnionShare-$VERSION.flatpak +``` + +Upload this `.flatpak` and its sig to the GitHub release as well. + ### Update Homebrew - Make a PR to [homebrew-cask](https://github.com/homebrew/homebrew-cask) to update the macOS version diff --git a/build-source.sh b/build-source.sh index b7bd700a..add57583 100755 --- a/build-source.sh +++ b/build-source.sh @@ -36,7 +36,7 @@ fi mkdir -p build/source mkdir -p dist cd build/source -git clone https://github.com/micahflee/onionshare.git +git clone https://github.com/onionshare/onionshare.git cd onionshare # Verify tag diff --git a/cli/onionshare_cli/common.py b/cli/onionshare_cli/common.py index 7ec31ec6..dd92eb0b 100644 --- a/cli/onionshare_cli/common.py +++ b/cli/onionshare_cli/common.py @@ -250,7 +250,7 @@ class Common: ) left_spaces = (43 - len(self.version) - 1) // 2 right_spaces = left_spaces - if left_spaces + len(self.version) + right_spaces < 43: + if left_spaces + len(self.version) + 1 + right_spaces < 43: right_spaces += 1 print( Back.MAGENTA diff --git a/cli/onionshare_cli/resources/static/css/style.css b/cli/onionshare_cli/resources/static/css/style.css index 57b23fdb..7cec9738 100644 --- a/cli/onionshare_cli/resources/static/css/style.css +++ b/cli/onionshare_cli/resources/static/css/style.css @@ -229,6 +229,7 @@ ul.breadcrumbs li a:link, ul.breadcrumbs li a:visited { display: block; } .chat-wrapper .message { + word-break: break-word; font-weight: normal; display: block; margin-bottom: 0.3em; diff --git a/cli/onionshare_cli/resources/static/js/chat.js b/cli/onionshare_cli/resources/static/js/chat.js index 258b020b..de64c094 100644 --- a/cli/onionshare_cli/resources/static/js/chat.js +++ b/cli/onionshare_cli/resources/static/js/chat.js @@ -88,7 +88,7 @@ var emitMessage = function (socket) { var updateUsername = function (socket) { var username = $('#username').val(); - if (!checkUsernameExists(username)) { + if (!checkUsernameExists(username) && !checkUsernameTooLong(username)) { $.ajax({ method: 'POST', url: `http://${document.domain}:${location.port}/update-session-username`, @@ -133,6 +133,15 @@ var checkUsernameExists = function (username) { return false; } +var checkUsernameTooLong = function (username) { + $('#username-error').text(''); + if (username.length > 128) { + $('#username-error').text('Please choose a shorter username.'); + return true; + } + return false; +} + var getScrollDiffBefore = function () { return $('#chat').scrollTop() - ($('#chat')[0].scrollHeight - $('#chat')[0].offsetHeight); } diff --git a/cli/onionshare_cli/resources/templates/500.html b/cli/onionshare_cli/resources/templates/500.html new file mode 100644 index 00000000..9f6727d2 --- /dev/null +++ b/cli/onionshare_cli/resources/templates/500.html @@ -0,0 +1,21 @@ + + + +
+Sorry, an unexpected error seems to have occurred, and your request didn't succeed.
+