Ensure minimum size for desktop app
This commit is contained in:
parent
2449ce824c
commit
6201818d3b
2
main.go
2
main.go
@ -52,6 +52,8 @@ func configure(app *aero.Application) *aero.Application {
|
|||||||
// Development server configuration
|
// Development server configuration
|
||||||
if arn.IsDevelopment() {
|
if arn.IsDevelopment() {
|
||||||
app.Config.Domain = "beta.notify.moe"
|
app.Config.Domain = "beta.notify.moe"
|
||||||
|
app.Config.Title += " - Beta"
|
||||||
|
app.Config.Manifest.Name = app.Config.Title
|
||||||
|
|
||||||
// Test connectivity
|
// Test connectivity
|
||||||
app.OnStart(testConnectivity)
|
app.OnStart(testConnectivity)
|
||||||
|
@ -224,6 +224,17 @@ export default class AnimeNotifier {
|
|||||||
document.getElementsByClassName("speech-input")[0].classList.add("speech-input-available")
|
document.getElementsByClassName("speech-input")[0].classList.add("speech-input-available")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure a minimum size for the desktop app
|
||||||
|
const minWidth = 1420
|
||||||
|
const minHeight = 800
|
||||||
|
|
||||||
|
if(window.outerWidth <= minWidth || window.outerHeight <= minHeight) {
|
||||||
|
let finalWidth = window.outerWidth < minWidth ? minWidth : window.outerWidth
|
||||||
|
let finalHeight = window.outerHeight < minHeight ? minHeight : window.outerHeight
|
||||||
|
|
||||||
|
window.resizeTo(finalWidth, finalHeight)
|
||||||
|
}
|
||||||
|
|
||||||
// // Download popular anime titles for the search
|
// // Download popular anime titles for the search
|
||||||
// let response = await fetch("/api/popular/anime/titles/500")
|
// let response = await fetch("/api/popular/anime/titles/500")
|
||||||
// let titles = await response.json()
|
// let titles = await response.json()
|
||||||
|
Loading…
Reference in New Issue
Block a user