Skip to content
This repository was archived by the owner on Mar 15, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .eslintrc

This file was deleted.

32 changes: 16 additions & 16 deletions .github/workflows/pr_test_deploy.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
yarn.lock


# local env files
Expand Down
11 changes: 0 additions & 11 deletions .prettierignore

This file was deleted.

11 changes: 0 additions & 11 deletions .prettierrc

This file was deleted.

23 changes: 1 addition & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
"scripts": {
"start": "vue-cli-service serve --port 9005",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"serve:standalone": "vue-cli-service serve --mode standalone",
"format": "prettier --check .",
"format:write": "prettier --write ."
"serve:standalone": "vue-cli-service serve --mode standalone"
},
"dependencies": {
"core-js": "^3.8.3",
Expand All @@ -23,26 +20,8 @@
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~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"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
Expand Down
10 changes: 6 additions & 4 deletions src/views/AuthView.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<template>
<div class="container" @submit.prevent="auth">
<div
class="container"
@submit.prevent="auth"
>
<h1>Вход в приложение</h1>
<p>
Добро пожаловать! Тут находится наша нулевая итерация по
прикручиванию авторизации в приложение. Ниже вы можете войти в
систему.
Добро пожаловать! Тут находится наша нулевая итерация по прикручиванию авторизации в приложение. Ниже вы
можете войти в систему.
</p>
<form action="">
<div class="mb-3 row">
Expand Down
18 changes: 5 additions & 13 deletions src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ export default {
watch: {
push_enable(newstate) {
localStorage.setItem('devtools-push-enable', newstate);
dispatchEvent(
new Event(
newstate ? 'devtools-push-enable' : 'devtools-push-disable',
),
);
dispatchEvent(new Event(newstate ? 'devtools-push-enable' : 'devtools-push-disable'));
},
},
methods: {
Expand All @@ -82,11 +78,7 @@ export default {
console.log(`Cache ${cacheName} cleared`);
});
})
.then(() =>
this.cache_size_all().then(
v => (this.current_cache_size = v),
),
);
.then(() => this.cache_size_all().then(v => (this.current_cache_size = v)));
},
async cache_size(c) {
// returns approximate size of a single cache (in bytes)
Expand All @@ -106,9 +98,9 @@ export default {
async cache_size_all() {
// returns approximate size of all caches (in bytes)
return caches.keys().then(a => {
return Promise.all(
a.map(n => caches.open(n).then(c => this.cache_size(c))),
).then(a => a.reduce((acc, n) => acc + n, 0));
return Promise.all(a.map(n => caches.open(n).then(c => this.cache_size(c)))).then(a =>
a.reduce((acc, n) => acc + n, 0),
);
});
},
},
Expand Down
25 changes: 10 additions & 15 deletions src/views/MeView.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<template>
<div>
<h1>Информация о пользователе</h1>
<p v-if="!data">
О-опс, кажется, вы еше не залогинились. Вернитесь в предыдущее меню.
</p>
<p v-if="!data">О-опс, кажется, вы еше не залогинились. Вернитесь в предыдущее меню.</p>
<ul v-else>
<li
v-for="k in Object.keys(data)"
Expand Down Expand Up @@ -34,19 +32,16 @@ export default {
},
watch: {
token(value) {
fetch(
`${process.env.VUE_APP_API_AUTH}/me?info=groups&info=indirect_groups`,
{
method: 'POST',
cache: 'no-cache',
redirect: 'follow',
headers: {
'Content-Type': 'application/json',
'Authorization': `token ${value}`,
'token': `${value}`,
},
fetch(`${process.env.VUE_APP_API_AUTH}/me?info=groups&info=indirect_groups`, {
method: 'POST',
cache: 'no-cache',
redirect: 'follow',
headers: {
'Content-Type': 'application/json',
'Authorization': `token ${value}`,
'token': `${value}`,
},
)
})
.then(response => response.json())
.then(response => {
this.data = response;
Expand Down
5 changes: 2 additions & 3 deletions src/views/RegisterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<div class="container">
<h1>Регистрация в приложение</h1>
<p>
Добро пожаловать! Тут находится наша нулевая итерация по
прикручиванию авторизации в приложение. Ниже вы можете
зарегистрироваться.
Добро пожаловать! Тут находится наша нулевая итерация по прикручиванию авторизации в приложение. Ниже вы
можете зарегистрироваться.
</p>
<form @submit.prevent="register">
<div class="mb-3 row">
Expand Down
Loading