Skip to content

Commit a4b117d

Browse files
Update 3.0.2
Co-Authored-By: SamsidParty <[email protected]>
1 parent b9f1e09 commit a4b117d

File tree

9 files changed

+44
-10
lines changed

9 files changed

+44
-10
lines changed

TopNotify/GUI/MainCommands.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@ public static void About()
4040
.Show();
4141
}
4242

43+
[Command("GetVersion")]
44+
public static string GetVersion()
45+
{
46+
// Read version from Appx Manifest
47+
var appxManifest = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "AppxManifest.xml");
48+
if (File.Exists(appxManifest)) {
49+
var manifestData = File.ReadAllText(appxManifest);
50+
51+
var from = manifestData.IndexOf("Version=\"") + "Version=\"".Length;
52+
var to = manifestData.LastIndexOf("\"");
53+
54+
var result = manifestData.Substring(from, to - from);
55+
return " v" + result.Substring(0, 5);
56+
}
57+
58+
return " Debug";
59+
}
60+
4361
//Called By JavaScript
4462
//Opens a URL
4563
[Command("OpenURL")]

TopNotify/GUI/SoundFinder.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,17 @@ public static void PreviewSound(string soundID)
5151
/// </summary>
5252
public static string[] GetWAVFilesInMusicFolder()
5353
{
54-
var musicFolder = Environment.ExpandEnvironmentVariables("%USERPROFILE%\\Music");
55-
56-
// Music folder doesn't always exist https://github.com/SamsidParty/TopNotify/issues/40#issuecomment-2692353622
57-
if (Directory.Exists(musicFolder))
54+
try
5855
{
59-
return Directory.GetFiles(musicFolder, "*.wav", SearchOption.AllDirectories);
56+
var musicFolder = Environment.ExpandEnvironmentVariables("%USERPROFILE%\\Music");
57+
58+
// Music folder doesn't always exist https://github.com/SamsidParty/TopNotify/issues/40#issuecomment-2692353622
59+
if (Directory.Exists(musicFolder))
60+
{
61+
return Directory.GetFiles(musicFolder, "*.wav", SearchOption.AllDirectories);
62+
}
6063
}
64+
catch { }
6165

6266
return new string[0];
6367
}

TopNotify/MSIX Beta/AppxManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!--Package created by MSIX Packaging Tool version: 1.2023.807.0-->
44
<!--Use CN=68C2D20A-96CA-43CC-A323-A549C2786CDA For Prod-->
55
<!--Use CN=SamsidParty For Beta-->
6-
<Identity Name="55968SamsidGameStudios.TopNotifyBeta" Publisher="CN=SamsidParty" Version="3.0.0.0" ProcessorArchitecture="x64" />
6+
<Identity Name="55968SamsidGameStudios.TopNotifyBeta" Publisher="CN=SamsidParty" Version="3.0.2.0" ProcessorArchitecture="x64" />
77
<Properties>
88
<DisplayName>TopNotify Beta</DisplayName>
99
<PublisherDisplayName>SamsidParty</PublisherDisplayName>

TopNotify/MSIX/AppxManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!--Package created by MSIX Packaging Tool version: 1.2023.807.0-->
44
<!--Use CN=68C2D20A-96CA-43CC-A323-A549C2786CDA For Prod-->
55
<!--Use CN=SamsidParty For Beta-->
6-
<Identity Name="55968SamsidGameStudios.TopNotify" Publisher="CN=68C2D20A-96CA-43CC-A323-A549C2786CDA" Version="3.0.1.0" ProcessorArchitecture="x64" />
6+
<Identity Name="55968SamsidGameStudios.TopNotify" Publisher="CN=68C2D20A-96CA-43CC-A323-A549C2786CDA" Version="3.0.2.0" ProcessorArchitecture="x64" />
77
<Properties>
88
<DisplayName>TopNotify</DisplayName>
99
<PublisherDisplayName>SamsidParty</PublisherDisplayName>
44 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TopNotify/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
background-color: transparent !important;
1010
}
1111
</style>
12-
<script type="module" crossorigin src="/assets/index-BDfEktSC.js"></script>
12+
<script type="module" crossorigin src="/assets/index-l-JEPa6Z.js"></script>
1313
<link rel="stylesheet" crossorigin href="/assets/index-vESu9V2o.css">
1414
</head>
1515
<body oncontextmenu="return false;">
44 Bytes
Binary file not shown.

TopNotify/src-vite/src/About.jsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
import { Button } from "@chakra-ui/react";
22
import "./CSS/About.css";
3+
import { useState } from "react";
34

45
export default function About() {
6+
7+
var [version, setVersion] = useState("");
8+
9+
if (version == "") {
10+
setVersion(" ...");
11+
12+
setTimeout(async () => {
13+
setVersion(await igniteView.commandBridge.GetVersion());
14+
});
15+
}
16+
517
return (
618
<div className={'app loaded about'}>
719
<div onMouseOver={window.igniteView.dragWindow} className="draggableHeader">
@@ -13,7 +25,7 @@ export default function About() {
1325
</div>
1426

1527
<img src="/Image/IconSmall.png"></img>
16-
<h4>TopNotify v3.0.0</h4>
28+
<h4>TopNotify{version}</h4>
1729
<h6>Developed by SamsidParty • Powered by IgniteView</h6>
1830

1931
<div className="aboutButtons">

0 commit comments

Comments
 (0)