diff --git a/copilot/App.vue b/copilot/App.vue
new file mode 100644
index 0000000..9680f8f
--- /dev/null
+++ b/copilot/App.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+ Escrcpy Copilot
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/copilot/components/Transmission/Message/Preset.vue b/copilot/components/Transmission/Message/Preset.vue
new file mode 100644
index 0000000..2391f35
--- /dev/null
+++ b/copilot/components/Transmission/Message/Preset.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
diff --git a/copilot/components/Transmission/Message/index.vue b/copilot/components/Transmission/Message/index.vue
new file mode 100644
index 0000000..67c53c2
--- /dev/null
+++ b/copilot/components/Transmission/Message/index.vue
@@ -0,0 +1,81 @@
+
+
+
+
+
+ {{ name }}
+
+
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/copilot/components/Transmission/index.vue b/copilot/components/Transmission/index.vue
new file mode 100644
index 0000000..abf5c47
--- /dev/null
+++ b/copilot/components/Transmission/index.vue
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
diff --git a/server/index.html b/copilot/index.html
similarity index 80%
rename from server/index.html
rename to copilot/index.html
index 49c1f14..40ea09f 100644
--- a/server/index.html
+++ b/copilot/index.html
@@ -1,13 +1,13 @@
-
+
- Escrcpy-Server
+ Escrcpy Copilot
-
\ No newline at end of file
+
diff --git a/copilot/main.js b/copilot/main.js
new file mode 100644
index 0000000..67d19a5
--- /dev/null
+++ b/copilot/main.js
@@ -0,0 +1,37 @@
+import { createApp, toRaw } from 'vue'
+import App from './App.vue'
+import { i18n, t } from '@/locales/index.js'
+import plugins from '@/plugins/index.js'
+import icons from '@/icons/index.js'
+
+import { replaceIP, restoreIP } from '@/utils/index.js'
+
+import 'virtual:uno.css'
+import '@/styles/index.js'
+
+const app = createApp(App)
+
+app.use(plugins)
+
+app.use(icons)
+
+app.use(i18n)
+window.t = t
+
+app.config.globalProperties.$replaceIP = replaceIP
+app.config.globalProperties.$restoreIP = restoreIP
+
+app.config.globalProperties.$toRaw = toRaw
+
+app.config.globalProperties.$mockAPI = ({ imitate = {}, delay = 500 } = {}) =>
+ new Promise((resolve) => {
+ setTimeout(() => {
+ resolve({
+ code: '0000',
+ data: imitate,
+ success: true,
+ })
+ }, delay)
+ })
+
+app.mount('#app')
diff --git a/electron/server/index.js b/electron/copilot/index.js
similarity index 84%
rename from electron/server/index.js
rename to electron/copilot/index.js
index a6be9ef..dd2ad27 100644
--- a/electron/server/index.js
+++ b/electron/copilot/index.js
@@ -7,14 +7,14 @@ export default async (mainWindow) => {
const app = new Hono()
app.notFound((c) => {
- return c.text('Escrcpy server 404', 404)
+ return c.text('Escrcpy copilot 404', 404)
})
const VITE_DEV_SERVER_URL = process.env.VITE_DEV_SERVER_URL
if (VITE_DEV_SERVER_URL) {
app.get('/', ctx =>
- ctx.redirect(`${VITE_DEV_SERVER_URL}server/index.html`),
+ ctx.redirect(`${VITE_DEV_SERVER_URL}copilot/index.html`),
)
}
else {
@@ -23,7 +23,7 @@ export default async (mainWindow) => {
serveStatic({
root: relative('./', process.env.DIST),
rewriteRequestPath: (path) => {
- return path.replace(/^\//, '/server')
+ return path.replace(/^\//, '/copilot')
},
}),
)
diff --git a/electron/main.js b/electron/main.js
index eba1b0e..05c3c0e 100644
--- a/electron/main.js
+++ b/electron/main.js
@@ -14,7 +14,7 @@ import { icnsLogoPath, icoLogoPath, logoPath } from './configs/index.js'
import events from './events/index.js'
-import server from './server/index.js'
+import copilot from './copilot/index.js'
log.initialize({ preload: true })
@@ -104,7 +104,7 @@ function createWindow() {
events(mainWindow)
- server(mainWindow)
+ copilot(mainWindow)
}
app.whenReady().then(() => {
diff --git a/index.html b/index.html
index ae7e1a3..319daa9 100644
--- a/index.html
+++ b/index.html
@@ -1,5 +1,5 @@
-
+
@@ -10,4 +10,4 @@
-
\ No newline at end of file
+
diff --git a/jsconfig.json b/jsconfig.json
index 6e35d74..e5934dd 100644
--- a/jsconfig.json
+++ b/jsconfig.json
@@ -3,11 +3,12 @@
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
+ "@copilot/*": ["copilot/*"],
"@root/*": ["*"],
"@electron/*": ["electron/*"],
"@renderer/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist", "dist-electron", "dist-release"],
- "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.vue", "electron"]
+ "include": ["src", "electron", "copilot"]
}
diff --git a/server/main.js b/server/main.js
deleted file mode 100644
index 43b3698..0000000
--- a/server/main.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { createApp } from 'vue'
-
-console.log('createApp', createApp)
diff --git a/src/assets/computer.png b/src/assets/computer.png
new file mode 100644
index 0000000..8501163
Binary files /dev/null and b/src/assets/computer.png differ
diff --git a/src/assets/mobile.png b/src/assets/mobile.png
new file mode 100644
index 0000000..69a7ce4
Binary files /dev/null and b/src/assets/mobile.png differ
diff --git a/src/assets/user.png b/src/assets/user.png
new file mode 100644
index 0000000..9d71959
Binary files /dev/null and b/src/assets/user.png differ
diff --git a/src/locales/index.js b/src/locales/index.js
index eb39f70..5d34278 100644
--- a/src/locales/index.js
+++ b/src/locales/index.js
@@ -2,7 +2,7 @@ import { createI18n } from 'vue-i18n'
import messages from '@intlify/unplugin-vue-i18n/messages'
const locale
- = window.appStore.get('common.language')
+ = window.appStore?.get('common.language')
|| window.electron?.process?.env?.LOCALE
// const locale = 'en_US'
diff --git a/src/styles/css/desktop.css b/src/styles/css/desktop.css
index c25edec..0ef191f 100644
--- a/src/styles/css/desktop.css
+++ b/src/styles/css/desktop.css
@@ -3,20 +3,23 @@ html {
}
/* 自定义滚动条的外观 */
-::-webkit-scrollbar {
- width: 8px;
-}
-::-webkit-scrollbar-track {
- background-color: theme("colors.gray.100");
- @apply bg-gray-100 dark:bg-gray-800;
-}
+@screen sm {
+ ::-webkit-scrollbar {
+ width: 8px;
+ }
-::-webkit-scrollbar-thumb {
- border-radius: 9999px;
- @apply bg-gray-300 dark:bg-gray-600;
-}
+ ::-webkit-scrollbar-track {
+ background-color: theme('colors.gray.100');
+ @apply bg-gray-100 dark:bg-gray-800;
+ }
-::-webkit-scrollbar-thumb:hover {
- @apply bg-gray-500 dark:bg-gray-300;
+ ::-webkit-scrollbar-thumb {
+ border-radius: 9999px;
+ @apply bg-gray-300 dark:bg-gray-600;
+ }
+
+ ::-webkit-scrollbar-thumb:hover {
+ @apply bg-gray-500 dark:bg-gray-300;
+ }
}
diff --git a/vite.config.js b/vite.config.js
index 4d91ced..3d76621 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -35,13 +35,14 @@ export default params =>
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
- server: resolve(__dirname, 'server/index.html'),
+ copilot: resolve(__dirname, 'copilot/index.html'),
},
},
},
resolve: {
alias: {
'@': resolve('src'),
+ '@copilot': resolve('copilot'),
'@electron': resolve('electron'),
},
},