mirror of
https://github.com/rubickCenter/rubick
synced 2025-07-15 03:27:26 +08:00
feat: souport windows
This commit is contained in:
parent
571ff12730
commit
3ba4be2e4a
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rubick",
|
||||
"version": "2.0.1-beta.4",
|
||||
"version": "2.0.1-beta.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 15 KiB |
@ -17,6 +17,8 @@ export default function getCopyFiles(): Array<any> | null {
|
||||
return null;
|
||||
}
|
||||
} else if (commonConst.windows()) {
|
||||
const filePath = clipboard.readBuffer('FileNameW').toString('ucs2').replace(RegExp(String.fromCharCode(0), 'g'), '');
|
||||
fileInfo = [filePath];
|
||||
// todo
|
||||
} else {
|
||||
if (!commonConst.linux()) return null;
|
||||
|
@ -3,6 +3,10 @@ import path from "path";
|
||||
import commonConst from "../../common/utils/commonConst";
|
||||
import { PLUGIN_INSTALL_DIR as baseDir } from "@/common/constans/main";
|
||||
|
||||
const getRelativePath = (indexPath) => {
|
||||
return commonConst.windows() ? indexPath.replace("file://", "") : indexPath.replace("file:", "");
|
||||
}
|
||||
|
||||
const getPreloadPath = (plugin, pluginIndexPath) => {
|
||||
const { name, preload, tplPath, indexPath } = plugin;
|
||||
if (!preload) return;
|
||||
|
@ -31,6 +31,7 @@ const API: any = {
|
||||
currentPlugin: API.currentPlugin,
|
||||
})})`
|
||||
);
|
||||
window.show();
|
||||
},
|
||||
removePlugin(e, window) {
|
||||
API.currentPlugin = null;
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div id="components-layout">
|
||||
<div v-if="commonConst.windows()" class="drag-bar"></div>
|
||||
<div :class="!commonConst.windows() && 'drag'" id="components-layout">
|
||||
<div class="rubick-select">
|
||||
<Search
|
||||
:currentPlugin="currentPlugin"
|
||||
@ -33,6 +34,7 @@ import Result from "./components/result.vue";
|
||||
import Search from "./components/search.vue";
|
||||
import getWindowHeight from "../common/utils/getWindowHeight";
|
||||
import createPluginManager from "./plugins-manager";
|
||||
import commonConst from "@/common/utils/commonConst";
|
||||
|
||||
const {
|
||||
initPlugins,
|
||||
@ -100,12 +102,23 @@ const choosePlugin = () => {
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.drag-bar {
|
||||
-webkit-app-region: drag;
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
#components-layout {
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
-webkit-app-region: drag;
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
.drag {
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user