-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d894b16
commit e974000
Showing
7 changed files
with
82 additions
and
15 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<script> | ||
import { TrayIcon } from '@tauri-apps/api/tray' | ||
export let onMessage | ||
let icon = null | ||
let tooltip = null | ||
let title = null | ||
let iconAsTemplate = false | ||
let menuOnLeftClick = true | ||
function create() { | ||
TrayIcon.new({ | ||
icon, | ||
tooltip, | ||
title, | ||
iconAsTemplate, | ||
menuOnLeftClick, | ||
action: (event) => onMessage(event) | ||
}).catch(onMessage) | ||
} | ||
</script> | ||
|
||
<div class="flex flex-col children:grow gap-2"> | ||
<div class="flex gap-1"> | ||
<input | ||
class="input grow" | ||
type="text" | ||
placeholder="Title" | ||
bind:value={title} | ||
/> | ||
|
||
<input | ||
class="input grow" | ||
type="text" | ||
placeholder="Tooltip" | ||
bind:value={tooltip} | ||
/> | ||
|
||
<label> | ||
Menu on left click | ||
<input type="checkbox" bind:checked={menuOnLeftClick} /> | ||
</label> | ||
</div> | ||
|
||
<div class="flex gap-1"> | ||
<input | ||
class="input grow" | ||
type="text" | ||
placeholder="Icon path" | ||
bind:value={icon} | ||
/> | ||
|
||
<label> | ||
Icon as template | ||
<input type="checkbox" bind:checked={iconAsTemplate} /> | ||
</label> | ||
</div> | ||
|
||
<div class="flex"> | ||
<button class="btn" on:click={create} title="Creates the tray icon" | ||
>Create</button | ||
> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters