-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vsc): Add PDP notification (#1716)
Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com>
- Loading branch information
1 parent
c5e3132
commit 48e0775
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { workspace, window, env, Uri, ConfigurationTarget } from 'vscode' | ||
|
||
export const showPDPNotification = async () => { | ||
const pdpNotif = workspace.getConfiguration('prisma').get('showPrismaDataPlatformNotification', true) | ||
|
||
if (!pdpNotif) return | ||
|
||
void window | ||
.showInformationMessage( | ||
'Supercharge your Prisma ORM usage with global database caching, serverless connection pooling and real-time database events.', | ||
'Visit Prisma Data Platform', | ||
) | ||
.then((v) => { | ||
if (v === undefined) return | ||
|
||
void env.openExternal(Uri.parse('https://pris.ly/vscode/pdp')) | ||
}) | ||
|
||
await workspace | ||
.getConfiguration('prisma') | ||
.update('showPrismaDataPlatformNotification', false, ConfigurationTarget.Global) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters