Skip to content

Commit

Permalink
npm up
Browse files Browse the repository at this point in the history
  • Loading branch information
swantzter committed Jan 21, 2024
1 parent 7192c92 commit 43154ac
Show file tree
Hide file tree
Showing 7 changed files with 1,485 additions and 988 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
'@typescript-eslint/return-await': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'vue/max-attributes-per-line': ['warn', { singleline: 5 }],
'vue/multi-word-component-names': 'off'
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-unsafe-argument': 'off'
}
}
2,379 changes: 1,435 additions & 944 deletions package-lock.json

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,38 @@
"codegen:watch": "npm run codegen -- --watch"
},
"dependencies": {
"@apollo/client": "^3.8.1",
"@apollo/client": "^3.8.10",
"@ropescore/components": "^1.8.1",
"@sentry/vue": "^7.64.0",
"@vue/apollo-composable": "^4.0.0-beta.8",
"@vue/tsconfig": "^0.4.0",
"@vueuse/core": "^10.4.0",
"graphql": "^16.8.0",
"graphql-ws": "^5.14.0",
"@sentry/vue": "^7.94.1",
"@vue/apollo-composable": "^4.0.0",
"@vue/tsconfig": "^0.5.1",
"@vueuse/core": "^10.7.2",
"graphql": "^16.8.1",
"graphql-ws": "^5.14.3",
"idb-keyval": "^6.2.1",
"safari-14-idb-fix": "^3.0.0",
"uuid": "^9.0.0",
"vue": "^3.3.4",
"vue-router": "^4.2.4"
"uuid": "^9.0.1",
"vue": "^3.4.15",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/introspection": "^4.0.0",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@graphql-codegen/typescript-vue-apollo": "^3.3.7",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"@vitejs/plugin-vue": "^4.3.3",
"@vue/compiler-sfc": "^3.3.4",
"eslint": "^8.48.0",
"eslint-config-standard-with-typescript": "^38.0.0",
"eslint-plugin-vue": "^9.17.0",
"typescript": "5.2",
"vite": "^4.4.9",
"vite-plugin-pwa": "^0.16.4",
"vite-plugin-windicss": "^1.9.1",
"vue-tsc": "^1.8.8"
"@graphql-codegen/typescript-vue-apollo": "^4.1.0",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@vitejs/plugin-vue": "^5.0.3",
"@vue/compiler-sfc": "^3.4.15",
"eslint": "^8.56.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-vue": "^9.20.1",
"typescript": "5.3",
"vite": "^5.0.12",
"vite-plugin-pwa": "^0.17.4",
"vite-plugin-windicss": "^1.9.3",
"vue-tsc": "^1.8.27"
}
}
4 changes: 2 additions & 2 deletions src/hooks/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const timeouts = new Map<string, Stoppable>()
export default function useNotifications () {
return {
notifications,
push (notif: Omit<ErrorMessage, 'id'> | Omit<Notification, 'id'>) {
push: (notif: Omit<ErrorMessage, 'id'> | Omit<Notification, 'id'>) => {
if (isErrorMessage(notif) && notif.code) {
const exists = notifications.value.find(e => isErrorMessage(e) && e.code === notif.code)
if (exists) {
Expand All @@ -46,7 +46,7 @@ export default function useNotifications () {
timeouts.delete(id)
}, 5000))
},
pop (id: Notification['id']) {
pop: (id: Notification['id']) => {
const errIdx = notifications.value.findIndex(e => e.id === id)
if (errIdx > -1) notifications.value.splice(errIdx, 1)
timeouts.get(id)?.stop()
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createApp } from 'vue'
import { createApp, type Component } from 'vue'
import * as Sentry from '@sentry/vue'
import 'virtual:windi.css'
import '../node_modules/@ropescore/components/dist/style.css'
Expand All @@ -7,7 +7,7 @@ import router from './router'
import { DefaultApolloClient } from '@vue/apollo-composable'
import { apolloClient } from './apollo'

const app = createApp(App)
const app = createApp(App as Component)

app.provide(DefaultApolloClient, apolloClient)
.use(router)
Expand Down
11 changes: 11 additions & 0 deletions src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ const models: Model[] = [
scores.SkillLevels.push(level)
scores.SkillTimes.push(mark.timestamp)
} else if (mark.schema === 'rep' && !isShow) {
// make TS happy by re-initing
scores.NumRepeated ??= 0
scores.RepeatedSkillTimes ??= []

scores.NumRepeated += mark.value ?? 1
scores.RepeatedSkillTimes.push(mark.timestamp)
}
Expand Down Expand Up @@ -237,6 +241,13 @@ const models: Model[] = [
}

if (isShow) {
// make TS happy by re-initing
scores.StyleMinus ??= 0
scores.StyleCheck ??= 0
scores.StylePlus ??= 0
scores.StyleScores ??= []
scores.StyleTimes ??= []

switch (mark.schema) {
case 'styleMinus': {
scores.StyleMinus += mark.value ?? 1
Expand Down
24 changes: 9 additions & 15 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default defineConfig({
icons: [
{
src: '/icons/monochrome-icon-192x192.png',
sized: '192x192',
sizes: '192x192',
type: 'image/png'
}
]
Expand All @@ -60,38 +60,32 @@ export default defineConfig({
{
src: '/icons/android-icon-36x36.png',
sizes: '36x36',
type: 'image/png',
density: '0.75'
type: 'image/png'
},
{
src: '/icons/android-icon-48x48.png',
sizes: '48x48',
type: 'image/png',
density: '1.0'
type: 'image/png'
},
{
src: '/icons/android-icon-72x72.png',
sizes: '72x72',
type: 'image/png',
density: '1.5'
type: 'image/png'
},
{
src: '/icons/android-icon-96x96.png',
sizes: '96x96',
type: 'image/png',
density: '2.0'
type: 'image/png'
},
{
src: '/icons/android-icon-144x144.png',
sizes: '144x144',
type: 'image/png',
density: '3.0'
type: 'image/png'
},
{
src: '/icons/android-icon-192x192.png',
sizes: '192x192',
type: 'image/png',
density: '4.0'
type: 'image/png'
},
{
src: '/icons/android-icon-512x512.png',
Expand All @@ -112,13 +106,13 @@ export default defineConfig({
},
{
src: '/icons/monochrome-icon-256x256.png',
sized: '256x256',
sizes: '256x256',
type: 'image/png',
purpose: 'monochrome'
},
{
src: '/icons/monochrome-icon-192x192.png',
sized: '192x192',
sizes: '192x192',
type: 'image/png',
purpose: 'monochrome'
}
Expand Down

0 comments on commit 43154ac

Please sign in to comment.