Skip to content

Commit

Permalink
Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 31, 2024
1 parent 66399ac commit 65438f0
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 59 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@

### Pending Release

### v4.29.0 - 2024-10-31

- :bug: `UI` More generic location error handling in the CloudTAK UI
- :bug: `UI` Ensure `Notification` api object is present

### v4.28.0 - 2024-10-29

- :rocket: `API` Strongly type Mission Subscription Roles API
Expand Down
100 changes: 47 additions & 53 deletions api/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/web/src/components/CloudTAK/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ export default {
this.loading.main = false;
if (Notification.permission !== 'granted') {
if (Notification && Notification.permission !== 'granted') {
Notification.requestPermission()
}
Expand Down
10 changes: 5 additions & 5 deletions api/web/src/stores/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineStore } from 'pinia'
import { std, stdurl } from '../std.ts';
import type { Group, Profile, Profile_Update } from '../types.ts';

export type Notification = {
export type TAKNotification = {
type: string;
name: string;
body: string;
Expand All @@ -12,7 +12,7 @@ export type Notification = {

export const useProfileStore = defineStore('profile', {
state: (): {
notifications: Array<Notification>;
notifications: Array<TAKNotification>;
channels: Array<Group>;
profile: Profile | null;
} => {
Expand All @@ -39,13 +39,13 @@ export const useProfileStore = defineStore('profile', {
clearNotifications: function(): void {
this.notifications = [];
},
pushNotification: function(notification: Notification): void {
pushNotification: function(notification: TAKNotification): void {
this.notifications.push(notification);

if (Notification.permission !== 'denied') {
if (Notification && Notification.permission !== 'denied') {
const n = new Notification(notification.name, {
body: notification.body
});
});

n.onclick = (event) => {
event.preventDefault(); // prevent the browser from focusing the Notification's tab
Expand Down

0 comments on commit 65438f0

Please sign in to comment.