Merge branch 'main' into feature/home

This commit is contained in:
莫颓 2023-10-22 16:30:57 +08:00 committed by GitHub
commit cbbc6180a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 62 additions and 38 deletions

View file

@ -57,26 +57,26 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- name: Build and push - name: Build and push
uses: docker/build-push-action@v4 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile

View file

@ -16,26 +16,26 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- name: Build and push - name: Build and push
uses: docker/build-push-action@v4 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile

2
.nvmrc
View file

@ -1 +1 @@
18.18.0 18.18.2

View file

@ -24,4 +24,28 @@ home:
aboutLabel: 'About' aboutLabel: 'About'
darkMode: 'Dark mode' darkMode: 'Dark mode'
lightMode: 'Light mode' lightMode: 'Light mode'
mode: 'Toggle dark/light mode' mode: 'Toggle dark/light mode'
about:
h1: 'About IT-Tools'
h1p1: 'This wonderful website, made with ❤ by'
h1p2: ', aggregates useful tools for developer and people working in IT. If you find it useful, please feel free to share it to people you think may find it useful too and don''''t forget to bookmark it in your shortcut bar!'
h1p3: 'IT Tools is open-source (under the MIT license) and free, and will always be, but it costs me money to host and renew the domain name. If you want to support my work, and encourage me to add more tools, please consider supporting by'
h1p4: 'sponsoring me'
h2: Technologies
h2p1: 'IT Tools is made in Vue.js (Vue 3) with the the Naive UI component library and is hosted and continuously deployed by Vercel. Third-party open-source libraries are used in some tools, you may find the complete list in the'
h2p2: 'file of the repository.'
h3: 'Found a bug? A tool is missing?'
h3p1: 'If you need a tool that is currently not present here, and you think can be useful, you are welcome to submit a feature request in the'
h3p2: 'issues section'
h3p3: 'in the GitHub repository.'
h3p4: 'And if you found a bug, or something doesn''''t work as expected, please file a bug report in the'
h3p5: 'issues section'
h3p6: 'in the GitHub repository.'
404:
notFound: '404 Not Found'
sorry: 'Sorry, this page does not seem to exist'
maybe: 'Maybe the cache is doing tricky things, try force-refreshing?'
backHome: 'Back home'
toolCard:
new: New

View file

@ -26,7 +26,7 @@ const appTheme = useAppTheme();
:bordered="false" :bordered="false"
:color="{ color: theme.primaryColor, textColor: theme.tagColor }" :color="{ color: theme.primaryColor, textColor: theme.tagColor }"
> >
New {{ $t('toolCard.new') }}
</n-tag> </n-tag>
<FavoriteButton :tool="tool" /> <FavoriteButton :tool="tool" />

View file

@ -11,17 +11,17 @@ useHead({ title: 'Page not found - IT Tools' });
</span> </span>
<h1 m-0 mt-3> <h1 m-0 mt-3>
404 Not Found {{ $t('404.notFound') }}
</h1> </h1>
<div mt-4 op-60> <div mt-4 op-60>
Sorry, this page does not seem to exist {{ $t('404.sorry') }}
</div> </div>
<div mb-8 op-60> <div mb-8 op-60>
Maybe the cache is doing tricky things, try force-refreshing? {{ $t('404.maybe') }}
</div> </div>
<c-button to="/"> <c-button to="/">
Back home {{ $t('404.backHome') }}
</c-button> </c-button>
</div> </div>
</template> </template>

View file

@ -8,62 +8,56 @@ const { tracker } = useTracker();
<template> <template>
<div mx-auto mt-50px max-w-600px> <div mx-auto mt-50px max-w-600px>
<h1>About IT-Tools</h1> <h1>{{ $t('about.h1') }}</h1>
<p text-justify> <p text-justify>
This wonderful website, made with by {{ $t('about.h1p1') }}
<c-link href="https://github.com/CorentinTh" target="_blank" rel="noopener"> <c-link href="https://github.com/CorentinTh" target="_blank" rel="noopener">
Corentin Thomasset Corentin Thomasset
</c-link>, </c-link>{{ $t('about.h1p2') }}
aggregates useful tools for developer and people working in IT. If you find it useful, please feel free to share
it to people you think may find it useful too and don't forget to bookmark it in your shortcut bar!
</p> </p>
<p text-justify> <p text-justify>
IT Tools is open-source (under the MIT license) and free, and will always be, but it costs me money to host and {{ $t('about.h1p3') }}
renew the domain name. If you want to support my work, and encourage me to add more tools, please consider
supporting by
<c-link <c-link
href="https://www.buymeacoffee.com/cthmsst" href="https://www.buymeacoffee.com/cthmsst"
rel="noopener" rel="noopener"
target="_blank" target="_blank"
@click="() => tracker.trackEvent({ eventName: 'Support button clicked' })" @click="() => tracker.trackEvent({ eventName: 'Support button clicked' })"
> >
sponsoring me {{ $t('about.h1p4') }}
</c-link>. </c-link>.
</p> </p>
<h2>Technologies</h2> <h2>{{ $t('about.h2') }}</h2>
<p text-justify> <p text-justify>
IT Tools is made in Vue.js (Vue 3) with the the Naive UI component library and is hosted and continuously deployed {{ $t('about.h2p1') }}
by Vercel. Third-party open-source libraries are used in some tools, you may find the complete list in the
<c-link href="https://github.com/CorentinTh/it-tools/blob/main/package.json" rel="noopener" target="_blank"> <c-link href="https://github.com/CorentinTh/it-tools/blob/main/package.json" rel="noopener" target="_blank">
package.json package.json
</c-link> </c-link>
file of the repository. {{ $t('about.h2p2') }}
</p> </p>
<h2>Found a bug? A tool is missing?</h2> <h2>{{ $t('about.h3') }}</h2>
<p text-justify> <p text-justify>
If you need a tool that is currently not present here, and you think can be useful, you are welcome to submit a {{ $t('about.h3p1') }}
feature request in the
<c-link <c-link
href="https://github.com/CorentinTh/it-tools/issues/new/choose" href="https://github.com/CorentinTh/it-tools/issues/new/choose"
rel="noopener" rel="noopener"
target="_blank" target="_blank"
> >
issues section {{ $t('about.h3p2') }}
</c-link> </c-link>
in the GitHub repository. {{ $t('about.h3p3') }}
</p> </p>
<p text-justify> <p text-justify>
And if you found a bug, or something doesn't work as expected, please file a bug report in the {{ $t('about.h3p4') }}
<c-link <c-link
href="https://github.com/CorentinTh/it-tools/issues/new/choose" href="https://github.com/CorentinTh/it-tools/issues/new/choose"
rel="noopener" rel="noopener"
target="_blank" target="_blank"
> >
issues section {{ $t('about.h3p5') }}
</c-link> </c-link>
in the GitHub repository. {{ $t('about.h3p6') }}
</p> </p>
</div> </div>
</template> </template>

View file

@ -29,3 +29,9 @@ export const i18nPlugin: Plugin = {
app.use(i18n); app.use(i18n);
}, },
}; };
export const translate = function (localeKey: string) {
// @ts-expect-error global
const hasKey = i18n.global.te(localeKey, i18n.global.locale);
return hasKey ? i18n.global.t(localeKey) : localeKey;
};