fix: log sharing in app + clearing (#5801)
* fix: log wiping app * fix: share modal rounded
This commit is contained in:
@@ -73,6 +73,12 @@ function invalidate(profilePathId: string): void {
|
||||
entry.logList = null
|
||||
}
|
||||
|
||||
async function clearLive(profilePathId: string): Promise<void> {
|
||||
const entry = getOrCreate(profilePathId)
|
||||
entry.liveConsole.clear()
|
||||
await clear_log_buffer(profilePathId).catch(() => {})
|
||||
}
|
||||
|
||||
async function destroy(profilePathId: string): Promise<void> {
|
||||
instances.delete(profilePathId)
|
||||
await clear_log_buffer(profilePathId).catch(() => {})
|
||||
@@ -87,6 +93,7 @@ export function useInstanceConsole(profilePathId: string) {
|
||||
getHistoricalLogs: (instancePath: string) => getHistoricalLogs(profilePathId, instancePath),
|
||||
getHistoricalContent: (filename: string) => getHistoricalContent(profilePathId, filename),
|
||||
invalidate: () => invalidate(profilePathId),
|
||||
clearLive: () => clearLive(profilePathId),
|
||||
destroy: () => destroy(profilePathId),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ const {
|
||||
getHistoricalLogs,
|
||||
getHistoricalContent,
|
||||
invalidate,
|
||||
clearLive,
|
||||
} = useInstanceConsole(profilePathId.value)
|
||||
|
||||
await hydrate()
|
||||
@@ -159,7 +160,8 @@ provideConsoleManager({
|
||||
showCommandInput: false,
|
||||
loading: ref(false),
|
||||
onClear: () => {
|
||||
activeConsole.value.clear()
|
||||
if (!isLive.value) return
|
||||
void clearLive()
|
||||
},
|
||||
onDelete: deleteSelectedLog,
|
||||
deleteDisabled,
|
||||
|
||||
Reference in New Issue
Block a user