Début WIP Vuejs #1

Merged
TristanBrault merged 2 commits from move-to-vuejs into main 2025-06-29 19:10:05 +00:00
43 changed files with 3052 additions and 894 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
build/bin
node_modules
frontend/dist
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,go,node
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,go,node

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

13
.idea/conjure-os.iml generated Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/conjure-os.iml" filepath="$PROJECT_DIR$/.idea/conjure-os.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -2,7 +2,10 @@
## About
This is the official Wails Svelte template.
This is the official Wails Vue-TS template.
You can configure the project by editing `wails.json`. More information about the project settings can be found
here: https://wails.io/docs/reference/project-config
## Live Development
@ -14,4 +17,3 @@ to this in your browser, and you can call your Go code from devtools.
## Building
To build a redistributable, production mode package, use `wails build`.
# conjure-os

View File

@ -1,13 +0,0 @@
package test
import (
"github.com/fsnotify/fsnotify"
"github.com/wailsapp/wails"
)
type Games struct {
filename string
runtime *wails.Runtime
logger *wails.CustomLogger
watcher *fsnotify.Watcher
}

View File

@ -1,5 +0,0 @@
{
"recommendations": [
"svelte.svelte-vscode"
]
}

View File

@ -1,69 +1,23 @@
# Vue 3 + TypeScript + Vite
# Svelte + Vite
## HOW TO RUN
`wails dev`
This template should help get you started developing with Svelte in Vite.
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue
3 `<script setup>` SFCs, check out
the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
## Recommended IDE Setup
[VS Code](https://code.visualstudio.com/)
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
+ [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
## Type Support For `.vue` Imports in TS
## Need an official Svelte framework?
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type
by default. In most cases this is fine if you don't really care about component prop types outside of templates.
However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using
manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its
serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less,
and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look
for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default,
Take Over mode will enable itself if the default TypeScript extension is disabled.
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
## Technical considerations
**Why use this over SvelteKit?**
- It brings its own routing solution which might not be preferable for some users.
- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
`vite dev` and `vite build` wouldn't work in a SvelteKit environment, for example.
This template contains as little as possible to get started with Vite + Svelte, while taking into account the developer
experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite`
templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been
structured similarly to SvelteKit so that it is easy to migrate.
**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash
references keeps the default TypeScript setting of accepting type information from the entire workspace, while also
adding `svelte` and `vite/client` type information.
**Why include `.vscode/extensions.json`?**
Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to
install the recommended extension upon opening the project.
**Why enable `checkJs` in the JS template?**
It is likely that most cases of changing variable types in runtime are likely to be accidental, rather than deliberate.
This provides advanced typechecking out of the box. Should you like to take advantage of the dynamically-typed nature of
JavaScript, it is trivial to change the configuration.
**Why is HMR not preserving my local component state?**
HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr`
and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the
details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
If you have state that's important to retain within a component, consider creating an external store which would not be
replaced by HMR.
```js
// store.js
// An extremely simple external store
import { writable } from 'svelte/store'
export default writable(0)
```
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).

View File

@ -7,6 +7,7 @@
</head>
<body>
<div id="app"></div>
<script src="./src/main.js" type="module"></script>
<script src="./src/main.ts" type="module"></script>
</body>
</html>

View File

@ -1,38 +0,0 @@
{
"compilerOptions": {
"moduleResolution": "Node",
"target": "ESNext",
"module": "ESNext",
/**
* svelte-preprocess cannot figure out whether you have
* a value or a type, so tell TypeScript to enforce using
* `import type` instead of `import` for Types.
*/
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"resolveJsonModule": true,
/**
* To have warnings / errors of the Svelte compiler at the
* correct position, enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable this if you'd like to use dynamic types.
*/
"checkJs": true
},
/**
* Use global.d.ts instead of compilerOptions.types
* to avoid limiting type declarations.
*/
"include": [
"src/**/*.d.ts",
"src/**/*.js",
"src/**/*.svelte"
]
}

File diff suppressed because it is too large Load Diff

View File

@ -3,14 +3,28 @@
"private": true,
"version": "0.0.0",
"type": "module",
"engines": {
"npm": ">=9.0.0",
"node": ">=20.0.0"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
},
"dependencies": {
"pinia": "^3.0.3",
"qrcode": "^1.5.4",
"tailwindcss": "^4.1.11",
"vue": "^3.5.17"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^1.0.1",
"svelte": "^3.49.0",
"vite": "^3.0.7"
"@babel/types": "^7.18.10",
"@tailwindcss/vite": "^4.1.11",
"@types/qrcode": "^1.5.5",
"@vitejs/plugin-vue": "^6.0.0",
"typescript": "^5.6.2",
"vite": "^6.3.5",
"vue-tsc": "^2.0.29"
}
}
}

