diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 7673c68..0000000 --- a/.eslintrc +++ /dev/null @@ -1,32 +0,0 @@ -{ - "env": { - "node": true - }, - "extends": [ - "plugin:vue/vue3-essential", - "eslint:recommended", - "@vue/eslint-config-prettier" - ], - "parserOptions": { - "parser": "@babel/eslint-parser", - "requireConfigFile": false - }, - "rules": { - "eqeqeq": "error", - "no-extra-boolean-cast": [ - "error", - { - "enforceForLogicalOperands": true - } - ], - "vue/component-name-in-template-casing": [ - "error", - "PascalCase", - { - "registeredComponentsOnly": false - } - ], - "object-shorthand": "warn", - "no-console": "warn" - } -} diff --git a/.github/workflows/pr_test_deploy.yml b/.github/workflows/pr_test_deploy.yml index 528ccc9..6c753c5 100644 --- a/.github/workflows/pr_test_deploy.yml +++ b/.github/workflows/pr_test_deploy.yml @@ -1,22 +1,22 @@ -name: Review deployment +# name: Review deployment -on: pull_request +# on: pull_request -jobs: - test: - runs-on: ubuntu-latest +# jobs: +# test: +# runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 +# steps: +# - name: Checkout repository +# uses: actions/checkout@v2 - - name: Set Node.js 18.x - uses: actions/setup-node@v3 - with: - node-version: 18.x +# - name: Set Node.js 18.x +# uses: actions/setup-node@v3 +# with: +# node-version: 18.x - - name: Install - run: yarn +# - name: Install +# run: yarn - - name: Check - run: yarn lint ; yarn format +# - name: Check +# run: yarn lint ; yarn format diff --git a/.gitignore b/.gitignore index 33a073b..58ca339 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ yarn-debug.log* yarn-error.log* lerna-debug.log* .pnpm-debug.log* +yarn.lock # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 4c0ac01..0000000 --- a/.prettierrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "tabWidth": 4, - "arrowParens": "avoid", - "bracketSpacing": true, - "trailingComma": "all", - "semi": true, - "printWidth": 80, - "singleQuote": true, - "quoteProps": "consistent", - "singleAttributePerLine": true, - "endOfLine": "auto" -} diff --git a/package.json b/package.json index 56b1752..8471609 100644 --- a/package.json +++ b/package.json @@ -5,15 +5,12 @@ "scripts": { "start": "vue-cli-service serve --port 9002", "build": "vue-cli-service build", - "lint": "eslint --ext .vue --ext .js .", - "lint:fix": "eslint --ext .vue --ext .js --fix .", - "format": "prettier --check .", - "format:write": "prettier --write .", "serve:standalone": "vue-cli-service serve --mode standalone" }, "dependencies": { "click-outside-vue3": "^4.0.1", "core-js": "^3.6.5", + "profcomff-common": "file:../../packages/common", "single-spa-vue": "^2.1.0", "vue": "3", "vue-router": "^4.0.0-0" @@ -22,12 +19,7 @@ "@babel/core": "^7.12.16", "@babel/eslint-parser": "^7.12.16", "@vue/cli-plugin-babel": "~5.0.0", - "@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-service": "~5.0.0", - "@vue/eslint-config-prettier": "^7.0.0", - "eslint": "^7.32.0", - "eslint-plugin-vue": "^8.0.3", - "prettier": "^2.8.3", "vue-cli-plugin-single-spa": "~3.3.0" }, "browserslist": [ diff --git a/src/components/EventRow.vue b/src/components/EventRow.vue index 3c1a01d..c861505 100644 --- a/src/components/EventRow.vue +++ b/src/components/EventRow.vue @@ -28,8 +28,7 @@ export default { }, methods: { formatLecturer(info) { - if (!info.middle_name) - return `${info.last_name} ${info.first_name[0]}.`; + if (!info.middle_name) return `${info.last_name} ${info.first_name[0]}.`; return `${info.last_name} ${info.first_name[0]}. ${info.middle_name[0]}.`; }, formatInfo(lecturer, room) { @@ -69,16 +68,6 @@ export default { .event:hover { background: var(--bs-primary-20); } -.noselect { - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Old versions of Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; /* Non-prefixed version, currently - supported by Chrome, Edge, Opera and Firefox */ - cursor: default; -} p { margin: 0; } diff --git a/src/components/GroupRow.vue b/src/components/GroupRow.vue index facd60f..24b5619 100644 --- a/src/components/GroupRow.vue +++ b/src/components/GroupRow.vue @@ -5,19 +5,22 @@ class="event-item noselect" >
- group +
- schedule +
-
+
Группа
{{ eventNumber }}
@@ -31,8 +34,10 @@ diff --git a/src/components/row.css b/src/components/row.css index c460a11..6886601 100644 --- a/src/components/row.css +++ b/src/components/row.css @@ -42,20 +42,3 @@ .event-item-information { font-size: 18px; } - -.noselect { - -webkit-touch-callout: none; - /* iOS Safari */ - -webkit-user-select: none; - /* Safari */ - -khtml-user-select: none; - /* Konqueror HTML */ - -moz-user-select: none; - /* Old versions of Firefox */ - -ms-user-select: none; - /* Internet Explorer/Edge */ - user-select: none; - /* Non-prefixed version, currently - supported by Chrome, Edge, Opera and Firefox */ - cursor: default; -} diff --git a/src/utils/FetchTimetable.js b/src/utils/FetchTimetable.js index c41eada..840bfc4 100644 --- a/src/utils/FetchTimetable.js +++ b/src/utils/FetchTimetable.js @@ -16,8 +16,6 @@ export async function fetchTimetable(time_start, time_end, group_id) { offset: 0, group_id, }; - Object.keys(params).forEach(key => - url.searchParams.append(key, params[key]), - ); + Object.keys(params).forEach(key => url.searchParams.append(key, params[key])); return fetch(url).then(response => response.json()); } diff --git a/src/utils/Retrying.js b/src/utils/Retrying.js index 3bfd72d..1a5c34e 100644 --- a/src/utils/Retrying.js +++ b/src/utils/Retrying.js @@ -18,10 +18,7 @@ export default function retry(callback, times, interval = 1000) { try { callback(); } catch (error) { - console.error( - `Call failed, retrying... (${times} attempts left)`, - error, - ); + console.error(`Call failed, retrying... (${times} attempts left)`, error); setTimeout(() => retry(callback, times - 1, interval), interval); } } diff --git a/src/views/EventView.vue b/src/views/EventView.vue index c74433d..3bc9389 100644 --- a/src/views/EventView.vue +++ b/src/views/EventView.vue @@ -15,9 +15,7 @@ Комментарии

