diff --git a/.eslintrc.js b/.eslintrc.js index 4868f360..28d39d03 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,17 +1,17 @@ module.exports = { root: true, parserOptions: { - parser: 'babel-eslint', + parser: '@babel/eslint-parser', sourceType: 'module' }, // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style extends: [ - 'standard', 'plugin:vue/recommended' ], // required to lint *.vue files plugins: [ - 'vue' + 'vue', + 'import' ], // add your custom rules here rules: { @@ -23,6 +23,8 @@ module.exports = { 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 'vue/require-prop-types': 0, 'vue/no-unused-vars': 0, - 'no-tabs': 0 + 'no-tabs': 0, + 'vue/multi-word-component-names': 0, + 'vue/no-reserved-component-names': 0 } } diff --git a/.gitea/issue_template/bug.yml b/.gitea/issue_template/bug.yml new file mode 100644 index 00000000..92f96625 --- /dev/null +++ b/.gitea/issue_template/bug.yml @@ -0,0 +1,49 @@ +name: "Bug report" +about: "Something isn't working as expected" +title: "[bug] " +body: + - type: markdown + attributes: + value: "Thanks for taking the time to file this bug report! Please try to be as specific and detailed as you can, so we can track down the issue and fix it as soon as possible." + - type: input + id: version + attributes: + label: "Version" + description: "Which version of pleroma-fe are you running? If running develop, specify the commit hash." + placeholder: "e.g. 2022.11, 40e86998e6" + - type: textarea + id: attempt + attributes: + label: "What were you trying to do?" + validations: + required: true + - type: textarea + id: expectation + attributes: + label: "What did you expect to happen?" + validations: + required: true + - type: textarea + id: reality + attributes: + label: "What actually happened?" + validations: + required: true + - type: dropdown + id: severity + attributes: + label: "Severity" + description: "Does this issue prevent you from using the software as normal?" + options: + - "I cannot use the software" + - "I cannot use it as easily as I'd like" + - "I can manage" + validations: + required: true + - type: checkboxes + id: searched + attributes: + label: "Have you searched for this issue?" + description: "Please double-check that your issue is not already being tracked on [the forums](https://meta.akkoma.dev) or [the issue tracker](https://akkoma.dev/AkkomaGang/pleroma-fe/issues)." + options: + - label: "I have double-checked and have not found this issue mentioned anywhere." diff --git a/.gitea/issue_template/feat.yml b/.gitea/issue_template/feat.yml new file mode 100644 index 00000000..9f583be3 --- /dev/null +++ b/.gitea/issue_template/feat.yml @@ -0,0 +1,29 @@ +name: "Feature request" +about: "I'd like something to be added to pleroma-fe" +title: "[feat] " +body: + - type: markdown + attributes: + value: "Thanks for taking the time to request a new feature! Please be as concise and clear as you can in your proposal, so we could understand what you're going for." + - type: textarea + id: idea + attributes: + label: "The idea" + description: "What do you think you should be able to do in pleroma-fe?" + validations: + required: true + - type: textarea + id: reason + attributes: + label: "The reasoning" + description: "Why would this be a worthwhile feature? Does it solve any problems? Have people talked about wanting it?" + validations: + required: true + - type: checkboxes + id: searched + attributes: + label: "Have you searched for this feature request?" + description: "Please double-check that your issue is not already being tracked on [the forums](https://meta.akkoma.dev), [the issue tracker](https://akkoma.dev/AkkomaGang/pleroma-fe/issues), or the one for [the backend](https://akkoma.dev/AkkomaGang/akkoma/issues)." + options: + - label: "I have double-checked and have not found this feature request mentioned anywhere." + - label: "This feature is related to the pleroma-fe Akkoma frontend specifically, and not the backend." 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 7d97864b..cad4b698 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,17 +3,17 @@ pipeline: when: event: - pull_request - image: node:16 + image: node:18 commands: - yarn - yarn lint - - yarn stylelint + #- yarn stylelint test: when: event: - pull_request - image: node:16 + image: node:18 commands: - apt update - apt install firefox-esr -y --no-install-recommends @@ -27,7 +27,7 @@ pipeline: branch: - develop - stable - image: node:16 + image: node:18 commands: - yarn - yarn build @@ -39,7 +39,7 @@ pipeline: branch: - develop - stable - image: node:16 + image: node:18 secrets: - SCW_ACCESS_KEY - SCW_SECRET_KEY diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..59961078 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,24 @@ +# Akkoma Code of Conduct + +The Akkoma project aims to be **enjoyable** for anyone to participate in, regardless of their identity or level of expertise. To achieve this, the community must create an environment which is **safe** and **equitable**; the following guidelines have been created with these goals in mind. + +1. **Treat individuals with respect.** Differing experiences and viewpoints deserve to be respected, and bigotry and harassment are not tolerated under any circumstances. + - Individuals should at all times be treated as equals, regardless of their age, gender, sexuality, race, ethnicity, _or any other characteristic_, intrinsic or otherwise. + - Behaviour that is harmful in nature should be addressed and corrected *regardless of intent*. + - Respect personal boundaries and ask for clarification whenever they are unclear. + - (Obviously, hate does not count as merely a "differing viewpoint", because it is harmful in nature.) + +2. **Be understanding of differences in communication.** Not everyone is aware of unspoken social cues, and speech that is not intended to be offensive should not be treated as such simply due to an atypical manner of communication. + - Somebody who speaks bluntly is not necessarily rude, and somebody who swears a lot is not necessarily volatile. + - Try to confirm your interpretation of their intent rather than assuming bad faith. + - Someone may not communicate as, or come across as a picture of "professionalism", but this should not be seen as a reason to dismiss them. This is a **casual** space, and communication styles can reflect that. + +3. **"Uncomfortable" does not mean "unsafe".** In an ideal world, the community would be safe, equitable, enjoyable, *and* comfortable for all members at all times. Unfortunately, this is not always possible in reality. + - Safety and equity will be prioritized over comfort whenever it is necessary to do so. + - Weaponizing one's own discomfort to deflect accountability or censor an individual (e.g. "white fragility") is a form of discriminatory conduct. + +4. **Let people grow from their mistakes.** Nobody is perfect; even the most well-meaning individual can do something hurtful. Everyone should be given a fair opportunity to explain themselves and correct their behaviour. Portraying someone as inherently malicious prevents improvement and shifts focus away from the *action* that was problematic. + - Avoid bringing up past events that do not accurately reflect an individual's current actions or beliefs. (This is, of course, different from providing evidence of a recurring pattern of behaviour.) + +--- +This document was adapted from one created by ~keith as part of punks default repository template, and is licensed under CC-BY-SA 4.0. The original template is here: diff --git a/COFE_OF_CONDUCT.md b/COFE_OF_CONDUCT.md deleted file mode 100644 index 1ba85c5f..00000000 --- a/COFE_OF_CONDUCT.md +++ /dev/null @@ -1,49 +0,0 @@ -``` - o$$$$$$oo - o$" "$oo - $ o""""$o "$o - "$ o "o "o $ - "$ $o $ $ o$ - "$ o$"$ o$ - "$ooooo$$ $ o$ - o$ """ $ " $$$ " $ - o$ $o $$" " " - $$ $ " $ $$$o"$ o o$" - $" o "" $ $" " o" $$ - $o " " $ o$" o" o$" - "$o $$ $ o" o$$" - ""o$o"$" $oo" o$" - o$$ $ $$$ o$$ - o" o oo"" "" "$o - o$o" "" $ - $" " o" " " " "o - $$ " " o$ o$o " $ - o$ $ $ o$$ " " "" - o $ $" " "o o$ - $ o $o$oo$"" - $o $ o o o"$$ - $o o $ $ "$o - $o $ o $ $ "o - $ $ "o $ "o"$o - $ " o $ o $$ - $o$o$o$o$$o$$$o$$o$o$$o$$o$$$o$o$o$o$o$o$o$o$o$ooo - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ " $$$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ "$$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ o$$$$" - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ooooo$$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""" - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" -"$o$o$o$o$o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" - "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" - "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""" - """"""""""""""""""""""""""""""""""""""""""""""""""""" -``` \ No newline at end of file diff --git a/build/dev-server.js b/build/dev-server.js index c06192bd..5acd0fed 100644 --- a/build/dev-server.js +++ b/build/dev-server.js @@ -29,18 +29,6 @@ var devMiddleware = require('webpack-dev-middleware')(compiler, { }) var hotMiddleware = require('webpack-hot-middleware')(compiler) -// force page reload when html-webpack-plugin template changes -compiler.plugin('compilation', function (compilation) { - compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { - // FIXME: This supposed to reload whole page when index.html is changed, - // however now it reloads entire page on every breath, i suppose the order - // of plugins changed or something. It's a minor thing and douesn't hurt - // disabling it, constant reloads hurt much more - - // hotMiddleware.publish({ action: 'reload' }) - // cb() - }) -}) // proxy api requests Object.keys(proxyTable).forEach(function (context) { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cfdd4071..2a3db96e 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -2,8 +2,6 @@ var path = require('path') var config = require('../config') var utils = require('./utils') var projectRoot = path.resolve(__dirname, '../') -var ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin') -var CopyPlugin = require('copy-webpack-plugin'); var { VueLoaderPlugin } = require('vue-loader') var env = process.env.NODE_ENV @@ -20,6 +18,7 @@ module.exports = { app: './src/main.js' }, output: { + hashFunction: "sha256", // Workaround for builds with OpenSSL 3. path: config.build.assetsRoot, publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath, filename: '[name].js' @@ -34,6 +33,9 @@ module.exports = { modules: [ path.join(__dirname, '../node_modules') ], + fallback: { + "url": require.resolve("url/"), + }, alias: { 'static': path.resolve(__dirname, '../static'), 'src': path.resolve(__dirname, '../src'), @@ -116,23 +118,6 @@ module.exports = { ] }, plugins: [ - new ServiceWorkerWebpackPlugin({ - entry: path.join(__dirname, '..', 'src/sw.js'), - filename: 'sw-pleroma.js' - }), - new VueLoaderPlugin(), - // This copies Ruffle's WASM to a directory so that JS side can access it - new CopyPlugin({ - patterns: [ - { - from: "node_modules/ruffle-mirror/*", - to: "static/ruffle", - flatten: true - }, - ], - options: { - concurrency: 100, - }, - }) + new VueLoaderPlugin() ] } diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js index 4605b93d..8c7ac5d7 100644 --- a/build/webpack.dev.conf.js +++ b/build/webpack.dev.conf.js @@ -1,6 +1,6 @@ var config = require('../config') var webpack = require('webpack') -var merge = require('webpack-merge') +var { merge } = require('webpack-merge') var utils = require('./utils') var baseWebpackConfig = require('./webpack.base.conf') var HtmlWebpackPlugin = require('html-webpack-plugin') @@ -16,7 +16,7 @@ module.exports = merge(baseWebpackConfig, { }, mode: 'development', // eval-source-map is faster for development - devtool: '#eval-source-map', + devtool: 'eval-source-map', plugins: [ new webpack.DefinePlugin({ 'process.env': config.dev.env, diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index a67ed2f6..d528cb0e 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -2,7 +2,8 @@ var path = require('path') var config = require('../config') var utils = require('./utils') var webpack = require('webpack') -var merge = require('webpack-merge') +const WorkboxPlugin = require('workbox-webpack-plugin'); +var { merge } = require('webpack-merge') var baseWebpackConfig = require('./webpack.base.conf') var MiniCssExtractPlugin = require('mini-css-extract-plugin') var HtmlWebpackPlugin = require('html-webpack-plugin') @@ -19,7 +20,7 @@ var webpackConfig = merge(baseWebpackConfig, { module: { rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, extract: true }) }, - devtool: config.build.productionSourceMap ? '#source-map' : false, + devtool: 'source-map', optimization: { minimize: true, splitChunks: { @@ -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, @@ -62,7 +68,7 @@ var webpackConfig = merge(baseWebpackConfig, { // https://github.com/kangax/html-minifier#options-quick-reference }, // necessary to consistently work with multiple chunks via CommonsChunkPlugin - chunksSortMode: 'dependency' + chunksSortMode: 'auto' }), // split vendor js into its own file // extract webpack runtime and module manifest to its own file in order to diff --git a/config/dev.env.js b/config/dev.env.js index efead7c8..ae12ff34 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -1,4 +1,4 @@ -var merge = require('webpack-merge') +var { merge } = require('webpack-merge') var prodEnv = require('./prod.env') module.exports = merge(prodEnv, { diff --git a/config/index.js b/config/index.js index 443c4a67..4a21e718 100644 --- a/config/index.js +++ b/config/index.js @@ -38,6 +38,11 @@ module.exports = { assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: { + '/manifest.json': { + target, + changeOrigin: true, + cookieDomainRewrite: 'localhost' + }, '/api': { target, changeOrigin: true, diff --git a/config/test.env.js b/config/test.env.js index 89f90deb..646a6ef8 100644 --- a/config/test.env.js +++ b/config/test.env.js @@ -1,4 +1,4 @@ -var merge = require('webpack-merge') +var { merge } = require('webpack-merge') var devEnv = require('./dev.env') module.exports = merge(devEnv, { diff --git a/docs/docs/CONFIGURATION.md b/docs/docs/CONFIGURATION.md index cdcbc61a..d7b25802 100644 --- a/docs/docs/CONFIGURATION.md +++ b/docs/docs/CONFIGURATION.md @@ -70,9 +70,6 @@ Default post formatting option (markdown/bbcode/plaintext/etc...) ### `redirectRootNoLogin`, `redirectRootLogin` These two settings should point to where FE should redirect visitor when they login/open up website root -### `scopeCopy` -Copy post scope (visibility) when replying to a post. Instance-default. - ### `sidebarRight` Change alignment of sidebar and panels to the right. Defaults to `false`. diff --git a/index.html b/index.html index 1b1385de..79613dd2 100644 --- a/index.html +++ b/index.html @@ -3,17 +3,19 @@ - Pleroma + Akkoma + + - +
diff --git a/package.json b/package.json index 6712bf76..e712cffd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pleroma_fe", - "version": "3.2.0", + "version": "3.5.0", "description": "A frontend for Akkoma instances", "author": "Roger Braun ", "private": true, @@ -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,13 +33,11 @@ "escape-html": "1.0.3", "js-cookie": "^3.0.1", "localforage": "1.10.0", - "marked": "^4.0.17", - "marked-mfm": "^0.5.0", - "parse-link-header": "1.0.1", + "parse-link-header": "^2.0.0", "phoenix": "1.6.2", "punycode.js": "2.1.0", "qrcode": "1", - "ruffle-mirror": "2021.12.31", + "url": "^0.11.0", "vue": "^3.2.31", "vue-i18n": "^9.2.2", "vue-router": "4.0.14", @@ -48,6 +46,7 @@ }, "devDependencies": { "@babel/core": "7.17.8", + "@babel/eslint-parser": "^7.19.1", "@babel/plugin-transform-runtime": "7.17.0", "@babel/preset-env": "7.16.11", "@babel/register": "7.17.7", @@ -58,31 +57,29 @@ "@vue/compiler-sfc": "^3.1.0", "@vue/test-utils": "^2.0.2", "autoprefixer": "6.7.7", - "babel-eslint": "7.2.3", - "babel-loader": "8.2.4", + "babel-loader": "^9.1.0", "babel-plugin-lodash": "3.3.4", - "chai": "3.5.0", + "chai": "^4.3.7", "chalk": "1.1.3", - "chromedriver": "87.0.7", - "connect-history-api-fallback": "1.6.0", - "copy-webpack-plugin": "6.4.1", - "cross-spawn": "4.0.2", - "css-loader": "0.28.11", - "custom-event-polyfill": "1.0.7", - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-friendly-formatter": "2.0.7", - "eslint-loader": "2.2.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-node": "7.0.1", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "eslint-plugin-vue": "5.2.3", + "chromedriver": "^107.0.3", + "connect-history-api-fallback": "^2.0.0", + "cross-spawn": "^7.0.3", + "css-loader": "^6.7.2", + "custom-event-polyfill": "^1.0.7", + "eslint": "^7.32.0", + "eslint-config-standard": "^17.0.0", + "eslint-friendly-formatter": "^4.0.1", + "eslint-loader": "^4.0.2", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-standard": "^5.0.0", + "eslint-plugin-vue": "^9.7.0", "eventsource-polyfill": "0.9.6", "express": "4.17.3", - "file-loader": "3.0.1", + "file-loader": "^6.2.0", "function-bind": "1.1.1", - "html-webpack-plugin": "3.2.0", + "html-webpack-plugin": "^5.5.0", "http-proxy-middleware": "0.21.0", "inject-loader": "2.0.1", "iso-639-1": "2.1.15", @@ -96,7 +93,7 @@ "karma-sinon-chai": "2.0.2", "karma-sourcemap-loader": "0.3.8", "karma-spec-reporter": "0.0.33", - "karma-webpack": "4.0.2", + "karma-webpack": "^5.0.0", "lodash": "4.17.21", "lolex": "1.6.0", "mini-css-extract-plugin": "0.12.0", @@ -104,29 +101,33 @@ "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.53.0", - "sass-loader": "7.3.1", + "sass": "^1.56.0", + "sass-loader": "^13.2.0", "selenium-server": "2.53.1", "semver": "5.7.1", - "serviceworker-webpack-plugin": "1.0.1", "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", - "url-loader": "1.1.2", - "vue-loader": "^16.0.0", - "vue-style-loader": "4.1.2", - "webpack": "4.46.0", - "webpack-dev-middleware": "3.7.3", - "webpack-hot-middleware": "2.25.1", - "webpack-merge": "0.20.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", + "webpack": "^5.75.0", + "webpack-dev-middleware": "^5.3.3", + "webpack-hot-middleware": "^2.25.1", + "webpack-merge": "^5.8.0", + "workbox-webpack-plugin": "^6.5.4" }, "engines": { - "node": ">= 4.0.0", + "node": ">= 16.0.0", "npm": ">= 3.0.0" } } diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 986cd356..4bafca1d 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -150,6 +150,7 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { copyInstanceOption('showPanelNavShortcuts') copyInstanceOption('stopGifs') copyInstanceOption('logo') + copyInstanceOption('conversationDisplay') store.dispatch('setInstanceOption', { name: 'logoMask', @@ -170,10 +171,8 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { copyInstanceOption('redirectRootNoLogin') copyInstanceOption('redirectRootLogin') copyInstanceOption('showInstanceSpecificPanel') - copyInstanceOption('minimalScopesMode') copyInstanceOption('hideMutedPosts') copyInstanceOption('collapseMessageWithSubject') - copyInstanceOption('scopeCopy') copyInstanceOption('subjectLineBehavior') copyInstanceOption('postContentType') copyInstanceOption('alwaysShowSubjectInput') 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') }} + +