View File

@ -1 +1 @@
d9dc84f0d17ed164f36dd584057aae68
1f77c5bc2ac4189b53ca32c331845b25

View File

@ -1,165 +0,0 @@
<script>
import logo from './assets/images/logo-universal.png'
import { onMount } from 'svelte';
import {LoadGames, SelectGame} from '../wailsjs/go/main/App.js'
let games = []
let activeIndex = 0;
let currentDeg = 0;
let selectedGame = {Title: "", Year: 2000};
function selectGame(index) {
SelectGame(index).then(resultText => "")
}
onMount(() => {
LoadGames().then(async result => {
games = result;
parse();
selectedGame = games[activeIndex];
});
})
function parse(node) {
let i = 0;
games.forEach(game => {
if(document.getElementById(game.Title) != null) {
console.log()
document.getElementById(game.Title).style.transform = "rotateY("+40*i+"deg) translateZ(412px)";
}
i ++;
});
}
function focus(node) {
parse(node)
}
// $: loadGames()
function prev() {
switchGame(1)
}
function next() {
switchGame(-1);
}
function switchGame(direction) {
if(activeIndex-direction < 0 || activeIndex-direction >= games.length)
return;
activeIndex -= direction;
if(activeIndex > games.length){
activeIndex += direction;
return;
}
let carrousel = document.getElementById("carousel");
currentDeg = 40 * activeIndex * -1;
carrousel.style.transform = `rotateY(${currentDeg}deg) `;/*carouselnext 40s steps(1000, end) 1";*/
selectedGame = games[activeIndex];
}
function getDegByPosition(title) {
return games.findIndex(x => x.Title == title);
}
</script>
<!-- https://codepen.io/blueacornfed/pen/qdRddr -->
<style>
.carousel_wrapper {
position: relative;
width: 320px;
margin: 100px auto 0 auto;
perspective: 1000px;
}
.carousel {
position: absolute;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: all 1s ease-in-out;
transform: rotateY(0deg); /* add reverse transformation from the slides */
/* animation: carouselnext 40s steps(10000, end) infinite; run `swirl` animation (defined at end of CSS) infitely, with animation lasting 40 seconds, and 10,000 steps between the FROM and TO values in the animation for a smooth rotation */
}
.slide {
position: absolute;
top: 10px;
left: 10px;
width: 300px;
height: 187px;
}
.slide img {
width: 280px;
height: 175px;
border: 3px inset rgba(29, 203, 84, 0.75);
/* border-radius: 100%; */
box-shadow: 0 0 15px 3px rgba(110, 72, 221, 0.9);
}
@keyframes carouselnext {
from {
transform: rotateY(-360deg);
}
to {
transform: rotateY(0deg);
}
}
@keyframes carousel-previous {
from {
transform: rotateY(-360deg);
}
to {
transform: rotateY(0deg);
}
}
</style>
<main>
<div class="game-basic-info">
<h1>{selectedGame.Title}</h1>
<h2> {selectedGame.Developper} - {selectedGame.Year}</h2>
</div>
<div class="input-box" id="input">
<button on:click={prev}>previous</button>
<button on:click={next}>next</button>
</div>
<div>
<div id="game-detailed-info">
<p>
{selectedGame.Description}
</p>
</div>
<div id="game-media">
</div>
<div id="game-scoreboard"></div>
</div>
<div class="carousel_wrapper">
<div id="carousel" class="carousel">
{#each games as game, i (game)}
<div id={game.Title} class="slide" use:parse>
<img src={game.Cartridge} />
</div>
{/each}
</div>
</div>
</main>

66
frontend/src/App.vue Normal file
View File

@ -0,0 +1,66 @@
<template>
<div class="flex h-screen w-screen bg-black text-white">
<!-- Sidebar -->
<Sidebar
:tags="tags"
:selectedTag="selectedTag"
@selectTag="store.selectTag"
@openOptions="optionsOpen = true"
/>
<!-- Main Content -->
<div class="flex flex-col flex-1 overflow-hidden">
<div class="flex-1 overflow-hidden">
<GamePreview
:game="selectedGame"
@qr="store.showQr"
/>
</div>
<GameCarousel
:games="store.filteredGames"
:selectedGame="selectedGame"
:selectedTag="selectedTag"
:direction="transitionDirection"
@selectGame="store.selectGame"
/>
</div>
<OptionsModal v-if="optionsOpen" @close="optionsOpen = false" />
<QrModal v-if="qrLink" :link="qrLink" @close="qrLink = ''" />
</div>
</template>
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue';
import Sidebar from './components/Sidebar.vue';
import GamePreview from './components/GamePreview.vue';
import GameCarousel from './components/GameCarousel.vue';
import OptionsModal from './components/OptionsModal.vue';
import QrModal from './components/QrModal.vue';
import { useKeyboardNavigation } from './utils/use-keyboard-navigation';
import { fetchGames } from './services/game-service';
import { useAppStore } from "./stores/app-store";
import { storeToRefs } from "pinia";
import { KeyboardManager } from "./utils/keyboard-manager";
const store = useAppStore();
const { selectedTag, selectedGame, tags, games, transitionDirection, qrLink } = storeToRefs(store);
const optionsOpen = ref(false);
onMounted(async () => {
games.value = await fetchGames();
tags.value = [...new Set(games.value.flatMap(game => game.tags))];
selectedTag.value = tags.value[0];
selectedGame.value = store.filteredGames[0];
});
KeyboardManager.switchContext("sidebar")
useKeyboardNavigation();
</script>
<style scoped>
body {
overflow: hidden;
}
</style>

View File

@ -0,0 +1,84 @@
<template>
<div class="relative h-[170px]">
<Transition :name="`carousel-${direction}`" mode="out-in">
<div :key="selectedTag" class="w-full py-4 px-6 flex overflow-x-auto space-x-4 items-end transition-inner">
<div
v-for="game in games"
:key="game.id"
@click="$emit('selectGame', game)"
:class="[
'transition-transform transform cursor-pointer rounded-lg overflow-hidden border-4',
game.id === selectedGame.id ? 'scale-110 border-blue-500' : 'scale-100 border-transparent'
]"
>
<img
:src="game.thumbnail"
class="h-32 w-48 object-cover"
:alt="game.title"
/>
</div>
</div>
<!-- Give the whole carousel a key based on selectedTag to trigger transition -->
<!-- <div :key="selectedTag" class="flex gap-4 w-full transition-inner">-->
<!-- <GameCard-->
<!-- v-for="game in games"-->
<!-- :key="game.id"-->
<!-- :game="game"-->
<!-- :selected="game.id === selectedGame?.id"-->
<!-- @click="$emit('selectGame', game)"-->
<!-- />-->
<!-- </div>-->
</Transition>
</div>
</template>
<script setup lang="ts">
import { Game } from "../models/game";
defineProps<{
games: Game[],
selectedGame: Game
selectedTag: string;
direction: 'up' | 'down';
}>()
defineEmits(['selectGame']);
</script>
<style scoped>
::-webkit-scrollbar {
display: none;
}
.carousel-up-enter-active,
.carousel-up-leave-active {
transition: all 0.2s ease;
position: absolute;
width: 100%;
}
.carousel-up-enter-from {
opacity: 0;
transform: translateY(-20px);
}
.carousel-up-leave-to {
opacity: 0;
transform: translateY(20px);
}
/* Slide DOWN */
.carousel-down-enter-active,
.carousel-down-leave-active {
transition: all 0.2s ease;
position: absolute;
width: 100%;
}
.carousel-down-enter-from {
opacity: 0;
transform: translateY(20px);
}
.carousel-down-leave-to {
opacity: 0;
transform: translateY(-20px);
}
</style>

