Skip to content

Commit

Permalink
Merge branch 'master' into feat/turnstile
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickMi committed Jan 30, 2023
2 parents 56a1af0 + 33ec81d commit 2bb343e
Show file tree
Hide file tree
Showing 63 changed files with 2,242 additions and 2,285 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/browserslist-regex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
browserslist-regex:
uses: dargmuesli/github-actions/.github/workflows/browserslist-regex.yml@0.23.1
uses: dargmuesli/github-actions/.github/workflows/browserslist-regex.yml@0.28.3
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
with:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker
name: CI

on:
pull_request:
Expand All @@ -9,19 +9,17 @@ on:
jobs:
build:
name: Build
uses: dargmuesli/github-actions/.github/workflows/docker.yml@0.23.1
uses: dargmuesli/github-actions/.github/workflows/docker3.yml@0.28.3
secrets:
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
DOCKER_HUB_USER_NAME: ${{ secrets.DOCKER_HUB_USER_NAME }}
with:
ARTIFACT_PATH: .output/public
release-semantic:
needs: build
name: Release (semantic)
uses: dargmuesli/github-actions/.github/workflows/release-semantic.yml@0.23.1
uses: dargmuesli/github-actions/.github/workflows/release-semantic.yml@0.28.3
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
with:
CACHE_PATH: nuxt/pnpm-lock.yaml
release-assets:
needs: release-semantic
name: Release (assets)
uses: dargmuesli/github-actions/.github/workflows/release-assets.yml@0.23.1
2 changes: 1 addition & 1 deletion .github/workflows/release-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
release-schedule:
name: 'Release: Scheduled'
uses: dargmuesli/github-actions/.github/workflows/release-schedule.yml@0.23.1
uses: dargmuesli/github-actions/.github/workflows/release-schedule.yml@0.28.3
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
with:
Expand Down
5 changes: 4 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"recommendations": [
"apollographql.vscode-apollo",
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"graphql.vscode-graphql",
"timonwong.shellcheck",
"vue.volar",
],
"unwantedRecommendations": [
"vscode.typescript-language-features"
]
}
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# [1.6.0](https://github.com/maevsi/maevsi/compare/1.5.0...1.6.0) (2023-01-20)


### Bug Fixes

