diff --git a/.eslintrc.js b/.eslintrc.js index c1eef9ab..923781ec 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,19 +1,31 @@ module.exports = { - extends: "eslint:recommended", + root: true, + env: { + browser: true, + node: true, + es2022: true, + }, + extends: [ + "plugin:vue/vue3-essential", + "eslint:recommended", + "@vue/eslint-config-typescript", + ], parser: "vue-eslint-parser", parserOptions: { - sourceType: "module", - ecmaVersion: "latest", parser: "@typescript-eslint/parser", + ecmaVersion: "latest", + sourceType: "module", }, - overrides: [ - { - files: ["*.ts", "*.js", "*.vue", "*.mts", "*.cts", "*.tsx"], - rules: { - "no-undef": "off", - - "no-unused-vars": "warn", + rules: { + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", + { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", }, - }, - ], + ], + "vue/multi-word-component-names": "off", + "vue/no-reserved-component-names": "off", + }, }; diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index ef8a5b07..018b0c87 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -45,6 +45,13 @@ AWallet is a Vue 3-based cryptocurrency wallet for Algorand blockchain, built wi - ESLint errors in `vue.config.js` due to obfuscated code are expected - Exit code 1 is normal due to ESLint errors +### Localization + +- **Master File**: `src/locales/en.json` is the source of truth for all localization keys. +- **Synchronization**: All other locale files (`af.json`, `cs.json`, `es.json`, `hu.json`, `it.json`, `nl.json`, `ru.json`, `sk.json`, `tr.json`) MUST have the exact same keys in the exact same order as `en.json`. +- **Missing Translations**: If a key is missing in a target locale, it should be added. If a translation is not available, use the English value as a placeholder or attempt a translation. +- **Formatting**: Ensure all JSON files use 2-space indentation and have a newline at the end. + ## Testing ### Cypress E2E Tests diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index e9558405..00000000 --- a/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset' - ] -} diff --git a/check_algosdk.ts b/check_algosdk.ts new file mode 100644 index 00000000..fcfd1bdb --- /dev/null +++ b/check_algosdk.ts @@ -0,0 +1,5 @@ +import algosdk from "algosdk"; +console.log("indexerModels:", !!algosdk.indexerModels); +if (algosdk.indexerModels) { + console.log("Transaction:", !!algosdk.indexerModels.Transaction); +} diff --git a/cypress.config.ts b/cypress.config.ts index b60f3f28..a9991141 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -13,7 +13,7 @@ export default defineConfig({ responseTimeout: 30000, }, - setupNodeEvents(on, config) { + setupNodeEvents(on) { on("before:browser:launch", (browser, launchOptions) => { if (browser.family === "chromium" && browser.name !== "electron") { launchOptions.preferences.default.intl = { accept_languages: "en" }; diff --git a/cypress/e2e/2-setup-account/create-arc76-account.cy.ts b/cypress/e2e/2-setup-account/create-arc76-account.cy.ts index 4c6ed27d..cd6a0be3 100644 --- a/cypress/e2e/2-setup-account/create-arc76-account.cy.ts +++ b/cypress/e2e/2-setup-account/create-arc76-account.cy.ts @@ -18,18 +18,23 @@ describe("Create ARC76 Account", () => { // Create wallet using custom command cy.createTestWallet(); - // Navigate to account creation via menu using text-based selectors - // First expand the Wallet menu - cy.contains("Wallet", { timeout: 10000 }).click(); + // The createTestWallet already redirects to /accounts - // Wait for menu to expand and click on "New account" - //cy.contains("New account", { timeout: 10000 }).should("be.visible").click(); - cy.get(".pi-plus").first().trigger("mouseenter").wait(1000); + // Wait for the navbar to load + cy.get("nav", { timeout: 10000 }).should("be.visible"); + + // Use the menu to navigate to ARC76 account creation + cy.contains("Wallet", { timeout: 10000 }).click({ force: true }); + + // Wait for menu to expand and hover on "New account" + cy.contains("New account", { timeout: 10000 }).trigger("mouseenter", { + force: true, + }); // Wait for submenu to appear and click on "Email & Password account" - cy.contains("Email & Password account", { timeout: 10000 }) - .should("be.visible") - .click(); + cy.contains("Email & Password account", { timeout: 10000 }).click({ + force: true, + }); // Wait for ARC76 form to load cy.url().should("include", "/new-account/email-password"); diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js index 59b2bab6..24a93581 100644 --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -19,4 +19,5 @@ module.exports = (on, config) => { // `on` is used to hook into various events Cypress emits // `config` is the resolved Cypress config -} + console.log("Cypress plugins/index.js loaded", on, config); +}; diff --git a/public/index.html b/index.html similarity index 53% rename from public/index.html rename to index.html index b7a0f8f1..166faac9 100644 --- a/public/index.html +++ b/index.html @@ -4,42 +4,40 @@ - -