From 1e88b02acdcaaa03e66c7854675825a43579f3e4 Mon Sep 17 00:00:00 2001 From: caty21 Date: Sun, 28 Jun 2026 11:47:18 +0200 Subject: [PATCH] feat: enable TradingView drawing toolbar + add GitHub Actions workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - TvAdvancedChart: hide_top_toolbar false → outils de dessin visibles - GitHub Actions: workflow fetch-rate-data.yml (cron horaire) Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/fetch-rate-data.yml | 29 +++++++++++++++++++++++++++ components/TvChart.tsx | 4 +++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/fetch-rate-data.yml diff --git a/.github/workflows/fetch-rate-data.yml b/.github/workflows/fetch-rate-data.yml new file mode 100644 index 0000000..c63e19e --- /dev/null +++ b/.github/workflows/fetch-rate-data.yml @@ -0,0 +1,29 @@ +name: Fetch Rate Probabilities + +on: + schedule: + - cron: '0 * * * *' # toutes les heures + workflow_dispatch: # déclenchement manuel + +jobs: + fetch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Fetch rate probabilities from rateprobability.com + run: node .github/scripts/fetch-rate-data.mjs + + - name: Commit updated data (if changed) + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add data/rate-probabilities.json + git diff --staged --quiet || git commit -m "chore: update rate-probabilities data [skip ci]" + git push diff --git a/components/TvChart.tsx b/components/TvChart.tsx index 0832421..c8e2e9d 100644 --- a/components/TvChart.tsx +++ b/components/TvChart.tsx @@ -80,12 +80,14 @@ export function TvAdvancedChart({ locale: "fr", backgroundColor: "rgba(8,12,20,0)", gridColor: "rgba(30,45,61,0.5)", - hide_top_toolbar: true, + hide_top_toolbar: false, hide_legend: false, allow_symbol_change: false, calendar: false, hide_volume: true, isTransparent: true, + save_image: true, + drawings_access: { type: "all", tools: [{ name: "Regression Trend" }] }, }, height );