From c7bea4a74358e4102ea0e2ecf3a7e66b2b5a73fd Mon Sep 17 00:00:00 2001 From: Jiiks Date: Tue, 5 Mar 2019 09:43:25 +0200 Subject: [PATCH] remove csseditor --- csseditor/package.json | 23 --- csseditor/src/Editor.vue | 191 ------------------------- csseditor/src/index.js | 27 ---- csseditor/src/styles/codemirror.scss | 105 -------------- csseditor/src/styles/editor.scss | 17 --- csseditor/src/styles/images.scss | 2 - csseditor/src/styles/index.scss | 13 -- csseditor/src/styles/main.scss | 36 ----- csseditor/src/styles/spinner.scss | 14 -- csseditor/src/styles/titlebar.scss | 71 --------- csseditor/src/styles/tools.scss | 66 --------- csseditor/webpack.config.js | 43 ------ csseditor/webpack.production.config.js | 47 ------ 13 files changed, 655 deletions(-) delete mode 100644 csseditor/package.json delete mode 100644 csseditor/src/Editor.vue delete mode 100644 csseditor/src/index.js delete mode 100644 csseditor/src/styles/codemirror.scss delete mode 100644 csseditor/src/styles/editor.scss delete mode 100644 csseditor/src/styles/images.scss delete mode 100644 csseditor/src/styles/index.scss delete mode 100644 csseditor/src/styles/main.scss delete mode 100644 csseditor/src/styles/spinner.scss delete mode 100644 csseditor/src/styles/titlebar.scss delete mode 100644 csseditor/src/styles/tools.scss delete mode 100644 csseditor/webpack.config.js delete mode 100644 csseditor/webpack.production.config.js diff --git a/csseditor/package.json b/csseditor/package.json deleted file mode 100644 index 1692bb58..00000000 --- a/csseditor/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "bdcsseditor", - "description": "BetterDiscord css editor package", - "author": "Jiiks", - "version": "0.4.0", - "homepage": "https://betterdiscord.net", - "license": "MIT", - "main": "dist/csseditor.js", - "contributors": [ - "Jiiks", - "Pohky" - ], - "repository": { - "type": "git", - "url": "https://github.com/JsSucks/BetterDiscordApp.git" - }, - "private": false, - "scripts": { - "build": "webpack --progress --colors", - "watch": "webpack --progress --colors --watch", - "release": "webpack --progress --colors --config=webpack.production.config.js" - } -} diff --git a/csseditor/src/Editor.vue b/csseditor/src/Editor.vue deleted file mode 100644 index e6b8324c..00000000 --- a/csseditor/src/Editor.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - diff --git a/csseditor/src/index.js b/csseditor/src/index.js deleted file mode 100644 index 9146bd05..00000000 --- a/csseditor/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// const styles = require('./styles/index.scss'); - -import Vue from 'vue'; -import VueCodemirror from 'vue-codemirror'; - -import Editor from './Editor.vue'; -import styles from './styles/index.scss'; - -Vue.use(VueCodemirror, {}); - -window.cmCommands = VueCodemirror.CodeMirror.commands; - -const mount = document.createElement('div'); -mount.classList.add('container'); -document.body.appendChild(mount); - -const vue = new Vue({ - el: mount, - components: { Editor }, - template: '' -}); - -const style = document.createElement('style'); -style.id = 'bd-main'; -style.type = 'text/css'; -style.appendChild(document.createTextNode(styles)); -document.head.appendChild(style); diff --git a/csseditor/src/styles/codemirror.scss b/csseditor/src/styles/codemirror.scss deleted file mode 100644 index b945ac14..00000000 --- a/csseditor/src/styles/codemirror.scss +++ /dev/null @@ -1,105 +0,0 @@ -.CodeMirror-scroll { - cursor: text; -} - -.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler { - background: #38444a; -} - -.CodeMirror-overlayscroll-horizontal div, -.CodeMirror-overlayscroll-vertical div { - background: rgb(41, 43, 47); -} - -.CodeMirror-overlayscroll-horizontal, -.CodeMirror-overlayscroll-horizontal div { - height: 10px; -} - -.CodeMirror-overlayscroll-vertical, -.CodeMirror-overlayscroll-vertical div { - width: 10px; -} - -.CodeMirror-scrollbar-filler { - width: 10px; - height: 10px; - background: rgb(41, 43, 47); -} - -.cm-s-material.CodeMirror { - background: #36393f; -} - -.CodeMirror-scroll { - cursor: text; -} - -.cm-s-material .CodeMirror-gutters { - background: #292b2f; -} - -.CodeMirror-gutter { - min-width: 34px; - border-right: 1px solid hsla(218,5%,47%,.3); - cursor: default; -} - -.CodeMirror-hints { - /*background: #1e262a;*/ - background: #292b2f; - box-shadow: 2px 3px 5px rgba(4, 4, 4, 0.22); - border: 1px solid #262f33; - - &::-webkit-scrollbar { - background: transparent; - } - - &::-webkit-scrollbar-thumb { - background-color: rgba(0,0,0,.4); - border-color: transparent; - } - - &::-webkit-scrollbar-thumb, - &::-webkit-scrollbar-track { - background-clip: padding-box; - border-width: 3px; - border-style: solid; - border-radius: 7px; - } - - &::-webkit-scrollbar-track { - background-color: transparent; - border-color: transparent; - } -} - -.CodeMirror-linenumber, -.CodeMirror-line { - padding: 0 5px !important; -} - -.CodeMirror-linenumber { - cursor: text; -} - -.cm-s-material .CodeMirror-linenumber { - color: #f6f6f7; -} - -.CodeMirror-hint { - color: #bac9d2; -} - -li.CodeMirror-hint-active { - color: #bac9d2; - /*background: #3b4950;*/ - background: #36393f; -} - -.CodeMirror-dialog-top { - bottom: 0; - top: auto; - border: none; - background: #1e262a; -} diff --git a/csseditor/src/styles/editor.scss b/csseditor/src/styles/editor.scss deleted file mode 100644 index a46844dc..00000000 --- a/csseditor/src/styles/editor.scss +++ /dev/null @@ -1,17 +0,0 @@ -.editor { - display: flex; - flex-direction: column; - flex-grow: 1; - overflow: hidden; - - .vue-codemirror { - display: flex; - flex-direction: column; - flex-grow: 1; - overflow: hidden; - - &, & .CodeMirror { - flex-grow: 1; - } - } -} diff --git a/csseditor/src/styles/images.scss b/csseditor/src/styles/images.scss deleted file mode 100644 index 202ab708..00000000 --- a/csseditor/src/styles/images.scss +++ /dev/null @@ -1,2 +0,0 @@ -$logoSmallGw: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkltYWdlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb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Mi0xODYuMlY0Ni4xYzAtMTguOC0xMy43LTI3LjMtMjcuMy0yNy4zSDM4Ny40eiIvPjwvZz48L3N2Zz4=); -$bdicon: $logoSmallGw; diff --git a/csseditor/src/styles/index.scss b/csseditor/src/styles/index.scss deleted file mode 100644 index a3ed0e36..00000000 --- a/csseditor/src/styles/index.scss +++ /dev/null @@ -1,13 +0,0 @@ -@import '../../../node_modules/codemirror/lib/codemirror.css'; -@import '../../../node_modules/codemirror/theme/material.css'; -@import '../../../node_modules/codemirror/addon/scroll/simplescrollbars.css'; -@import '../../../node_modules/codemirror/addon/dialog/dialog.css'; -@import '../../../node_modules/codemirror/addon/hint/show-hint.css'; - -@import './images.scss'; -@import './main.scss'; -@import './titlebar.scss'; -@import './spinner.scss'; -@import './editor.scss'; -@import './tools.scss'; -@import './codemirror.scss'; diff --git a/csseditor/src/styles/main.scss b/csseditor/src/styles/main.scss deleted file mode 100644 index 20c89ea8..00000000 --- a/csseditor/src/styles/main.scss +++ /dev/null @@ -1,36 +0,0 @@ -html, body { - margin: 0; - padding: 0; - max-height: 100%; - height: 100%; - background: #2c383e; - min-width: 700px; - min-height: 400px; -} - -* { - outline: none; -} - -.flex-spacer { - flex-grow: 1; -} - -.flex-row { - display: flex; - flex-direction: row; -} - -.valign { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); -} - -.container { - display: flex; - flex-grow: 1; - flex-direction: column; - height: 100%; -} diff --git a/csseditor/src/styles/spinner.scss b/csseditor/src/styles/spinner.scss deleted file mode 100644 index 97acdd91..00000000 --- a/csseditor/src/styles/spinner.scss +++ /dev/null @@ -1,14 +0,0 @@ -#spinner { - background: rgba(51, 48, 48, 0.41); - position: absolute; - top: 34px; - left: 0; - right: 0; - bottom: 0; - color: #bac9d2; - font-family: Whitney,Helvetica Neue,Helvetica,Arial,sans-serif; - font-weight: 600; - font-size: 2em; - z-index: 90000; - user-select: none; -} diff --git a/csseditor/src/styles/titlebar.scss b/csseditor/src/styles/titlebar.scss deleted file mode 100644 index b837087a..00000000 --- a/csseditor/src/styles/titlebar.scss +++ /dev/null @@ -1,71 +0,0 @@ -.titlebar { - display: flex; - height: 25px; - padding: 4px 5px; - background: #292b2f; - border-bottom: 1px solid hsla(218,5%,47%,.3); - user-select: none; - cursor: default; - - .icon { - width: 31px; - height: 25px; - - .inner { - width: 25px; - height: 25px; - background-image: $bdicon; - background-size: 22px 22px; - background-repeat: no-repeat; - background-position: center; - } - } - - .title { - color: #bac9d2; - font-family: Whitney,Helvetica Neue,Helvetica,Arial,sans-serif; - line-height: 25px; - font-size: 15px; - } - - .controls { - margin: 0 0 0 2px; - font-size: 0; - - button { - -webkit-app-region: no-drag; - border-radius: 3px; - width: 25px; - font-size: 12px; - font-weight: 600; - background: #36393f; - color: #bac9d2; - font-family: Whitney,Helvetica Neue,Helvetica,Arial,sans-serif; - transition: background-color .2s ease, color .2s ease; - cursor: default; - border: 0; - height: 25px; - z-index: 900062; - padding: 0; - margin: 0 0 0 4px; - - &:hover { - background: #44474e; - color: #FFF; - } - - &.active { - background: #3a71c1; - } - } - } - - .draggable { - top: 0; - left: 0; - right: 63px; - position: absolute; - height: 33px; - -webkit-app-region: drag; - } -} diff --git a/csseditor/src/styles/tools.scss b/csseditor/src/styles/tools.scss deleted file mode 100644 index 2a4ae589..00000000 --- a/csseditor/src/styles/tools.scss +++ /dev/null @@ -1,66 +0,0 @@ -.parser-error { - padding: 4px 6px; - background: #292b2f; - border-top: 1px solid hsla(218,5%,47%,.3); - color: #d84040; - font-family: monospace; - white-space: pre-wrap; - font-size: 12px; -} - -.tools { - height: 36px; - background: #292b2f; - border-top: 1px solid hsla(218,5%,47%,.3); - display: flex; - flex-direction: column; - user-select: none; - - .flex-row { - flex-grow: 1; - padding: 4px 5px; - } - - button { - border-radius: 3px; - width: 100px; - padding: 3px 10px; - font-size: 12px; - font-weight: 600; - background: #36393f; - color: #bac9d2; - font-family: Whitney,Helvetica Neue,Helvetica,Arial,sans-serif; - transition: background-color .2s ease, color .2s ease; - cursor: pointer; - border: 0; - margin-right: 4px; - flex: 0 0 auto; - - &:hover { - background: #44474e; - color: #fff; - } - } - - #chkboxLiveUpdate { - padding: 3px 10px; - line-height: 22px; - flex: 0 0 auto; - - label { - cursor: pointer; - } - - input[type="checkbox"] { - margin: 0 6px 0 0; - cursor: pointer; - } - - span { - font-size: 12px; - font-weight: 500; - color: #bac9d2; - font-family: Whitney,Helvetica Neue,Helvetica,Arial,sans-serif; - } - } -} diff --git a/csseditor/webpack.config.js b/csseditor/webpack.config.js deleted file mode 100644 index 67f86166..00000000 --- a/csseditor/webpack.config.js +++ /dev/null @@ -1,43 +0,0 @@ -const path = require('path'); -const VueLoaderPlugin = require('vue-loader/lib/plugin'); - -const vueLoader = { - test: /\.(vue)$/, - exclude: /node_modules/, - use: 'vue-loader' -}; - -const scssLoader = { - test: /\.(css|scss)$/, - use: ['css-loader', 'sass-loader'] -}; - -module.exports = { - entry: './src/index.js', - mode: 'development', - output: { - path: path.resolve(__dirname, 'dist'), - filename: 'csseditor.js' - }, - module: { - rules: [vueLoader, scssLoader] - }, - externals: { - electron: 'window.require("electron")', - fs: 'window.require("fs")', - util: 'window.require("util")', - process: 'require("process")' - }, - resolve: { - alias: { - vue$: path.resolve('..', 'node_modules', 'vue', 'dist', 'vue.esm.js') - }, - modules: [ - path.resolve('..', 'node_modules'), - path.resolve('..', 'common', 'modules') - ] - }, - plugins: [ - new VueLoaderPlugin() - ] -}; diff --git a/csseditor/webpack.production.config.js b/csseditor/webpack.production.config.js deleted file mode 100644 index 780c7111..00000000 --- a/csseditor/webpack.production.config.js +++ /dev/null @@ -1,47 +0,0 @@ -const path = require('path'); -const webpack = require('webpack'); -const VueLoaderPlugin = require('vue-loader/lib/plugin'); - -const vueLoader = { - test: /\.(vue)$/, - exclude: /node_modules/, - use: 'vue-loader' -}; - -const scssLoader = { - test: /\.(css|scss)$/, - use: ['css-loader', 'sass-loader'] -}; - -module.exports = { - entry: './src/index.js', - mode: 'production', - output: { - path: path.resolve(__dirname, 'dist'), - filename: 'csseditor-release.js' - }, - module: { - rules: [vueLoader, scssLoader] - }, - externals: { - electron: 'window.require("electron")', - fs: 'window.require("fs")', - util: 'window.require("util")', - process: 'require("process")' - }, - resolve: { - alias: { - vue$: path.resolve('..', 'node_modules', 'vue', 'dist', 'vue.esm.js') - }, - modules: [ - path.resolve('..', 'node_modules'), - path.resolve('..', 'common', 'modules') - ] - }, - plugins: [ - new webpack.DefinePlugin({ - PRODUCTION: JSON.stringify(true) - }), - new VueLoaderPlugin() - ] -};