View File

@ -0,0 +1,50 @@
<template>
<div class="p-6 h-full overflow-auto">
<div v-if="game" class="space-y-4">
<h1 class="text-4xl font-bold">{{ game.title }}</h1>
<div class="text-sm text-gray-400">{{ game.genre }} - {{ game.players }} players</div>
<p class="text-lg">{{ game.description }}</p>
<div class="grid grid-cols-2 gap-4">
<img
v-for="(img, index) in game.media"
:key="index"
:src="img"
class="rounded-lg border border-gray-600 max-h-48 object-cover"
/>
</div>
<div class="space-y-2">
<div><strong>Languages:</strong> {{ game.languages.join(', ') }}</div>
<div class="flex gap-2 mt-2">
<button
v-for="(link, name) in game.links"
:key="name"
class="bg-blue-600 px-3 py-1 rounded hover:bg-blue-500"
@click="$emit('qr', link)"
>
{{ name }} 🔗
</button>
</div>
</div>
</div>
<div v-else class="text-center text-gray-500">No game selected</div>
</div>
</template>
<script setup lang="ts">
defineProps({
game: Object,
});
defineEmits(['qr']);
</script>
<style scoped>
img {
transition: transform 0.2s;
}
img:hover {
transform: scale(1.05);
}
</style>

