-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
baa5d29
commit a9fc5d3
Showing
59 changed files
with
8,987 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div align="center"> | ||
<img src="./assets/qnaplus.png"> | ||
<h1>webapp</h1> | ||
<p>Q&A Web Client for the <a href="https://www.robotevents.com/V5RC/2024-2025/QA/">VEX Robotics Q&A</a>. | ||
</p> | ||
<a href="https://github.com/qnaplus/webapp/stargazers"> | ||
<img src="https://img.shields.io/github/stars/qnaplus/webapp?color=577BB5&labelColor=1A1B26&style=for-the-badge"> | ||
</a> | ||
<a href="../LICENSE.md"> | ||
<img src="https://img.shields.io/github/license/qnaplus/webapp?color=C0CAF5&labelColor=1A1B26&style=for-the-badge"> | ||
</a> | ||
</div> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Neat | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
branches: | ||
- master | ||
|
||
jobs: | ||
neat: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 22.13.1 | ||
- run: yarn install | ||
- run: yarn neat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
on: [push] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
permissions: | ||
contents: read | ||
deployments: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Deploy | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
command: pages deploy dist --project-name=qnaplus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
*.tsbuildinfo | ||
|
||
lib-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
*.swp | ||
|
||
pids | ||
logs | ||
results | ||
tmp | ||
|
||
# Build | ||
public/css/main.css | ||
|
||
# Coverage reports | ||
coverage | ||
|
||
# Dependency directory | ||
node_modules | ||
bower_components | ||
|
||
# Editors | ||
.idea | ||
*.iml | ||
|
||
# OS metadata | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Ignore built ts files | ||
dist | ||
|
||
# API keys and secrets | ||
/.env* | ||
.flaskenv* | ||
!.env.project | ||
!.env.vault | ||
!.env.template | ||
|
||
.turbo | ||
|
||
out/ | ||
.env* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
registry=https://registry.npmjs.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", | ||
"vcs": { | ||
"enabled": false, | ||
"clientKind": "git", | ||
"useIgnoreFile": true | ||
}, | ||
"files": { | ||
"ignoreUnknown": false, | ||
"ignore": [".turbo", "dist", "node_modules"] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "tab" | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "double" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
if [ "$CF_PAGES_BRANCH" == "dev" ]; then | ||
yarn build --mode development | ||
else | ||
yarn build | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="icons/qnaplus.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>%VITE_APP_NAME%</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"name": "@qnaplus/web", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vue-tsc && vite", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"neat": "biome check .", | ||
"neat:fix": "biome check . --write", | ||
"clean": "rimraf dist .turbo", | ||
"clean:modules": "rimraf node_modules", | ||
"clean:full": "yarn clean && yarn clean:modules" | ||
}, | ||
"dependencies": { | ||
"@primevue/themes": "^4.0.0", | ||
"@supabase/supabase-js": "^2.48.1", | ||
"@vueuse/core": "^10.9.0", | ||
"@vueuse/integrations": "^10.8.0", | ||
"@vueuse/rxjs": "^10.11.0", | ||
"deep-equal": "^2.2.3", | ||
"dexie": "^4.0.7", | ||
"htmlparser2": "^9.1.0", | ||
"minisearch": "^6.3.0", | ||
"primeflex": "^3.3.1", | ||
"primeicons": "^6.0.1", | ||
"primevue": "^4.0.0", | ||
"rxjs": "^7.8.1", | ||
"sanitize-html": "^2.13.0", | ||
"tailwindcss-primeui": "^0.3.4", | ||
"uuid": "^11.0.5", | ||
"virtua": "^0.28.0", | ||
"vue": "^3.4.15", | ||
"vue-draggable-plus": "^0.5.0", | ||
"vue-router": "4" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.9.4", | ||
"@qnaplus/scraper": "^2.0.2", | ||
"@tailwindcss/typography": "^0.5.15", | ||
"@types/deep-equal": "^1.0.4", | ||
"@types/sanitize-html": "^2.11.0", | ||
"@vite-pwa/assets-generator": "^0.2.4", | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"autoprefixer": "^10.4.19", | ||
"domhandler": "^5.0.3", | ||
"postcss": "^8.4.39", | ||
"primeclt": "^0.1.5", | ||
"rimraf": "^6.0.1", | ||
"sass": "^1.71.1", | ||
"tailwindcss": "^3.4.6", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.2.10", | ||
"vite-plugin-pwa": "^0.20.0", | ||
"vue-tsc": "^2.0.28", | ||
"workbox-window": "^7.1.0", | ||
"wrangler": "^3.109.1" | ||
}, | ||
"resolutions": { | ||
"sharp": "0.32.6", | ||
"sharp-ico": "0.1.5" | ||
}, | ||
"volta": { | ||
"node": "22.13.1", | ||
"yarn": "1.22.22" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<script setup lang="ts"> | ||
import ProgressSpinner from "primevue/progressspinner"; | ||
import { provide, ref } from "vue"; | ||
import { loadMinisearch } from "./composable/useSearch"; | ||
import { | ||
type QnaplusAppData, | ||
database, | ||
getAppData, | ||
setupDatabase, | ||
} from "./database"; | ||
const loading = ref<boolean>(true); | ||
const appdata = ref<QnaplusAppData>(); | ||
provide("appdata", appdata); | ||
const appname = import.meta.env.VITE_APP_NAME; | ||
const startup = async () => { | ||
try { | ||
await setupDatabase(); | ||
const data = await getAppData(); | ||
appdata.value = data; | ||
const questions = await database.questions.toArray(); | ||
await loadMinisearch(questions); | ||
loading.value = false; | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
}; | ||
startup(); | ||
</script> | ||
|
||
<template> | ||
<div v-if="loading" class="flex flex-row h-screen-mobile justify-center items-center gap-x-4"> | ||
<h1 class="text-xl font-semibold">{{ appname }}</h1> | ||
<ProgressSpinner style="width: 40px; height: 40px; margin: 0;" strokeWidth="6" fill="transparent" animationDuration="0.5s" /> | ||
</div> | ||
<div v-else class="flex flex-column w-full h-screen p-component"> | ||
<Suspense> | ||
<router-view class="w-full"></router-view> | ||
</Suspense> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
@import "styles"; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
import type { Node as ParserNode } from "domhandler"; | ||
import { | ||
resolveQuestionComponent, | ||
resolveQuestionComponentProps, | ||
} from "../../composable/componentMap"; | ||
defineProps<{ | ||
children: ParserNode[]; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<blockquote class="p-3 border-l-2 bg-surface-900 border-l-surface-800 not-prose"> | ||
<component :is="resolveQuestionComponent(child)" v-bind="resolveQuestionComponentProps(child)" | ||
v-for="child in children" /> | ||
</blockquote> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script setup lang="ts"> | ||
import type { Node as ParserNode } from "domhandler"; | ||
import { | ||
resolveQuestionComponent, | ||
resolveQuestionComponentProps, | ||
} from "../../composable/componentMap"; | ||
defineProps<{ | ||
children: ParserNode[]; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<em> | ||
<component :is="resolveQuestionComponent(child)" v-bind="resolveQuestionComponentProps(child)" | ||
v-for="child in children" /> | ||
</em> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script setup lang="ts"> | ||
import Image from "primevue/image"; | ||
defineProps<{ | ||
src: string; | ||
height: number; | ||
preview: boolean; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<Image :src="src" :width="height" :preview="preview" /> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
.fit-image { | ||
max-width: 100%; | ||
object-fit: contain; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script setup lang="ts"> | ||
import type { Node as ParserNode } from "domhandler"; | ||
import { | ||
resolveQuestionComponent, | ||
resolveQuestionComponentProps, | ||
} from "../../composable/componentMap"; | ||
defineProps<{ | ||
href: string; | ||
children: ParserNode[]; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<a :href="href"> | ||
<component :is="resolveQuestionComponent(child)" v-bind="resolveQuestionComponentProps(child)" | ||
v-for="child in children" /> | ||
</a> | ||
</template> |
Oops, something went wrong.