From d70f9851def2fdfc3ed34d1b601ecf06678dcb83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Knuchel?= Date: Sun, 1 Dec 2024 16:27:42 +0100 Subject: [PATCH] Add links for VS Code extension --- backend/config/config.exs | 5 +++-- .../templates/website/_footer.html.heex | 1 + .../templates/website/aml.html.heex | 19 ++++++++++--------- .../Project_/Components/AmlSidebar.elm | 6 ++++-- frontend/src/Services/Urls.elm | 7 ++++++- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/backend/config/config.exs b/backend/config/config.exs index c1fdf30f8..9a84244ae 100644 --- a/backend/config/config.exs +++ b/backend/config/config.exs @@ -16,6 +16,7 @@ config :azimutt, logo_url_for_emails: "https://azimutt.app/android-chrome-512x512.png", cli_url: "https://www.npmjs.com/package/azimutt", heroku_url: "https://elements.heroku.com/addons/azimutt", + vscode_extension_url: "https://marketplace.visualstudio.com/items?itemName=azimutt.vscode-aml", browser_extension_url: "https://chrome.google.com/webstore/detail/azimutt/bpifdkechgdibghkkpaioccoijeoebjf", azimutt_documentation: "https://azimutt.app/docs", azimutt_email: "contact@azimutt.app", @@ -27,8 +28,8 @@ config :azimutt, azimutt_github_issues_new: "https://github.com/azimuttapp/azimutt/issues/new", environment: config_env(), # TODO: find an automated process to build it - version: "2.1.16", - version_date: "2024-11-29T00:00:00.000Z", + version: "2.1.17", + version_date: "2024-12-02T00:00:00.000Z", commit_hash: System.cmd("git", ["log", "-1", "--pretty=format:%h"]) |> elem(0) |> String.trim(), commit_message: System.cmd("git", ["log", "-1", "--pretty=format:%s"]) |> elem(0) |> String.trim(), commit_date: System.cmd("git", ["log", "-1", "--pretty=format:%aI"]) |> elem(0) |> String.trim(), diff --git a/backend/lib/azimutt_web/templates/website/_footer.html.heex b/backend/lib/azimutt_web/templates/website/_footer.html.heex index dceec93da..00cf78707 100644 --- a/backend/lib/azimutt_web/templates/website/_footer.html.heex +++ b/backend/lib/azimutt_web/templates/website/_footer.html.heex @@ -50,6 +50,7 @@
  • Dialect converters
  • Connectors
  • +
  • VS Code extension
  • Browser extension
  • Heroku Add-on
  • Database samples
  • diff --git a/backend/lib/azimutt_web/templates/website/aml.html.heex b/backend/lib/azimutt_web/templates/website/aml.html.heex index 655d6095e..ca1c78747 100644 --- a/backend/lib/azimutt_web/templates/website/aml.html.heex +++ b/backend/lib/azimutt_web/templates/website/aml.html.heex @@ -1,9 +1,10 @@ <% aml_doc = Routes.website_path(@conn, :doc, ["aml"]) aml_npm = "https://www.npmjs.com/package/@azimutt/aml" + aml_vscode = Azimutt.config(:vscode_extension_url) aml_converter = Routes.website_path(@conn, :converter, "aml") aml_azimutt = Routes.elm_path(@conn, :create) - cli_convert = "https://github.com/azimuttapp/azimutt/blob/main/cli/README.md#convert" + # cli_convert = "https://github.com/azimuttapp/azimutt/blob/main/cli/README.md#convert" %>
    @@ -121,13 +122,13 @@ COMMENT ON COLUMN posts.content IS 'in markdown';
    - - In converters + + In Visual Studio Code
    -

    Azimutt offers free converters from/to many formats: AML, SQL, JSON, DBML, Mermaid and more. Use our converters to quickly get what you need.

    +

    VS Code extension providing syntax highlighting, inline errors, smart suggestions, symbol rename and even conversions to SQL, JSON, DOT, Mermaid and more...

    - Use converters + Get extension

    @@ -145,13 +146,13 @@ COMMENT ON COLUMN posts.content IS 'in markdown';
    - - With the CLI + + With converters
    -

    The Azimutt CLI is a toolbox to work with databases, and now you can also convert dialects from one to another with a single command.

    +

    Azimutt offers free converters from/to many formats: AML, SQL, JSON, DBML, Mermaid and more. Use our converters to quickly get what you need.

    - View command + Use converters

    diff --git a/frontend/src/PagesComponents/Organization_/Project_/Components/AmlSidebar.elm b/frontend/src/PagesComponents/Organization_/Project_/Components/AmlSidebar.elm index c665260b1..2c1d784ba 100644 --- a/frontend/src/PagesComponents/Organization_/Project_/Components/AmlSidebar.elm +++ b/frontend/src/PagesComponents/Organization_/Project_/Components/AmlSidebar.elm @@ -375,7 +375,9 @@ viewWarnings warnings = viewHelp : Html msg viewHelp = p [ class "mt-2 text-sm text-gray-500" ] - [ text "Write your schema using " + [ text "Write your database schema using " , extLink Urls.amlDocs [ class "link" ] [ text "AML syntax" ] - , text "." + , text ". You can also use the " + , extLink Urls.vscodeExt [ class "link" ] [ text "VS Code extension" ] + , text " for best editing experience." ] diff --git a/frontend/src/Services/Urls.elm b/frontend/src/Services/Urls.elm index 648a6fdb7..92a52cbe4 100644 --- a/frontend/src/Services/Urls.elm +++ b/frontend/src/Services/Urls.elm @@ -1,4 +1,4 @@ -module Services.Urls exposing (amlDocs, amlEditor, amlHome, amlV1Converter, cliNpm, pricing) +module Services.Urls exposing (amlDocs, amlEditor, amlHome, amlV1Converter, cliNpm, pricing, vscodeExt) amlHome : String @@ -26,6 +26,11 @@ cliNpm = "https://www.npmjs.com/package/azimutt" +vscodeExt : String +vscodeExt = + "https://marketplace.visualstudio.com/items?itemName=azimutt.vscode-aml" + + pricing : String pricing = "/pricing"