Initial commit

This commit is contained in:
KaasKop
2025-04-06 10:59:00 +02:00
commit 569bdba727
21 changed files with 3828 additions and 0 deletions

30
.gitignore vendored Normal file
View File

@@ -0,0 +1,30 @@
# 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
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.tsbuildinfo

5
README.md Normal file
View File

@@ -0,0 +1,5 @@
# Moossages
Features:
When a email was generated on a certain page it well be associated with it.
(check with mailcow how and where)

1
env.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
/// <reference types="vite/client" />

13
index.html Normal file
View File

@@ -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>Moossages</title>
</head>
<body>
<div id="app" style="min-width: 500px; min-height: 500px;"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

15
manifest.json Normal file
View File

@@ -0,0 +1,15 @@
{
"description": "Adds a toolbar extension from whence you can create permanent or temporari aliasses",
"manifest_version": 3,
"name": "Moossages",
"version": "0.1",
"homepage_url": "https://git.mitchelbv.nl/KaasKop/Moossages",
"permissions": [
"clipboardWrite",
"activeTab"
],
"action": {
"default_title": "Moossages",
"default_popup": "index.html"
}
}

3536
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

30
package.json Normal file
View File

@@ -0,0 +1,30 @@
{
"name": "popup",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"watch": "vite build --watch --config ./vite.config.ts",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build"
},
"dependencies": {
"vue": "^3.5.13",
"vue-router": "^4.5.0"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.1",
"@types/node": "^22.13.14",
"@vitejs/plugin-vue": "^5.2.3",
"@vue/tsconfig": "^0.7.0",
"npm-run-all2": "^7.0.2",
"typescript": "~5.8.0",
"vite": "^6.2.4",
"vite-plugin-static-copy": "^2.3.0",
"vite-plugin-vue-devtools": "^7.7.2",
"vue-tsc": "^2.2.8"
}
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

14
src/App.vue Normal file
View File

@@ -0,0 +1,14 @@
<template>
<RouterView />
</template>
<script setup lang="ts">
import { RouterView } from 'vue-router';
import { onMounted } from 'vue';
onMounted(() => {
})
</script>
<style scoped></style>

View File

@@ -0,0 +1,19 @@
<template>
<div class="alias-list">
<AliasListItem v-for="alias in mailcowAliases" :alias="alias" />
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import Alias from "@/types/alias.ts";
import AliasListItem from '@/components/AliasListItem.vue';
const mailcowAliases = ref([
new Alias("kees@kaas.com", new Date(), "haha nee")
])
</script>
<style scoped></style>

View File

@@ -0,0 +1,13 @@
<template>
{{ props.alias }}
</template>
<script setup lang="ts">
import type Alias from "@/types/alias.ts";
const props = defineProps<{
alias: Alias
}>();
</script>
<style></style>

3
src/lib/mailcow.ts Normal file
View File

@@ -0,0 +1,3 @@
class Mailcow {
apiUrl: string = "kaas";
}

9
src/main.ts Normal file
View File

@@ -0,0 +1,9 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router.ts'
const app = createApp(App)
app.use(router)
app.mount('#app')

14
src/router.ts Normal file
View File

@@ -0,0 +1,14 @@
import { createMemoryHistory, createRouter } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import OptionsView from '@/views/OptionsView.vue'
const routes = [
{ path: '/', component: HomeView },
{ path: '/options', component: OptionsView },
]
export default createRouter({
history: createMemoryHistory(),
routes,
})

24
src/types/alias.ts Normal file
View File

@@ -0,0 +1,24 @@
// export default class Alias {
// address: string;
// expiration: Date;
// description: string;
//
// constructor(address: string, expiration: Date, description: string) {
// this.address = address;
// this.expiration = expiration;
// this.description = description;
// }
// }
//
export default class Alias {
address: string;
expiration: Date;
description: string;
constructor(address: string, expiration: Date, description: string) {
this.address = address;
this.expiration = expiration;
this.description = description;
}
};

10
src/views/HomeView.vue Normal file
View File

@@ -0,0 +1,10 @@
<template>
<AliasList />
</template>
<script setup lang="ts">
import AliasList from '@/components/AliasList.vue';
</script>
<style scoped></style>

View File

@@ -0,0 +1,9 @@
<template>
</template>
<script setup>
</script>
<style></style>

19
tsconfig.app.json Normal file
View File

@@ -0,0 +1,19 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": [
"env.d.ts",
"src/**/*",
"src/**/*.vue"
],
"exclude": [
"src/**/__tests__/*"
],
"compilerOptions": {
"composite": true,
"paths": {
"@/*": [
"./src/*"
]
}
}
}

11
tsconfig.json Normal file
View File

@@ -0,0 +1,11 @@
{
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
}
]
}

19
tsconfig.node.json Normal file
View File

@@ -0,0 +1,19 @@
{
"extends": "@tsconfig/node22/tsconfig.json",
"include": [
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*",
"eslint.config.*"
],
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"types": [
"node"
]
}
}

34
vite.config.ts Normal file
View File

@@ -0,0 +1,34 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
import { viteStaticCopy } from 'vite-plugin-static-copy'
export default defineConfig({
plugins: [
vue(),
vueDevTools(),
viteStaticCopy({
targets: [
{
src: "manifest.json",
dest: "./"
}
]
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
build: {
rollupOptions: {
output: {
entryFileNames: "plugin.js",
assetFileNames: "plugin.css"
}
}
}
})