mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 04:57:59 +00:00
Correctly open settings & about dialogs
This commit is contained in:
parent
3a325fe064
commit
4e68bf324c
@ -30,6 +30,10 @@
|
||||
</Modal>
|
||||
|
||||
<style>
|
||||
.brand, .info {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -40,9 +44,9 @@
|
||||
flex: 0 1 125px;
|
||||
}
|
||||
.brand .title {
|
||||
font-size: 2.25rem;
|
||||
font-size: 2.25em;
|
||||
font-weight: 600;
|
||||
line-height: 2.5rem;
|
||||
margin-bottom: .25em;
|
||||
}
|
||||
.brand .title .version {
|
||||
font-size: 80%;
|
||||
@ -51,7 +55,6 @@
|
||||
}
|
||||
.brand .description {
|
||||
font-size: 1.5rem;
|
||||
line-height: 1.6rem;
|
||||
}
|
||||
|
||||
hr {
|
||||
@ -60,7 +63,6 @@
|
||||
|
||||
.info {
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.25rem;
|
||||
margin: 0 1rem 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -1,13 +1,20 @@
|
||||
import './styles/reset.css';
|
||||
import './styles/style.css';
|
||||
|
||||
import { LogError } from '$wails/runtime/runtime.js';
|
||||
import { EventsOn, LogError } from '$wails/runtime/runtime.js';
|
||||
import dialogs from '$lib/dialogs.js';
|
||||
|
||||
import App from './app.svelte';
|
||||
import AboutDialog from './dialogs/about.svelte';
|
||||
import SettingsDialog from './dialogs/settings/index.svelte';
|
||||
|
||||
window.addEventListener('unhandledrejection', event => {
|
||||
LogError('Unhandled JS rejection: ' + event.reason);
|
||||
});
|
||||
|
||||
EventsOn('global.about', () => dialogs.new(AboutDialog));
|
||||
EventsOn('global.settings', () => dialogs.new(SettingsDialog));
|
||||
|
||||
const app = new App({ target: document.getElementById('app') });
|
||||
|
||||
export default app;
|
||||
|
@ -24,12 +24,12 @@ func (a *App) Menu() *menu.Menu {
|
||||
appMenu := menu.NewMenu()
|
||||
|
||||
aboutMenu := appMenu.AddSubmenu("Rolens")
|
||||
aboutMenu.AddText("About Rolens", nil, menuCallbackEmit(a, "OpenAboutModal"))
|
||||
aboutMenu.AddText("About Rolens", nil, menuCallbackEmit(a, "global.about"))
|
||||
aboutMenu.AddSeparator()
|
||||
aboutMenu.AddText("Preferences…", keys.CmdOrCtrl(","), menuCallbackEmit(a, "OpenPreferences"))
|
||||
aboutMenu.AddText("Preferences…", keys.CmdOrCtrl(","), menuCallbackEmit(a, "global.settings"))
|
||||
aboutMenu.AddSeparator()
|
||||
aboutMenu.AddText("Open data directory…", nil, func(cd *menu.CallbackData) { a.ui.Reveal(a.Env.DataDirectory) })
|
||||
aboutMenu.AddText("Open log directory…", nil, func(cd *menu.CallbackData) { a.ui.Reveal(a.Env.LogDirectory) })
|
||||
aboutMenu.AddText("Open data directory", nil, func(cd *menu.CallbackData) { a.ui.Reveal(a.Env.DataDirectory) })
|
||||
aboutMenu.AddText("Open log directory", nil, func(cd *menu.CallbackData) { a.ui.Reveal(a.Env.LogDirectory) })
|
||||
aboutMenu.AddText("Purge logs…", nil, func(cd *menu.CallbackData) { a.PurgeLogDirectory() })
|
||||
aboutMenu.AddSeparator()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user