mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-25 03:49:26 +08:00
feat: suport windows
This commit is contained in:
@@ -28,12 +28,36 @@ let defaultConfig = {
|
||||
mouseDownTime: 500
|
||||
},
|
||||
global: []
|
||||
},
|
||||
Windows_NT: {
|
||||
perf: {
|
||||
shortCut: {
|
||||
showAndHidden: 'Option+R',
|
||||
separate: 'Ctrl+D'
|
||||
},
|
||||
common: {
|
||||
start: true,
|
||||
space: true,
|
||||
},
|
||||
local: {
|
||||
search: true,
|
||||
}
|
||||
},
|
||||
superPanel: {
|
||||
baiduAPI: {
|
||||
key: '',
|
||||
appid: '',
|
||||
},
|
||||
mouseDownTime: 500
|
||||
},
|
||||
global: []
|
||||
}
|
||||
}
|
||||
global.opConfig = {
|
||||
config: null,
|
||||
get() {
|
||||
const platform = os.type();
|
||||
console.log(platform);
|
||||
try {
|
||||
if (!opConfig.config) {
|
||||
opConfig.config = JSON.parse(fs.readFileSync(configPath) || JSON.stringify(defaultConfig[platform]));
|
||||
|
||||
@@ -13,7 +13,10 @@ if (process.env.NODE_ENV !== 'development') {
|
||||
}
|
||||
// to fix https://github.com/electron/electron/issues/18397
|
||||
app.allowRendererProcessReuse = false;
|
||||
app.dock.hide();
|
||||
console.log(process.platform);
|
||||
if (process.platform === 'darwin') {
|
||||
app.dock.hide();
|
||||
}
|
||||
|
||||
function createWindow() {
|
||||
main.init();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a-layout id="components-layout">
|
||||
<div v-if="!searchType" class="rubick-select">
|
||||
<div v-if="!searchType" class="rubick-select" @click="alert(123123)">
|
||||
<div class="tag-container" v-if="selected">
|
||||
<a-tag
|
||||
:key="selected.key"
|
||||
@@ -345,9 +345,13 @@ export default {
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
}
|
||||
.main-input {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
}
|
||||
.rubick-select,
|
||||
.rubick-select-subMenu {
|
||||
-webkit-app-region: drag;
|
||||
display: flex;
|
||||
padding-left: 10px;
|
||||
background: #fff;
|
||||
|
||||
@@ -53,6 +53,6 @@ const SYSTEM_PLUGINS = [
|
||||
}
|
||||
];
|
||||
|
||||
const APP_FINDER_PATH = ['/System/Applications', '/Applications', '/System/Library/PreferencePanes'];
|
||||
const APP_FINDER_PATH = process.platform === 'darwin' ? ['/System/Applications', '/Applications', '/System/Library/PreferencePanes'] : [];
|
||||
|
||||
export { WINDOW_MAX_HEIGHT, WINDOW_MIN_HEIGHT, PRE_ITEM_HEIGHT, SYSTEM_PLUGINS, APP_FINDER_PATH };
|
||||
|
||||
@@ -47,7 +47,6 @@ export default {
|
||||
|
||||
<style lang="less">
|
||||
.main-input {
|
||||
-webkit-app-region: drag;
|
||||
height: 60px !important;
|
||||
flex: 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user