Commit Graph

180 Commits

Author SHA1 Message Date
Jamil
e7dddee78f ci: bump android apple dns match (#6833)
Bumps Android -> 1.3.4, Apple -> 1.3.5

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-09-26 09:32:41 -07:00
Jamil
332a9fe352 ci: bump all clients to include fix for #6781 (#6820)
bump all clients to include #6781 fix

---------

Co-authored-by: Not Applicable <ReactorScram@users.noreply.github.com>
2024-09-25 19:27:50 +00:00
Jamil
4a1dc23a7e ci: Bump Apple and GUI versions (#6776)
Mainly to get DNS logging improvements out.
2024-09-19 07:13:33 -07:00
Jamil
7c806f7602 chore: Bump Apple to 1.3.2 (#6750)
Adds update notifications and fixes resource menu bug.
2024-09-19 01:40:38 +00:00
Gabi
9979f5a4e4 feat(macos): show notification updates (#6679)
This patch adds a notification for updates for macos clients when they
are on an old version.

This is how it looks:

<img width="497" alt="image"
src="https://github.com/user-attachments/assets/829044fd-e8bc-4b47-b64d-67b8ef72adb0">

The orange dot is shown regardless of the notification being dismissed.

If the notification is dismissed by the "Dismiss this version" button,
until there's no new version there won't be notifications.

Updates are check at the start of firezone and every 6 hours after. This
is saved in `UserDefaults`.

Permissions for notifications needs to be allowed so that it's show,
this should be done by the `requestAuthorization`

Also, when an update is available a new `Update available...` option
appears in the menu

<img width="230" alt="image"
src="https://github.com/user-attachments/assets/16d7fea8-3cf5-4711-9d42-5c49faffe6c8">

This option, same as the notification takes you to the appstore.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-09-17 01:31:27 +00:00
Jamil
947db254cc fix(apple): Don't bold addressDescription in macOS Menubar (#6632)
When the addressDescription looks like a URI, we highlight it with
markdown and set its click handler to open the URL when clicked. We were
also making it bold, which seems to break macOS's menubar width
calculation, causing the field to truncate (typically after `https://`)
instead of expanding the container to contain it.

By removing the bold formatting, the container is properly sized, fixing
the display issue.


# Before
<img width="553" alt="Screenshot 2024-09-07 at 10 44 37 AM"
src="https://github.com/user-attachments/assets/4596bf54-918d-4a59-81d6-a18e436da5ad">

# After
<img width="569" alt="Screenshot 2024-09-07 at 10 45 38 AM"
src="https://github.com/user-attachments/assets/0400731f-e189-4416-a670-d5c3b314d71b">
2024-09-07 18:40:06 +00:00
Jamil
4c7daddf64 ci: Publish Apple/Android changelog entries (#6631)
These have been published.
2024-09-07 10:38:00 -07:00
Gabi
700b056cd2 fix(ui): make internet resource off by default (#6518)
With this PR we made internet resource disabled by default.

Since no other resource is disalable and internet resource behavior is
particular we remove all client code to make non internet resource
disalable.

Also, since the portal never makes the internet resource that can't be
disabled we remove the whole code path to handle that.

Additionally, some other smaller refactors across the UI wrt internet
resource

Fix #6509

---------

Signed-off-by: conectado <gabrielalejandro7@gmail.com>
Co-authored-by: conectado <conectado@conectados-MacBook-Air.local>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-09-04 19:16:50 +00:00
Jamil
cb061bf9ba fix(apple): Trigger connlib reset() when IPv4, IPv6, or available network gateways has changed (#6521)
On Apple, we try to be smart about triggering connlib's `reset()` in
order to keep from triggering endless update loops. This can happen
because connlib itself triggers path monitoring updates through
onUpdateRoutes and such.

Before, we only kept track of whether our primary interface changed in
order to consider the path updated. Now, we also track IPv4/IPv6
connectivity and the network's available gateways (read: routers) to
trigger changes. This fixes the case where our interface loses or gains
IPv4 / IPv6 connectivity, or the router address changes.

Fixes #6515

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-08-31 20:49:54 +00:00
Jamil
c6b0b0a922 ci: Release 1.3.0 for Internet Resource (#6503)
This publishes the 1.3.0 clients and gateways so that Internet Resources
will work.

The feature is still disabled for the Stripe plans until we publish the
launch post. Select customers have the feature enabled.

Closes #2667
2024-08-30 01:21:34 -07:00
Jamil
c66f0c15c0 ci: Draft bump 1.3.0 clients (#6470)
- Internet resources
2024-08-29 23:33:02 -07:00
Gabi
14b7652e0c chore(ui): move disable resource into resources details (#6463)
To homogenize the UI in mobile and non-mobile, we re-enable the sub-menu
for the internet resource, where it shows all resource

## New UI for android


![image](https://github.com/user-attachments/assets/3b9ce82f-1dbd-4ace-b7ba-873a34fd9dec)



![image](https://github.com/user-attachments/assets/16e9b128-532c-467e-b663-ae83195b2730)

## New UI for apple


![98579](https://github.com/user-attachments/assets/8bbda871-1d16-4d99-b873-a26d480821cf)


![99694](https://github.com/user-attachments/assets/f2924a08-8996-4882-867d-7446f7cfbafd)
2024-08-29 00:26:30 +00:00
Gabi
63c73e5bb6 feat: Internet Resource UI (#6434)
Fixes #6047

On mobile platforms the internet resource is rendered with all
non-favorite resources, since it was weird to see within the favorite
tab, for the system tray platforms it's rendered as part of favorites if
there is any favorite so that it's always visible to the user.

For mobile platforms the resource is non-clickeable, since the menu
shouldn't be of interest(maybe I should add it only for the sites?).

For non-mobile there is a sub menu where you can find the sites and the
enable/disable.

The current label for the resource is a place holder for the
screenshots, and can be set by the portal, if the portal doesn't set any
name it will just show "Internet Resource".

### Android screenshot


![image](https://github.com/user-attachments/assets/63deb25f-1cd1-4b49-be80-77570e612aa5)


### Linux Screenshot


![image](https://github.com/user-attachments/assets/7b67033d-71ee-4bac-98c8-4c5810bf43a3)


![image](https://github.com/user-attachments/assets/5bdbced5-bacd-4a09-a59c-aa853bb3baa0)

### Windows Screenshot


![image](https://github.com/user-attachments/assets/a3bbebb3-9a18-4b75-9e18-f58b1b61a7a3)

### MacOS screenshot

<img width="417" alt="image"
src="https://github.com/user-attachments/assets/5488d6e4-1cd2-42be-bcd7-3c51ec295590">

### iOS screenshot


![17044](https://github.com/user-attachments/assets/5321c363-5b43-4b1e-ac37-4fd7bdc68e28)
2024-08-27 04:08:19 +00:00
Jamil
2e54ae19c9 ci: Release Apple 1.2.1 (#6426)
Get the packet routing fix out.
2024-08-22 23:23:33 -07:00
Jamil
0994bd145a feat(apple): Build GITHUB_SHA into Apple clients (#6406)
Closes #6401 

<img width="1012" alt="Screenshot 2024-08-21 at 11 52 31 PM"
src="https://github.com/user-attachments/assets/3012d088-97cb-4a82-8a8f-b2a398865755">

![Screenshot 2024-08-22 at 12 05
44 AM](https://github.com/user-attachments/assets/5e1209f9-e8fa-4453-9bdd-9f40339649b4)
2024-08-22 20:49:57 +00:00
Jamil
c8eed59387 ci: Release 1.2.0 (#6395)
Releasing 1.2.0 to unblock portal deploy! Some of these have already
been published.
2024-08-22 00:18:27 +00:00
Reactor Scram
0c0cd7b514 fix(macos): menu bar (#6376)
Closes #6370 

Tested with Jamil's patch. The bug is fixed on #6370 and no apparent
regressions on iOS

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-21 22:22:37 +00:00
Gabi
dd46a489b3 fix(connlib): prevent panic on internet resource for apps (#6381)
[Refs](https://github.com/firezone/firezone/pull/6299#discussion_r1724108733)

The problem right now, after #6325 we send the internet resource up to
the clients. The clients expect a certain format for the resources and
panic if it isn't followed.

Particularly, in the case of no `address` or no `name`.

To fix this, we add a name and an address for the internet resource when
it is converted to the callback type.

Setting the `name` at that point actually makes a lot of sense since it
homogenizes the name across all platforms. But the internet resource
having an address makes no sense.

So in a next PR, when I do the last UI changes I plan to make `address`
optional for all resources on the clients and specialize the display of
the internet resource.

For now I wanted to get this in so that we don't ever panic on the
internet resource existing. (This was tested on all platforms and it
works)
2024-08-21 05:37:07 +00:00
Reactor Scram
7593dba7fb feat(client/ios): favorites menu (#6298)
![Screenshot 2024-08-14 at 16 08
14](https://github.com/user-attachments/assets/7d962b32-ee39-42d8-af4a-5f1287bb4b58)
![Screenshot 2024-08-14 at 16 36
10](https://github.com/user-attachments/assets/95876d86-1eb7-4e7f-87ca-6dbd610adddd)

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-20 17:57:57 +00:00
Reactor Scram
d43b501b48 fix(apple): show "Loading Resources..." instead of "No Resources" while loading (#6358)
Closes #6356

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-08-20 16:44:00 +00:00
Gabi
e00eeae790 chore(connlib): rename can_toggle to can_be_disabled (#6362)
This is made to sync this with #6299
2024-08-20 07:22:13 +00:00
Reactor Scram
7b73eeae36 feat(client/macOS): Favorite Resources menu (#6186)
```[tasklist]
- [x] Update changelog
- [x] Hook into reset button
```

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-16 20:21:48 +00:00
Reactor Scram
b944f1b544 docs(ios): fix docs for Rust iOS (#6300) 2024-08-16 14:06:25 +00:00
Thomas Eizinger
7c70850217 feat(connlib): allow glob patterns for matching domain names (#5901)
Currently, `connlib` can only handle "simple" DNS wildcards where `*`
matches any number of subdomains, including zero and `?` matches a
single subdomain.

With this PR, we expand `connlib'`s capabilities to allow for a much
more complex matching of domains that more closely resembles glob
patterns:

- `**` matches any number of subdomains. This supersedes the previous
`*` operator.
- `*` matches a single subdomain. This supersedes the previous `?`
operator.
- `?` matches a single character. This wasn't possible before.
- Additionally, any of these can be combined. Previously, only `*` or
`?` was allowed and they were only accepted at the front of the domain
name pattern.

Resolves: #5056.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
2024-08-15 01:30:53 +00:00
Jamil
296ca4ad4d ci: Bump Clients and Gateways to fix NAT / allocation issues (#6287)
Bump all Clients and Gateways due to #6265 being fixed.

---------

Co-authored-by: Not Applicable <ReactorScram@users.noreply.github.com>
2024-08-13 21:58:12 +00:00
Jamil
e7f8a4e4bf ci: bump apple / android versions (#6251)
These were approved and published so the versions need bumping.
2024-08-10 13:04:26 -07:00
Gabi
db655dd171 feat(apple): permit resources to be disabled (#6215)
Work for #6074 equivalent to #6166 for MacOS

MacOs view:

<img width="547" alt="image"
src="https://github.com/user-attachments/assets/f465183e-247b-49b5-a916-3ecc5f0a02f4">


iOS(ipad) view:


![image](https://github.com/user-attachments/assets/e64da75a-c69f-4e6a-aeeb-739958c3b046)

Other than implementing the resource disabling, this PR also refactor
the IPC between the network extension and the app so that it's some form
of structured IPC instead of relying on it being deserializable to
string to match the message.

One big difference with Android is that we don't introduce the concept
of a `ResourceView` for swift, the main reason for this is that on iOS
the resources are bound to the view instead of just being a parameter
for creating the view. So if we modify the `disabled` property it'd
update the UI unnecessarily, also it'd update the `Store` value for the
resource and then we need to copy that over again to the view. Making it
easier to go out of sync.
2024-08-10 04:20:14 +00:00
Jamil
a6ba9868dd ci: Revert bumps to 1.2 (#6227)
We need these at 1.1 until ready to release.
2024-08-08 18:34:39 -07:00
Jamil
096ddfe7c5 ci: bump gui/headless to 1.1.10 (#6221)
To publish the mpsc channel fix.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-08 16:20:20 +00:00
Jamil
51e0b61c9c chore: Bump all clients and gateway versions (#6149)
Includes major fixes https://github.com/firezone/firezone/pull/6143 and
https://github.com/firezone/firezone/pull/6117
2024-08-02 01:12:49 -07:00
Reactor Scram
cab6a5a21c chore(client/macos): align the signed-in-and-connected tray icon (#6069)
Closes #6052

The new icon is here
https://www.figma.com/design/THvQQ1QxKlsk47H9DZ2bhN/Core-Library?node-id=1305-799&t=kASomGCOu5fsLmCs-0

The swipe diff makes it easy to see
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/cde4da25-9c02-4ab2-b342-367868825217">

Also, **is the 95% opacity also intentional?** I saw that some icons
have 100% opacity black, and the connecting icons are mixed 45% and 95%,
and the signed-in icon was 95% opacity, so I stuck with that.
2024-07-30 14:44:37 +00:00
Thomas Eizinger
fc4b8c7b46 refactor: rename reconnect to reset (#6057)
Connection roaming within `connlib` has changed a fair-bit since we
introduced the `reconnect` function. The new implementation is basically
a hard-reset of all state within `connlib`. Renaming this function
across all layers makes this more obvious.

Resolves: #6038.
2024-07-28 07:41:45 +00:00
Jamil
423032cb5b fix(apple): stringify errors from WrappedSession::connect (#5970)
Errors returned from `WrappedSession.connect` are always a `RustString`
but those are only pointers to the actual data. See
https://chinedufn.github.io/swift-bridge/built-in/string/index.html#ruststring
for details. To see the actual string on the Swift side (and in the
logs), we need to call `.toString()` on it.

Fixes: #5965.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-07-23 14:21:14 +00:00
Thomas Eizinger
86549378c9 refactor(apple): tidy up error handling around Session.start (#5968)
Whilst investigating #5965, I noticed that the code around
`Adapter.start` on the Swift side can be tidied up a bit to prevent
duplicate logs.
2024-07-23 06:22:50 +00:00
Gabi
8a76f2b870 fix(connlib): use 120 prefix for macos address (#5853)
Otherwise with full route when we try to create the default route for
ipv6 it just removes the previous default route and never adds ours,
completely breaking ipv6 [this seems to be the
reason](2fec12a6e1/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift (L137-L141))
2024-07-16 03:24:04 +00:00
Jamil
086c730aaf chore: Bump clients to 1.1.2 for DNS record type forward (#5703)
Apps are already in review with App Stores
2024-07-04 01:31:26 +00:00
Jamil
8388efcf52 fix(apple): Fix ResourceList bug showing cached Resources from last session (#5645)
On macOS and iOS, the TunnelManager instance stays active across
sessions. This contains a Resource cache used to fetch Resources from
the tunnel process.

This cache wasn't cleared across sessions, so the first time the
callback fired the Resources shown were the ones from the last session.
After `1s`, they were correctly set to the current session's Resources
due to the `beginUpdatingResources` timer.

We were already clearing the stored Hash of the Resource cache on
disconnect, but not the Resource cache itself. This patch fixes that bug
by re-initializing the cache when the tunnel session is `disconnected`.
2024-07-01 14:28:05 +00:00
Jamil
ce974a8c31 docs: Dependabot note for apple secrets instructions (#5666) 2024-07-01 05:41:27 -07:00
Jamil
25b6528942 chore: Bump versions and update changelog (#5636)
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-06-29 09:06:10 -07:00
Jamil
8655b711db fix(connlib): Don't use operatingSystemVersionString on Apple OSes (#5628)
The [HTTP 1.1 RFC](https://datatracker.ietf.org/doc/html/rfc2616) states
that HTTP headers should be US-ASCII. This is not the case when the
macOS Client is run from a host that has a non-English language selected
as its system default due to the way we build the user agent.

This PR fixes that by normalizing how we build the user agent by more
granularly selecting which fields compose it, and not just relying on
OS-provided version strings that may contain non-ASCII characters.

fixes https://github.com/firezone/firezone/issues/5467

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-06-28 21:59:02 +00:00
Jamil
b5de55ac26 chore: Bump clients to 1.1.0, Gateway to 1.1.1 (#5591) 2024-06-27 02:43:48 -07:00
Jamil
786815dc39 fix(apple): use jsonl file suffix for app-side logs for consistency (#5582)
refs #5504
2024-06-27 05:51:44 +00:00
Jamil
0993583fea feat(apple): Add button to show menuBar from FirstTimeView (#5505)
Fixes #5500 

Unfortunately showing the menubar menu _only_ on re-launch is
non-trivial due to the way "re-launches" are processed in macOS.

We can handle them with the `applicationDidBecomeActive` override in
`AppDelegate`, but then this will be triggered whenever we sign in, open
Settings, or open About window because we activate the app then as well
in order to bring the Window to the foreground.

There's no good to way to determine who asked us to activate either.

Instead, we show the Welcome window (FirstTimeView on macOS), and in
there is a new button to show the app menu to use as a fallback for
users who need an alternative way to open the menu with a busy menubar.


<img width="1012" alt="Screenshot 2024-06-23 at 5 14 57 PM"
src="https://github.com/firezone/firezone/assets/167144/1a7dde08-1e83-4dc8-9516-e0390f29c941">
2024-06-24 16:54:04 +00:00
Jamil
b4cde74bee chore: Bump client next versions to 1.1.0 (#5485) 2024-06-21 16:31:43 +00:00
Jamil
eb3be3db5e chore(apple): Clean up certs in Swift CI (#5471)
Our provisioning profiles / distribution certs expire in a month. I've
regenerated them and noted the instructions for doing so.
2024-06-21 02:01:23 +00:00
Jamil
a45acc04db fix(connlib): set default firezone_tunnel log level from trace to debug for development and some ci (#5411)
"Encapsulated packet" is now spamming dev clients, so this level is
changed to `debug` by default in dev builds.

```
2024-06-17 14:04:15.419  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.419  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.420  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.420  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.420  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.420  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.421  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.421  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.422  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.422  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.422  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.423  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
```
2024-06-18 04:48:52 +00:00
Jamil
eda1df56c2 ci: Bump Android/Apple cur versions to 1.0.4/1.0.5 (#5397) 2024-06-17 06:55:33 -07:00
Jamil
e2f1617558 feat(iOS): Add Resource details view (#5129)
refs #3514 

- Show more Resource details when tapping a Resource
- Update logo text to be a stacked variant and SVG so it scales better,
also apply to all scale sizes
- Refactor SessionView so that Resources occupy more space, and move
auth controls to contextual menu
- Add `iOSNavigationView` that wraps child views to keep the navbar
controls consistent

<p align="center">
<img
src="https://github.com/firezone/firezone/assets/167144/6b337227-2b32-4864-b5b0-47a541b94476"
width="300">
</p>

--- 

<p align="center">
<img
src="https://github.com/firezone/firezone/assets/167144/5e129c38-37b5-4487-9b34-36b303434fac"
width="300">
</p>

---

<p align="center">
<img
src="https://github.com/firezone/firezone/assets/167144/edc56e34-a660-4256-a719-6886ff63c1a1"
width="300">
</p>

---


![IMG_0069](https://github.com/firezone/firezone/assets/167144/48c6bd87-7297-4fb4-81fa-3fa96110a17e)
2024-05-28 17:26:44 +00:00
Jamil
9b085eabd4 feat(macOS): Add resource and site details to macOS menu (#5116)
- Adds admin portal, docs, and support links to menu. The support link
is a 404 for now, see firezone/gtm#249
- Adds more details including site online/offline status to submenu
- If the `address_description` field looks like a URL, open it on click.
Otherwise, copy to clipboard
- Adds relevant tooltips

<img width="550" alt="Screenshot 2024-05-23 at 9 37 40 PM"
src="https://github.com/firezone/firezone/assets/167144/cae4f6ce-e581-459c-82dd-032bf4ea4eb4">



<img width="481" alt="Screenshot 2024-05-23 at 9 54 51 PM"
src="https://github.com/firezone/firezone/assets/167144/0f4eb80f-47f6-49a8-8830-ebfbdad7dd26">
<img width="577" alt="Screenshot 2024-05-23 at 9 54 38 PM"
src="https://github.com/firezone/firezone/assets/167144/e93fefc8-3f55-45b2-9a69-cf885996a857">


Refs #3514
2024-05-24 21:58:50 +00:00
Jamil
1d5aae18cf fix(apple): Fix menu display and activation (#5090)
When the menu was clicked, the system would show it without activating
the app. This meant that other actions launched from the menu like `Sign
in` could sometimes happen without their respective window coming to the
foreground.

To fix it, we need more control over how the menu is displayed. So we
add a click handler and open the menu manually. Note that to do this, we
need to ensure `statusItem.menu = nil` otherwise the system will default
to showing the menu for us, and not firing our handler.

fixes #4818
2024-05-22 18:55:28 +00:00