diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..87bcd77 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [fabio286] +patreon: #fabio286 +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: ['https://paypal.me/fabiodistasio'] \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..86b7f2e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: Fabio286 + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Application (please complete the following information):** + +- App version [e.g. 0.5.2] +- Installation source: [e.g. exe, Linux Store, AppImage] + +**Environment (please complete the following information):** + +- OS name: [e.g. Windows 11] +- OS version [e.g. 21H2] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..a2ea08c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: Fabio286 + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..607222b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" + allow: + - dependency-type: "production" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d8215c5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build & release + +on: + push: + tags: + - "v*" + +jobs: + release: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Install dependencies + run: npm i + + - name: "Build" + run: npm run build + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: "build/*.AppImage,build/*.yml,build/*.deb,build/*.blockmap,build/*.zip,build/*.exe" + allowUpdates: true + draft: true + generateReleaseNotes: true diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..8f3b34a --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,57 @@ +name: "CodeQL" + +on: + push: + branches: [master] + pull_request: + # The branches below must be a subset of the branches above + branches: [master] + schedule: + - cron: '0 15 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + # Override automatic language detection by changing the below list + # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] + language: ['javascript'] + # Learn more... + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/create-artifact-linux.yml b/.github/workflows/create-artifact-linux.yml new file mode 100644 index 0000000..de32bad --- /dev/null +++ b/.github/workflows/create-artifact-linux.yml @@ -0,0 +1,32 @@ +name: Create artifact [LINUX] + +on: + workflow_dispatch: {} + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Install dependencies + run: npm i + + - name: "Build" + run: npm run build + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: linux-build + retention-days: 3 + path: | + build + !build/*-unpacked + !build/.icon-ico diff --git a/src/renderer/scss/themes/dark-theme.scss b/src/renderer/scss/themes/dark-theme.scss deleted file mode 100644 index bfbdcc8..0000000 --- a/src/renderer/scss/themes/dark-theme.scss +++ /dev/null @@ -1,484 +0,0 @@ -/* stylelint-disable selector-class-pattern */ -/* stylelint-disable function-no-unknown */ -.theme-dark { - color: $body-font-color-dark; - background: $body-bg-dark; - - ::-webkit-scrollbar-track { - background: $bg-color-light-dark; - } - - ::-webkit-scrollbar-thumb { - background: rgba($color: #fff, $alpha: 50%); - - &:hover { - background: rgba($color: #fff, $alpha: 100%); - } - } - - :disabled { - .file-uploader { - background-color: #151515; - } - } - - option, - optgroup { - background-color: $bg-color-gray; - } - - /* Override Spectre.css */ - .menu { - background: $bg-color-light-dark; - - .menu-item a { - &:hover { - color: $primary-color; - background: $bg-color-gray; - } - } - } - - .btn { - &.btn-link { - color: rgba($body-font-color-dark, 0.8); - - &:hover { - color: $body-font-color-dark; - } - } - - &.btn-gray { - color: #fff; - background: $bg-color-gray; - - &:hover { - background: $bg-color-dark; - } - } - - &.btn-dark { - color: #fff; - background: $bg-color-light-dark; - border-color: $bg-color-light-dark; - - &:hover { - background: $bg-color-gray; - } - - &.active { - background-color: $primary-color; - } - } - - &.btn-clear { - &:hover { - background: rgba($light-color, 20%); - } - } - } - - .modal { - .modal-overlay, - &.active .modal-overlay { - background: rgb(255 255 255 / 15%); - } - - .modal-container, - .modal-sm .modal-container { - box-shadow: 0 0 1px 0 #000; - background: $bg-color-dark; - - .modal-header { - background: $bg-color-gray; - color: #fff; - } - } - } - - .tab { - border-color: #272727; - } - - .form-select, - .form-input, - .form-select:not([multiple], [size]), - .form-checkbox .form-icon, - .form-radio .form-icon { - border-color: $bg-color-light-dark; - background-color: $bg-color-gray; - color: $body-font-color-dark; - } - - .form-select:not([multiple], [size]) { - background-color: $bg-color-gray !important; - } - - .form-input.is-error, - .form-select.is-error { - background-color: $bg-color-gray; - } - - .form-input:not(:placeholder-shown):invalid:focus { - background: $bg-color-gray; - } - - .form-select:not([multiple], [size]):focus { - border-color: $primary-color; - } - - .select { - &__list-wrapper { - border-color: $bg-color-gray; - background-color: $bg-color-light-dark; - } - - &__group { - background: rgba($bg-color-gray, 0.65); - color: rgba($bg-color-light-gray, 0.7); - } - } - - .form-input[readonly] { - background-color: $bg-color-dark; - cursor: default; - } - - .input-group .input-group-addon { - border-color: #3f3f3f; - background: $bg-color-dark; - } - - .empty { - color: $body-font-color-dark; - background: transparent; - } - - .divider { - border-top: 0.05rem solid rgba($body-font-color-dark, 0.1); - } - - .form-switch .form-icon::before { - background: $bg-color-light-dark; - } - - code { - background-color: #111; - border: 1px solid #444; - color: rgba($body-font-color-dark, 0.7); - } - - /* Antares */ - .workspace { - .workspace-explorebar { - background: $bg-color-gray; - box-shadow: 0 0 1px 0 #000; - - .workspace-explorebar-database { - .database-name { - background: $bg-color-gray; - } - - .database-name, - .misc-name { - &:hover { - color: $body-font-color-dark; - background: $bg-color-light-dark; - } - } - - a.table-name { - &:hover { - color: inherit; - background: inherit; - } - } - - .menu-item { - &:hover, - &.selected { - color: $body-font-color-dark; - background: rgba($color: #fff, $alpha: 5%); - } - } - } - } - - .workspace-tabs { - .tab-block { - background: $bg-color-light-dark; - - .tab-item { - background: $bg-color-light-dark; - - > a { - color: $body-font-color-dark; - } - - &.tools-dropdown { - background-color: $bg-color-light-dark; - } - } - - .workspace-query-runner .workspace-query-runner-footer .workspace-query-buttons .btn { - color: $body-font-color-dark; - } - } - } - } - - .workspace-query-results { - .table { - .th { - border-color: darken($bg-color-light-gray, 80%); - background-color: $body-bg-dark; - } - - .tr { - background-color: darken($bg-color-light-gray, 80%); - - .td:first-child { - border-left: 2px solid $body-bg-dark; - } - - .td { - border-color: $body-bg-dark; - - &:focus, - &.selected { - box-shadow: inset 0 0 0 2px darken($body-font-color-dark, 40%); - background-color: rgba($color: #000, $alpha: 30%); - } - - .editable-field { - box-shadow: inset 0 0 0 2px darken($body-font-color-dark, 40%); - background-color: rgba($color: #000, $alpha: 30%); - } - } - } - } - } - - .connection-panel { - .panel { - background: rgba($bg-color-light-dark, 50%); - } - } - - .connection-block { - &:hover { - background: $bg-color-light-dark; - } - } - - .bg-checkered { - background-image: - linear-gradient(to right, rgb(192 192 192 / 75%), rgb(192 192 192 / 75%)), - linear-gradient(to right, black 50%, white 50%), - linear-gradient(to bottom, black 50%, white 50%); - background-blend-mode: normal, difference, normal; - background-size: 2em 2em; - } - - .context { - color: $body-font-color-dark; - - .context-container { - box-shadow: 0 0 2px 0 #000; - background: #1d1d1d; - - .context-element { - .context-submenu { - background: #1d1d1d; - box-shadow: 0 0 2px 0 #000; - } - - &:hover { - background: rgba($light-color, 15%); - } - } - } - } - - .editor-wrapper { - border-bottom: 1px solid #444; - } - - .file-uploader { - border: 0.05rem solid $bg-color-light-dark; - background-color: $bg-color-gray; - - .file-uploader-message { - border-right: 0.05rem solid $bg-color-light-dark; - background-color: $bg-color-dark; - } - } - - .query-console { - border-top: 1px solid #444; - background-color: $bg-color-dark; - - .query-console-log { - &:hover, - &:focus { - background: $bg-color-gray; - } - } - } - - .tile { - transition: background 0.2s; - - &:focus { - background: rgba($bg-color-light-dark, 60%); - } - - &:hover { - background: $bg-color-light-dark; - } - - &.selected-element { - background: $bg-color-light-dark; - } - } - - .editor-col { - border-left: 0.05rem solid rgba($bg-color-light-dark, 60%); - } - - .table { - .td, - .th { - border-bottom: $border-width solid $border-color; - } - - &, - &.table-striped { - .tbody { - .tr { - &.selected { - background: #333 !important; - } - - &.active { - background: $bg-color-dark; - } - } - } - } - - &.table-hover { - .tbody { - .tr { - &:hover { - background: #151515; - } - } - } - } - - &.table-striped { - .tbody { - .tr:nth-of-type(odd) { - background: $bg-color; - } - } - } - } - - #titlebar { - background: $bg-color-light-dark; - box-shadow: 0 0 1px 0 #000; - - .titlebar-elements { - .titlebar-element { - &:hover { - opacity: 1; - background: rgba($color: #fff, $alpha: 10%); - } - - &.close-button:hover { - background: red; - } - } - } - } - - #settingbar { - width: $settingbar-width; - height: calc(100vh - #{$excluding-size}); - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - background: $bg-color-light-dark; - padding: 0; - box-shadow: 0 0 1px 0 #000; - z-index: 9; - - .settingbar-top-elements { - overflow-x: hidden; - overflow-y: overlay; - max-height: calc((100vh - 3.5rem) - #{$excluding-size}); - - &::-webkit-scrollbar { - width: 3px; - } - } - - .settingbar-bottom-elements { - background: $bg-color-light-dark; - } - - .settingbar-elements { - list-style: none; - text-align: center; - width: $settingbar-width; - padding: 0; - margin: 0; - - .settingbar-element { - .settingbar-element-icon { - &.badge-update::after { - background: $primary-color; - } - } - } - } - } - - .ex-tooltip { - .ex-tooltip-content { - background: rgb(48 55 66 / 95%); - color: #fff; - } - } - - #footer { - background: $primary-color; - box-shadow: 0 0 1px 0 #000; - - .footer-elements { - .footer-element { - &.footer-link { - &:hover { - background: rgba($color: #fff, $alpha: 10%); - } - } - } - } - } -} - -.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { - background-color: #c9561a99; -} - -.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_line-hover { - background-color: #c9571a33; - border: none; -} - -.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight { - color: #e0d00c; -} diff --git a/src/renderer/scss/themes/light-theme.scss b/src/renderer/scss/themes/light-theme.scss deleted file mode 100644 index 078f732..0000000 --- a/src/renderer/scss/themes/light-theme.scss +++ /dev/null @@ -1,373 +0,0 @@ -/* stylelint-disable function-no-unknown */ -.theme-light { - ::-webkit-scrollbar-track { - background: #fff; - } - - ::-webkit-scrollbar-thumb { - background: rgba($color: $bg-color-light-dark, $alpha: 50%); - - &:hover { - background: rgba($color: $bg-color-light-dark, $alpha: 100%); - } - } - - .form-input:disabled, - .form-input.disabled, - .form-select:disabled, - .form-select.disabled { - background: #ababab; - } - - .select { - &__list-wrapper { - border: #bcc3ce; - background-color: $body-bg; - } - - &__group { - background: $bg-color-light-gray; - color: $unknown-color; - } - - &__option--highlight { - color: $light-color; - } - } - - .menu { - .menu-item a { - &:hover { - color: $body-font-color; - background: rgba($color: #000, $alpha: 10%); - } - } - } - - .btn { - &.btn-link { - color: rgba($body-font-color, 0.8); - - &:hover { - color: $body-font-color; - } - } - - &.btn-gray { - color: #fff; - background: $bg-color-gray; - - &:hover { - background: $bg-color-dark; - } - } - - &.btn-dark { - color: #fff; - background: lighten($bg-color-light-dark, 20%); - border-color: lighten($bg-color-light-dark, 20%); - - &:hover { - background: $bg-color-gray; - } - - &.active { - background-color: $primary-color; - } - } - } - - .modal { - color: $body-font-color; - - &:target .modal-overlay, - &.active .modal-overlay { - background: rgba($bg-color-dark, 0.75); - } - - .modal-container .modal-header { - background: $bg-color-light-dark; - color: #fff; - } - } - - .empty { - background: transparent; - } - - .divider { - border-top: 0.05rem solid rgba($body-font-color-dark, 0.1); - } - - .tile { - transition: background 0.2s; - - &:focus { - background: rgba($bg-color-light-gray, 70%); - } - - &:hover { - background: $bg-color-light-gray; - } - - &.selected-element { - background: $bg-color-light-gray; - } - } - - .editor-col { - border-left: 0.05rem solid darken($bg-color-light-gray, 15%); - } - - .file-uploader { - border: 0.05rem solid $border-color-dark; - background-color: $bg-color-light; - - .file-uploader-message { - border-right: 0.05rem solid $border-color-dark; - background-color: $bg-color-light; - } - } - - .query-console { - border-top: 1px solid darken($bg-color-light-gray, 15%); - background-color: $bg-color-light; - - .query-console-log { - &:hover, - &:focus { - background: $bg-color-light-gray; - } - } - } - - #titlebar { - background: $bg-color-light; - box-shadow: 0 0 1px 0 #000; - - .titlebar-elements { - .titlebar-element { - &:hover { - opacity: 1; - background: rgba($color: rgb(172 172 172), $alpha: 30%); - } - - &.close-button:hover { - background: red; - } - } - } - } - - #settingbar { - width: $settingbar-width; - height: calc(100vh - #{$excluding-size}); - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - background: $bg-color-light-dark; - padding: 0; - box-shadow: 0 0 1px 0 #000; - z-index: 9; - - .settingbar-top-elements { - overflow-x: hidden; - overflow-y: overlay; - max-height: calc((100vh - 3.5rem) - #{$excluding-size}); - - &::-webkit-scrollbar { - width: 3px; - } - } - - .settingbar-bottom-elements { - background: $bg-color-light-dark; - } - - .settingbar-elements { - list-style: none; - text-align: center; - width: $settingbar-width; - padding: 0; - margin: 0; - - .settingbar-element { - .settingbar-element-icon { - &.badge-update::after { - background: $primary-color; - } - } - } - } - } - - .ex-tooltip { - .ex-tooltip-content { - background: rgb(48 55 66 / 95%); - color: #fff; - } - } - - code { - background-color: #eee; - border: 1px solid #ddd; - } - - .workspace { - .workspace-explorebar { - background: $bg-color-light-gray; - box-shadow: 0 0 1px 0 #000; - - .workspace-explorebar-database { - .database-name { - background: $bg-color-light-gray; - } - - .menu-item { - &:hover, - &.selected { - background: rgba($color: #000, $alpha: 5%); - } - } - - .table-size { - opacity: 0.4; - - &:hover { - opacity: 1; - } - } - } - } - - .workspace-tabs { - .tab-block { - .tab-item { - &.tools-dropdown { - background-color: $body-bg; - } - } - } - } - } - - .workspace-query-results { - .table { - .th { - background: $body-bg; - border-color: lighten($bg-color-light-gray, 2%); - } - - .tr { - background-color: lighten($bg-color-light-gray, 2%); - - .td:first-child { - border-left: 2px solid $body-bg; - } - - .td { - border-color: $body-bg; - - &:focus, - &.selected { - box-shadow: inset 0 0 0 2px lighten($body-font-color, 10%); - background-color: $body-font-color-dark; - } - - .editable-field { - box-shadow: inset 0 0 0 2px lighten($body-font-color, 10%); - background-color: $body-font-color-dark; - } - } - } - } - } - - .connection-panel { - .panel { - background: rgba($bg-color-light-gray, 100%); - } - } - - .connection-block { - &:hover { - background: $bg-color-light-gray; - } - } - - .context { - color: $body-font-color-dark; - - .context-container { - box-shadow: 0 0 2px 0 #000; - background: #1d1d1d; - - .context-element { - .context-submenu { - background: #1d1d1d; - box-shadow: 0 0 2px 0 #000; - } - - &:hover { - background: rgba($light-color, 15%); - } - } - } - } - - .table { - .td, - .th { - border-bottom: $border-width solid $border-color; - } - - &, - &.table-striped { - .tbody { - .tr { - &.selected { - background: rgba($bg-color-gray, 0.2) !important; - } - - &.active { - background: $bg-color; - } - } - } - } - - &.table-hover { - .tbody { - .tr { - &:hover { - background: $bg-color-light-gray; - } - } - } - } - - &.table-striped { - .tbody { - .tr:nth-of-type(odd) { - background: $bg-color; - } - } - } - } - - #footer { - background: $primary-color; - box-shadow: 0 0 1px 0 #000; - - .footer-elements { - .footer-element { - &.footer-link { - &:hover { - background: rgba($color: #fff, $alpha: 10%); - } - } - } - } - } -}