diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c15366872..bc4266cb8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,9 +100,8 @@ jobs: labels: ${{ steps.meta.outputs.labels }} annotations: ${{ steps.meta.outputs.annotations }} - # After the image push, so that no published chart ever names an image that is not there - name: Set up Helm - uses: azure/setup-helm@v4 + uses: azure/setup-helm@v5 - name: Package and push Helm chart env: diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml deleted file mode 100644 index 5c27af1ed..000000000 --- a/.github/workflows/helm.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Helm Chart CI - -on: - # Triggers the workflow on push or pull request events but only for the dev branch - push: - branches: [ main ] - paths: [ dev/helm/** ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - build: - name: Update Chart - runs-on: ubuntu-latest - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Package and Push Chart - run: | - helm plugin install https://github.com/chartmuseum/helm-push.git - helm repo add chartmuseum https://charts.js.wiki - helm cm-push --version="2.2.${{github.run_number}}" --username="${{secrets.HELM_REPO_USERNAME}}" --password="${{secrets.HELM_REPO_PASSWORD}}" dev/helm/ chartmuseum - helm repo remove chartmuseum diff --git a/frontend/src/stores/common.js b/frontend/src/stores/common.js index 91d880249..c83008e22 100644 --- a/frontend/src/stores/common.js +++ b/frontend/src/stores/common.js @@ -2,16 +2,26 @@ import { defineStore } from 'pinia' import { difference } from 'es-toolkit/array' +// -> A browser blocking site data throws on merely reading `localStorage`, and a throw here +// happens while the store is created, which leaves the whole app unmounted +function storedLocale() { + try { + return localStorage.getItem('locale') + } catch { + return null + } +} + export const useCommonStore = defineStore('common', { state: () => ({ routerLoading: false, - locale: localStorage.getItem('locale') || 'en', - desiredLocale: localStorage.getItem('locale'), + locale: storedLocale() || 'en', + desiredLocale: storedLocale(), blocksLoaded: [] }), getters: {}, actions: { - async fetchLocaleStrings (locale) { + async fetchLocaleStrings(locale) { try { return API_CLIENT.get(`locales/${locale}/strings`).json() } catch (err) { @@ -19,14 +29,18 @@ export const useCommonStore = defineStore('common', { throw err } }, - setLocale (locale) { + setLocale(locale) { this.$patch({ locale, desiredLocale: locale }) - localStorage.setItem('locale', locale) + try { + localStorage.setItem('locale', locale) + } catch { + // -> Refused storage costs remembering the choice, not making it + } }, - async loadBlocks (blocks = []) { + async loadBlocks(blocks = []) { const toLoad = difference(blocks, this.blocksLoaded) for (const block of toLoad) { try {