View File

@ -0,0 +1,42 @@
<template>
<div class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50">
<div class="bg-white text-black p-6 rounded-lg w-full max-w-md">
<h2 class="text-2xl font-bold mb-4">Options</h2>
<div class="space-y-3">
<label class="block">
<span class="text-gray-700">Data Source:</span>
<select v-model="dataSource" class="mt-1 block w-full">
<option value="local">Local (Mock)</option>
<option value="remote">Remote (API)</option>
</select>
</label>
<label class="block">
<span class="text-gray-700">Volume:</span>
<input type="range" min="0" max="100" v-model="volume" class="w-full" />
</label>
</div>
<div class="mt-6 flex justify-end gap-2">
<button @click="$emit('close')" class="px-4 py-2 bg-gray-600 text-white rounded">Close</button>
<button @click="save" class="px-4 py-2 bg-blue-600 text-white rounded">Save</button>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
const emit = defineEmits(['close']);
const dataSource = ref(localStorage.getItem('dataSource') || 'local');
const volume = ref(+localStorage.getItem('volume') || 50);
function save() {
localStorage.setItem('dataSource', dataSource.value);
localStorage.setItem('volume', volume.value.toString());
emit('close');
}
</script>

View File

@ -0,0 +1,36 @@
// File: src/components/QrModal.vue
<template>
<div class="fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-50">
<div class="bg-white text-black p-6 rounded-lg text-center max-w-sm w-full">
<h2 class="text-xl font-bold mb-4">Scan with your phone</h2>
<img :src="qrCodeDataUrl" alt="QR Code" class="mx-auto mb-4" />
<p class="text-sm break-words">{{ link }}</p>
<button class="mt-4 bg-blue-600 text-white px-4 py-2 rounded" @click="$emit('close')">Close</button>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
import QRCode from 'qrcode';
const props = defineProps({
link: String
});
const emit = defineEmits(['close']);
const qrCodeDataUrl = ref('');
watch(() => props.link, async (newLink) => {
if (newLink) {
qrCodeDataUrl.value = await QRCode.toDataURL(newLink);
}
}, { immediate: true });
</script>
<style scoped>
img {
max-width: 200px;
max-height: 200px;
}
</style>

View File

@ -0,0 +1,29 @@
<template>
<div class="w-20 flex flex-col items-center bg-gray-900 py-4">
<div class="flex-1 space-y-4">
<button
v-for="tag in tags"
:key="tag"
:class="[
'w-12 h-12 rounded-full flex items-center justify-center',
tag === selectedTag ? 'bg-blue-500' : 'bg-gray-700 hover:bg-gray-600'
]"
@click="$emit('selectTag', tag)"
>
{{ tag }}
</button>
</div>
<button
class="mt-auto w-12 h-12 bg-gray-600 hover:bg-gray-500 rounded-full flex items-center justify-center"
@click="$emit('openOptions')"
>
</button>
</div>
</template>
<script setup lang="ts">
defineProps(['tags', 'selectedTag']);
defineEmits(['selectTag', 'openOptions']);
</script>

