diff --git a/.gitignore b/.gitignore index a400ce86..a0be5c16 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ selenium-debug.log config/local.json config/local.*.json docs/site/ +.vscode/ \ No newline at end of file diff --git a/.stylelintrc.json b/.stylelintrc.json index fbf3a245..bf408009 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,19 +1,13 @@ { "extends": [ - "stylelint-rscss/config", + "stylelint-config-recommended-vue/scss", "stylelint-config-recommended", "stylelint-config-standard" ], + "customSyntax": "postcss-scss", "rules": { "declaration-no-important": true, - "rscss/no-descendant-combinator": false, - "rscss/class-format": [ - true, - { - "component": "pascal-case", - "variant": "^-[a-z]\\w+", - "element": "^[a-z]\\w+" - } - ] + "selector-class-pattern": null, + "custom-property-pattern": null } } diff --git a/.woodpecker.yml b/.woodpecker.yml index b5b6e889..cad4b698 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -7,7 +7,7 @@ pipeline: commands: - yarn - yarn lint - - yarn stylelint + #- yarn stylelint test: when: diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index e478d341..2a3db96e 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -2,7 +2,6 @@ var path = require('path') var config = require('../config') var utils = require('./utils') var projectRoot = path.resolve(__dirname, '../') -const WorkboxPlugin = require('workbox-webpack-plugin'); var { VueLoaderPlugin } = require('vue-loader') var env = process.env.NODE_ENV @@ -119,11 +118,6 @@ module.exports = { ] }, plugins: [ - new WorkboxPlugin.InjectManifest({ - swSrc: path.join(__dirname, '..', 'src/sw.js'), - swDest: 'sw-pleroma.js', - maximumFileSizeToCacheInBytes: 15 * 1024 * 1024, - }), new VueLoaderPlugin() ] } diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 7c94ec3c..d528cb0e 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -2,6 +2,7 @@ var path = require('path') var config = require('../config') var utils = require('./utils') var webpack = require('webpack') +const WorkboxPlugin = require('workbox-webpack-plugin'); var { merge } = require('webpack-merge') var baseWebpackConfig = require('./webpack.base.conf') var MiniCssExtractPlugin = require('mini-css-extract-plugin') @@ -32,6 +33,11 @@ var webpackConfig = merge(baseWebpackConfig, { chunkFilename: utils.assetsPath('js/[name].[chunkhash].js') }, plugins: [ + new WorkboxPlugin.InjectManifest({ + swSrc: path.join(__dirname, '..', 'src/sw.js'), + swDest: 'sw-pleroma.js', + maximumFileSizeToCacheInBytes: 15 * 1024 * 1024, + }), // http://vuejs.github.io/vue-loader/workflow/production.html new webpack.DefinePlugin({ 'process.env': env, diff --git a/package.json b/package.json index cd00c490..19a7e186 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "unit:watch": "karma start test/unit/karma.conf.js --single-run=false", "e2e": "node test/e2e/runner.js", "test": "npm run unit && npm run e2e", - "stylelint": "npx stylelint src/components/status/status.scss", + "stylelint": "stylelint src/**/*.scss", "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs", "lint-fix": "eslint --fix --ext .js,.vue src test/unit/specs test/e2e/specs" }, @@ -23,8 +23,8 @@ "@fortawesome/free-solid-svg-icons": "^6.2.0", "@fortawesome/vue-fontawesome": "3.0.1", "@kazvmoe-infra/pinch-zoom-element": "1.2.0", - "@vuelidate/core": "2.0.0-alpha.42", - "@vuelidate/validators": "2.0.0-alpha.30", + "@vuelidate/core": "^2.0.0", + "@vuelidate/validators": "^2.0.0", "body-scroll-lock": "2.7.1", "chromatism": "3.0.0", "click-outside-vue3": "4.0.1", @@ -33,8 +33,6 @@ "escape-html": "1.0.3", "js-cookie": "^3.0.1", "localforage": "1.10.0", - "marked": "^4.2.2", - "marked-mfm": "^0.5.0", "parse-link-header": "^2.0.0", "phoenix": "1.6.2", "punycode.js": "2.1.0", @@ -103,7 +101,9 @@ "nightwatch": "0.9.21", "opn": "4.0.2", "ora": "0.4.1", + "postcss-html": "^1.5.0", "postcss-loader": "3.0.0", + "postcss-sass": "^0.5.0", "raw-loader": "0.5.1", "sass": "^1.56.0", "sass-loader": "^13.2.0", @@ -112,9 +112,11 @@ "shelljs": "0.8.5", "sinon": "2.4.1", "sinon-chai": "2.14.0", - "stylelint": "13.6.1", - "stylelint-config-standard": "20.0.0", - "stylelint-rscss": "0.4.0", + "stylelint": "^14.15.0", + "stylelint-config-recommended-vue": "^1.4.0", + "stylelint-config-standard": "^29.0.0", + "stylelint-config-standard-scss": "^6.1.0", + "stylelint-rscss": "^0.4.0", "url-loader": "^4.1.1", "vue-loader": "^17.0.0", "vue-style-loader": "^4.1.2", diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 12919c2a..de261243 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -152,6 +152,7 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { copyInstanceOption('showPanelNavShortcuts') copyInstanceOption('stopGifs') copyInstanceOption('logo') + copyInstanceOption('conversationDisplay') store.dispatch('setInstanceOption', { name: 'logoMask', diff --git a/src/boot/routes.js b/src/boot/routes.js index d762f057..93a94a9b 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -22,6 +22,8 @@ import Lists from 'components/lists/lists.vue' import ListTimeline from 'components/list_timeline/list_timeline.vue' import ListEdit from 'components/list_edit/list_edit.vue' import AnnouncementsPage from 'components/announcements_page/announcements_page.vue' +import RegistrationRequestSent from 'components/registration_request_sent/registration_request_sent.vue' +import AwaitingEmailConfirmation from 'components/awaiting_email_confirmation/awaiting_email_confirmation.vue' export default (store) => { const validateAuthenticatedRoute = (to, from, next) => { @@ -62,6 +64,8 @@ export default (store) => { { name: 'interactions', path: '/users/:username/interactions', component: Interactions, beforeEnter: validateAuthenticatedRoute }, { name: 'dms', path: '/users/:username/dms', component: DMs, beforeEnter: validateAuthenticatedRoute }, { name: 'registration', path: '/registration', component: Registration }, + { name: 'registration-request-sent', path: '/registration-request-sent', component: RegistrationRequestSent }, + { name: 'awaiting-email-confirmation', path: '/awaiting-email-confirmation', component: AwaitingEmailConfirmation }, { name: 'password-reset', path: '/password-reset', component: PasswordReset, props: true }, { name: 'registration-token', path: '/registration/:token', component: Registration }, { name: 'friend-requests', path: '/friend-requests', component: FollowRequests, beforeEnter: validateAuthenticatedRoute }, diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js index 7a712e31..0f348474 100644 --- a/src/components/account_actions/account_actions.js +++ b/src/components/account_actions/account_actions.js @@ -26,6 +26,9 @@ const AccountActions = { ConfirmModal }, methods: { + refetchRelationship () { + return this.$store.dispatch('fetchUserRelationship', this.user.id) + }, showConfirmBlock () { this.showingConfirmBlock = true }, @@ -57,6 +60,14 @@ const AccountActions = { }, reportUser () { this.$store.dispatch('openUserReportingModal', { userId: this.user.id }) + }, + muteDomain () { + this.$store.dispatch('muteDomain', this.user.screen_name.split('@')[1]) + .then(() => this.refetchRelationship()) + }, + unmuteDomain () { + this.$store.dispatch('unmuteDomain', this.user.screen_name.split('@')[1]) + .then(() => this.refetchRelationship()) } }, computed: { diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 2f86b102..126f6fa9 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -55,6 +55,20 @@ > {{ $t('user_card.report') }} + +