-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a956101
commit 9d5e8f1
Showing
154 changed files
with
4,282 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Vue 3 + TypeScript + 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 Setup | ||
|
||
- [VS Code](https://code.visualstudio.com/) + [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously Volar) and disable Vetur | ||
|
||
- Use [vue-tsc](https://github.com/vuejs/language-tools/tree/master/packages/tsc) for performing the same type checking from the command line, or for generating d.ts files for SFCs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "https://shadcn-vue.com/schema.json", | ||
"style": "new-york", | ||
"typescript": true, | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "src/index.css", | ||
"baseColor": "slate", | ||
"cssVariables": true | ||
}, | ||
"framework": "vite", | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + Vue + TS</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"$schema": "https://extensions.jarvis.huakun.tech/schema.json", | ||
"name": "jarvis-ext-git-skyline-3d", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"jarvis": { | ||
"name": "Git Skyline", | ||
"identifier": "tech.huakun.jarvis-ext-git-skyline", | ||
"shortDescription": "Git Skyline 3D Model", | ||
"longDescription": "Display Git Skyline 3D Model", | ||
"icon": { | ||
"icon": "tabler:building-skyscraper", | ||
"type": "iconify" | ||
}, | ||
"demoImages": [], | ||
"uiCmds": [ | ||
{ | ||
"name": "Git Skyline", | ||
"main": "dist", | ||
"window": { | ||
"transparent": true, | ||
"decorations": false | ||
}, | ||
"description": "3D Model", | ||
"devMain": "http://localhost:5173", | ||
"cmds": [ | ||
{ | ||
"type": "text", | ||
"value": "git-skyline" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vue-tsc && vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@internationalized/date": "^3.5.4", | ||
"@radix-icons/vue": "^1.0.0", | ||
"@vee-validate/zod": "^4.12.8", | ||
"@vueuse/core": "^10.9.0", | ||
"class-variance-authority": "^0.7.0", | ||
"clsx": "^2.1.1", | ||
"jarvis-api": "0.0.2-alpha.6", | ||
"lucide-vue-next": "^0.378.0", | ||
"pinia": "^2.1.7", | ||
"pinia-plugin-persistedstate": "^3.2.1", | ||
"radix-vue": "^1.7.4", | ||
"tailwind-merge": "^2.3.0", | ||
"tailwindcss-animate": "^1.0.7", | ||
"vee-validate": "^4.12.8", | ||
"vue": "^3.4.21", | ||
"vue-router": "4", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@iconify-json/radix-icons": "^1.1.14", | ||
"@iconify/vue": "^4.1.2", | ||
"@types/node": "^20.12.11", | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"autoprefixer": "^10.4.19", | ||
"tailwindcss": "^3.4.3", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.2.0", | ||
"vue-tsc": "^2.0.6" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script setup lang="ts"> | ||
import { useColorMode } from "@vueuse/core"; | ||
import { onMounted } from "vue"; | ||
import { window } from "jarvis-api/ui"; | ||
import Toaster from "@/components/ui/toast/Toaster.vue"; | ||
useColorMode(); | ||
onMounted(() => { | ||
document.addEventListener("keydown", (e) => { | ||
if (e.key === "Escape") { | ||
window.destroyWindow(); | ||
} | ||
}); | ||
document.addEventListener("dblclick", () => { | ||
window.destroyWindow(); | ||
}); | ||
}); | ||
</script> | ||
|
||
<template> | ||
<Toaster /> | ||
<RouterView /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<script setup lang="ts"> | ||
import { onMounted, ref } from "vue"; | ||
import ContextMenu from "./components/context-menu.vue"; | ||
import { useAppState } from "./lib/store"; | ||
import { router } from "./lib/router"; | ||
import { window } from "jarvis-api/ui"; | ||
import { cn } from "@/lib/utils"; | ||
import Card from "./components/ui/card/Card.vue"; | ||
const appState = useAppState(); | ||
const showInstructions = ref(true); | ||
onMounted(() => { | ||
if (!appState.gitSkylineUrl) { | ||
router.push("/setting"); | ||
} | ||
document.addEventListener("keydown", (e) => { | ||
if (e.key === "Escape") { | ||
window.destroyWindow(); | ||
} | ||
}); | ||
setTimeout(() => { | ||
showInstructions.value = false; | ||
}, 5000); | ||
}); | ||
</script> | ||
<template> | ||
<div class="h-screen w-full absolute z-0"> | ||
<iframe :src="appState.gitSkylineUrl" width="100%" height="100%" frameBorder="0" class="grow" /> | ||
</div> | ||
<div class="h-screen flex flex-col"> | ||
<div :class="cn('h-32 z-50')" data-tauri-drag-region> | ||
<Card v-if="showInstructions" class="w-full h-full flex justify-center items-center"> | ||
<h1 class="text-3xl z-0 select-none"> | ||
Left Click and Drag this region to move this window | ||
</h1> | ||
</Card> | ||
</div> | ||
<div class="grow"></div> | ||
<div :class="cn('h-32 z-50')" data-tauri-drag-region> | ||
<Card v-if="showInstructions" class="w-full h-full flex flex-col justify-center items-center"> | ||
<h1 class="text-3xl z-0 select-none">Right Click on This Region to Go To Settings</h1> | ||
<h1 class="text-3xl z-0 select-none">Press Escape To Close Window</h1> | ||
<ContextMenu /> | ||
</Card> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<script setup lang="ts"> | ||
import * as z from "zod"; | ||
import { onMounted, ref } from "vue"; | ||
import { Input } from "@/components/ui/input"; | ||
import { Label } from "@/components/ui/label"; | ||
import { Button } from "@/components/ui/button"; | ||
import { toast } from "@/components/ui/toast"; | ||
import { InfoIcon } from "lucide-vue-next"; | ||
import { window } from "jarvis-api/ui"; | ||
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; | ||
import { | ||
Card, | ||
CardContent, | ||
CardDescription, | ||
CardFooter, | ||
CardHeader, | ||
CardTitle, | ||
} from "@/components/ui/card"; | ||
import { useAppState } from "./lib/store"; | ||
import { router } from "./lib/router"; | ||
onMounted(() => { | ||
document.addEventListener("keydown", (e) => { | ||
if (e.key === "Escape") { | ||
window.destroyWindow(); | ||
} | ||
}); | ||
}); | ||
const appState = useAppState(); | ||
function onSubmit(e: Event) { | ||
e.preventDefault(); | ||
} | ||
const url = ref(""); | ||
function updateUrl() { | ||
const parse = z.string().url().safeParse(url.value); | ||
if (parse.error) { | ||
toast({ | ||
title: "Fail to Set URL", | ||
description: parse.error.toString(), | ||
variant: "destructive", | ||
}); | ||
} else { | ||
appState.setUrl(url.value); | ||
toast({ | ||
title: "URL Set", | ||
}); | ||
router.push("/"); | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<div | ||
class="h-screen flex items-center justify-center bg-background/50 rounded-lg" | ||
data-tauri-drag-region | ||
> | ||
<Card data-tauri-drag-region> | ||
<form @submit="onSubmit"> | ||
<CardHeader> | ||
<CardTitle>Setting</CardTitle> | ||
<CardDescription>Set Your GitHub Username or Git Skyline iframe URL</CardDescription> | ||
</CardHeader> | ||
<CardContent> | ||
<div class="grid items-center w-full gap-4"> | ||
<div class="flex flex-col space-y-1.5"> | ||
<Label for="url">Git Skyline URL</Label> | ||
<Input | ||
id="url" | ||
placeholder="Git Skyline URL" | ||
v-model="url" | ||
:default-value="appState.gitSkylineUrl" | ||
/> | ||
</div> | ||
<div class="text-sm text-muted-foreground flex items-center space-x-2"> | ||
Go To <Button class="px-1" variant="link">https://git-skyline.huakun.tech</Button> to | ||
Generate a URL | ||
<Popover> | ||
<PopoverTrigger><InfoIcon class="w-5 h-5" /></PopoverTrigger> | ||
<PopoverContent> | ||
<span class=""> | ||
Go to | ||
<Button class="px-1" variant="link">https://git-skyline.huakun.tech</Button>, | ||
enter your Username. A 3D model will be generated. Click on | ||
<strong>Embed Page</strong> button in the top right corner to generate a embed | ||
URL, and paste it here. | ||
</span> | ||
</PopoverContent> | ||
</Popover> | ||
</div> | ||
</div> | ||
</CardContent> | ||
<CardFooter> | ||
<div class="flex flex-col space-y-3 w-full"> | ||
<Button @click="updateUrl" type="submit">Update</Button> | ||
<router-link to="/" class="w-full"> | ||
<Button class="w-full">Go Back to Git Skyline</Button> | ||
</router-link> | ||
</div> | ||
</CardFooter> | ||
</form> | ||
</Card> | ||
</div> | ||
</template> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.