View File

@ -1,8 +0,0 @@
import './style.css'
import App from './App.svelte'
const app = new App({
target: document.getElementById('app')
})
export default app

8
frontend/src/main.ts Normal file
View File

@ -0,0 +1,8 @@
import {createApp} from 'vue'
import App from './App.vue'
import './style.css';
import { createPinia } from "pinia";
const app = createApp(App);
app.use(createPinia());
app.mount('#app');

View File

@ -0,0 +1,22 @@
export interface Game {
id: number | string;
title: string;
description?: string;
playerCount: "1" | "2" | "1-2";
teamMember?: TeamMember[];
languages?: string[];
tags?: string[];
media?: string[];
thumbnail?: string;
links?: object;
metadata?: object;
executablePath: string;
}
export interface TeamMember {
id: number | string;
name: string;
role?: string;
picture?: string;
socials?: object;
}

View File

@ -0,0 +1,53 @@
import { Game } from "../models/game";
const localGames: Game[] = [
{
id: 'g1',
title: 'Neon Rush',
description: 'A fast-paced 2D platformer through glowing neon levels.',
playerCount: '1',
languages: ['English', 'French'],
tags: ['platformer', 'neon', 'funny'],
media: [
'/assets/neon-rush-1.png',
'/assets/neon-rush-2.png'
],
thumbnail: '/assets/neon-rush-thumb.png',
links: {
Website: 'https://neonrush.dev',
Itch: 'https://hyperbyte.itch.io/neonrush'
},
executablePath: "."
},
{
id: 'g2',
title: 'Ghost Bakery',
description: 'Bake spooky pastries in a haunted kitchen.',
playerCount: '1-2',
languages: ['English'],
tags: ['cooking', 'funny', 'co-op'],
media: [
'/assets/ghost-bakery-1.jpg'
],
thumbnail: '/assets/ghost-bakery-thumb.jpg',
links: {
Itch: 'https://phantomforks.itch.io/ghostbakery'
},
executablePath: "."
}
];
export async function fetchGames(): Promise<Game[]> {
const source = localStorage.getItem('dataSource') || 'local';
if (source === 'local') return localGames;
// TODO games should be loaded from and started from the wails/go code
try {
const res = await fetch('https://your-api-server.com/api/games');
if (!res.ok) throw new Error('Failed to fetch games');
return await res.json();
} catch (e) {
console.error('API fetch failed, falling back to local:', e);
return localGames;
}
}

View File

@ -0,0 +1,52 @@
import { defineStore } from 'pinia';
import { Game } from "../models/game";
export const useAppStore = defineStore('app', {
state: () => ({
tags: [] as string[],
games: [] as Game[],
selectedTag: null as string | null,
transitionDirection: 'down' as 'up' | 'down',
selectedGame: null as Game | null,
selectedGameIndex: 0,
qrLink: '' as string
}),
getters: {
filteredGames(state): Game[] {
return state.games.filter(game => game.tags.includes(state.selectedTag ?? ''));
}
},
actions: {
moveGameRight() {
this.selectGame(this.selectedGameIndex + 1);
},
moveGameLeft() {
this.selectGame(this.selectedGameIndex - 1);
},
moveTagUp() {
const index = this.tags.findIndex(t => t === this.selectedTag);
this.transitionDirection = 'down';
if (index > 0) this.selectTag(this.tags[index - 1]);
},
moveTagDown() {
const index = this.tags.findIndex(t => t === this.selectedTag);
this.transitionDirection = 'up';
if (index < this.tags.length - 1) this.selectTag(this.tags[index + 1]);
},
selectGame(index: number) {
const games = this.filteredGames;
if (index >= 0 && index < games.length) {
this.selectedGameIndex = index;
this.selectedGame = games[index];
}
},
selectTag(tag: string) {
this.selectedTag = tag;
this.selectedGameIndex = 0;
this.selectedGame = this.filteredGames[0] ?? null;
},
showQr(link: string) {
this.qrLink = link;
}
}
});

View File

