Skip to content

Commit

Permalink
rename folder
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonNekoGH committed Jan 2, 2025
1 parent d53007e commit 4ee5771
Show file tree
Hide file tree
Showing 44 changed files with 96 additions and 90 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"typecheck": "pnpm -r --filter=./packages/* run build",
"dev": "pnpm packages:dev",
"build": "pnpm packages:build",
"dev:desktop": "pnpm packages:dev:desktop",
"dev:tamagotchi": "pnpm packages:dev:tamagotchi",
"packages:dev": "pnpm -r --filter=./packages/* --parallel run dev",
"packages:dev:desktop": "pnpm -r --filter=./packages/* --parallel run dev:desktop",
"packages:dev:tamagotchi": "pnpm -r --filter=./packages/* --parallel run dev:tamagotchi",
"packages:stub": "pnpm -r --filter=./packages/* run stub",
"packages:build": "pnpm -r --filter=./packages/* run build",
"packages:publish": "pnpm -r --filter=./packages/* run package:publish",
Expand Down
3 changes: 2 additions & 1 deletion packages/stage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"lint": "eslint .",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit",
"dev:desktop": "vite --mode desktop"
"dev:tamagotchi": "vite --mode tamagotchi",
"build:tamagotchi": "vite build --mode tamagotchi"
},
"dependencies": {
"@11labs/client": "^0.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { useMicVAD } from '../../composables/micvad'
import { useChatStore } from '../../stores/chat'
import { useSettings } from '../../stores/settings'
import BasicTextarea from '../BasicTextarea.vue'
import DesktopChatHistory from '../Widgets/DesktopChatHistory.vue'
import DesktopSettings from '../Widgets/DesktopSettings.vue'
import DesktopChatHistory from '../Widgets/TamagotchiChatHistory.vue'
import DesktopSettings from '../Widgets/TamagotchiSettings.vue'
const messageInput = ref('')
const listening = ref(false)
Expand Down
4 changes: 2 additions & 2 deletions packages/stage/src/utils/platform.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function isPlatformDesktop() {
return import.meta.env.MODE === 'desktop'
export function isPlatformTamagotchi() {
return import.meta.env.MODE === 'tamagotchi'
}
1 change: 1 addition & 0 deletions packages/stage/stage.dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "address": { "address": "::1", "family": "IPv6", "port": 5173 } }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref } from 'vue'
import DesktopInteractiveArea from '../src/components/Layouts/DesktopInteractiveArea.vue'
import TamagotchiInteractiveArea from '../src/components/Layouts/TamagotchiInteractiveArea.vue'
import Stage from '../src/components/Widgets/Stage.vue'
const dragDelay = ref(0)
Expand All @@ -17,6 +17,10 @@ function handleMouseUp() {
isDragging.value = false
}
function handleMouseLeave() {
isDragging.value = false
}
function handleMouseMove(event: MouseEvent) {
if (isDragging.value) {
window.electron.ipcRenderer.send('move-window', event.movementX, event.movementY)
Expand All @@ -25,10 +29,10 @@ function handleMouseMove(event: MouseEvent) {
</script>

<template>
<div relative max-h="[100vh]" max-w="[100vw]" p="2" flex="~ col" z-2 h-full overflow-hidden @mousedown="handleMouseDown" @mouseup="handleMouseUp" @mousemove="handleMouseMove">
<div relative max-h="[100vh]" max-w="[100vw]" p="2" flex="~ col" z-2 h-full overflow-hidden @mousedown="handleMouseDown" @mouseup="handleMouseUp" @mousemove="handleMouseMove" @mouseleave="handleMouseLeave">
<div relative h-full w-full items-end gap-2 class="view">
<Stage h-full w-full flex-1 mb="<md:18" />
<DesktopInteractiveArea class="interaction-area block" pointer-events-none absolute bottom-0 w-full opacity-0 transition="opacity duration-250" />
<TamagotchiInteractiveArea class="interaction-area block" pointer-events-none absolute bottom-0 w-full opacity-0 transition="opacity duration-250" />
</div>
</div>
</template>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/stage/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export default defineConfig(({ mode }) => {
},
},

base: mode === 'desktop' ? './' : '',
root: mode === 'desktop' ? 'desktop' : '',
base: mode === 'tamagotchi' ? './' : '',
root: mode === 'tamagotchi' ? 'tamagotchi' : '',

plugins: [
VueMacros({
Expand Down Expand Up @@ -87,7 +87,7 @@ export default defineConfig(({ mode }) => {
Unocss(),

// https://github.com/antfu/vite-plugin-pwa
...(env.TARGET_HUGGINGFACE_SPACE || mode === 'desktop'
...(env.TARGET_HUGGINGFACE_SPACE || mode === 'tamagotchi'
? []
: [VitePWA({
registerType: 'autoUpdate',
Expand Down Expand Up @@ -320,7 +320,7 @@ export default defineConfig(({ mode }) => {
name: 'write-port-number-to-file-when-dev',
apply: 'serve',
configureServer(server) {
if (mode !== 'desktop')
if (mode !== 'tamagotchi')
return

if (!server.httpServer)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $ pnpm install
### Development

```bash
$ pnpm dev
$ pnpm dev:tamagotchi
```

### Build
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
appId: com.electron.app
productName: desktop
appId: io.ayaka.moeru-ai.airi-tamagotchi
productName: airi
directories:
buildResources: build
files:
Expand All @@ -12,7 +12,7 @@ files:
asarUnpack:
- resources/**
win:
executableName: desktop
executableName: tamagotchi
nsis:
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "desktop",
"name": "@proj-airi/tamagotchi",
"version": "1.0.0",
"description": "An Electron application with Vue and TypeScript",
"author": "LemonNekoGH",
Expand All @@ -12,8 +12,8 @@
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false",
"typecheck": "npm run typecheck:node && npm run typecheck:web",
"start": "electron-vite preview",
"dev:desktop": "npm run build && electron .",
"build": "npm run typecheck && electron-vite build && rm -rf ./out/renderer && cp -r ../stage/desktop/dist/ ./out/renderer",
"dev:tamagotchi": "npm run build && electron .",
"build": "npm run typecheck && electron-vite build && rm -rf ./out/renderer && cp -r ../stage/tamagotchi/dist/ ./out/renderer",
"postinstall": "electron-builder install-app-deps",
"build:unpack": "npm run build && electron-builder --dir",
"build:win": "npm run build && electron-builder --win",
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4ee5771

Please sign in to comment.