diff --git a/package.json b/package.json index 99fa312..0734e00 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "vue-router": "^4.0.12" }, "devDependencies": { - "@iconify-json/bx": "^1.0.3", "@iconify-json/ph": "^1.0.4", "@intlify/vite-plugin-vue-i18n": "^3.3.0", "@rushstack/eslint-patch": "^1.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fb8defc..add6c70 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,7 +1,6 @@ lockfileVersion: 5.3 specifiers: - '@iconify-json/bx': ^1.0.3 '@iconify-json/ph': ^1.0.4 '@intlify/vite-plugin-vue-i18n': ^3.3.0 '@rushstack/eslint-patch': ^1.1.0 @@ -41,7 +40,6 @@ dependencies: vue-router: 4.0.12_vue@3.2.30 devDependencies: - '@iconify-json/bx': 1.0.3 '@iconify-json/ph': 1.0.4 '@intlify/vite-plugin-vue-i18n': 3.3.0_vite@2.8.1+vue-i18n@9.1.9 '@rushstack/eslint-patch': 1.1.0 @@ -179,12 +177,6 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true - /@iconify-json/bx/1.0.3: - resolution: {integrity: sha512-nwUxwOwocTp5u+KcBUraqEXiC7VG6niL6RQIdbLsRjZwouxayyVXPIkBPwMEmxpcTk1SA8Jh52MI+Scex1wJSA==} - dependencies: - '@iconify/types': 1.0.12 - dev: true - /@iconify-json/ph/1.0.4: resolution: {integrity: sha512-hcxC2k25/Lh/bgXgbwAD4WvnC8BeunSqafFwIOyL1dCu3QGBgKmPFIBUv4W2kBm+rbrv7F3WHPFBAJDVrjpunA==} dependencies: diff --git a/src/App.vue b/src/App.vue index 7ad1b92..70e9399 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,7 @@ diff --git a/src/components/AppHeader.vue b/src/components/AppHeader.vue new file mode 100644 index 0000000..82a2ae9 --- /dev/null +++ b/src/components/AppHeader.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/components/OperationsList.vue b/src/components/OperationsList.vue index 8557da9..72f996b 100644 --- a/src/components/OperationsList.vue +++ b/src/components/OperationsList.vue @@ -11,24 +11,30 @@
+ class="flex items-center border-b border-stone-600" + :class="{ 'text-red-400': isOperationInvalid(op) }"> -
+
{{ op.left?.value ?? ' ' }}
- -
- {{ op.operator ?? ' ' }} + + +
+ +  
-
+ +
{{ op.right?.value ?? ' ' }}
- = +
@@ -72,13 +78,14 @@ import { isOperationResultValid, operate, } from '@/algo' -import { operations, plaquettes } from '@/game-state' -import { GameState, gameState } from '@/globals' +import PlaquetteBox from '@/components/common/PlaquetteBox.vue' +import { gameState, operations, plaquettes } from '@/composables/game-state' +import { operatorIcons } from '@/composables/operators' +import { GameState } from '@/globals' import { Operation } from '@/types' -import IconUndo from '~icons/bx/bx-undo' +import IconEquals from '~icons/ph/equals-bold' import IconSad from '~icons/ph/smiley-sad' - -import PlaquetteBox from './common/PlaquetteBox.vue' +import IconUndo from '~icons/ph/x-circle-fill' const transDelay = 100 diff --git a/src/components/OperatorsList.vue b/src/components/OperatorsList.vue new file mode 100644 index 0000000..4c9ec31 --- /dev/null +++ b/src/components/OperatorsList.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/components/PlaquettesList.vue b/src/components/PlaquettesList.vue new file mode 100644 index 0000000..6133bf9 --- /dev/null +++ b/src/components/PlaquettesList.vue @@ -0,0 +1,43 @@ + + + diff --git a/src/components/common/NumberBox.vue b/src/components/common/NumberBox.vue deleted file mode 100644 index 8183b0e..0000000 --- a/src/components/common/NumberBox.vue +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/src/components/common/PlaquetteBox.vue b/src/components/common/PlaquetteBox.vue index c394938..69c7774 100644 --- a/src/components/common/PlaquetteBox.vue +++ b/src/components/common/PlaquetteBox.vue @@ -1,7 +1,7 @@