From 6aac4f772761d1811b26cbb35c71646d973f350c Mon Sep 17 00:00:00 2001 From: Yuriy Evdokimov Date: Wed, 13 Dec 2023 15:05:17 +0500 Subject: [PATCH] add analytics, v 1.2.1 --- README.md | 31 +++++++------------------------ index.html | 1 + package.json | 2 +- src/store.ts | 8 +++++--- src/types.ts | 9 ++++++++- 5 files changed, 22 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 1ebe379..38a72b9 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,10 @@ -# React + TypeScript + Vite +# Pinyin Dictation -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +this is a source code repository for pinyin.wst74.ru site -Currently, two official plugins are available: +## version history -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: - -- Configure the top-level `parserOptions` property like this: - -```js - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - project: ['./tsconfig.json', './tsconfig.node.json'], - tsconfigRootDir: __dirname, - }, -``` - -- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` -- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list +v 1.2.1 +added analytics script call +this README instead of default vitejs +begin of multivoice \ No newline at end of file diff --git a/index.html b/index.html index d03d427..f2d6d9a 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@ + Pinyin dictation diff --git a/package.json b/package.json index df2ed27..074499c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "pinyindictation", "author": {"email": "rurik19@yandex.ru", "name": "Юрий Евдокимов"}, "private": true, - "version": "1.2.0", + "version": "1.2.1", "type": "module", "scripts": { "dev": "vite", diff --git a/src/store.ts b/src/store.ts index 6e4a8af..f6e3802 100644 --- a/src/store.ts +++ b/src/store.ts @@ -1,6 +1,6 @@ import { Context, createContext, Dispatch, useContext } from "react"; import { Action, ToggleType } from "./reducer" -import { Syllable, SylPart, Tone } from "./types"; +import { SoundPackName, Syllable, SylPart, Tone } from "./types"; import { isEnabled } from "./utils"; export interface IState { @@ -17,7 +17,8 @@ export interface IState { allEnabled: (type: ToggleType) => false, isEnabled: (type: ToggleType, index: string) => false, isFound: () => false, - isToneChecked: (toneNo: number) => false + isToneChecked: (toneNo: number) => false, + soundPackName: SoundPackName } export interface IStore { @@ -48,7 +49,8 @@ export const defaultState:object = { }, isFound: function():boolean { return (this as IState).foundSyllables!.length > 0 && (this as IState).toneChecks!.length > 0} , - isToneChecked: function(toneNo: number):boolean{ return (this as IState).toneChecks.includes(toneNo) } + isToneChecked: function(toneNo: number):boolean{ return (this as IState).toneChecks.includes(toneNo) }, + soundPackName: SoundPackName.archchinese } export const AppContext:Context = createContext({ state: defaultState as IState, dispatch: () => null }) diff --git a/src/types.ts b/src/types.ts index b62943f..4733c81 100644 --- a/src/types.ts +++ b/src/types.ts @@ -34,4 +34,11 @@ export enum BtnColor { green = "success" } -export enum Status {params, prepare, playing, plaied, showlist} \ No newline at end of file +export enum Status {params, prepare, playing, plaied, showlist} + +export enum SoundPackName { archchinese, dongchinesea, dongchineseb, dongchinesec } + +export type SoundPack = { + name: SoundPackName, + audioPath: string +} \ No newline at end of file