diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 05ea413..ebf9662 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -4,8 +4,6 @@ name: Node.js CI on: - push: - branches: [ "main" ] pull_request: branches: [ "main" ] diff --git a/package.json b/package.json index e4ef8e8..06241e7 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "three-css3d": "^1.0.6", "vue": "^3.4.31", "vue-dompurify-html": "^5.1.0", + "vue-i18n": "^10.0.4", "vue-router": "^4.4.0", "vue-toast-notification": "^3", "vue3-colorpicker": "^2.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 78ed7e3..83dafbb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,6 +56,9 @@ importers: vue-dompurify-html: specifier: ^5.1.0 version: 5.1.0(vue@3.4.31(typescript@5.5.3)) + vue-i18n: + specifier: ^10.0.4 + version: 10.0.4(vue@3.4.31(typescript@5.5.3)) vue-router: specifier: ^4.4.0 version: 4.4.0(vue@3.4.31(typescript@5.5.3)) @@ -565,6 +568,18 @@ packages: '@iconify/utils@2.1.25': resolution: {integrity: sha512-Y+iGko8uv/Fz5bQLLJyNSZGOdMW0G7cnlEX1CiNcKsRXX9cq/y/vwxrIAtLCZhKHr3m0VJmsjVPsvnM4uX8YLg==} + '@intlify/core-base@10.0.4': + resolution: {integrity: sha512-GG428DkrrWCMhxRMRQZjuS7zmSUzarYcaHJqG9VB8dXAxw4iQDoKVQ7ChJRB6ZtsCsX3Jse1PEUlHrJiyQrOTg==} + engines: {node: '>= 16'} + + '@intlify/message-compiler@10.0.4': + resolution: {integrity: sha512-AFbhEo10DP095/45EauinQJ5hJ3rJUmuuqltGguvc3WsvezZN+g8qNHLGWKu60FHQVizMrQY7VJ+zVlBXlQQkQ==} + engines: {node: '>= 16'} + + '@intlify/shared@10.0.4': + resolution: {integrity: sha512-ukFn0I01HsSgr3VYhYcvkTCLS7rGa0gw4A4AMpcy/A9xx/zRJy7PS2BElMXLwUazVFMAr5zuiTk3MQeoeGXaJg==} + engines: {node: '>= 16'} + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -1034,6 +1049,7 @@ packages: acorn-import-assertions@1.9.0: resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} + deprecated: package has been renamed to acorn-import-attributes peerDependencies: acorn: ^8 @@ -3230,11 +3246,6 @@ packages: uglify-js: optional: true - terser@5.24.0: - resolution: {integrity: sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==} - engines: {node: '>=10'} - hasBin: true - terser@5.31.1: resolution: {integrity: sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==} engines: {node: '>=10'} @@ -3590,6 +3601,12 @@ packages: peerDependencies: eslint: '>=6.0.0' + vue-i18n@10.0.4: + resolution: {integrity: sha512-1xkzVxqBLk2ZFOmeI+B5r1J7aD/WtNJ4j9k2mcFcQo5BnOmHBmD7z4/oZohh96AAaRZ4Q7mNQvxc9h+aT+Md3w==} + engines: {node: '>= 16'} + peerDependencies: + vue: ^3.0.0 + vue-router@4.4.0: resolution: {integrity: sha512-HB+t2p611aIZraV2aPSRNXf0Z/oLZFrlygJm+sZbdJaW6lcFqEDQwnzUBXn+DApw+/QzDU/I9TeWx9izEjTmsA==} peerDependencies: @@ -4166,6 +4183,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@intlify/core-base@10.0.4': + dependencies: + '@intlify/message-compiler': 10.0.4 + '@intlify/shared': 10.0.4 + + '@intlify/message-compiler@10.0.4': + dependencies: + '@intlify/shared': 10.0.4 + source-map-js: 1.2.0 + + '@intlify/shared@10.0.4': {} + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -7042,18 +7071,10 @@ snapshots: jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 - terser: 5.24.0 + terser: 5.31.1 webpack: 5.89.0 optional: true - terser@5.24.0: - dependencies: - '@jridgewell/source-map': 0.3.5 - acorn: 8.12.0 - commander: 2.20.3 - source-map-support: 0.5.21 - optional: true - terser@5.31.1: dependencies: '@jridgewell/source-map': 0.3.5 @@ -7437,6 +7458,13 @@ snapshots: transitivePeerDependencies: - supports-color + vue-i18n@10.0.4(vue@3.4.31(typescript@5.5.3)): + dependencies: + '@intlify/core-base': 10.0.4 + '@intlify/shared': 10.0.4 + '@vue/devtools-api': 6.5.1 + vue: 3.4.31(typescript@5.5.3) + vue-router@4.4.0(vue@3.4.31(typescript@5.5.3)): dependencies: '@vue/devtools-api': 6.5.1 diff --git a/public/readme-en.md b/public/readme-en.md new file mode 100644 index 0000000..a18f483 --- /dev/null +++ b/public/readme-en.md @@ -0,0 +1,31 @@ +# Operation Guide + +## Steps + +1. Upon first entry, no data will be displayed. You can choose to use default data to view the overall display effect. It is recommended to import your own data for operation. The steps are as follows: + + a. Personnel Configuration - Personnel List - Download Template, download the data template and modify it with your data (please note that the header cannot be modified). + + b. After modification, click 'Upload File' on the same page to upload the modified Excel table. + +2. Enter the Prize Configuration to modify your prize information. Try to keep the name short for better display; "All Participants" indicates whether this award will be drawn from all participants (those who have already won can still participate); "Winners" refers to the number of people to be drawn for this award; "Already Won" cannot be edited; "Selected" means this award has been used, unselecting it will reset the award but not the winners; "Image" is the prize image displayed on the home page (you can upload images in the image list); "Left Icon" is used to adjust the order of prizes. + +Completing the above two steps allows normal use. + +## Function Description + +1. Add Temporary Draw: There is a '+' button in the prize list on the draw page. Clicking it allows you to add a temporary draw. Note: Only one temporary draw can be added at a time. After adding successfully, the current prize will be set to the temporary prize, and after drawing, it will return to the normal prize list. +2. Music and Image List: You can upload files yourself for use. After uploading images successfully, you can select them in the prize configuration for display. After uploading music successfully, it will be added to the play list. +3. Music Playback: Left-click with the mouse to play/pause, right-click to play the next song. +4. Interface Configuration - Pattern Settings: You can use the mouse to click and customize the highlighted patterns on the home page. +5. If you do not want to display the prize list on the home page, uncheck 'Always Show Prize List' in the interface configuration. +6. When clicking buttons on the home page, the button value will not update immediately but will only update after the animation ends. This is a normal phenomenon. + +## Shortcuts + +Shortcuts are set up on the draw page. + +| Shortcut | Description | +| --- | --- | +| Space | Enter Draw / Start / Draw Lucky Winner / Continue | +| Esc | Cancel | \ No newline at end of file diff --git a/public/readme.md b/public/readme-zh-cn.md similarity index 100% rename from public/readme.md rename to public/readme-zh-cn.md diff --git a/public/人口登记表.xlsx b/public/人口登记表-en.xlsx similarity index 100% rename from public/人口登记表.xlsx rename to public/人口登记表-en.xlsx diff --git a/public/人口登记表-zhCn.xlsx b/public/人口登记表-zhCn.xlsx new file mode 100644 index 0000000..7e88377 Binary files /dev/null and b/public/人口登记表-zhCn.xlsx differ diff --git a/src/App.vue b/src/App.vue index 7523bee..32c8287 100644 --- a/src/App.vue +++ b/src/App.vue @@ -66,13 +66,13 @@ onMounted(() => {