create qr-codes by tg bot
Deploy app frontend / app frontend (push) Failing after 48s
Deploy db-migrations / db-migrations (push) Failing after 35s
Deploy service message-delivery-method-web-push / service message-delivery-method-web-push (push) Failing after 53s

This commit is contained in:
2024-12-10 13:21:38 +02:00
parent e9b3df38fe
commit 1810c550ba
91 changed files with 3317 additions and 1909 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
VITE_API_URL=https://hereconnect.condev.ru/api
VITE_API_URL=/api
VITE_READ_BASE_URL=https://r.condev.ru
+1
View File
@@ -1,2 +1,3 @@
VITE_MANIFEST_NAME=НаСвязи-dev
VITE_MANIFEST_SHORT_NAME=НаСвязи-dev
VITE_PROXY_API_URL=https://hereconnect.condev.ru/api
+1 -1
View File
@@ -12,7 +12,7 @@ node_modules
dist
dist-ssr
coverage
.env.local
.env.development.local
/cypress/videos/
/cypress/screenshots/
+3 -1
View File
@@ -12,12 +12,14 @@
"test:e2e": "playwright test",
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --fix",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --write src/",
"vite-bundle-visualizer": "npx vite-bundle-visualizer"
},
"dependencies": {
"@f3ve/vue-markdown-it": "^0.2.3",
"@hereconnect/constants": "workspace:^",
"@hereconnect/types": "^1.0.0",
"@primevue/forms": "^4.2.1",
"@primevue/themes": "^4.2.1",
+3 -1
View File
@@ -12,7 +12,9 @@ import type {
import { DB_NAMES } from '@/constants/dbNames'
export const getRemoteDb = <T extends BaseDocument>(dbName: DB_NAMES) =>
new PouchDB<T>(`${import.meta.env.VITE_API_URL}/${dbName}`, { skip_setup: true })
new PouchDB<T>(new URL(`${import.meta.env.VITE_API_URL}/${dbName}`, location.origin).toString(), {
skip_setup: true,
})
export const getLocalDb = <T extends BaseDocument>(dbName: DB_NAMES) => new PouchDB<T>(dbName)
+2 -3
View File
@@ -1,18 +1,17 @@
import type { QRCodeDocument } from '@hereconnect/types'
import { EPOCH } from '@hereconnect/constants'
import { qrCodeDbLocal, qrCodeDbRemote } from '@/api/dbs'
import { getUserUuid } from '@/utils/getUserUuid'
import { getBrowserUuid } from '@/utils/getBrowserUuid'
import { isNotFoundError } from '@/api/PouchDB'
const EPOHE = 1731661630981
export const createQrCodeDocument = async (
qrCodeDocPartial: Pick<
QRCodeDocument,
'name' | 'placement' | 'actions' | 'predefinedMessages' | 'messageDeliveryMethod'
>,
) => {
const uri = Math.abs(Date.now() - EPOHE).toString(36)
const uri = Math.abs(Date.now() - EPOCH).toString(36)
const url = new URL(
`${import.meta.env.VITE_READ_BASE_URL || '/read'}/${uri}`,
location.origin,
@@ -33,7 +33,7 @@
</template>
<script setup lang="ts">
import { ref, onMounted, onUnmounted, useTemplateRef, watch, nextTick } from 'vue'
import { ref, onMounted, onUnmounted, watch, nextTick } from 'vue'
import { messagesDbLocal as db, messagesDbRemote as remoteDb } from '@/api/dbs'
import { type MessageDocument } from '@hereconnect/types'
@@ -22,7 +22,7 @@
</template>
<script setup lang="ts">
import { qrCodePlacements } from '@/constants/qrCodePlacements'
import { qrCodePlacements } from '@hereconnect/constants'
import type { QRCodeDocument } from '@hereconnect/types'
const selectedPlacement = defineModel<null | QRCodeDocument['placement']>()
@@ -4,7 +4,7 @@
<script lang="ts" setup>
import { computed } from 'vue'
import type { QrCodePlacement } from '@/constants/qrCodePlacements'
import type { QrCodePlacement } from '@hereconnect/constants'
const props = defineProps<{ placement: QrCodePlacement }>()
@@ -1,12 +0,0 @@
import { type QRCodeDocument } from '@hereconnect/types'
export type QrCodePlacement = QRCodeDocument['placement']
export const qrCodePlacements = [
{ type: 'car', label: 'Автомобиль' },
{ type: 'pet', label: 'Питомец' },
{ type: 'door', label: 'Входная дверь дома или квартиры' },
{ type: 'store', label: 'Магазин' },
{ type: 'restaurant_table', label: 'Стол в кафе или ресторане' },
{ type: 'other', label: 'Другое' },
] as const satisfies { type: QrCodePlacement; label: string }[]
@@ -1,4 +1,4 @@
import { ref, watch } from 'vue'
import { ref } from 'vue'
import { defineStore } from 'pinia'
export const usePrefersColorSchemeStore = defineStore('prefersColorScheme', () => {
+9
View File
@@ -175,5 +175,14 @@ export default defineConfig(({ mode }) => {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
proxy: {
'/api': {
target: process.env.VITE_PROXY_API_URL,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
}
})