Skip to content

Commit

Permalink
Merge pull request #95 from mellobacon/master
Browse files Browse the repository at this point in the history
Merge master into release
  • Loading branch information
mellobacon authored Jul 16, 2023
2 parents 75d4d02 + c896fc2 commit 522c3b3
Show file tree
Hide file tree
Showing 23 changed files with 73 additions and 47 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</h3>
<p align="center">
<a href="https://github.com/mellobacon/Nucleus/blob/d704ed7892344480fb6fcd3c94ef534f52cadc31/LICENSE">License</a> •
Download
<a href="https://github.com/mellobacon/Nucleus/releases">Download</a>
</p>

___
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nucleus"
version = "0.2.0"
version = "0.2.1"
description = "A Tauri App"
authors = ["mellobacon"]
license = ""
Expand Down
Binary file modified src-tauri/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square107x107Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square142x142Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square284x284Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square30x30Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square310x310Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square71x71Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square89x89Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/icon.icns
Binary file not shown.
Binary file modified src-tauri/icons/icon.ico
Binary file not shown.
Binary file modified src-tauri/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "nucleus",
"version": "0.2.0"
"version": "0.2.1"
},
"tauri": {
"allowlist": {
Expand Down
20 changes: 20 additions & 0 deletions src/config/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,26 @@ export const commands = {
//
}
},
"minimizeWindow": {
"keybind": "",
"command": () => {
appWindow.minimize()
}
},
"maximizeWindow": {
"keybind": "",
"command": async () => {
if (await appWindow.isFullscreen()) {
return;
}
if (await appWindow.isMaximized()) {
appWindow.unmaximize();
}
else {
appWindow.maximize()
}
}
},
"closeWindow": {
"keybind": "Alt+F4",
"command": async () => {
Expand Down
1 change: 1 addition & 0 deletions src/lib/Editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
})
editorView.contentDOM.classList.add("mousetrap");
setEditorFontSize(await appSettings.get("editor.fontSize"));
setEditorFontFamily(await appSettings.get("editor.fontFamily"));
});
let _ = null;
Expand Down
91 changes: 48 additions & 43 deletions src/lib/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
]},
{menuname: "Window", children: [
{name: "New Window", disabled: true, shortcut: commands.openNewWindow.keybind, action: commands.openNewWindow.command},
{name: "Minimize Window", shortcut: "", action: async () => {await appWindow.minimize()}},
{name: "Maximize Window", shortcut: "", action: async () => {await appWindow.maximize()}},
{name: "Minimize Window", shortcut: commands.minimizeWindow.keybind, action: commands.minimizeWindow.command},
{name: "Maximize Window", shortcut: commands.maximizeWindow.keybind, action: commands.maximizeWindow.command},
{name: "Close Window", shortcut: commands.closeWindow.keybind, action: commands.closeWindow.command},
]},
{menuname: "Help", children: [
Expand All @@ -56,50 +56,55 @@
{name: "About", disabled: true, shortcut: "", action: () => {console.warn("Feature not implemented yet.")}},
]},
];
const x = appWindow.isFullscreen()
</script>
<div id="header">
<div id="logo"></div>
<div id="menubar">
{#each items as item}
<Dropdown menu={item}></Dropdown>
{/each}
</div>
<div class="divider"></div>
<div id="workspace" title="" data-tauri-drag-region>
{$workspaceName}
</div>
<div id="handle" data-tauri-drag-region></div>
<div class="tools">

<div class="settings-button">
<Dropdown right menu={{icon: Settings, children: [
{name: "Settings", shortcut: "", action: () => {addTab("Settings", "Settings", new settings({target: document.getElementById("tabview")}))}},
{name: "Keymap", disabled: true, shortcut: "", action: () => {console.warn("Feature not implemented yet.")}}
]
}} />

{#if x}
<div id="header">
<div id="logo"></div>
<div id="menubar">
{#each items as item}
<Dropdown menu={item}></Dropdown>
{/each}
</div>
<div class="divider"></div>
<div id="workspace" title="" data-tauri-drag-region>
{$workspaceName}
</div>
<div id="handle" data-tauri-drag-region></div>
<div class="tools">

<div class="settings-button">
<Dropdown right menu={{icon: Settings, children: [
{name: "Settings", shortcut: "", action: () => {addTab("Settings", "Settings", new settings({target: document.getElementById("tabview")}))}},
{name: "Keymap", disabled: true, shortcut: "", action: () => {console.warn("Feature not implemented yet.")}}
]
}} />
</div>
</div>
<div id="window-controls">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
class="window-button"
id="minimize"
on:click={commands.minimizeWindow.command}
/>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
class="window-button"
id="maximize"
on:click={commands.maximizeWindow.command}
/>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
class="window-button"
id="close"
on:click={commands.closeWindow.command}
/>
</div>
</div>
<div id="window-controls">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
class="window-button"
id="minimize"
on:click={() => appWindow.minimize()}
/>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
class="window-button"
id="maximize"
on:click={async () => { (await appWindow.isMaximized()) ? appWindow.unmaximize() : appWindow.maximize(); }}
/>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
class="window-button"
id="close"
on:click={commands.closeWindow.command}
/>
</div>
</div>
{/if}

<style lang="scss">
#header {
Expand Down

0 comments on commit 522c3b3

Please sign in to comment.