diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml new file mode 100644 index 000000000..25443707c --- /dev/null +++ b/.github/workflows/frontend.yml @@ -0,0 +1,52 @@ +name: "Frontend checks" + +on: + merge_group: + pull_request: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + name: Build frontend + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v4 + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + - uses: actions/cache@v4 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Build frontend + working-directory: ./kitsune-fe + run: nix develop ..#frontend --command bash -c "yarn && yarn build" + + lints: + name: Check lints + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v4 + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + - uses: actions/cache@v4 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Run linter + working-directory: ./kitsune-fe + run: nix develop ..#frontend --command bash -c "yarn && yarn lint" diff --git a/kitsune-fe/src/components/BaseTimeline.vue b/kitsune-fe/src/components/BaseTimeline.vue index e7b0fb4a8..9dc8a61b9 100644 --- a/kitsune-fe/src/components/BaseTimeline.vue +++ b/kitsune-fe/src/components/BaseTimeline.vue @@ -44,7 +44,7 @@ import { ref } from 'vue'; import { DynamicScroller, DynamicScrollerItem } from 'vue-virtual-scroller'; - import Post, { Post as PostType } from './Post.vue'; + import Post, { Post as PostType } from './PostComponent.vue'; const props = defineProps<{ posts: PostType[]; diff --git a/kitsune-fe/src/components/Post.vue b/kitsune-fe/src/components/PostComponent.vue similarity index 100% rename from kitsune-fe/src/components/Post.vue rename to kitsune-fe/src/components/PostComponent.vue diff --git a/kitsune-fe/src/i18n.ts b/kitsune-fe/src/i18n.ts index 1b8d3f7b0..ab317c2a7 100644 --- a/kitsune-fe/src/i18n.ts +++ b/kitsune-fe/src/i18n.ts @@ -2,14 +2,8 @@ import { FluentBundle } from '@fluent/bundle'; import { createFluentVue } from 'fluent-vue'; -import enCyberpunkMessages from './locales/en-cyberpunk.ftl'; -import enMessages from './locales/en.ftl'; - const enBundle = new FluentBundle('en'); -enBundle.addResource(enMessages); - const enCyberpunkBundle = new FluentBundle('en-cyberpunk'); -enCyberpunkBundle.addResource(enCyberpunkMessages); const fluent = createFluentVue({ bundles: [enBundle], diff --git a/kitsune-fe/src/views/MessagePage.vue b/kitsune-fe/src/views/MessagePage.vue index 9fa3844ce..da9939302 100644 --- a/kitsune-fe/src/views/MessagePage.vue +++ b/kitsune-fe/src/views/MessagePage.vue @@ -1,3 +1,5 @@ - + diff --git a/kitsune-fe/src/views/NotificationPage.vue b/kitsune-fe/src/views/NotificationPage.vue index 9fa3844ce..882ed9589 100644 --- a/kitsune-fe/src/views/NotificationPage.vue +++ b/kitsune-fe/src/views/NotificationPage.vue @@ -1,3 +1,5 @@ - + diff --git a/kitsune-fe/src/views/PostPage.vue b/kitsune-fe/src/views/PostPage.vue index 60dd6dcd3..09637b4b3 100644 --- a/kitsune-fe/src/views/PostPage.vue +++ b/kitsune-fe/src/views/PostPage.vue @@ -14,7 +14,7 @@