From 2b13831aa8879b7eeaf7217fb52dc09d337c94c5 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Tue, 2 Nov 2021 15:48:25 +0530 Subject: [PATCH] feat: Add "Clear Cache" button to tab config modal --- src/components/TabConfigModal.svelte | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/components/TabConfigModal.svelte b/src/components/TabConfigModal.svelte index 5a7ffbe8..0a7ec772 100644 --- a/src/components/TabConfigModal.svelte +++ b/src/components/TabConfigModal.svelte @@ -9,6 +9,7 @@ import Check from "./svg/Check.svelte"; import ColorPicker from "./common/ColorPicker.svelte"; import Modal from "./common/Modal.svelte"; + const { ipcRenderer } = require("electron"); export let visible = false; export let tabSettings: TabType; @@ -68,6 +69,10 @@ .getElementById(`webview-${tabSettings.id}`) .openDevTools(); }; + + const clearTabCache = () => { + ipcRenderer.send("clear-cache", tabSettings.id); + }; -
+
{#if tabAlreadyExists} - +
+ + +
{/if}
-