File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- async function openURL(url : string ) {
3- try {
4- const {BrowserOpenURL} = await import (
5- ' ../../../../wailsjs/runtime/runtime'
6- );
7- BrowserOpenURL (url );
8- } catch {}
9- }
2+ import {openURL } from ' $lib/utils/browser' ;
103 </script >
114
125<div
136 class =" bg-bg-secondary border-border text-fg-dimmed flex h-6 shrink-0 items-center justify-between border-t px-3 text-[10px]"
147>
158 <div class =" flex items-center gap-2" >
16- <span class =" text-fg-secondary font-semibold tracking-wide" >Aether</span
17- >
18- <span class =" bg-border h-3 w-px" ></span >
199 <span >v{__APP_VERSION__ }</span >
20- <span class =" bg-border h-3 w-px" ></span >
21- <span >by Bjarne Øverli</span >
2210 </div >
2311 <div class =" flex items-center gap-3" >
2412 <button
Original file line number Diff line number Diff line change 77 toggleSidebar ,
88 type Tab ,
99 } from ' $lib/stores/ui.svelte' ;
10+ import {openURL } from ' $lib/utils/browser' ;
1011
1112 let sidebarVisible = $derived (getSidebarVisible ());
1213 let isMac = $state (false );
1819 } catch {}
1920 });
2021
21- async function openGitHub() {
22- const {BrowserOpenURL} = await import (
23- ' ../../../../wailsjs/runtime/runtime'
24- );
25- BrowserOpenURL (' https://github.com/bjarneo/aether' );
26- }
27-
2822 const tabs: {id: Tab ; label: string ; icon: string }[] = [
2923 {
3024 id: ' editor' ,
8074 class:pb- 1.5={isMac }
8175 class:ml- 2={isMac }
8276 style =" letter-spacing: 0.08em; --wails-draggable:no-drag"
83- onclick ={openGitHub }
77+ onclick ={() => openURL ( ' https://github.com/bjarneo/aether ' ) }
8478 title =" Open GitHub repository" >AETHER</button
8579 >
8680 <button
Original file line number Diff line number Diff line change 55 getAdditionalImages ,
66 } from ' $lib/stores/theme.svelte' ;
77 import {setActiveTab , showToast } from ' $lib/stores/ui.svelte' ;
8+ import {openURL } from ' $lib/utils/browser' ;
89
910 let {wallpaper, onpreview}: {wallpaper: any ; onpreview: () => void } =
1011 $props ();
8081 }
8182 }
8283
83- async function handleVisit() {
84- try {
85- const {BrowserOpenURL} = await import (
86- ' ../../../../wailsjs/runtime/runtime'
87- );
88- BrowserOpenURL (` https://wallhaven.cc/w/${wallpaper .id } ` );
89- } catch {}
84+ function handleVisit() {
85+ openURL (` https://wallhaven.cc/w/${wallpaper .id } ` );
9086 }
9187
9288 function formatSize(bytes : number ): string {
Original file line number Diff line number Diff line change 1+ export async function openURL ( url : string ) : Promise < void > {
2+ try {
3+ const { BrowserOpenURL} = await import (
4+ '../../../wailsjs/runtime/runtime'
5+ ) ;
6+ BrowserOpenURL ( url ) ;
7+ } catch { }
8+ }
You can’t perform that action at this time.
0 commit comments