diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 123fe4c..f3974ab 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,7 +5,7 @@ name: Node.js CI on: pull_request: - branches: [ "main" ] + branches: [main] jobs: build: @@ -19,26 +19,24 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - run: pnpm install - - run: pnpm build - - name: Copy and Rename index.html to dist - run: cp dist/index.html dist/404.html - - - name: Deploy to gh-pages - uses: crazy-max/ghaction-github-pages@v2 - with: - target_branch: gh-pages - build_dir: dist - env: - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: pnpm + - run: pnpm install + - run: pnpm build + - name: Copy and Rename index.html to dist + run: cp dist/index.html dist/404.html + - name: Deploy to gh-pages + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + build_dir: dist + env: + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 002c943..7377250 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,12 +6,11 @@ on: - 'v*' jobs: - build-and-release: + build-web: runs-on: ubuntu-latest - permissions: contents: write - + steps: - name: Checkout code uses: actions/checkout@v3 @@ -26,18 +25,18 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: '22.x' - cache: 'pnpm' + node-version: 22.x + cache: pnpm - name: Install dependencies run: pnpm install + - name: Install dependency fast-glob + run: pnpm add fast-glob -D + - name: Build for production run: pnpm build - - name: Build for file protocol - run: pnpm build:file - - name: Prepare directories run: | mv dist dist-prod @@ -45,18 +44,78 @@ jobs: - name: Create production build archive run: | - tar -czf dist.tar.gz dist-prod + zip -r dist.zip dist-prod - - name: Create file protocol build archive - run: | - tar -czf dist-file.tar.gz dist-file + - name: Upload web build artifact + uses: actions/upload-artifact@v4 + with: + name: web-build + path: dist.zip - - name: Release + publish-tauri: + permissions: + contents: write + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Rust cache + uses: swatinem/rust-cache@v2 + with: + workspaces: ./src-tauri -> target + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 22.x + cache: pnpm + + - name: Install frontend dependencies + run: pnpm install + + - name: Install dependency fast-glob + run: pnpm add fast-glob -D + + - name: Build the app + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: ${{ github.ref_name }} + releaseName: 'Release ${{ github.ref_name }}' + releaseBody: See the assets to download this version and install. + releaseDraft: true + prerelease: false + run: pnpm tauri build + + release: + needs: [build-web, publish-tauri] + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Download web build artifact + uses: actions/download-artifact@v4 + with: + name: web-build + + - name: Create Release uses: softprops/action-gh-release@v1 with: files: | - dist.tar.gz - dist-file.tar.gz + dist.zip + name: 'Release ${{ github.ref_name }}' draft: true prerelease: false - generate_release_notes: true \ No newline at end of file + generate_release_notes: true diff --git a/.gitignore b/.gitignore index 92b12cc..b1d5c6f 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,8 @@ bower_components # node-waf configuration .lock-wscript +pnpm-lock.yaml + # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release diff --git a/build/syncVersion.js b/build/syncVersion.js new file mode 100644 index 0000000..869cee0 --- /dev/null +++ b/build/syncVersion.js @@ -0,0 +1,22 @@ +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +// 读取 package.json 版本号 +const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8')); +const version = packageJson.version; + +// 读取并更新 tauri.conf.json +const tauriConfPath = path.join(__dirname, '..', 'src-tauri', 'tauri.conf.json'); +const tauriConf = JSON.parse(fs.readFileSync(tauriConfPath, 'utf8')); + +// 更新版本号 +tauriConf.version = version; + +// 写回 tauri.conf.json +fs.writeFileSync(tauriConfPath, JSON.stringify(tauriConf, null, 2)); + +console.log(`Tauri 配置版本号已同步至: ${version}`); \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js index 4a63dce..b512ed3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -2,7 +2,7 @@ import antfu from '@antfu/eslint-config' export default antfu( { - ignores: ['**/node_modules', '**/public', '**/dist', '**/package.json', '**/*.yaml', '**/.gitignore', '**/.env*', '**/tsconfig*', '**/*.config.js'], + ignores: ['**/node_modules', '**/build', '**/public', '**/dist', '**/package.json', '**/*.yaml', '**/.gitignore', '**/.env*', '**/tsconfig*', '**/*.config.js'], }, { rules: { diff --git a/package.json b/package.json index f0350b9..3edaca3 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "build": "vue-tsc --noEmit && vite build", "build:pre": "vue-tsc --noEmit && vite build --mode prebuild", "build:file": "vue-tsc --noEmit && vite build --mode file", + "tauri":"node ./build/syncVersion.js && tauri", "test": "vitest", "test:ui": "vitest --ui", "preview": "vite preview", @@ -30,8 +31,8 @@ "pinia": "^3.0.3", "pinia-plugin-persist": "^1.0.0", "sparticles": "^1.3.1", - "three": "^0.166.0", - "three-css3d": "^1.0.6", + "three": "0.166.0", + "three-css3d": "1.0.6", "uuid": "^13.0.0", "vue": "^3.5.13", "vue-dompurify-html": "^5.2.0", @@ -57,7 +58,7 @@ "@types/lodash-es": "^4.17.12", "@types/markdown-it": "^14.1.2", "@types/node": "^24.10.2", - "@types/three": "^0.166.0", + "@types/three": "0.166.0", "@typescript-eslint/eslint-plugin": "^8.49.0", "@typescript-eslint/parser": "^8.49.0", "@vitejs/plugin-legacy": "^7.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 016944e..08c9472 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,10 +51,10 @@ importers: specifier: ^1.3.1 version: 1.3.1 three: - specifier: ^0.166.0 + specifier: 0.166.0 version: 0.166.0 three-css3d: - specifier: ^1.0.6 + specifier: 1.0.6 version: 1.0.6(three@0.166.0) uuid: specifier: ^13.0.0 @@ -127,7 +127,7 @@ importers: specifier: ^24.10.2 version: 24.10.2 '@types/three': - specifier: ^0.166.0 + specifier: 0.166.0 version: 0.166.0 '@typescript-eslint/eslint-plugin': specifier: ^8.49.0 @@ -1394,36 +1394,42 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm-musl@2.5.0': resolution: {integrity: sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA==} engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [musl] '@parcel/watcher-linux-arm64-glibc@2.5.0': resolution: {integrity: sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.5.0': resolution: {integrity: sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [musl] '@parcel/watcher-linux-x64-glibc@2.5.0': resolution: {integrity: sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-x64-musl@2.5.0': resolution: {integrity: sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [musl] '@parcel/watcher-win32-arm64@2.5.0': resolution: {integrity: sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig==} @@ -1494,56 +1500,67 @@ packages: resolution: {integrity: sha512-aL6hRwu0k7MTUESgkg7QHY6CoqPgr6gdQXRJI1/VbFlUMwsSzPGSR7sG5d+MCbYnJmJwThc2ol3nixj1fvI/zQ==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.52.0': resolution: {integrity: sha512-BTs0M5s1EJejgIBJhCeiFo7GZZ2IXWkFGcyZhxX4+8usnIo5Mti57108vjXFIQmmJaRyDwmV59Tw64Ap1dkwMw==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.52.0': resolution: {integrity: sha512-uj672IVOU9m08DBGvoPKPi/J8jlVgjh12C9GmjjBxCTQc3XtVmRkRKyeHSmIKQpvJ7fIm1EJieBUcnGSzDVFyw==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.52.0': resolution: {integrity: sha512-/+IVbeDMDCtB/HP/wiWsSzduD10SEGzIZX2945KSgZRNi4TSkjHqRJtNTVtVb8IRwhJ65ssI56krlLik+zFWkw==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.52.0': resolution: {integrity: sha512-U1vVzvSWtSMWKKrGoROPBXMh3Vwn93TA9V35PldokHGqiUbF6erSzox/5qrSMKp6SzakvyjcPiVF8yB1xKr9Pg==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-gnu@4.52.0': resolution: {integrity: sha512-X/4WfuBAdQRH8cK3DYl8zC00XEE6aM472W+QCycpQJeLWVnHfkv7RyBFVaTqNUMsTgIX8ihMjCvFF9OUgeABzw==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.52.0': resolution: {integrity: sha512-xIRYc58HfWDBZoLmWfWXg2Sq8VCa2iJ32B7mqfWnkx5mekekl0tMe7FHpY8I72RXEcUkaWawRvl3qA55og+cwQ==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.52.0': resolution: {integrity: sha512-mbsoUey05WJIOz8U1WzNdf+6UMYGwE3fZZnQqsM22FZ3wh1N887HT6jAOjXs6CNEK3Ntu2OBsyQDXfIjouI4dw==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.52.0': resolution: {integrity: sha512-qP6aP970bucEi5KKKR4AuPFd8aTx9EF6BvutvYxmZuWLJHmnq4LvBfp0U+yFDMGwJ+AIJEH5sIP+SNypauMWzg==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.52.0': resolution: {integrity: sha512-nmSVN+F2i1yKZ7rJNKO3G7ZzmxJgoQBQZ/6c4MuS553Grmr7WqR7LLDcYG53Z2m9409z3JLt4sCOhLdbKQ3HmA==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.52.0': resolution: {integrity: sha512-2d0qRo33G6TfQVjaMR71P+yJVGODrt5V6+T0BDYH4EMfGgdC/2HWDVjSSFw888GSzAZUwuska3+zxNUCDco6rQ==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-openharmony-arm64@4.52.0': resolution: {integrity: sha512-A1JalX4MOaFAAyGgpO7XP5khquv/7xKzLIyLmhNrbiCxWpMlnsTYr8dnsWM7sEeotNmxvSOEL7F65j0HXFcFsw==} @@ -1628,24 +1645,28 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-arm64-musl@4.1.13': resolution: {integrity: sha512-hZQrmtLdhyqzXHB7mkXfq0IYbxegaqTmfa1p9MBj72WPoDD3oNOh1Lnxf6xZLY9C3OV6qiCYkO1i/LrzEdW2mg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [musl] '@tailwindcss/oxide-linux-x64-gnu@4.1.13': resolution: {integrity: sha512-uaZTYWxSXyMWDJZNY1Ul7XkJTCBRFZ5Fo6wtjrgBKzZLoJNrG+WderJwAjPzuNZOnmdrVg260DKwXCFtJ/hWRQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-x64-musl@4.1.13': resolution: {integrity: sha512-oXiPj5mi4Hdn50v5RdnuuIms0PVPI/EG4fxAfFiIKQh5TgQgX7oSuDWntHW7WNIi/yVLAiS+CRGW4RkoGSSgVQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [musl] '@tailwindcss/oxide-wasm32-wasi@4.1.13': resolution: {integrity: sha512-+LC2nNtPovtrDwBc/nqnIKYh/W2+R69FA0hgoeOn64BdCX522u19ryLh3Vf3F8W49XBcMIxSe665kwy21FkhvA==} @@ -1708,30 +1729,35 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [glibc] '@tauri-apps/cli-linux-arm64-musl@2.9.5': resolution: {integrity: sha512-/gRBMnphS9E8riZ0LIbBhZ9Oy16A2rx/g3DGR0DcDBvUtkLfbL0lMu4s+sY85nkn9An15+cZ1ZK6d7AIqWahLA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [musl] '@tauri-apps/cli-linux-riscv64-gnu@2.9.5': resolution: {integrity: sha512-NOzjPF9YIBodjdkFcJmqINT0k3YDoR5ANM/jg6Z6s3Zmk8ScN6inI60jTxcfgfWyITiKsPy7GJyYou3Cm2XNzw==} engines: {node: '>= 10'} cpu: [riscv64] os: [linux] + libc: [glibc] '@tauri-apps/cli-linux-x64-gnu@2.9.5': resolution: {integrity: sha512-SfGbwgvTphM5y+J91NyU/psleMUlyyPkZyDCFg8WU1HX8DpKUT3Vwhb/W1xpUBGb56tJgGCO46FCVkr8w4Areg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [glibc] '@tauri-apps/cli-linux-x64-musl@2.9.5': resolution: {integrity: sha512-ZfeoiASAOGDzyvN+TDAg8A1pCeS082h4uc0vZKvtWUN+9QBIMfz0yJwltAv+SN/afap6NS6DVkbPV3UVuI9V5A==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [musl] '@tauri-apps/cli-win32-arm64-msvc@2.9.5': resolution: {integrity: sha512-ulg7irow+ekjaK4inFHVq7m1KQebDSYNb17DFKV+h+x7qnLZymz2gHK7df2u4YyEjqvzwRd3AJpU3HNxRurSFQ==} @@ -3886,24 +3912,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.30.1: resolution: {integrity: sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.30.1: resolution: {integrity: sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.30.1: resolution: {integrity: sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.30.1: resolution: {integrity: sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==} diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 38cdd41..e736ed4 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "log-lottery", - "version": "0.1.0", + "version": "0.0.4", "identifier": "to2026.xyz", "build": { "frontendDist": "../dist", @@ -34,4 +34,4 @@ "icons/icon.ico" ] } -} +} \ No newline at end of file diff --git a/src/locales/en.ts b/src/locales/en.ts index e304819..02ba8fe 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -1,153 +1,153 @@ export default { - button: { - enterLottery: 'Enter Lottery', - start: 'Start', - selectLucky: 'Draw the Lucky', - continue: 'Continue', - confirm: 'Confirm', - cancel: 'Cancel', - setting: 'Setting', - delete: 'Delete', - allDelete: 'Delete All', - downloadTemplate: 'Download Template', - importData: 'Import Data', - resetData: 'Reset Data', - exportResult: 'Export Result', - add: 'Add', - resetDefault: 'Reset Default', - resetAllData: 'Reset All Data', - clearPattern: 'Clear Pattern', - DefaultPattern: 'Default Pattern', - upload: 'Upload', - reset: 'Reset', - play: 'Play', - setLayout: 'Set Layout', - close: 'Close', - noInfoAndImport: 'No Info and import it', - useDefault: 'Use Default Data', - }, - sidebar: { - personConfiguration: 'Person Configuration', - personList: 'Person List', - winnerList: 'Winner List', - prizeConfiguration: 'Prize Configuration', - globalSetting: 'Global Configuration', - viewSetting: 'View Setting', - imagesManagement: 'Images Management', - musicManagement: 'Music Management', - operatingInstructions: 'Operating Instructions', - }, - viewTitle: { - personManagement: 'Person Management', - winnerManagement: 'Winner Management', - prizeManagement: 'Prize Management', - globalSetting: 'Global Setting', - operatingInstructions: 'Operating Instructions', - }, - table: { - // person configuration - number: 'Number', - name: 'Name', - prizeName: 'Name', - department: 'Department', - identity: 'Identity', - isLucky: 'Is Lucky', - operation: 'Operation', - setLuckyNumber: 'Set Lucky Number', - luckyPeopleNumber: 'Lucky People Number', + button: { + enterLottery: 'Enter Lottery', + start: 'Start', + selectLucky: 'Draw the Lucky', + continue: 'Continue', + confirm: 'Confirm', + cancel: 'Cancel', + setting: 'Setting', + delete: 'Delete', + allDelete: 'Delete All', + downloadTemplate: 'Download Template', + importData: 'Import Data', + resetData: 'Reset Data', + exportResult: 'Export Result', + add: 'Add', + resetDefault: 'Reset Default', + resetAllData: 'Reset All Data', + clearPattern: 'Clear Pattern', + DefaultPattern: 'Default Pattern', + upload: 'Upload', + reset: 'Reset', + play: 'Play', + setLayout: 'Set Layout', + close: 'Close', + noInfoAndImport: 'No Info and import it', + useDefault: 'Use Default Data', + }, + sidebar: { + personConfiguration: 'Person Configuration', + personList: 'Person List', + winnerList: 'Winner List', + prizeConfiguration: 'Prize Configuration', + globalSetting: 'Global Configuration', + viewSetting: 'View Setting', + imagesManagement: 'Images Management', + musicManagement: 'Music Management', + operatingInstructions: 'Operating Instructions', + }, + viewTitle: { + personManagement: 'Person Management', + winnerManagement: 'Winner Management', + prizeManagement: 'Prize Management', + globalSetting: 'Global Setting', + operatingInstructions: 'Operating Instructions', + }, + table: { + // person configuration + number: 'Number', + name: 'Name', + prizeName: 'Name', + department: 'Department', + identity: 'Identity', + isLucky: 'Is Lucky', + operation: 'Operation', + setLuckyNumber: 'Set Lucky Number', + luckyPeopleNumber: 'Lucky People Number', - detail: 'Detail', - noneData: 'No Data', - // prize configuration - fullParticipation: 'FullParticipation', - numberParticipants: 'NumberParticipants', - isDone: 'is Done', - image: 'Image', - onceNumber: 'Once Number', - time: 'Time', - // view setting - title: 'Main Title', - columnNumber: 'Column Number', - theme: 'Theme', - language: 'Language', - cardColor: 'Card Color', - winnerColor: 'Winner Color', - textColor: 'Text Color', - cardWidth: 'Card Width', - cardHeight: 'Card Height', - textSize: 'Text Size', - highlightColor: 'HighLight Color', - patternSetting: 'Pattern Setting', - alwaysDisplay: 'Always Display Prize List', - avatarDisplay: 'Show avatars or not', - selectPicture: 'Select a Picture', - backgroundImage: 'Select Background Image', - }, - dialog: { - titleTip: 'Tip!', - titleTemporary: 'Add Temporary Activity', - dialogPCWeb: 'Please use a PC browser to access for optimal display performance', - dialogDelAllPerson: 'This operation will delete all personnel list data. Do you want to continue?', - dialogResetWinner: 'This operation will clear the winning information of personnel. Do you want to continue?', - dialogResetAllData: 'This operation will reset all data. Do you want to continue?', - dialogSingleDrawLimit: 'Only 10 characters can be extracted in a single draw', - dialogLatestBrowser: 'Please use the latest version of Chrome or Edge browser', - tipResetPrize: 'Performing operations may reset data, please proceed with caution', - }, - tooltip: { - settingConfiguration: 'Setting/Configuration', - nextSong: 'Right Click to Next Song', - noSongPlay: 'No Song to Play', - prizeList: 'Prize List', - addActivity: 'Add Activity', - downloadTemplateTip: 'After downloading the file, please fill in the data in Excel and save it in xlsx format', - uploadExcelTip: 'Upload the modified Excel file', - leftClick: 'Left Click to Slice', - toHome: 'to Home', - resetLayout: 'This item is time-consuming and performance intensive', - defaultLayout: 'The default pattern setting is valid for 17 columns, please set the number of other columns yourself', - doneCount: 'Number of winners', - edit: 'Edit', - delete: 'Delete', - }, - error: { - require: 'required field', - requireNumber: 'please enter a number', - minNumber1: 'the minimum is 1', - maxNumber100: 'the maximum is 100', - uploadSuccess: 'Upload Success', - uploadFail: 'Upload Failed', - notImage: 'Not Image', - personIsAllDone: 'All Person Is Done', - personNotEnough: 'Person Is Not Enough', - startDraw: 'Now Draw {count} {leftover} people', - completeInformation: 'Please provide complete information', - }, - placeHolder: { - enterTitle: 'Enter Title', - name: 'Name', - winnerCount: 'Lucky Person Count', - }, - data: { - yes: 'Yes', - no: 'No', - number: 'Number', - isWin: 'isWin', - avatar: 'avatar', - department: 'Department', - name: 'Name', - identity: 'Identity', - prizeName: 'Prize Name', - prizeTime: 'Prize Time', - operation: 'Operation', - delete: 'Delete', - removePerson: 'Remove the Person', - defaultTitle: 'The Prelude to the Six Ministries of the Ming Dynasty Cabinet', - xlsxName: 'personListTemplate-en.xlsx', - readmeName: 'readme-en.md', - }, - footer: { - 'self-reflection': 'Turn inward and examine yourself when you encounter difficulties in life.', - 'thiefEasy': 'Thief difficult mountain thief easily, breaking heart.', - }, + detail: 'Detail', + noneData: 'No Data', + // prize configuration + fullParticipation: 'FullParticipation', + numberParticipants: 'NumberParticipants', + isDone: 'is Done', + image: 'Image', + onceNumber: 'Once Number', + time: 'Time', + // view setting + title: 'Main Title', + columnNumber: 'Column Number', + theme: 'Theme', + language: 'Language', + cardColor: 'Card Color', + winnerColor: 'Winner Color', + textColor: 'Text Color', + cardWidth: 'Card Width', + cardHeight: 'Card Height', + textSize: 'Text Size', + highlightColor: 'HighLight Color', + patternSetting: 'Pattern Setting', + alwaysDisplay: 'Always Display Prize List', + avatarDisplay: 'Show avatars or not', + selectPicture: 'Select a Picture', + backgroundImage: 'Select Background Image', + }, + dialog: { + titleTip: 'Tip!', + titleTemporary: 'Add Temporary Activity', + dialogPCWeb: 'Please use a PC browser to access for optimal display performance', + dialogDelAllPerson: 'This operation will delete all personnel list data. Do you want to continue?', + dialogResetWinner: 'This operation will clear the winning information of personnel. Do you want to continue?', + dialogResetAllData: 'This operation will reset all data. Do you want to continue?', + dialogSingleDrawLimit: 'Only 10 characters can be extracted in a single draw', + dialogLatestBrowser: 'Please use the latest version of Chrome or Edge browser', + tipResetPrize: 'Performing operations may reset data and cant recover, please proceed with caution', + }, + tooltip: { + settingConfiguration: 'Setting/Configuration', + nextSong: 'Right Click to Next Song', + noSongPlay: 'No Song to Play', + prizeList: 'Prize List', + addActivity: 'Add Activity', + downloadTemplateTip: 'After downloading the file, please fill in the data in Excel and save it in xlsx format', + uploadExcelTip: 'Upload the modified Excel file', + leftClick: 'Left Click to Slice', + toHome: 'to Home', + resetLayout: 'This item is time-consuming and performance intensive', + defaultLayout: 'The default pattern setting is valid for 17 columns, please set the number of other columns yourself', + doneCount: 'Number of winners', + edit: 'Edit', + delete: 'Delete', + }, + error: { + require: 'required field', + requireNumber: 'please enter a number', + minNumber1: 'the minimum is 1', + maxNumber100: 'the maximum is 100', + uploadSuccess: 'Upload Success', + uploadFail: 'Upload Failed', + notImage: 'Not Image', + personIsAllDone: 'All Person Is Done', + personNotEnough: 'Person Is Not Enough', + startDraw: 'Now Draw {count} {leftover} people', + completeInformation: 'Please provide complete information', + }, + placeHolder: { + enterTitle: 'Enter Title', + name: 'Name', + winnerCount: 'Lucky Person Count', + }, + data: { + yes: 'Yes', + no: 'No', + number: 'Number', + isWin: 'isWin', + avatar: 'avatar', + department: 'Department', + name: 'Name', + identity: 'Identity', + prizeName: 'Prize Name', + prizeTime: 'Prize Time', + operation: 'Operation', + delete: 'Delete', + removePerson: 'Remove the Person', + defaultTitle: 'The Prelude to the Six Ministries of the Ming Dynasty Cabinet', + xlsxName: 'personListTemplate-en.xlsx', + readmeName: 'readme-en.md', + }, + footer: { + 'self-reflection': 'Turn inward and examine yourself when you encounter difficulties in life.', + 'thiefEasy': 'Thief difficult mountain thief easily, breaking heart.', + }, } diff --git a/src/locales/zhCn.ts b/src/locales/zhCn.ts index 94b741d..5671de5 100644 --- a/src/locales/zhCn.ts +++ b/src/locales/zhCn.ts @@ -1,153 +1,153 @@ export default { - button: { - enterLottery: '进入抽奖', - start: '开始', - selectLucky: '抽取幸运儿', - continue: '继续', - confirm: '确认', - cancel: '取消', - setting: '设置', - delete: '删除', - allDelete: '删除全部', - downloadTemplate: '下载模板', - importData: '导入数据', - resetData: '重置数据', - exportResult: '导出结果', - add: '添加', - resetDefault: '重置为默认', - resetAllData: '重置所有数据', - clearPattern: '清除图案', - DefaultPattern: '默认图案', - upload: '上传', - reset: '重置', - play: '播放', - setLayout: '重设布局', - close: '关闭', - noInfoAndImport: '暂无人员信息,前往导入', - useDefault: '使用默认数据', - }, - sidebar: { - personConfiguration: '人员配置', - personList: '人员列表', - winnerList: '中奖人员', - prizeConfiguration: '奖品配置', - globalSetting: '全局配置', - viewSetting: '界面设置', - imagesManagement: '图片管理', - musicManagement: '音乐管理', - operatingInstructions: '操作说明', - }, - viewTitle: { - personManagement: '人员管理', - winnerManagement: '已中奖人员管理', - prizeManagement: '奖项配置', - globalSetting: '全局配置', - operatingInstructions: '操作说明', - }, - table: { - // person configuration - number: '编号', - name: '姓名', - prizeName: '名称', - department: '部门', - identity: '身份', - isLucky: '是否中奖', - operation: '操作', - setLuckyNumber: '设置中奖人数', - luckyPeopleNumber: '中奖人数', + button: { + enterLottery: '进入抽奖', + start: '开始', + selectLucky: '抽取幸运儿', + continue: '继续', + confirm: '确认', + cancel: '取消', + setting: '设置', + delete: '删除', + allDelete: '删除全部', + downloadTemplate: '下载模板', + importData: '导入数据', + resetData: '重置数据', + exportResult: '导出结果', + add: '添加', + resetDefault: '重置为默认', + resetAllData: '重置所有数据', + clearPattern: '清除图案', + DefaultPattern: '默认图案', + upload: '上传', + reset: '重置', + play: '播放', + setLayout: '重设布局', + close: '关闭', + noInfoAndImport: '暂无人员信息,前往导入', + useDefault: '使用默认数据', + }, + sidebar: { + personConfiguration: '人员配置', + personList: '人员列表', + winnerList: '中奖人员', + prizeConfiguration: '奖品配置', + globalSetting: '全局配置', + viewSetting: '界面设置', + imagesManagement: '图片管理', + musicManagement: '音乐管理', + operatingInstructions: '操作说明', + }, + viewTitle: { + personManagement: '人员管理', + winnerManagement: '已中奖人员管理', + prizeManagement: '奖项配置', + globalSetting: '全局配置', + operatingInstructions: '操作说明', + }, + table: { + // person configuration + number: '编号', + name: '姓名', + prizeName: '名称', + department: '部门', + identity: '身份', + isLucky: '是否中奖', + operation: '操作', + setLuckyNumber: '设置中奖人数', + luckyPeopleNumber: '中奖人数', - detail: '详细信息', - noneData: '暂无数据', - // prize configuration - fullParticipation: '全员参加', - numberParticipants: '抽奖人数', - isDone: '已抽取', - image: '图片', - onceNumber: '单次抽取个数', - time: '时间', - // view setting - title: '主标题', - columnNumber: '列数', - theme: '主题', - language: '语言', - cardColor: '卡片颜色', - winnerColor: '中奖卡片颜色', - textColor: '文字颜色', - cardWidth: '卡片宽度', - cardHeight: '卡片高度', - textSize: '文字大小', - highlightColor: '高亮颜色', - patternSetting: '图案设置', - alwaysDisplay: '常显奖项列表', - avatarDisplay: '是否显示头像', - selectPicture: '选择一张图片', - backgroundImage: '选择背景图片', - }, - dialog: { - titleTip: '提示!', - titleTemporary: '增加临时抽奖', - dialogPCWeb: '请使用PC进行访问以获得最佳显示效果', - dialogDelAllPerson: '该操作会删除所有人员数据,是否继续?', - dialogResetWinner: '该操作会清空人员中奖信息,是否继续?', - dialogResetAllData: '该操作会重置所有数据,是否继续?', - dialogSingleDrawLimit: '单次抽取只能抽取10位', - dialogLatestBrowser: '请使用最新版Chrome或者Edge浏览器', - tipResetPrize: '进行操作可能会重置数据,请谨慎操作', - }, - tooltip: { - settingConfiguration: '设置/配置', - nextSong: '右键点击下一首', - noSongPlay: '没有音乐可以播放', - prizeList: '奖项列表', - addActivity: '添加抽奖', - downloadTemplateTip: '下载文件后,请在excel中填写数据,并保存为xlsx格式', - uploadExcelTip: '上传修改好的excel文件', - leftClick: '左键切割', - toHome: '主页', - resetLayout: '该项比较耗费时间和性能', - defaultLayout: '默认图案设置针对17列时有效,其他列数请自行设置', - doneCount: '已抽取', - edit: '编辑', - delete: '删除', - }, - error: { - require: '必填项', - requireNumber: '请输入数字', - minNumber1: '最小为1', - maxNumber100: '最大为100', - uploadSuccess: '上传成功', - uploadFail: '上传失败', - notImage: '不是图片', - personIsAllDone: '抽奖抽完了', - personNotEnough: '抽奖人数不足', - startDraw: '现在抽取{count}{leftover}人', - completeInformation: '请填写完整信息', - }, - placeHolder: { - enterTitle: '输入标题', - name: '名称', - winnerCount: '中奖人数', - }, - data: { - yes: '是', - no: '否', - number: '编号', - isWin: '是否中奖', - avatar: '头像', - department: '部门', - name: '姓名', - identity: '身份', - prizeName: '获奖', - prizeTime: '获奖时间', - operation: '操作', - delete: '删除', - removePerson: '移入未中奖名单', - defaultTitle: '大明内阁六部御前奏对', - xlsxName: '人口登记表-zhCn.xlsx', - readmeName: 'readme-zhCn.md', - }, - footer: { - 'self-reflection': '行有不得,反求诸己', - 'thiefEasy': '破山中贼易,破心中贼难', - }, + detail: '详细信息', + noneData: '暂无数据', + // prize configuration + fullParticipation: '可重复', + numberParticipants: '抽奖人数', + isDone: '已抽取', + image: '图片', + onceNumber: '单次抽取个数', + time: '时间', + // view setting + title: '主标题', + columnNumber: '列数', + theme: '主题', + language: '语言', + cardColor: '卡片颜色', + winnerColor: '中奖卡片颜色', + textColor: '文字颜色', + cardWidth: '卡片宽度', + cardHeight: '卡片高度', + textSize: '文字大小', + highlightColor: '高亮颜色', + patternSetting: '图案设置', + alwaysDisplay: '常显奖项列表', + avatarDisplay: '是否显示头像', + selectPicture: '选择一张图片', + backgroundImage: '选择背景图片', + }, + dialog: { + titleTip: '提示!', + titleTemporary: '增加临时抽奖', + dialogPCWeb: '请使用PC进行访问以获得最佳显示效果', + dialogDelAllPerson: '该操作会删除所有人员数据,是否继续?', + dialogResetWinner: '该操作会清空人员中奖信息,是否继续?', + dialogResetAllData: '该操作会重置所有数据,是否继续?', + dialogSingleDrawLimit: '单次抽取只能抽取10位', + dialogLatestBrowser: '请使用最新版Chrome或者Edge浏览器', + tipResetPrize: '进行操作可能会重置数据并不可恢复,请谨慎操作', + }, + tooltip: { + settingConfiguration: '设置/配置', + nextSong: '右键点击下一首', + noSongPlay: '没有音乐可以播放', + prizeList: '奖项列表', + addActivity: '添加抽奖', + downloadTemplateTip: '下载文件后,请在excel中填写数据,并保存为xlsx格式', + uploadExcelTip: '上传修改好的excel文件', + leftClick: '左键切割', + toHome: '主页', + resetLayout: '该项比较耗费时间和性能', + defaultLayout: '默认图案设置针对17列时有效,其他列数请自行设置', + doneCount: '已抽取', + edit: '编辑', + delete: '删除', + }, + error: { + require: '必填项', + requireNumber: '请输入数字', + minNumber1: '最小为1', + maxNumber100: '最大为100', + uploadSuccess: '上传成功', + uploadFail: '上传失败', + notImage: '不是图片', + personIsAllDone: '抽奖抽完了', + personNotEnough: '抽奖人数不足', + startDraw: '现在抽取{count}{leftover}人', + completeInformation: '请填写完整信息', + }, + placeHolder: { + enterTitle: '输入标题', + name: '名称', + winnerCount: '中奖人数', + }, + data: { + yes: '是', + no: '否', + number: '编号', + isWin: '是否中奖', + avatar: '头像', + department: '部门', + name: '姓名', + identity: '身份', + prizeName: '获奖', + prizeTime: '获奖时间', + operation: '操作', + delete: '删除', + removePerson: '移入未中奖名单', + defaultTitle: '大明内阁六部御前奏对', + xlsxName: '人口登记表-zhCn.xlsx', + readmeName: 'readme-zhCn.md', + }, + footer: { + 'self-reflection': '行有不得,反求诸己', + 'thiefEasy': '破山中贼易,破心中贼难', + }, } diff --git a/src/views/Config/Global/FaceConfig/index.vue b/src/views/Config/Global/FaceConfig/index.vue index 3692cb2..0fef3a1 100644 --- a/src/views/Config/Global/FaceConfig/index.vue +++ b/src/views/Config/Global/FaceConfig/index.vue @@ -1,9 +1,9 @@