Fix alternative paste

This commit is contained in:
smartfridge 2022-07-15 11:17:42 +02:00
parent 33b2b05792
commit 414c7d120f
3 changed files with 23 additions and 1 deletions

View file

@ -126,6 +126,7 @@ button {
border: none; border: none;
border-radius: 5px; border-radius: 5px;
padding: 8px; padding: 8px;
margin-top: 10px;
transition: 0.17s ease; transition: 0.17s ease;
} }
button:hover { button:hover {
@ -238,7 +239,7 @@ select {
outline: none !important; outline: none !important;
} }
.acTheme { .acTheme {
height: 14em !important; height: 15em !important;
} }
.acCSP { .acCSP {
height: 10em !important; height: 10em !important;

View file

@ -20,10 +20,23 @@ export async function setMenu() {
} }
}) })
}) })
mainWindow.on("show", function () {
console.log("[Window state manager] Show")
mainWindow.focus()
globalShortcut.register("CmdOrCtrl+V", function () {
if (mainWindow.isFocused()) {
paste(mainWindow.webContents)
}
})
})
mainWindow.on("blur", function () { mainWindow.on("blur", function () {
console.log("[Window state manager] Defocus") console.log("[Window state manager] Defocus")
globalShortcut.unregister("CmdOrCtrl+V") globalShortcut.unregister("CmdOrCtrl+V")
}) })
mainWindow.on("hide", function () {
console.log("[Window state manager] Hide")
globalShortcut.unregister("CmdOrCtrl+V")
})
} }
var template: Electron.MenuItemConstructorOptions[] = [{ var template: Electron.MenuItemConstructorOptions[] = [{
label: "ArmCord", label: "ArmCord",

View file

@ -163,6 +163,14 @@
</div> </div>
<br /> <br />
<button id="settings-save" class="center">Save Settings</button> <button id="settings-save" class="center">Save Settings</button>
<br />
<button id="settings-pluginsFolder" class="center">Open plugins folder</button>
<br />
<button id="settings-themeFolder" class="center">Open themes folder</button>
<br />
<button id="settings-storageFolder" class="center">Open storage folder</button>
<br />
<button id="settings-copyDebugInfo" class="center">Copy debug info</button>
</body> </body>
<script> <script>
async function loadLang() { async function loadLang() {