Initial commit (Move from other Repository)
This commit is contained in:
commit
4900d81eaa
52 files changed
+26138
No files matched your search
@@ -0,0 +1,8 @@
|
||||
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
|
||||
charset = utf-8
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
end_of_line = lf
|
||||
max_line_length = 100
|
||||
@@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
||||
@@ -0,0 +1,39 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
coverage
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
*.tsbuildinfo
|
||||
|
||||
.eslintcache
|
||||
|
||||
# Cypress
|
||||
/cypress/videos/
|
||||
/cypress/screenshots/
|
||||
|
||||
# Vitest
|
||||
__screenshots__/
|
||||
|
||||
# Vite
|
||||
*.timestamp-*-*.mjs
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": ["eslint", "typescript", "unicorn", "oxc", "vue", "vitest"],
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"categories": {
|
||||
"correctness": "error"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/prettierrc",
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"printWidth": 100
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"Vue.volar",
|
||||
"vitest.explorer",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"EditorConfig.EditorConfig",
|
||||
"oxc.oxc-vscode",
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Elegit frontend
|
||||
|
||||
**The craft of enginerring,** _refined._
|
||||
|
||||
## Development
|
||||
|
||||
You can start the application in development using `bun dev`
|
||||
|
||||
The Website is available on `http://localhost:5173/`
|
||||
|
||||
The dev mode also unlocks a special tab in the navbar, where all available custom components are listed
|
||||
+1384
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,8 @@
|
||||
import { defineConfig } from 'cypress'
|
||||
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
|
||||
baseUrl: 'http://localhost:4173',
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
// https://on.cypress.io/api
|
||||
|
||||
describe('My First Test', () => {
|
||||
it('visits the app root url', () => {
|
||||
cy.visit('/')
|
||||
cy.contains('h1', 'You did it!')
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Using fixtures to represent data",
|
||||
"email": "hello@cypress.io",
|
||||
"body": "Fixtures are a great way to mock data for responses to routes"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/// <reference types="cypress" />
|
||||
// ***********************************************
|
||||
// This example commands.ts shows you how to
|
||||
// create various custom commands and overwrite
|
||||
// existing commands.
|
||||
//
|
||||
// For more comprehensive examples of custom
|
||||
// commands please read more here:
|
||||
// https://on.cypress.io/custom-commands
|
||||
// ***********************************************
|
||||
//
|
||||
//
|
||||
// -- This is a parent command --
|
||||
// Cypress.Commands.add('login', (email, password) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a child command --
|
||||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a dual command --
|
||||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
//
|
||||
// declare global {
|
||||
// namespace Cypress {
|
||||
// interface Chainable {
|
||||
// login(email: string, password: string): Chainable<void>
|
||||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
export {}
|
||||
@@ -0,0 +1,20 @@
|
||||
// ***********************************************************
|
||||
// This example support/index.js is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import './commands'
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||
"include": ["./e2e/**/*", "./support/**/*"],
|
||||
"exclude": ["./support/component.*"],
|
||||
"compilerOptions": {
|
||||
"isolatedModules": false,
|
||||
"types": ["cypress"]
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
@@ -0,0 +1,41 @@
|
||||
import { globalIgnores } from 'eslint/config'
|
||||
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
||||
import pluginVue from 'eslint-plugin-vue'
|
||||
import pluginCypress from 'eslint-plugin-cypress'
|
||||
import pluginVitest from '@vitest/eslint-plugin'
|
||||
import pluginOxlint from 'eslint-plugin-oxlint'
|
||||
import skipFormatting from 'eslint-config-prettier/flat'
|
||||
|
||||
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
|
||||
// import { configureVueProject } from '@vue/eslint-config-typescript'
|
||||
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
|
||||
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
|
||||
|
||||
export default defineConfigWithVueTs(
|
||||
{
|
||||
name: 'app/files-to-lint',
|
||||
files: ['**/*.{vue,ts,mts,tsx}'],
|
||||
},
|
||||
|
||||
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
||||
|
||||
...pluginVue.configs['flat/essential'],
|
||||
vueTsConfigs.recommended,
|
||||
|
||||
{
|
||||
...pluginCypress.configs.recommended,
|
||||
files: [
|
||||
'cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}',
|
||||
'cypress/support/**/*.{js,ts,jsx,tsx}',
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
...pluginVitest.configs.recommended,
|
||||
files: ['src/**/__tests__/*'],
|
||||
},
|
||||
|
||||
...pluginOxlint.buildFromOxlintConfigFile('.oxlintrc.json'),
|
||||
|
||||
skipFormatting,
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Elegit</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"preview": "vite preview",
|
||||
"test:unit": "vitest",
|
||||
"prepare": "cypress install",
|
||||
"test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
|
||||
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --build",
|
||||
"lint": "run-s lint:*",
|
||||
"lint:oxlint": "oxlint . --fix",
|
||||
"lint:eslint": "eslint . --fix --cache",
|
||||
"format": "prettier --write --experimental-cli src/"
|
||||
},
|
||||
"dependencies": {
|
||||
"pinia": "^3.0.4",
|
||||
"vue": "^3.5.28",
|
||||
"vue-router": "^5.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node24": "^24.0.4",
|
||||
"@types/jsdom": "^27.0.0",
|
||||
"@types/node": "^24.10.13",
|
||||
"@vitejs/plugin-vue": "^6.0.4",
|
||||
"@vitest/eslint-plugin": "^1.6.9",
|
||||
"@vue/eslint-config-typescript": "^14.6.0",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"@vue/tsconfig": "^0.8.1",
|
||||
"cypress": "^15.10.0",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-cypress": "^5.3.0",
|
||||
"eslint-plugin-oxlint": "~1.46.0",
|
||||
"eslint-plugin-vue": "~10.8.0",
|
||||
"jiti": "^2.6.1",
|
||||
"jsdom": "^28.1.0",
|
||||
"npm-run-all2": "^8.0.4",
|
||||
"oxlint": "~1.47.0",
|
||||
"prettier": "3.8.1",
|
||||
"start-server-and-test": "^2.1.3",
|
||||
"typescript": "~5.9.3",
|
||||
"vite": "^7.3.1",
|
||||
"vite-plugin-vue-devtools": "^8.0.6",
|
||||
"vitest": "^4.0.18",
|
||||
"vue-tsc": "^3.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
@@ -0,0 +1,51 @@
|
||||
<script setup lang="ts">
|
||||
import { RouterView, RouterLink } from 'vue-router'
|
||||
import ElegitButton from './components/ElegitButton.vue'
|
||||
|
||||
const isDev = import.meta.env.DEV
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header>
|
||||
<img src="./assets/logo.svg" alt="Elegit Logo" />
|
||||
<h1>Elegit</h1>
|
||||
|
||||
<RouterLink to="/">
|
||||
<ElegitButton color="transparent" label="DASHBOARD" />
|
||||
</RouterLink>
|
||||
|
||||
<ElegitButton color="transparent" label="ISSUES" />
|
||||
<ElegitButton color="transparent" label="MILESTONES" />
|
||||
|
||||
<RouterLink to="/repos">
|
||||
<ElegitButton color="transparent" label="REPOSITORIES" />
|
||||
</RouterLink>
|
||||
|
||||
<RouterLink v-if="isDev" to="/components">
|
||||
<ElegitButton color="transparent" label="COMPONENTS" />
|
||||
</RouterLink>
|
||||
</header>
|
||||
|
||||
<RouterView />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
background-color: var(--color-background-soft);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
img {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5rem;
|
||||
margin: 0 1rem;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,94 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=JetBrains+Mono:wght@400;700&family=Playfair+Display:wght@400;700&display=swap');
|
||||
|
||||
:root {
|
||||
--color-background: #faf9f6;
|
||||
--color-background-soft: #ffffff;
|
||||
|
||||
--color-heading: #0f172a;
|
||||
--color-text: #334155;
|
||||
--color-text-accent: #64748b;
|
||||
|
||||
--color-border: #e2e8f0;
|
||||
|
||||
--color-primary: #d4af37;
|
||||
|
||||
--color-green: #059669;
|
||||
--color-yellow: #d4af37;
|
||||
--color-red: #ff5a8e;
|
||||
|
||||
--radius-base: 0.5rem;
|
||||
--radius-smaler: 0.25rem;
|
||||
}
|
||||
|
||||
/*@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-background: var(--vt-c-black);
|
||||
--color-background-soft: var(--vt-c-black-soft);
|
||||
--color-background-mute: var(--vt-c-black-mute);
|
||||
|
||||
--color-border: var(--vt-c-divider-dark-2);
|
||||
--color-border-hover: var(--vt-c-divider-dark-1);
|
||||
|
||||
--color-heading: var(--vt-c-text-dark-1);
|
||||
--color-text: var(--vt-c-text-dark-2);
|
||||
}
|
||||
}*/
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
background: var(--color-background);
|
||||
transition:
|
||||
color 0.5s,
|
||||
background-color 0.5s;
|
||||
color: var(--color-text);
|
||||
font:
|
||||
400 1rem 'Inter',
|
||||
sans-serif;
|
||||
font-size: 15px;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: var(--color-heading);
|
||||
font:
|
||||
700 2.5rem 'Playfair Display',
|
||||
serif;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: var(--color-heading);
|
||||
font:
|
||||
700 1.75rem 'Playfair Display',
|
||||
serif;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: var(--color-heading);
|
||||
font:
|
||||
700 1.25rem 'Playfair Display',
|
||||
serif;
|
||||
}
|
||||
|
||||
p {
|
||||
color: var(--color-text);
|
||||
font:
|
||||
400 0.875rem 'Inter',
|
||||
sans-serif;
|
||||
line-height: calc(1.25 / 0.875);
|
||||
}
|
||||
|
||||
code {
|
||||
font-family:
|
||||
400 0.9em 'JetBrains Mono',
|
||||
monospace;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#1f1f1f"><path d="M364-590 162-703l318-177 318 177-202 113q-23-24-53-37t-63-13q-33 0-63 13t-53 37Zm76 488L120-280v-355l205 115q-3 10-4 19.5t-1 20.5q0 55 33 98t87 57v223Zm-16.5-321.5Q400-447 400-480t23.5-56.5Q447-560 480-560t56.5 23.5Q560-513 560-480t-23.5 56.5Q513-400 480-400t-56.5-23.5ZM520-102v-223q54-14 87-57t33-98q0-11-1-20.5t-4-19.5l205-115v355L520-102Z"/></svg>
|
||||
|
After Width: | Height: | Size: 440 B |
@@ -0,0 +1 @@
|
||||
@import './base.css';
|
||||
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<div class="elegit-box">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.elegit-box {
|
||||
padding: 1.25rem;
|
||||
background-color: var(--color-background-soft);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-base);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,78 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
label?: string
|
||||
color?: 'primary' | 'secondary' | 'transparent' | 'glowing' | 'outline'
|
||||
}>()
|
||||
|
||||
const emit = defineEmits(['click'])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button class="elegit-button" :class="color || 'primary'" @click="emit('click')">
|
||||
<slot>{{ label || 'Click Me' }}</slot>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.elegit-button {
|
||||
padding: 0.625rem 1.5rem;
|
||||
border-radius: var(--radius-smaler);
|
||||
cursor: pointer;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.primary {
|
||||
background-color: var(--color-background-soft);
|
||||
color: var(--color-heading);
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.primary:hover {
|
||||
border: 1px solid var(--color-text-accent);
|
||||
}
|
||||
|
||||
.secondary {
|
||||
background-color: var(--color-heading);
|
||||
color: var(--color-background-soft);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.secondary:hover {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.transparent {
|
||||
background-color: transparent;
|
||||
color: var(--color-text-accent);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.transparent:hover {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.glowing {
|
||||
background-color: var(--color-background-soft);
|
||||
color: var(--color-heading);
|
||||
border: 1px solid var(--color-primary);
|
||||
}
|
||||
|
||||
.glowing:hover {
|
||||
background-color: var(--color-background);
|
||||
}
|
||||
|
||||
.outline {
|
||||
background-color: transparent;
|
||||
color: var(--color-text-accent);
|
||||
border: 1px solid var(--color-text-accent);
|
||||
}
|
||||
|
||||
.outline:hover {
|
||||
color: var(--color-heading);
|
||||
border: 1px solid var(--color-heading);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,96 @@
|
||||
<script setup lang="ts">
|
||||
const model = defineModel<boolean>()
|
||||
|
||||
defineProps<{
|
||||
label?: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<label class="elegit-checkbox-container">
|
||||
<div class="input-wrapper">
|
||||
<input v-model="model" type="checkbox" class="elegit-checkbox" />
|
||||
<div class="custom-checkmark">
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="4"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline points="20 6 9 17 4 12"></polyline>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<span v-if="label" class="checkbox-label">{{ label || 'Check me' }}</span>
|
||||
</label>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.elegit-checkbox-container {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-heading);
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
position: relative;
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
}
|
||||
|
||||
.elegit-checkbox {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.custom-checkmark {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 1.25rem;
|
||||
width: 1.25rem;
|
||||
background-color: var(--color-background-soft);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-smaler);
|
||||
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.elegit-checkbox-container:hover .custom-checkmark {
|
||||
border: 1px solid var(--color-text-accent);
|
||||
}
|
||||
|
||||
.elegit-checkbox:checked ~ .custom-checkmark {
|
||||
background-color: var(--color-primary);
|
||||
border-color: var(--color-border);
|
||||
}
|
||||
|
||||
.custom-checkmark svg {
|
||||
width: 0.75rem;
|
||||
height: 0.75rem;
|
||||
color: var(--color-background-soft);
|
||||
transform: scale(0);
|
||||
transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.elegit-checkbox:checked ~ .custom-checkmark svg {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.elegit-checkbox:focus-visible ~ .custom-checkmark {
|
||||
outline: 2px solid var(--color-text-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,146 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted } from 'vue'
|
||||
|
||||
const model = defineModel<string | number | null>()
|
||||
|
||||
interface Option {
|
||||
label: string
|
||||
value: string | number
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
options: Option[]
|
||||
placeholder?: string
|
||||
}>()
|
||||
|
||||
const isOpen = ref(false)
|
||||
const dropdownRef = ref<HTMLElement | null>(null)
|
||||
|
||||
const toggle = () => (isOpen.value = !isOpen.value)
|
||||
const select = (option: Option) => {
|
||||
model.value = option.value
|
||||
isOpen.value = false
|
||||
}
|
||||
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
if (dropdownRef.value && !dropdownRef.value.contains(event.target as Node)) {
|
||||
isOpen.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => window.addEventListener('click', handleClickOutside))
|
||||
onUnmounted(() => window.removeEventListener('click', handleClickOutside))
|
||||
|
||||
const selectedLabel = () => {
|
||||
const option = props.options.find((o) => o.value === model.value)
|
||||
return option ? option.label : props.placeholder || 'Select...'
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="elegit-dropdown" ref="dropdownRef">
|
||||
<div class="elegit-dropdown-trigger" :class="{ 'is-active': isOpen }" @click="toggle">
|
||||
<span>{{ selectedLabel() }}</span>
|
||||
<span class="arrow" :class="{ 'is-rotated': isOpen }">▾</span>
|
||||
</div>
|
||||
|
||||
<Transition name="fade">
|
||||
<ul v-if="isOpen" class="elegit-dropdown-menu">
|
||||
<li
|
||||
v-for="option in options"
|
||||
:key="option.value"
|
||||
@click="select(option)"
|
||||
:class="{ 'is-selected': model === option.value }"
|
||||
>
|
||||
{{ option.label }}
|
||||
</li>
|
||||
</ul>
|
||||
</Transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.elegit-dropdown {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.elegit-dropdown-trigger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0.625rem 1rem;
|
||||
border-radius: var(--radius-smaler);
|
||||
cursor: pointer;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
background-color: var(--color-background-soft);
|
||||
color: var(--color-heading);
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.elegit-dropdown-trigger:hover,
|
||||
.elegit-dropdown-trigger.is-active {
|
||||
border: 1px solid var(--color-text-accent);
|
||||
}
|
||||
|
||||
.arrow {
|
||||
transition: transform 0.2s ease;
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
|
||||
.arrow.is-rotated {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.elegit-dropdown-menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 4px);
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
list-style: none;
|
||||
|
||||
background-color: var(--color-background-soft);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-smaler);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.elegit-dropdown-menu li {
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: calc(var(--radius-smaler) - 2px);
|
||||
cursor: pointer;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
color: var(--color-text);
|
||||
transition: background 0.1s ease;
|
||||
}
|
||||
|
||||
.elegit-dropdown-menu li:hover {
|
||||
background-color: var(--color-background);
|
||||
color: var(--color-heading);
|
||||
}
|
||||
|
||||
.elegit-dropdown-menu li.is-selected {
|
||||
background-color: var(--color-heading);
|
||||
color: var(--color-background-soft);
|
||||
}
|
||||
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition:
|
||||
opacity 0.15s ease,
|
||||
transform 0.15s ease;
|
||||
}
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
const model = defineModel<string>()
|
||||
|
||||
defineProps<{
|
||||
placeholder?: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input v-model="model" class="elegit-text-input" :placeholder="placeholder || 'Input...'" />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.elegit-text-input {
|
||||
padding: 0.625rem 1rem;
|
||||
border-radius: var(--radius-smaler);
|
||||
cursor: text;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
outline: none;
|
||||
|
||||
background-color: var(--color-background-soft);
|
||||
color: var(--color-heading);
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.elegit-text-input:hover {
|
||||
border: 1px solid var(--color-text-accent);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,29 @@
|
||||
<script setup lang="ts">
|
||||
import languageData from '@/assets/languages.json'
|
||||
|
||||
const props = defineProps<{
|
||||
label: string
|
||||
}>()
|
||||
|
||||
const getLangColor = (name: string): string => {
|
||||
const lang = languageData.find((l) => l.name === name)
|
||||
return lang ? lang.color : '#ccc'
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<span class="dot" :style="{ backgroundColor: getLangColor(props.label) }"></span>
|
||||
{{ label }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.dot {
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,53 @@
|
||||
<script setup lang="ts">
|
||||
import ElegitBox from './ElegitBox.vue'
|
||||
import LanguageTag from './LanguageTag.vue'
|
||||
import VisibilityTag from './VisibilityTag.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
title: string
|
||||
visibility: 'private' | 'internal' | 'public'
|
||||
description?: string
|
||||
language: string
|
||||
updated: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElegitBox>
|
||||
<div class="header">
|
||||
<h2>{{ title }}</h2>
|
||||
<VisibilityTag label="public" />
|
||||
</div>
|
||||
<br />
|
||||
<p>{{ description }}</p>
|
||||
<br />
|
||||
<div class="footer">
|
||||
<LanguageTag :label="language" />
|
||||
<p class="updated">UPDATED {{ updated }}</p>
|
||||
</div>
|
||||
</ElegitBox>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-right: 0.75rem;
|
||||
transform: translateY(-0.1rem);
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.updated {
|
||||
color: var(--color-text-accent);
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,36 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
label: 'private' | 'internal' | 'public'
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<p :class="label">{{ label }}</p>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
p {
|
||||
padding: 0.2rem 0.45rem;
|
||||
border-radius: var(--radius-smaler);
|
||||
font-size: 0.6rem;
|
||||
font-weight: 400;
|
||||
text-transform: uppercase;
|
||||
width: min-content;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.private {
|
||||
border: 1px solid var(--color-text-accent);
|
||||
color: var(--color-text-accent);
|
||||
}
|
||||
|
||||
.internal {
|
||||
border: 1px solid var(--color-heading);
|
||||
color: var(--color-heading);
|
||||
}
|
||||
|
||||
.public {
|
||||
border: 1px solid var(--color-primary);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,14 @@
|
||||
import './assets/main.css'
|
||||
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
app.use(createPinia())
|
||||
app.use(router)
|
||||
|
||||
app.mount('#app')
|
||||
@@ -0,0 +1,28 @@
|
||||
import { ref, type Ref } from 'vue'
|
||||
|
||||
class Checkable {
|
||||
private _ref: Ref<string>
|
||||
private _regex: RegExp | null
|
||||
|
||||
constructor(initialValue = '', pattern = '') {
|
||||
this._ref = ref(initialValue)
|
||||
this._regex = pattern ? new RegExp(pattern) : null
|
||||
}
|
||||
|
||||
get value() {
|
||||
return this._ref.value
|
||||
}
|
||||
|
||||
set value(newValue: string) {
|
||||
this._ref.value = newValue
|
||||
}
|
||||
|
||||
get isValid() {
|
||||
if (!this._regex) return true
|
||||
return this._regex.test(this._ref.value)
|
||||
}
|
||||
}
|
||||
|
||||
export function useCheckable(initialValue = '', regexSource = '') {
|
||||
return new Checkable(initialValue, regexSource)
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: HomeView,
|
||||
},
|
||||
{
|
||||
path: '/new',
|
||||
name: 'create_repository',
|
||||
component: () => import('../views/CreateRepositoryView.vue'),
|
||||
},
|
||||
{
|
||||
path: '/repos',
|
||||
name: 'repositories',
|
||||
component: () => import('../views/RepositoriesView.vue'),
|
||||
},
|
||||
]
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
routes.push({
|
||||
path: '/components',
|
||||
name: 'components',
|
||||
component: () => import('../views/ComponentsView.vue'),
|
||||
})
|
||||
}
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: routes,
|
||||
})
|
||||
|
||||
export default router
|
||||
@@ -0,0 +1,137 @@
|
||||
<script setup lang="ts">
|
||||
import ElegitBox from '@/components/ElegitBox.vue'
|
||||
import ElegitButton from '@/components/ElegitButton.vue'
|
||||
import ElegitCheckbox from '@/components/ElegitCheckbox.vue'
|
||||
import ElegitDropdown from '@/components/ElegitDropdown.vue'
|
||||
import ElegitTextInput from '@/components/ElegitTextInput.vue'
|
||||
import LanguageTag from '@/components/LanguageTag.vue'
|
||||
import RepositoryBanner from '@/components/RepositoryBanner.vue'
|
||||
import VisibilityTag from '@/components/VisibilityTag.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<h1>Components</h1>
|
||||
|
||||
<br />
|
||||
<h2>ElegitButton</h2>
|
||||
<pre><code>
|
||||
<ElegitButton color="primary" label="EDIT MR" />
|
||||
</code></pre>
|
||||
<div class="component-container">
|
||||
<ElegitButton class="stacked" color="primary" label="EDIT MR" />
|
||||
<ElegitButton class="stacked" color="secondary" label="APPROVE" />
|
||||
<ElegitButton class="stacked" color="transparent" label="REQUEST CHANGES" />
|
||||
<ElegitButton class="stacked" color="glowing" label="FOLLOW" />
|
||||
<ElegitButton class="stacked" color="outline" label="LOAD MORE" />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<h2>ElegitBox</h2>
|
||||
<pre><code>
|
||||
<ElegitBox>
|
||||
<p>Example content</p>
|
||||
</ElegitBox>
|
||||
</code></pre>
|
||||
<ElegitBox>
|
||||
<p>This is a text text to showcase, that tags can be insertet into the box</p>
|
||||
</ElegitBox>
|
||||
|
||||
<br />
|
||||
<h2>ElegitTextInput</h2>
|
||||
<pre><code>
|
||||
<ElegitTextInput v-model="example" placeholder="Input name..." />
|
||||
</code></pre>
|
||||
<div class="component-container">
|
||||
<ElegitTextInput placeholder="Input name..." />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<h2>ElegitDropdown</h2>
|
||||
<pre><code>
|
||||
<ElegitDropdown
|
||||
:options="[
|
||||
{ label: 'Low Priority', value: 'low' },
|
||||
{ label: 'Medium Priority', value: 'medium' },
|
||||
{ label: 'High Priority', value: 'high' },
|
||||
{ label: 'Critical', value: 'critical' },
|
||||
]"
|
||||
placeholder="Select priority..."
|
||||
/>
|
||||
</code></pre>
|
||||
<div class="component-container">
|
||||
<ElegitDropdown
|
||||
:options="[
|
||||
{ label: 'Low Priority', value: 'low' },
|
||||
{ label: 'Medium Priority', value: 'medium' },
|
||||
{ label: 'High Priority', value: 'high' },
|
||||
{ label: 'Critical', value: 'critical' },
|
||||
]"
|
||||
placeholder="Select priority..."
|
||||
/>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<h2>ElegitCheckbox</h2>
|
||||
<pre><code>
|
||||
<ElegitCheckbox label="I accept the terms and conditions" />
|
||||
</code></pre>
|
||||
<div class="component-container">
|
||||
<ElegitCheckbox label="I accept the terms and conditions" />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<h2>LanguageTag</h2>
|
||||
<pre><code>
|
||||
<LanguageTag label="Rust"></LanguageTag>
|
||||
</code></pre>
|
||||
<div class="component-container">
|
||||
<LanguageTag label="Rust"></LanguageTag>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<h2>VisibilityTag</h2>
|
||||
<pre><code>
|
||||
<VisibilityTag label="public" />
|
||||
</code></pre>
|
||||
<div class="component-container">
|
||||
<VisibilityTag label="public" />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<h2>RepositoryBanner</h2>
|
||||
<pre><code>
|
||||
<RepositoryBanner
|
||||
title="quantum-rendering-engine"
|
||||
visibility="private"
|
||||
description="A high-fidelity rendering pipeline utilizing quantum-inspired sampling methods for path tracing."
|
||||
language="C++"
|
||||
updated="YESTERDAY"
|
||||
/>
|
||||
</code></pre>
|
||||
<div class="component-container">
|
||||
<RepositoryBanner
|
||||
title="quantum-rendering-engine"
|
||||
visibility="private"
|
||||
description="A high-fidelity rendering pipeline utilizing quantum-inspired sampling methods for path tracing."
|
||||
language="C++"
|
||||
updated="YESTERDAY"
|
||||
/>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
main {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
.component-container {
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.stacked {
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,170 @@
|
||||
<script setup lang="ts">
|
||||
import ElegitBox from '@/components/ElegitBox.vue'
|
||||
import ElegitButton from '@/components/ElegitButton.vue'
|
||||
import ElegitCheckbox from '@/components/ElegitCheckbox.vue'
|
||||
import ElegitDropdown from '@/components/ElegitDropdown.vue'
|
||||
import ElegitTextInput from '@/components/ElegitTextInput.vue'
|
||||
import { useCheckable } from '@/module/utils'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
const holder = useCheckable('smo', '.+')
|
||||
const name = useCheckable('', '^[a-z0-9-]+$')
|
||||
const description = ref('')
|
||||
|
||||
const triggered = ref(false)
|
||||
|
||||
const error = computed(() => {
|
||||
if (!holder.isValid) return 'Owner has to be set'
|
||||
if (!name.value) return 'Name has to be set'
|
||||
if (!name.isValid) return 'Name can only contain smal letters, numbers and dashes'
|
||||
return ''
|
||||
})
|
||||
|
||||
function create() {
|
||||
if (!holder.isValid || !name.isValid) {
|
||||
triggered.value = true
|
||||
return
|
||||
}
|
||||
alert(`${holder.value}, ${name.value}, ${description.value}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="container">
|
||||
<header class="form-header">
|
||||
<h1>Create Repository</h1>
|
||||
<p>A repository contains all project files, including the revision history.</p>
|
||||
</header>
|
||||
|
||||
<hr class="divider" />
|
||||
|
||||
<section class="form-section">
|
||||
<div class="repo-name-wrapper">
|
||||
<div class="input-group owner-group">
|
||||
<label><h3>Owner</h3></label>
|
||||
<ElegitDropdown
|
||||
v-model="holder.value"
|
||||
:options="[
|
||||
{ label: 'Simon Oberzier', value: 'smo' },
|
||||
{ label: 'FH Aachen', value: 'fhac' },
|
||||
{ label: 'MC RaceLine', value: 'mcrl' },
|
||||
]"
|
||||
placeholder="Repository holder"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<span class="separator">/</span>
|
||||
|
||||
<div class="input-group grow">
|
||||
<label><h3>Repository name</h3></label>
|
||||
<ElegitTextInput v-model="name.value" placeholder="my-project" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label>
|
||||
<h3>Description <b>(optional)</b></h3>
|
||||
</label>
|
||||
<ElegitTextInput
|
||||
v-model="description"
|
||||
placeholder="A brief, sophisticated overview of your masterpiece..."
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
<p v-if="triggered && error" class="error">{{ error }}</p>
|
||||
|
||||
<hr class="divider" />
|
||||
|
||||
<section class="form-section">
|
||||
<h3>Initialize this repository with:</h3>
|
||||
<ElegitBox class="init-box">
|
||||
<ElegitCheckbox label="Add a README file" />
|
||||
<ElegitCheckbox label="Add a .gitignore" />
|
||||
<ElegitCheckbox label="Choose a license" />
|
||||
</ElegitBox>
|
||||
</section>
|
||||
|
||||
<footer class="form-actions">
|
||||
<ElegitButton color="secondary" label="Create Repository" @click="create()" />
|
||||
</footer>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
max-width: 760px;
|
||||
margin: 2rem auto;
|
||||
padding: 0 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.form-header h1 {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.repo-name-wrapper {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.separator {
|
||||
padding-bottom: 0.5rem;
|
||||
color: var(--color-heading);
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.owner-group {
|
||||
min-width: 150px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.grow {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.init-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.divider {
|
||||
border: 0;
|
||||
border-top: 1px solid var(--color-border);
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
border-top: 1px solid var(--color-border);
|
||||
padding-top: 1.5rem;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
b {
|
||||
color: var(--color-text-accent);
|
||||
font:
|
||||
400 0.9rem 'Inter',
|
||||
sans-serif;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: var(--color-red);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<main>
|
||||
<h1>The craft of engineering, <br /><b>refined.</b></h1>
|
||||
<br />
|
||||
<p>
|
||||
Welcome back, Simon. Your architectural workspace is<br />synchronized and ready for the next
|
||||
iteration.
|
||||
</p>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
main {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
b {
|
||||
color: var(--color-text-accent);
|
||||
font:
|
||||
400 2.5rem 'Playfair Display',
|
||||
serif;
|
||||
font-style: italic;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<main>
|
||||
<h1>Your Repositories</h1>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
main {
|
||||
padding: 50px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||
"exclude": ["src/**/__tests__/*"],
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.node.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.vitest.json"
|
||||
}
|
||||
],
|
||||
"compilerOptions": {
|
||||
"module": "NodeNext"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": "@tsconfig/node24/tsconfig.json",
|
||||
"include": [
|
||||
"vite.config.*",
|
||||
"vitest.config.*",
|
||||
"cypress.config.*",
|
||||
"nightwatch.conf.*",
|
||||
"playwright.config.*",
|
||||
"eslint.config.*"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"types": ["node"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "./tsconfig.app.json",
|
||||
"include": ["src/**/__tests__/*", "env.d.ts"],
|
||||
"exclude": [],
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",
|
||||
|
||||
"lib": [],
|
||||
"types": ["node", "jsdom"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueDevTools from 'vite-plugin-vue-devtools'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
vueDevTools(),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,14 @@
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config'
|
||||
import viteConfig from './vite.config'
|
||||
|
||||
export default mergeConfig(
|
||||
viteConfig,
|
||||
defineConfig({
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
exclude: [...configDefaults.exclude, 'e2e/**'],
|
||||
root: fileURLToPath(new URL('./', import.meta.url)),
|
||||
},
|
||||
}),
|
||||
)
|
||||
Reference in new issue
Block a user