* **cookie-control:** correct locale string ([a815fd0](https://github.com/maevsi/maevsi/commit/a815fd04eb1e73eea94e99064eaf0a951dc5000d))
* **nuxt:** correct dayjs destructuring ([080019b](https://github.com/maevsi/maevsi/commit/080019bd6a927d405c29686536b4ad9bdb37d925))
* **util:** correct ip header ([ddc4cb6](https://github.com/maevsi/maevsi/commit/ddc4cb6ec1cd4e14ac233338e9897b088261babe))


### Features

* **ssr:** account for timezone ([57a9ebf](https://github.com/maevsi/maevsi/commit/57a9ebfc15e3c70f2725f4533215a406c3a057a7)), closes [#999](https://github.com/maevsi/maevsi/issues/999)

# [1.5.0](https://github.com/maevsi/maevsi/compare/1.4.0...1.5.0) (2023-01-19)


### Features

* **cookie-control:** upgrade to v4 ([5e048f2](https://github.com/maevsi/maevsi/commit/5e048f2a4d90135dd21ce286588b7b725e3c79e5)), closes [#1042](https://github.com/maevsi/maevsi/issues/1042)

# [1.4.0](https://github.com/maevsi/maevsi/compare/1.3.5...1.4.0) (2023-01-17)


### Features

* **cookie-control:** set checkbox active background color ([64ed54c](https://github.com/maevsi/maevsi/commit/64ed54cbc749cc19a9135ae5165da6eb03924493))

## [1.3.5](https://github.com/maevsi/maevsi/compare/1.3.4...1.3.5) (2023-01-17)


### Bug Fixes

* **image-upload-gallery:** correct upload quota calculation ([682b357](https://github.com/maevsi/maevsi/commit/682b3573c2fa54256d8d372e5d8974ff73e87c08)), closes [#1037](https://github.com/maevsi/maevsi/issues/1037)

## [1.3.4](https://github.com/maevsi/maevsi/compare/1.3.3...1.3.4) (2023-01-16)


### Bug Fixes

* **cookie-control:** correct page placement ([0f4a13b](https://github.com/maevsi/maevsi/commit/0f4a13bd131e64da0bb0af28fa1a12233a472d2c))

## [1.3.3](https://github.com/maevsi/maevsi/compare/1.3.2...1.3.3) (2023-01-14)


### Bug Fixes

* **cypress:** correct cookie handling ([dbf9a1a](https://github.com/maevsi/maevsi/commit/dbf9a1a354e4d15325a0ef4433fc1756e08b41b1))
* **cypress:** correct cookie name ([eda243c](https://github.com/maevsi/maevsi/commit/eda243c7f299cfe810001849dafe0b10af158114))
* **gtag:** convert undefined to boolean ([49c1413](https://github.com/maevsi/maevsi/commit/49c141369495fd89f731d90bd992317673df2a71))

## [1.3.2](https://github.com/maevsi/maevsi/compare/1.3.1...1.3.2) (2023-01-13)


Expand Down
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Should be the specific version of `node:slim`.
# `sqitch` requires at least `buster`.
FROM node:19.4.0-slim AS development
FROM node:19.5.0-slim AS development

COPY ./docker/entrypoint.sh /usr/local/bin/

Expand Down Expand Up @@ -33,7 +33,7 @@ CMD ["pnpm", "run", "dev"]
# Prepare Nuxt.

# Should be the specific version of `node:slim`.
FROM node:19.4.0-slim AS prepare
FROM node:19.5.0-slim AS prepare

WORKDIR /srv/app/

Expand All @@ -54,7 +54,7 @@ RUN pnpm install --offline \

# Should be the specific version of `node:slim`.
# Could be the specific version of `node:alpine`, but the `prepare` stage uses slim too.
FROM node:19.4.0-slim AS build
FROM node:19.5.0-slim AS build

ARG CI=false
ENV CI ${CI}
Expand All @@ -75,7 +75,7 @@ RUN npm install -g pnpm && \

# Should be the specific version of `node:slim`.
# Could be the specific version of `node:alpine`, but the `prepare` stage uses slim too.
FROM node:19.4.0-slim AS lint
FROM node:19.5.0-slim AS lint

WORKDIR /srv/app/

Expand All @@ -90,7 +90,7 @@ RUN npm install -g pnpm && \

# Should be the specific version of `node:slim`.
# Could be the specific version of `node:alpine`, but the `prepare` stage uses slim too.
FROM node:19.4.0-slim AS test-unit
FROM node:19.5.0-slim AS test-unit

WORKDIR /srv/app/

Expand All @@ -104,7 +104,7 @@ RUN npm install -g pnpm && \
# Nuxt: test (integration)

# Should be the specific version of `cypress/included`.
FROM cypress/included:12.3.0 AS test-integration_base
FROM cypress/included:12.4.1 AS test-integration_base

ARG UNAME=cypress
ARG UID=1000
Expand Down Expand Up @@ -140,7 +140,7 @@ VOLUME /srv/app
# Nuxt: test (integration)

# Should be the specific version of `cypress/included`.
FROM cypress/included:12.3.0 AS test-integration
FROM cypress/included:12.4.1 AS test-integration

# Update and install dependencies.
RUN npm install -g pnpm
Expand All @@ -158,7 +158,7 @@ RUN pnpm test:integration:prod \
# Collect build, lint and test results.

# Should be the specific version of `node:slim`.
FROM node:19.4.0-slim AS collect
FROM node:19.5.0-slim AS collect

WORKDIR /srv/app/

Expand All @@ -174,7 +174,7 @@ COPY --from=test-integration /srv/app/package.json /tmp/test/package.json

# Should be the specific version of `node:slim`.
# `sqitch` requires at least `buster`.
FROM node:19.4.0-slim AS production
FROM node:19.5.0-slim AS production

ENV NODE_ENV=production

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![build status](https://github.com/maevsi/maevsi/workflows/CI/badge.svg)](https://github.com/maevsi/maevsi/actions?query=workflow%3ACI "build status")

[![CI](https://github.com/maevsi/maevsi/actions/workflows/docker.yml/badge.svg)](https://github.com/maevsi/maevsi/actions/workflows/docker.yml)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmaevsi%2Fmaevsi.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmaevsi%2Fmaevsi?ref=badge_shield)

# maevsi

Expand Down
34 changes: 34 additions & 0 deletions nuxt/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,50 @@
<script setup lang="ts">
import supportedBrowsers from '~/supportedBrowsers'
const { $dayjs } = useNuxtApp()
const { t } = useI18n()
const config = useRuntimeConfig()
const cookieControl = useCookieControl()
// data
const isBrowserSupported = ref(true)
// methods
const init = () => {
if (process.client) {
const cookieTimezone = useCookie(TIMEZONE_COOKIE_NAME, {
// default: () => undefined, // setting `default` on the client side only does not write the cookie
httpOnly: false,
sameSite: 'strict',
secure: true,
})
// @ts-ignore `tz` should be part of `$dayjs` (https://github.com/iamkun/dayjs/issues/2106)
cookieTimezone.value = $dayjs.tz.guess()
}
}
// lifecycle
onBeforeMount(() => {
isBrowserSupported.value = supportedBrowsers.test(navigator.userAgent)
})
watch(
() => cookieControl.cookiesEnabledIds.value,
(current, previous) => {
if (
(!previous?.includes('google-analytics') &&
current?.includes('google-analytics')) ||
(previous?.includes('google-analytics') &&
!current?.includes('google-analytics'))
) {
window.location.reload()
}
},
{ deep: true }
)
// initialization
init()
</script>

<i18n lang="yaml">
Expand Down
Loading

0 comments on commit 2bb343e

Please sign in to comment.