mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 09:19:56 -05:00
Better formatting for dates
This commit is contained in:
+1
-3
@@ -266,7 +266,6 @@ export const uiAuth = {
|
||||
clientMutationId: payload.clientMutationId ?? existing.clientMutationId,
|
||||
...withExpiryFromSettings(payload.accessToken, jwt),
|
||||
refreshToken: existing.refreshToken,
|
||||
refreshExpiresAt: existing.refreshExpiresAt,
|
||||
});
|
||||
},
|
||||
clearToken: () => {
|
||||
@@ -577,11 +576,10 @@ export async function loginUI(user: string, pass: string): Promise<void> {
|
||||
};
|
||||
|
||||
uiAuth.setLoginSession(preliminarySession, null);
|
||||
updateSettings({ serverAuthMode: "UI_LOGIN", serverAuthUser: user, serverAuthPass: "" });
|
||||
|
||||
const jwt = await getJwtSettings(true).catch(() => null);
|
||||
uiAuth.setLoginSession(preliminarySession, jwt);
|
||||
|
||||
updateSettings({ serverAuthMode: "UI_LOGIN", serverAuthUser: user, serverAuthPass: "" });
|
||||
}
|
||||
|
||||
export async function loginBasic(user: string, pass: string): Promise<void> {
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
function fmtTime(ts: number | null): string {
|
||||
if (ts === null) return "—";
|
||||
return new Date(ts).toLocaleTimeString();
|
||||
return new Date(ts).toLocaleString([], { dateStyle: "medium", timeStyle: "medium" });
|
||||
}
|
||||
|
||||
async function forceTokenRefresh() {
|
||||
|
||||
Reference in New Issue
Block a user