- Еще нет комментариев + Еще нет комментариев

- - delete - + />

{{ comment }}

@@ -77,9 +72,10 @@ import GroupRow from '@/components/GroupRow.vue'; import LecturerRow from '@/components/LecturerRow.vue'; import RoomRow from '@/components/RoomRow.vue'; +import { MaterialIcon } from 'profcomff-common/components'; export default { - components: { LecturerRow, RoomRow, GroupRow }, + components: { LecturerRow, RoomRow, GroupRow, MaterialIcon }, data() { return { loaded: false, @@ -100,9 +96,7 @@ export default { }); document.dispatchEvent(changeHeaderLayoutEvent); - this.comments = JSON.parse( - localStorage.getItem('timetable-event-comment') || '{}', - ); + this.comments = JSON.parse(localStorage.getItem('timetable-event-comment') || '{}'); }, beforeUnmount() { document.dispatchEvent( @@ -115,9 +109,7 @@ export default { }, methods: { loadEventInfo() { - var url = new URL( - `${process.env.VUE_APP_API_TIMETABLE}/timetable/event/${this.eventId}`, - ); + var url = new URL(`${process.env.VUE_APP_API_TIMETABLE}/timetable/event/${this.eventId}`); fetch(url) .then(response => response.json()) .then(json => { @@ -158,19 +150,13 @@ export default { if (newComment !== '') { event.target[0].value = ''; curComments.push(newComment); - localStorage.setItem( - 'timetable-event-comment', - JSON.stringify(this.comments), - ); + localStorage.setItem('timetable-event-comment', JSON.stringify(this.comments)); } }, dropComment(index) { let curComments = this.getCurComments(); curComments.splice(index, 1); - localStorage.setItem( - 'timetable-event-comment', - JSON.stringify(this.comments), - ); + localStorage.setItem('timetable-event-comment', JSON.stringify(this.comments)); }, }, }; diff --git a/src/views/InitView.vue b/src/views/InitView.vue index be73485..bdb4f53 100644 --- a/src/views/InitView.vue +++ b/src/views/InitView.vue @@ -5,10 +5,7 @@ :style="{ backgroundColor: '#fff' }" />

Добро пожаловать!

-

- Наше приложение позволит получить доступ к сервисам для студентов ФФ - МГУ! -

+

Наше приложение позволит получить доступ к сервисам для студентов ФФ МГУ!

Для просмотра расписания выберите свою группу