From 9575af7a2b69253dfac93e91fe342055b3451884 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Thu, 18 Jun 2020 14:07:04 -0700 Subject: [PATCH] Locale support for 12 hr / 24 format (#525) --- assets/components/LogEventSource.spec.js | 8 +++--- assets/components/LogViewer.vue | 12 +++------ assets/components/RelativeTime.vue | 34 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 assets/components/RelativeTime.vue diff --git a/assets/components/LogEventSource.spec.js b/assets/components/LogEventSource.spec.js index 7e0981f8..b0f4f2b9 100644 --- a/assets/components/LogEventSource.spec.js +++ b/assets/components/LogEventSource.spec.js @@ -144,7 +144,7 @@ describe("", () => { await wrapper.vm.$nextTick(); expect(wrapper.find("ul.events")).toMatchInlineSnapshot(` `); }); @@ -159,7 +159,7 @@ describe("", () => { await wrapper.vm.$nextTick(); expect(wrapper.find("ul.events")).toMatchInlineSnapshot(`
    -
  • today at 10:55 AM blackwhite
  • +
  • blackwhite
`); }); @@ -174,7 +174,7 @@ describe("", () => { await wrapper.vm.$nextTick(); expect(wrapper.find("ul.events")).toMatchInlineSnapshot(`
    -
  • today at 10:55 AM <test>foo bar</test>
  • +
  • <test>foo bar</test>
`); }); @@ -192,7 +192,7 @@ describe("", () => { await wrapper.vm.$nextTick(); expect(wrapper.find("ul.events")).toMatchInlineSnapshot(`
    -
  • today at 10:55 AM This is a test <hi></hi>
  • +
  • This is a test <hi></hi>
`); }); diff --git a/assets/components/LogViewer.vue b/assets/components/LogViewer.vue index 3d5d3f32..471168cb 100644 --- a/assets/components/LogViewer.vue +++ b/assets/components/LogViewer.vue @@ -1,17 +1,16 @@ -