From efe1992d7c36cc5857210204956ec354df3c2215 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+KaizIqbal@users.noreply.github.com> Date: Mon, 17 Aug 2020 16:28:29 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Remove=20individual=20cursor=20cust?= =?UTF-8?q?omization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/round/src/color.ts | 17 +++-------------- packages/round/src/helpers/schema.ts | 15 ++++----------- packages/round/src/types.ts | 6 ------ 3 files changed, 7 insertions(+), 31 deletions(-) diff --git a/packages/round/src/color.ts b/packages/round/src/color.ts index 008a5838..6f2952ef 100644 --- a/packages/round/src/color.ts +++ b/packages/round/src/color.ts @@ -2,7 +2,7 @@ import path from "path"; import { ColorSchema } from "./types"; -// --------------------------------------- Paths +// --------------------------------------- Paths ๐Ÿ”— const rawSvgsDir = path.resolve("src", "svg", "raw"); const schemesPath = path.resolve("src", "svg"); @@ -23,15 +23,6 @@ const watchColors = { color4: blue // top-left shape color }; -// --------------------------------------- Custimized Corner Colors (Bibata Style) ๐Ÿš€ - -const customize = { - "top_right_corner.svg": { base: red }, - "bottom_right_corner.svg": { base: yellow }, - "bottom_left_corner.svg": { base: green }, - "top_left_corner.svg": { base: blue } -}; - // --------------------------------------- Schemes๐ŸŒˆ const colorSchemes: ColorSchema = { Ice: { @@ -40,8 +31,7 @@ const colorSchemes: ColorSchema = { watch: { background: white, ...watchColors - }, - customize + } }, Classic: { base: black, @@ -49,8 +39,7 @@ const colorSchemes: ColorSchema = { watch: { background: black, ...watchColors - }, - customize + } } }; diff --git a/packages/round/src/helpers/schema.ts b/packages/round/src/helpers/schema.ts index f09d074b..d562f193 100644 --- a/packages/round/src/helpers/schema.ts +++ b/packages/round/src/helpers/schema.ts @@ -5,6 +5,8 @@ import { staticCursors, animatedCursors, animatedClip } from "../cursors.json"; import { schemesPath } from "../color"; import { ColorSchema, Configs } from "../types"; +// --------------------------------------- Generate Configs ๐Ÿ›  + const generateConfigs = ( colorSchemes: ColorSchema, dirPrefix: string, @@ -18,7 +20,7 @@ const generateConfigs = ( const configs: Configs = {}; for (let [schema] of Object.entries(colorSchemes)) { - const { base, outline, watch, customize } = colorSchemes[schema]; + const { base, outline, watch } = colorSchemes[schema]; const schemaName = `${dirPrefix}-${schema}`; const schemaSvgsPath = path.resolve(schemesPath, schemaName); @@ -30,16 +32,7 @@ const generateConfigs = ( .readFileSync(path.resolve(rawSvgsDir, cursor), "utf-8") .toString(); - // try => replace `customize` colors - // onError => replace `schema` main colors - try { - let { base: b, outline: o } = customize![cursor]; - if (!b) b = base; - if (!o) o = outline; - content = content.replace("#00FF00", b).replace("#0000FF", o); - } catch (error) { - content = content.replace("#00FF00", base).replace("#0000FF", outline); - } + content = content.replace("#00FF00", base).replace("#0000FF", outline); // Save Schema const cursorPath = path.resolve(schemaSvgsPath, cursor); diff --git a/packages/round/src/types.ts b/packages/round/src/types.ts index 691cb328..b35a7364 100644 --- a/packages/round/src/types.ts +++ b/packages/round/src/types.ts @@ -9,12 +9,6 @@ interface ColorSchema { color3: string; color4: string; }; - customize?: { - [name: string]: { - outline?: string; - base?: string; - }; - }; }; }