Add sticker popup
Add send sticker message
Add ability to select sticker pack and show stickers for pack with scroll
1. Sticker history
2. Install sticker packs
3. Sticker market
1. Sticker packs are installed on app start up until installation of sticker pack functionality is added
2. Optimisations such as preloading images to be done so that sticker images are not downloaded each time.
Replaces PR #105.
Implement a `pkg-macos` target that ultimately results in `Status.dmg` being
written to `pkg/`. Due to [limitations][limits] of the OpenSSL `.dylib`s in
`/usr/lib/` on macOS, `libssl.a` and `libcrypto.a` are statically linked into
`bin/nim_status_client` from a [Homebrew][brew] "bottle" that is compatible
with macOS 10.13 (the oldest macOS version compatible with Qt v5.14).
`pkg-macos` creates an `.app` bundle layout in `tmp/macos/dist` based partly on
information in a very helpful [StackOverflow answer][so-answer]. Note the part
of the answer (toward the end) that explains a problem with the working
directory and how to fix it. That's the reason for the `nim_status_client.sh`
script introduced in this commit (it gets copied into the bundle). It's also
the reason for having `Info.plist` copied into the bundle before `macdeployqt`
is run (see below) and then overwriting it with `Info.runner.plist` before
creating the `.dmg` file. The app icons file `status-icon.icns` was taken from
`deployment/macos/` in the [status-react][sr] repo.
The [`macdeployqt`][macdeployqt] tool is used to copy the needed portions of Qt
into the bundle; it automatically updates `rpath`, etc. so the
`nim_status_client` executable in the bundle can locate the libs within the
bundle.
`macdeployqt` is run twice, for the "outer" and "inner" `.app` bundles,
because of an apparent bug in `macdeployqt` that results in QtWebEngine related
resources not being processed correctly on the first pass. This results in some
bloat in the final bundle but it seems unavoidable at present.
The [create-dmg][cdmg] tool is used to package the bundle into a `.dmg`
file. There are two reasons for this:
1. It produces a nice looking icon for the `.dmg` that overlays the Status logo
on an external disk icon.
2. `Info.plist` needs to be overwritten after running `macdeployqt` (see
explanation above) but before creating the `.dmg` file. If we passed the `-dmg`
cli option to `macdeployqt` to have it generate the `.dmg` file then it
wouldn't be possible to overwrite `Info.plist`.
So there is a cosmetic reason and a practical reason for using another
tool. Probably the biggest downside is that `create-dmg` is implemented in
Node.js so it needs to be installed with `npm`; that's the reason this commit
introduces `package.json`, etc. Note that zero code from `node_modules` ends up
in the `.app` bundle or the `.dmg` file.
Code signing of the macOS `.app` bundle and `.dmg` is attempted if the
environment variable `MACOS_CODESIGN_IDENT` is defined. In that case, the
environment variable `MACOS_KEYCHAIN_OPT` may optionally be defined with the
path to a preferred keychain database file.
Refactor a number of sections in the Makefile for consistency's sake, e.g. the
`appimage` target becomes `pkg-linux` and ultimately results in
`NimStatusClient-x86_64.AppImage` being written to `pkg/`.
Make a number of changes to bring the Linux packaging steps up-to-date and use
the `-qmlimport` cli option of `linuxdeployqt` to simplify resolution of Qt
plugins.
Note that `make pkg` will correctly resolve to `make pkg-linux` or `make
pkg-macos` depending on the OS in use.
Consistently use lower-case "c" in the name of *components* directories and
imports.
[limits]: https://developer.apple.com/forums/thread/124782
[brew]: https://brew.sh/
[so-answer]: https://stackoverflow.com/a/3251285
[sr]: https://github.com/status-im/status-react/tree/develop/deployment/macos
[macdeployqt]: https://doc.qt.io/qt-5/macos-deployment.html
[cdmg]: https://github.com/sindresorhus/create-dmg
There's still some things that needs to be done (possibly in future commits):
[ ] Asset icons need to be determined so they can be displayed along the transaction
[ ] Transaction values need to be converted to decimal values
[ ] Date-time formatting
[ ] Grouping of transactions by days
display real contacts on profile
query contacts
add contact in form
fixes
fixes
display contacts
cleanup
cleanup
remove echo
refactor to use profile instead of contact model
Move the onboarding/login state machine to the top level in main.qml, so that logout events can trigger new states.
Add Loader to statemachine so that each component is lazy-loaded. Initial tests saved 50MB of memory on startup.
Currently, logging out, then logging back in to the same or different account results in a doubling-up of chats/messages/wallet accounts. These need to be reset, however I need help doing that and it would delayed and blown out this PR further. This reset has been done for Onboarding and Login, but needs to be done for chats, wallet, mailservers, etc.
Having all the different input types in one file made it simpler to design, but created an issue with memory, because all the aliases, properties and images were created for all types even if you only used a basic Input. I tried using Loaders, but making aliases within loaders is super painful/impossible in some cases.
This commit extends the profile popup to align more with the application
designs. There's still work left to be done such as showing/hiding the
qrcode view or copying data to the clipboard.
The profilepopup also relies on context data at the moment and should rather
receive its data via the newly introduced `getContractByID()` API proposed in
https://github.com/status-im/status-go/pull/1987
Similar to its `footer` content, ModalPopup can now receive header components
allowing consumers to design the header part of the modal to their likings.
Usage:
```
ModalPopup {
id: popup
header: Item {
...
}
...
}
```
The header section will take the height of the root element of the substree
passed to `header`
simply chat views by reacting to model events
abstract join event from join event call; react to join channel event
remove unneded if else
move left channel to event
refactor getChannelColor
refactor getChannelColor
rename sendMessage method
cleanup
move random color to channels list
remove toChatType
remove toChatType
display a sticker when a content type sticker message is received
display a sticker when a content type sticker message is received
display a sticker when a content type sticker message is received
display sticker
fix height and default value
cleanup
cleanup
cleanup
use constants for the content type
default views for when there is no chat opened + chat links
add channel component
update other layouts
fix problem with alias
add test channels
fix merge conflict
add mouse hand pointer to chat list; add simple FAQ (testing QT urls)
refactor wallet to use asset model
move some of wallet logic away from the controller
move ChatMessage to model
move chatItem model
organize models folder
simplify chat message and chat item
rename messageList to message_list
simply addresses in the controller
rename mailservers list
refactor how profile is set
refactor/simplify profile view
refactor/simplify adding mailservers
rename wallet view
simplify wallet assets
rename nodeView to view
extract channel list view
extract channel list view
refactor channel list / chats view
move signals out of app folder
simplify callRPC
add raw rpc method and make node section use it
add node model
move accounts model inside onboard controller (for now)
make events usage consistent among models and controllers; separate model events from app events
make mouse show hand cursor when hovering over chat list
add FAQ url
simplify controllers and views, make everything more consistent
refactor wallet to use asset model
move some of wallet logic away from the controller
move ChatMessage to model
move chatItem model
organize models folder
simplify chat message and chat item
rename messageList to message_list
simply addresses in the controller
rename mailservers list
refactor how profile is set
refactor/simplify profile view
refactor/simplify adding mailservers
rename wallet view
simplify wallet assets
rename nodeView to view
extract channel list view
extract channel list view
refactor channel list / chats view
move signals out of app folder
address code reviews
Work on this PR started before the build system was updated and at one point I
upgraded `nim_status_client.nimble` to use NimScript so the nimble command
would stop warning that the old format was being used. In team chat it was
discussed that since we're no longer using nimble for package management we
could simply delete `nim_status_client.nimble` to avoid confusion, which can be
done in another PR.
Introduce a BrowserLayout stub so the index will be calcualted correctly re:
the active tab.
Reorganize ChatLayout and NodeLayout into subdirs `Chat` and `Node`,
respectively.
Introduce ProfileLayout which uses a "LeftTab" approach similar to that of
WalletLayout. There remains quite a bit of styling work to be done in
ProfileLayout and its LeftTab. Also, it may be better to start over using a
SplitView like the ChatLayout, I'm not really sure.
It wasn't clear what should be the default view for the right-pane when Profile
is selected in the left-most TabBar. In this PR, it defaults to showing the
view corresponding to the ENS usernames button.
In the archived Figma for the desktop design, it seemed a picture could be set,
e.g. there is a headshot of a woman used in the Profile screen. To that end I
explored how to take a square image and clip/mask it so it appears round and I
included a larger placeholder image for that purpose. In the new design, and
with respect to mobile, it may not be possible to set a profile picture so the
code that rounds the image can maybe be dropped.