mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-17 23:01:23 +00:00
feat: nandesuka feed
fix: version reporting minior cleanup
This commit is contained in:
parent
2465b31d58
commit
cc22b2147d
6 changed files with 19 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "1.4.13",
|
||||
"version": "1.4.14",
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"main": "src/index.js",
|
||||
"homepage": "https://github.com/ThaUnknown/miru#readme",
|
||||
|
|
|
|||
|
|
@ -13,9 +13,7 @@ if (process.defaultApp) {
|
|||
app.setAsDefaultProtocolClient('miru')
|
||||
}
|
||||
|
||||
const gotTheLock = app.requestSingleInstanceLock()
|
||||
|
||||
if (!gotTheLock) {
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
app.quit()
|
||||
} else {
|
||||
app.on('second-instance', (event, commandLine, workingDirectory) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
const { dialog, ipcMain, BrowserWindow } = require('electron')
|
||||
const { dialog, ipcMain, BrowserWindow, app } = require('electron')
|
||||
|
||||
ipcMain.on('dialog', async (event, data) => {
|
||||
const { filePaths } = await dialog.showOpenDialog({
|
||||
|
|
@ -17,11 +17,11 @@ ipcMain.on('dialog', async (event, data) => {
|
|||
}
|
||||
})
|
||||
|
||||
ipcMain.on('minimize', () => {
|
||||
BrowserWindow.getAllWindows()[0].minimize()
|
||||
ipcMain.on('minimize', (event) => {
|
||||
BrowserWindow.fromWebContents(event.sender).minimize()
|
||||
})
|
||||
ipcMain.on('maximize', () => {
|
||||
const window = BrowserWindow.getAllWindows()[0]
|
||||
ipcMain.on('maximize', (event) => {
|
||||
const window = BrowserWindow.fromWebContents(event.sender)
|
||||
if (window.isMaximized()) {
|
||||
window.unmaximize()
|
||||
} else {
|
||||
|
|
@ -51,3 +51,7 @@ function loginRPC () {
|
|||
})
|
||||
}
|
||||
loginRPC()
|
||||
|
||||
ipcMain.on('version', (event) => {
|
||||
event.sender.send('version', app.getVersion()) // fucking stupid
|
||||
})
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ contextBridge.exposeInMainWorld('IPC', {
|
|||
}
|
||||
})
|
||||
contextBridge.exposeInMainWorld('version', {
|
||||
version: process.env.npm_package_version,
|
||||
arch: process.arch,
|
||||
platform: process.platform
|
||||
})
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@
|
|||
}
|
||||
const rssmap = {
|
||||
SubsPlease: 'https://nyaa.si/?page=rss&c=0_0&f=0&u=subsplease&q=',
|
||||
'Erai-raws': 'https://nyaa.si/?page=rss&c=0_0&f=0&u=Erai-raws&q='
|
||||
'Erai-raws [Multi-Sub]': 'https://nyaa.si/?page=rss&c=0_0&f=0&u=Erai-raws&q=',
|
||||
NanDesuKa: 'https://nyaa.si/?page=rss&c=0_0&f=0&u=NanDesuKa&q='
|
||||
}
|
||||
export function getRSSurl() {
|
||||
let rss = rssmap[settings.rssFeed] || settings.rssFeed
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@
|
|||
sunos: 'SunOS',
|
||||
win32: 'Windows'
|
||||
}
|
||||
let version = '1.0.0'
|
||||
window.IPC.on('version', data => (version = data))
|
||||
window.IPC.emit('version')
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
|
@ -96,7 +99,7 @@
|
|||
data-title="Restores All Settings Back To Their Recommended Defaults">
|
||||
Restore Defaults
|
||||
</button>
|
||||
<p class="text-muted px-20 m-0 mb-20">v{window.version.version} {platformMap[window.version.platform]} {window.version.arch}</p>
|
||||
<p class="text-muted px-20 m-0 mb-20">v{version} {platformMap[window.version.platform]} {window.version.arch}</p>
|
||||
</div>
|
||||
<div class="h-full p-20 m-20">
|
||||
<Tab>
|
||||
|
|
@ -140,7 +143,8 @@
|
|||
<input id="rss-feed" type="text" list="rss-feed-list" class="form-control form-control-lg" autocomplete="off" bind:value={settings.rssFeed} />
|
||||
<datalist id="rss-feed-list">
|
||||
<option value="SubsPlease">https://nyaa.si/?page=rss&c=0_0&f=0&u=subsplease&q=</option>
|
||||
<option value="Erai-raws">https://nyaa.si/?page=rss&c=0_0&f=0&u=Erai-raws&q=</option>
|
||||
<option value="Erai-raws [Multi-Sub]">https://nyaa.si/?page=rss&c=0_0&f=0&u=Erai-raws&q=</option>
|
||||
<option value="NanDesuKa">https://nyaa.si/?page=rss&c=0_0&f=0&u=NanDesuKa&q=</option>
|
||||
</datalist>
|
||||
</div>
|
||||
<div class="input-group mb-10 w-300 form-control-lg" data-toggle="tooltip" data-placement="top" data-title="What Quality To Find Torrents In">
|
||||
|
|
|
|||
Loading…
Reference in a new issue