@ -1,3 +1,5 @@
@import "tailwindcss";
html {
background-color: rgba(27, 38, 54, 1);
text-align: center;

View File

@ -0,0 +1,39 @@
import { KeyContext } from "./key-context";
import { KeyboardManager } from "../keyboard-manager";
export class CarouselKeyContext extends KeyContext {
readonly name: string = "CarouselContext";
protected onKeyUp() {
super.onKeyUp();
this.store.moveTagUp();
}
protected onKeyDown() {
super.onKeyDown();
this.store.moveTagDown();
}
protected onKeyRight() {
super.onKeyRight();
this.store.moveGameRight();
}
protected onKeyLeft() {
super.onKeyLeft();
if (this.store.selectedGameIndex === 0) {
KeyboardManager.switchContext("sidebar");
}
else {
this.store.moveGameLeft();
}
}
protected onEscape() {
super.onEscape();
}
protected onEnter() {
super.onEnter();
}
}

View File

@ -0,0 +1,25 @@
import { KeyContext } from "./key-context";
export class GamePreviewKeyContext extends KeyContext {
readonly name: string = "GamePreviewKeyContext";
protected onKeyUp() {
super.onKeyUp();
}
protected onKeyDown() {
super.onKeyDown();
}
protected onKeyRight() {
super.onKeyRight();
}
protected onEnter() {
super.onEnter();
}
protected onEscape() {
super.onEscape();
}
}

View File

@ -0,0 +1,56 @@
import { useAppStore } from "../../stores/app-store";
export abstract class KeyContext {
public abstract readonly name: string;
protected store = useAppStore();
public handleKey(event: KeyboardEvent): void {
switch (event.key) {
case 'ArrowRight':
this.onKeyRight();
break;
case 'ArrowLeft':
this.onKeyLeft();
break;
case 'ArrowUp':
this.onKeyUp();
break;
case 'ArrowDown':
this.onKeyDown();
break;
case 'Escape':
this.onEscape();
break;
case 'Enter':
this.onEnter();
break;
default:
break;
}
}
protected onKeyRight(): void {
console.log('onKeyRight');
}
protected onKeyLeft(): void {
console.log('onKeyLeft');
}
protected onKeyUp(): void {
console.log('onKeyUp');
}
protected onKeyDown(): void {
console.log('onKeyDown');
}
protected onEscape(): void {
console.log('onEscape');
}
protected onEnter(): void {
console.log('onEnter');
}
}

View File

@ -0,0 +1,8 @@
import { KeyContext } from "./key-context";
export abstract class ModalKeyContext extends KeyContext {
protected onEscape() {
super.onEscape();
}
}

View File

@ -0,0 +1,33 @@
import { KeyContext } from "./key-context";
import { KeyboardManager } from "../keyboard-manager";
export class SidebarKeyContext extends KeyContext {
readonly name: string = "SidebarContext";
protected onKeyUp() {
super.onKeyUp();
this.store.moveTagUp();
}
protected onKeyDown() {
super.onKeyDown();
this.store.moveTagDown();
}
protected onKeyRight() {
super.onKeyRight();
this.store.moveGameRight();
KeyboardManager.switchContext("carousel")
}
protected onEnter() {
super.onEnter();
this.store.moveGameRight();
KeyboardManager.switchContext("carousel")
}
protected onEscape() {
super.onEscape();
// TODO options menu
}
}

View File

@ -0,0 +1,17 @@
import { CarouselKeyContext } from "./key-contexts/carousel-key-context";
import { KeyContext } from "./key-contexts/key-context";
import { SidebarKeyContext } from "./key-contexts/sidebar-key-context";
export class KeyboardManager {
private static current?: KeyContext;
static switchContext(name: 'sidebar' | 'carousel') {
console.log("Switching context to " + name);
if (name === 'sidebar') this.current = new SidebarKeyContext();
else this.current = new CarouselKeyContext();
}
static handle(event: KeyboardEvent) {
this.current?.handleKey(event);
}
}

View File

@ -0,0 +1,12 @@
import { onMounted, onBeforeUnmount } from 'vue';
import { KeyboardManager } from "./keyboard-manager";
export function useKeyboardNavigation(): void {
onMounted(() => {
window.addEventListener('keydown', KeyboardManager.handle.bind(KeyboardManager));
});
onBeforeUnmount(() => {
window.removeEventListener('keydown', KeyboardManager.handle);
});
}

View File

@ -1,2 +1,7 @@
/// <reference types="svelte" />
/// <reference types="vite/client" />
declare module '*.vue' {
import type {DefineComponent} from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}

30
frontend/tsconfig.json Normal file
View File

@ -0,0 +1,30 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "bundler",
"strict": false,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": [
"ESNext",
"DOM"
],
"skipLibCheck": true
},
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}

