mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-08 11:34:10 +08:00
🐛 尝试修复 arm build 问题
This commit is contained in:
parent
d1ce6a307d
commit
effd00f10f
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-2019, ubuntu-latest]
|
os: [macos-11, windows-2019, ubuntu-latest]
|
||||||
|
|
||||||
# create steps
|
# create steps
|
||||||
steps:
|
steps:
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<div class="handle">
|
<div class="handle">
|
||||||
<div class="devtool" @click="openDevTool" title="开发者工具"></div>
|
<div class="devtool" @click="openDevTool" title="开发者工具"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="window-handle" v-if="platform !== 'darwin'">
|
<div class="window-handle" v-if="process.platform !== 'darwin'">
|
||||||
<div class="minimize" @click="minimize"></div>
|
<div class="minimize" @click="minimize"></div>
|
||||||
<div class="maximize" @click="maximize"></div>
|
<div class="maximize" @click="maximize"></div>
|
||||||
<div class="close" @click="close"></div>
|
<div class="close" @click="close"></div>
|
||||||
@ -30,7 +30,7 @@ import { ref } from 'vue';
|
|||||||
|
|
||||||
const { ipcRenderer } = window.require('electron');
|
const { ipcRenderer } = window.require('electron');
|
||||||
|
|
||||||
const platform = ref(window.process.platform);
|
const process = window.require('process');
|
||||||
const showInput = ref(false);
|
const showInput = ref(false);
|
||||||
|
|
||||||
const storeInfo = localStorage.getItem('rubick-system-detach') || '{}';
|
const storeInfo = localStorage.getItem('rubick-system-detach') || '{}';
|
||||||
|
@ -32,7 +32,9 @@ const getSearchFiles = (argv = process.argv, cwd = process.cwd()) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const putFileToRubick = (webContents, files) => {
|
const putFileToRubick = (webContents, files) => {
|
||||||
webContents.executeJavaScript(`window.searchFocus(${JSON.stringify(files)})`);
|
webContents.executeJavaScript(
|
||||||
|
`window.searchFocus(${JSON.stringify(files)}, false)`
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const copyFileOutsideOfElectronAsar = function (
|
const copyFileOutsideOfElectronAsar = function (
|
||||||
|
@ -8,10 +8,10 @@ import { ref } from 'vue';
|
|||||||
|
|
||||||
export default ({ currentPlugin, optionsRef, openPlugin, setOptionsRef }) => {
|
export default ({ currentPlugin, optionsRef, openPlugin, setOptionsRef }) => {
|
||||||
const clipboardFile: any = ref([]);
|
const clipboardFile: any = ref([]);
|
||||||
const searchFocus = (files) => {
|
const searchFocus = (files, strict = true) => {
|
||||||
const config: any = localConfig.getConfig();
|
const config: any = localConfig.getConfig();
|
||||||
// 未开启自动粘贴
|
// 未开启自动粘贴
|
||||||
if (!config.perf.common.autoPast) return;
|
if (!config.perf.common.autoPast && strict) return;
|
||||||
|
|
||||||
if (currentPlugin.value.name) return;
|
if (currentPlugin.value.name) return;
|
||||||
const fileList = files || getCopyFiles();
|
const fileList = files || getCopyFiles();
|
||||||
|
@ -176,6 +176,14 @@ const createPluginManager = (): any => {
|
|||||||
state.pluginLoading = false;
|
state.pluginLoading = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
window.searchFocus = (args, strict) => {
|
||||||
|
ipcRenderer.send('msg-trigger', {
|
||||||
|
type: 'removePlugin',
|
||||||
|
});
|
||||||
|
window.initRubick();
|
||||||
|
searchFocus(args, strict);
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
initPlugins,
|
initPlugins,
|
||||||
|
@ -156,8 +156,6 @@ const optionsManager = ({
|
|||||||
setOptionsRef,
|
setOptionsRef,
|
||||||
});
|
});
|
||||||
|
|
||||||
window.searchFocus = searchFocus;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
options: optionsRef,
|
options: optionsRef,
|
||||||
searchFocus,
|
searchFocus,
|
||||||
|
2
src/renderer/shims-vue.d.ts
vendored
2
src/renderer/shims-vue.d.ts
vendored
@ -26,5 +26,5 @@ interface Window {
|
|||||||
setCurrentPlugin: (plugin: any) => void;
|
setCurrentPlugin: (plugin: any) => void;
|
||||||
pluginLoaded: () => void;
|
pluginLoaded: () => void;
|
||||||
getMainInputInfo: () => any;
|
getMainInputInfo: () => any;
|
||||||
searchFocus: (args: any) => any;
|
searchFocus: (args: any, strict?: boolean) => any;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user