Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/eslint #485

Merged
merged 15 commits into from
Jul 19, 2024
11 changes: 11 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "@ownclouders",
"rules": {
"array-bracket-newline": ["error", "consistent"],
"multiline-ternary": ["error", "always-multiline"],
"no-var": "error",
"prefer-const": "error",
"object-shorthand": ["error", "always"],
"eqeqeq": ["error", "smart"]
}
}
36 changes: 36 additions & 0 deletions .github/workflows/lint-eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: ESLint

on:
workflow_dispatch:
push:
branches: [master, develop, refactor/eslint]
pull_request:
branches: [master, develop, refactor/eslint]

env:
NODE_VERSION: 20

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./js
steps:
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Code Checkout
uses: actions/checkout@v3

- name: Install Dependencies
run: npm ci

- name: Code Linting
run: npx eslint ./**/*.js

- name: CSS Linting
run: npx stylelint ../css/*.css
13 changes: 13 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-sass-guidelines"],
"rules": {
"scss/at-extend-no-missing-placeholder": null,
"max-nesting-depth": null,
"selector-class-pattern": null,
"selector-max-compound-selectors": null,
"selector-max-id": null,
"selector-no-qualifying-type": null,
"property-no-vendor-prefix": null,
"string-quotes": "double"
}
}
15 changes: 9 additions & 6 deletions css/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@
*/

#app > iframe {
position: absolute;
vertical-align: top;
position: absolute;
vertical-align: top;
}

#body-public #content {
height: 100%;
height: 100%;
}

#content-wrapper #content {
height: calc(100dvh - 45px);
height: calc(100dvh - 45px);
}

.AscDesktopEditor #header {
display: none;
display: none;
}

.AscDesktopEditor #content-wrapper {
padding-top: 0;
padding-top: 0;
}
82 changes: 48 additions & 34 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,77 +17,91 @@
*/

.icon-onlyoffice-new-docx {
background-image: url("../img/new-docx.svg");
background-image: url("../img/new-docx.svg");
}

.icon-onlyoffice-new-xlsx {
background-image: url("../img/new-xlsx.svg");
background-image: url("../img/new-xlsx.svg");
}

.icon-onlyoffice-new-pptx {
background-image: url("../img/new-pptx.svg");
background-image: url("../img/new-pptx.svg");
}

.icon-onlyoffice-new-pdf {
background-image: url("../img/new-pdf.svg");
background-image: url("../img/new-pdf.svg");
}

.icon-onlyoffice-open,
.icon-onlyoffice-convert,
.icon-onlyoffice-download,
.icon-onlyoffice-create {
background-image: url("../img/app-dark.svg");
background-image: url("../img/app-dark.svg");
}

.AscDesktopEditor #content-wrapper {
padding-top: 0;
}

.AscDesktopEditor #controls,
.AscDesktopEditor #app-sidebar {
top: 0;
}

/* onlyoffice-inline */
body.onlyoffice-inline #content-wrapper {
overscroll-behavior-y: none;
overflow: hidden;
overflow: hidden;
overscroll-behavior-y: none;
}

body.onlyoffice-inline #app-navigation,
body.onlyoffice-inline .searchbox,
body.onlyoffice-inline #app-content #controls {
display: none;
display: none;
}

body.onlyoffice-inline #app-navigation-toggle {
display: none !important;
display: none !important;
}

body.onlyoffice-inline #content #app-content {
margin-left: 0;
overflow: hidden;
margin-left: 0;
overflow: hidden;
}
#onlyofficeFrame {
background-color: #fff;
width: 100%;
height: calc(100vh - 45px);
display: block;
position: absolute;
top: 0;
z-index: 110;

#onlyoffice-frame {
background-color: #fff;
display: block;
height: calc(100vh - 45px);
position: absolute;
top: 0;
width: 100%;
z-index: 110;
}

.onlyoffice-public-open {
display: inline-block;
margin-top: 10px;
display: inline-block;
margin-top: 10px;
}

/* AscDesktopEditor */
.AscDesktopEditor #header {
display: none;
}
.AscDesktopEditor #content-wrapper {
padding-top: 0;
}
.AscDesktopEditor #controls,
.AscDesktopEditor #app-sidebar {
top: 0;
display: none;
}

.AscDesktopEditor #body-user table.multiselect thead {
top: 44px;
top: 44px;
}

.AscDesktopEditor #body-user #gallery-button {
display: none;
display: none;
}

.onlyoffice-download-container {
display: flex;
display: flex;
}

.onlyoffice-download-container p {
margin-right: 10px;
padding-top: 10px;
margin-right: 10px;
padding-top: 10px;
}
Loading
Loading