mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-06-01 10:43:34 -07:00
Add upload indicator to UI
This commit is contained in:
committed by
Markus Unterwaditzer
parent
6aa3491a6c
commit
e7ffebbb30
@@ -13,6 +13,11 @@
|
|||||||
manager: AnalysisManager;
|
manager: AnalysisManager;
|
||||||
current: boolean;
|
current: boolean;
|
||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
|
const date_formatter = new Intl.DateTimeFormat(undefined, {
|
||||||
|
timeStyle: 'long',
|
||||||
|
dateStyle: 'short',
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="container mt-2">
|
<div class="container mt-2">
|
||||||
@@ -49,20 +54,30 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<p>No warnings to display!</p>
|
<p>No warnings to display!</p>
|
||||||
{/if}
|
{/if}
|
||||||
{#if metadata !== undefined && metadata.rayhunter !== undefined}
|
<div>
|
||||||
<div>
|
<p class="text-lg underline">Metadata</p>
|
||||||
<p class="text-lg underline">Metadata</p>
|
{#if metadata !== undefined && metadata.rayhunter !== undefined}
|
||||||
<p>Analysis by Rayhunter version {metadata.rayhunter.rayhunter_version}</p>
|
<p><b>Rayhunter version:</b> {metadata.rayhunter.rayhunter_version}</p>
|
||||||
<p><b>Device system OS:</b> {metadata.rayhunter.system_os}</p>
|
<p><b>Device system OS:</b> {metadata.rayhunter.system_os}</p>
|
||||||
</div>
|
{:else}
|
||||||
|
<p>N/A (analysis generated by an older version of rayhunter)</p>
|
||||||
|
{/if}
|
||||||
|
{#if entry.upload_time}
|
||||||
|
<p>
|
||||||
|
<b>WebDAV uploaded at:</b>
|
||||||
|
<span class="text-green-700"
|
||||||
|
>{date_formatter.format(entry.upload_time)}</span
|
||||||
|
>
|
||||||
|
</p>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{#if metadata && metadata.analyzers}
|
||||||
<div>
|
<div>
|
||||||
<p class="text-lg underline">Analyzers</p>
|
<p class="text-lg underline">Enabled Analyzers</p>
|
||||||
{#each metadata.analyzers as analyzer}
|
{#each metadata.analyzers as analyzer}
|
||||||
<p><b>{analyzer.name}:</b> {analyzer.description}</p>
|
<p><b>{analyzer.name}:</b> {analyzer.description}</p>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
|
||||||
<p>N/A (analysis generated by an older version of rayhunter)</p>
|
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ interface JsonManifestEntry {
|
|||||||
last_message_time: string;
|
last_message_time: string;
|
||||||
qmdl_size_bytes: number;
|
qmdl_size_bytes: number;
|
||||||
stop_reason: string | null;
|
stop_reason: string | null;
|
||||||
|
upload_time: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Manifest {
|
export class Manifest {
|
||||||
@@ -59,6 +60,7 @@ export class ManifestEntry {
|
|||||||
public analysis_status: AnalysisStatus | undefined = $state(undefined);
|
public analysis_status: AnalysisStatus | undefined = $state(undefined);
|
||||||
public analysis_report: AnalysisReport | string | undefined = $state(undefined);
|
public analysis_report: AnalysisReport | string | undefined = $state(undefined);
|
||||||
public stop_reason: string | undefined = $state(undefined);
|
public stop_reason: string | undefined = $state(undefined);
|
||||||
|
public upload_time: Date | undefined = $state(undefined);
|
||||||
|
|
||||||
constructor(json: JsonManifestEntry) {
|
constructor(json: JsonManifestEntry) {
|
||||||
this.name = json.name;
|
this.name = json.name;
|
||||||
@@ -70,6 +72,9 @@ export class ManifestEntry {
|
|||||||
if (json.stop_reason) {
|
if (json.stop_reason) {
|
||||||
this.stop_reason = json.stop_reason;
|
this.stop_reason = json.stop_reason;
|
||||||
}
|
}
|
||||||
|
if (json.upload_time) {
|
||||||
|
this.upload_time = new Date(json.upload_time);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get_readable_qmdl_size(): string {
|
get_readable_qmdl_size(): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user