@@ -20,7 +20,7 @@ import { useOrgBillingMode } from "./data/billing-mode/org-billing-mode-query";
2020import { Organization } from "@gitpod/public-api/lib/gitpod/v1/organization_pb" ;
2121
2222const KEY_APP_DISMISSED_NOTIFICATIONS = "gitpod-app-notifications-dismissed" ;
23- const PRIVACY_POLICY_LAST_UPDATED = "2024-09-30 " ;
23+ const PRIVACY_POLICY_LAST_UPDATED = "2023-12-20 " ;
2424
2525interface Notification {
2626 id : string ;
@@ -52,6 +52,46 @@ const UPDATED_PRIVACY_POLICY = (updateUser: (user: Partial<UserProtocol>) => Pro
5252 } ) ;
5353 }
5454 } ,
55+ message : (
56+ < span className = "text-md" >
57+ We've updated our Privacy Policy. You can review it{ " " }
58+ < a className = "gp-link" href = "https://www.gitpod.io/privacy" target = "_blank" rel = "noreferrer" >
59+ here
60+ </ a >
61+ .
62+ </ span >
63+ ) ,
64+ } as Notification ;
65+ } ;
66+
67+ const GITPOD_FLEX_INTRODUCTION_COACHMARK_KEY = "gitpod_flex_introduction" ;
68+ const GITPOD_FLEX_INTRODUCTION = ( updateUser : ( user : Partial < UserProtocol > ) => Promise < User > ) => {
69+ return {
70+ id : GITPOD_FLEX_INTRODUCTION_COACHMARK_KEY ,
71+ type : "info" ,
72+ preventDismiss : true ,
73+ onClose : async ( ) => {
74+ let dismissSuccess = false ;
75+ try {
76+ const updatedUser = await updateUser ( {
77+ additionalData : {
78+ profile : {
79+ coachmarksDismissals : {
80+ [ GITPOD_FLEX_INTRODUCTION_COACHMARK_KEY ] : new Date ( ) . toISOString ( ) ,
81+ } ,
82+ } ,
83+ } ,
84+ } ) ;
85+ dismissSuccess = ! ! updatedUser ;
86+ } catch ( err ) {
87+ dismissSuccess = false ;
88+ } finally {
89+ trackEvent ( "coachmark_dismissed" , {
90+ name : "gitpod-flex-introduction" ,
91+ success : dismissSuccess ,
92+ } ) ;
93+ }
94+ } ,
5595 message : (
5696 < span className = "text-md" >
5797 < b > Introducing Gitpod Flex:</ b > self-host for free in 3 min, run locally using Gitpod Desktop and
@@ -115,6 +155,10 @@ export function AppNotifications() {
115155 notifications . push ( notification ) ;
116156 }
117157 }
158+
159+ if ( isGitpodIo ( ) && ! user ?. profile ?. coachmarksDismissals [ GITPOD_FLEX_INTRODUCTION_COACHMARK_KEY ] ) {
160+ notifications . push ( GITPOD_FLEX_INTRODUCTION ( ( u : Partial < UserProtocol > ) => mutateAsync ( u ) ) ) ;
161+ }
118162 }
119163
120164 if ( ! ignore ) {
0 commit comments