View File

@ -0,0 +1,11 @@
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": [
"vite.config.ts"
]
}

View File

@ -1,7 +0,0 @@
import {defineConfig} from 'vite'
import {svelte} from '@sveltejs/vite-plugin-svelte'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()]
})

8
frontend/vite.config.ts Normal file
View File

@ -0,0 +1,8 @@
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), tailwindcss()]
})

20
go.mod
View File

@ -2,46 +2,31 @@ module conjure-os
go 1.21
toolchain go1.23.3
toolchain go1.23.5
require (
github.com/fsnotify/fsnotify v1.4.9
github.com/wailsapp/wails v1.16.9
github.com/wailsapp/wails/v2 v2.9.2
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/abadojack/whatlanggo v1.0.1 // indirect
github.com/bep/debounce v1.2.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-playground/colors v1.2.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.4.1 // indirect
github.com/jackmordaunt/icns v1.0.0 // indirect
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
github.com/kennygrant/sanitize v1.2.4 // indirect
github.com/labstack/echo/v4 v4.10.2 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/leaanthony/go-ansi-parser v1.6.0 // indirect
github.com/leaanthony/gosod v1.0.3 // indirect
github.com/leaanthony/slicer v1.6.0 // indirect
github.com/leaanthony/spinner v0.5.3 // indirect
github.com/leaanthony/synx v0.1.0 // indirect
github.com/leaanthony/u v1.1.0 // indirect
github.com/leaanthony/wincursor v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/syossan27/tebata v0.0.0-20180602121909-b283fe4bc5ba // indirect
github.com/tkrajina/go-reflector v0.5.6 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
@ -49,10 +34,9 @@ require (
github.com/wailsapp/mimetype v1.4.1 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
golang.org/x/image v0.12.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
)
// replace github.com/wailsapp/wails/v2 v2.9.2 => /Users/guillaumelanglois/go/pkg/mod
// replace github.com/wailsapp/wails/v2 v2.9.2 => /Users/tristan/go/pkg/mod

93
go.sum
View File

@ -1,37 +1,16 @@
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
github.com/abadojack/whatlanggo v1.0.1 h1:19N6YogDnf71CTHm3Mp2qhYfkRdyvbgwWdd2EPxJRG4=
github.com/abadojack/whatlanggo v1.0.1/go.mod h1:66WiQbSbJBIlOZMsvbKe5m6pzQovxCH9B/K8tQB2uoc=
github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-playground/colors v1.2.0 h1:0EdjTXKrr2g1L/LQTYtIqabeHpZuGZz1U4osS1T8+5M=
github.com/go-playground/colors v1.2.0/go.mod h1:miw1R2JIE19cclPxsXqNdzLZsk4DP4iF+m88bRc7kfM=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A=
github.com/jackmordaunt/icns v1.0.0 h1:RYSxplerf/l/DUd09AHtITwckkv/mqjVv4DjYdPmAMQ=
github.com/jackmordaunt/icns v1.0.0/go.mod h1:7TTQVEuGzVVfOPPlLNHJIkzA6CoV7aH1Dv9dW351oOo=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kennygrant/sanitize v1.2.4 h1:gN25/otpP5vAsO2djbMhF/LQX6R7+O1TB4yv8NzpJ3o=
github.com/kennygrant/sanitize v1.2.4/go.mod h1:LGsjYYtgxbetdg5owWB2mpgUL6e2nfw2eObZ0u0qvak=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/labstack/echo/v4 v4.10.2 h1:n1jAhnq/elIFTHr1EYpiYtyKgx4RW9ccVgkqByZaN2M=
github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k=
github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8=
@ -42,40 +21,22 @@ github.com/leaanthony/go-ansi-parser v1.6.0 h1:T8TuMhFB6TUMIUm0oRrSbgJudTFw9csT3
github.com/leaanthony/go-ansi-parser v1.6.0/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ=
github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4=
github.com/leaanthony/slicer v1.4.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
github.com/leaanthony/slicer v1.6.0 h1:1RFP5uiPJvT93TAHi+ipd3NACobkW53yUiBqZheE/Js=
github.com/leaanthony/slicer v1.6.0/go.mod h1:o/Iz29g7LN0GqH3aMjWAe90381nyZlDNquK+mtH2Fj8=
github.com/leaanthony/spinner v0.5.3 h1:IMTvgdQCec5QA4qRy0wil4XsRP+QcG1OwLWVK/LPZ5Y=
github.com/leaanthony/spinner v0.5.3/go.mod h1:oHlrvWicr++CVV7ALWYi+qHk/XNA91D9IJ48IqmpVUo=
github.com/leaanthony/synx v0.1.0 h1:R0lmg2w6VMb8XcotOwAe5DLyzwjLrskNkwU7LLWsyL8=
github.com/leaanthony/synx v0.1.0/go.mod h1:Iz7eybeeG8bdq640iR+CwYb8p+9EOsgMWghkSRyZcqs=
github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI=
github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
github.com/leaanthony/wincursor v0.1.0 h1:Dsyp68QcF5cCs65AMBmxoYNEm0n8K7mMchG6a8fYxf8=
github.com/leaanthony/wincursor v0.1.0/go.mod h1:7TVwwrzSH/2Y9gLOGH+VhA+bZhoWXBRgbGNTMk+yimE=
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@ -85,17 +46,10 @@ github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/syossan27/tebata v0.0.0-20180602121909-b283fe4bc5ba h1:2DHfQOxcpWdGf5q5IzCUFPNvRX9Icf+09RvQK2VnJq0=
github.com/syossan27/tebata v0.0.0-20180602121909-b283fe4bc5ba/go.mod h1:iLnlXG2Pakcii2CU0cbY07DRCSvpWNa7nFxtevhOChk=
github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE=
github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
@ -107,81 +61,34 @@ github.com/wailsapp/go-webview2 v1.0.16 h1:wffnvnkkLvhRex/aOrA3R7FP7rkvOqL/bir1b
github.com/wailsapp/go-webview2 v1.0.16/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
github.com/wailsapp/wails v1.16.9 h1:H0jWILvWU1I3y2MgqwIPjMfD95/nQP9qAuqAsadYaOs=
github.com/wailsapp/wails v1.16.9/go.mod h1:R4AAEWp6K4c0nIMHj5jmr+WQ4yXTfzLXbQoXbg2vEHM=
github.com/wailsapp/wails/v2 v2.9.2 h1:Xb5YRTos1w5N7DTMyYegWaGukCP2fIaX9WF21kPPF2k=
github.com/wailsapp/wails/v2 v2.9.2/go.mod h1:uehvlCwJSFcBq7rMCGfk4rxca67QQGsbg5Nm4m9UnBs=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ=
golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180606202747-9527bec2660b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/AlecAivazis/survey.v1 v1.8.4/go.mod h1:iBNOmqKz/NUbZx3bA+4hAGLRC7fSK7tgtVDT4tB22XA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20190709130402-674ba3eaed22/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@ -23,7 +23,7 @@ type Game struct {
var token string
const game_path = "/Users/guillaumelanglois/Games/conjure"
const game_path = "/Users/tristan/Downloads/conjure-os"
func Update() {
requestURL := fmt.Sprintf("http://localhost:%d", 8080)
@ -60,7 +60,7 @@ func allGames(requestURL string) {
res, err := client.Do(req)
check(err)
fmt.Println("client: status code: %d\n", res.StatusCode)
fmt.Printf("client: status code: %d\n", res.StatusCode)
}
func ObtainConjureGameInfo() []Game {

View File

@ -7,7 +7,7 @@
"frontend:dev:watcher": "npm run dev",
"frontend:dev:serverUrl": "auto",
"author": {
"name": "Guillaume Langlois",
"email": "guillaume.langlois.dev@gmail.com"
"name": "Conjure",
"email": "conjure@ens.etsmtl.ca"
}
}