[ARVADOS-WORKBENCH2] updated: 2.1.0-58-ga5ea2cce

Git user git at public.arvados.org
Thu Nov 12 17:12:33 UTC 2020


Summary of changes:
 src/common/copy-store.ts  | 28 ----------------------------
 src/common/redirect-to.ts | 18 ++----------------
 2 files changed, 2 insertions(+), 44 deletions(-)
 delete mode 100644 src/common/copy-store.ts

       via  a5ea2cce9d99fbfa52dc34d4ba18dd5338d724a0 (commit)
      from  b1a33418fbebefb360278baa97caebcfcbe53f31 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a5ea2cce9d99fbfa52dc34d4ba18dd5338d724a0
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Thu Nov 12 18:11:38 2020 +0100

    16005: Removed unused functions
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>

diff --git a/src/common/copy-store.ts b/src/common/copy-store.ts
deleted file mode 100644
index 9c7f3875..00000000
--- a/src/common/copy-store.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-const STORE_COPY_KEY = 'storeCopy';
-
-export const copyStore = (store: any) => {
-    const { localStorage } = window;
-    const state = store.getState();
-    const storeCopy = JSON.parse(JSON.stringify(state));
-    storeCopy.router.location.pathname = '/';
-
-    if (localStorage) {
-        localStorage.setItem(STORE_COPY_KEY, JSON.stringify(storeCopy));
-    }
-};
-
-export const restoreStore = () => {
-    let storeCopy = null;
-    const { localStorage } = window;
-
-    if (localStorage && localStorage.getItem(STORE_COPY_KEY)) {
-        storeCopy = localStorage.getItem(STORE_COPY_KEY);
-        localStorage.removeItem(STORE_COPY_KEY);
-    }
-
-    return storeCopy;
-};
diff --git a/src/common/redirect-to.ts b/src/common/redirect-to.ts
index baf44711..77be742f 100644
--- a/src/common/redirect-to.ts
+++ b/src/common/redirect-to.ts
@@ -5,12 +5,10 @@
 import { Config } from './config';
 
 const REDIRECT_TO_KEY = 'redirectTo';
-export const REDIRECT_TO_APPLY_TO_PATH = 'redirectToApplyToPath';
 
 export const storeRedirects = () => {
     let redirectUrl;
     const { location: { href }, localStorage } = window;
-    const applyToPath = href.indexOf(REDIRECT_TO_APPLY_TO_PATH) > -1;
 
     if (href.indexOf(REDIRECT_TO_KEY) > -1) {
         redirectUrl = href.split(`${REDIRECT_TO_KEY}=`)[1];
@@ -18,10 +16,6 @@ export const storeRedirects = () => {
 
     if (localStorage && redirectUrl) {
         localStorage.setItem(REDIRECT_TO_KEY, redirectUrl);
-
-        if (applyToPath) {
-            localStorage.setItem(REDIRECT_TO_APPLY_TO_PATH, 'true');
-        }
     }
 };
 
@@ -32,18 +26,10 @@ export const handleRedirects = (token: string, config: Config) => {
     if (localStorage && localStorage.getItem(REDIRECT_TO_KEY)) {
         const redirectUrl = localStorage.getItem(REDIRECT_TO_KEY);
         localStorage.removeItem(REDIRECT_TO_KEY);
-        const applyToPath = localStorage.getItem(REDIRECT_TO_APPLY_TO_PATH);
 
         if (redirectUrl) {
-            if (applyToPath === 'true') {
-                localStorage.removeItem(REDIRECT_TO_APPLY_TO_PATH);
-                setTimeout(() => {
-                    window.location.pathname = redirectUrl;
-                }, 0);
-            } else {
-                const sep = redirectUrl.indexOf("?") > -1 ? "&" : "?";
-                window.location.href = `${keepWebServiceUrl}${redirectUrl}${sep}api_token=${token}`;
-            }
+            const sep = redirectUrl.indexOf("?") > -1 ? "&" : "?";
+            window.location.href = `${keepWebServiceUrl}${redirectUrl}${sep}api_token=${token}`;
         }
     }
 };

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list