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 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/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/index.html b/index.html index 5581c894..79613dd2 100644 --- a/index.html +++ b/index.html @@ -9,8 +9,10 @@ + + diff --git a/package.json b/package.json index cd00c490..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,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 e63b313b..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', 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') }} + +