Skip to content

Commit

Permalink
Merge branch 'main' into feat/custom-assets-server
Browse files Browse the repository at this point in the history
  • Loading branch information
A-kirami committed Dec 3, 2024
2 parents 69e3aa2 + 49749c4 commit a94e0ee
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
24 changes: 21 additions & 3 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use tauri::Manager;
use tauri::{Manager, WebviewUrl, WebviewWindowBuilder};
mod command;
mod state;
mod utils;
Expand All @@ -7,8 +7,26 @@ use std::sync::Mutex;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
let mut builder = tauri::Builder::default().setup(|app| {
#[cfg(dev)]
app.get_webview_window("main",).unwrap().open_devtools();
let win_builder = WebviewWindowBuilder::new(app, "main", WebviewUrl::default(),)
.title("Matcha",)
.min_inner_size(620.0, 540.0,)
.inner_size(1080.0, 720.0,)
.center();

#[cfg(not(target_os = "macos"))]
let win_builder = win_builder.decorations(false,).transparent(true,);

#[cfg(target_os = "macos")]
let win_builder = win_builder
.decorations(true,)
.hidden_title(true,)
.title_bar_style(tauri::TitleBarStyle::Overlay,);

let window = win_builder.build().unwrap();

if tauri::is_dev() {
window.open_devtools();
}

app.manage(Mutex::new(state::AppState::default(),),);

Expand Down
10 changes: 0 additions & 10 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@
"app": {
"macOSPrivateApi": true,
"windows": [
{
"title": "Matcha",
"height": 720,
"width": 1080,
"minHeight": 540,
"minWidth": 620,
"center": true,
"decorations": false,
"transparent": true
}
],
"security": {
"csp": null
Expand Down
5 changes: 2 additions & 3 deletions src/components/AppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ const isMacOs = $computed(() => unref(osType) === 'macos')

<template>
<aside
class="w-15 flex flex-col items-center gap-4 bg-background pb-5"
class="flex flex-col items-center gap-4 bg-background pb-5"
:class="[
focused ? 'bg-opacity-40 dark:bg-opacity-60' : 'bg-opacity-70 dark:bg-opacity-90',
isMacOs ? 'pt-2' : 'pt-7',
isMacOs ? 'pt-8 w-18' : 'pt-7 w-15',
]"
>
<WindowControls v-if="isMacOs" />
<AppLogo class="size-9" />
<AppSidebarNavigation />
<AppSidebarUserAvatar class="mt-auto" />
Expand Down

0 comments on commit a94e0ee

Please sign in to comment.