diff --git a/.babelrc b/.babelrc
index 373d2c599..4ec104161 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,5 +1,5 @@
{
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-transform-runtime", "lodash", "@vue/babel-plugin-jsx"],
- "comments": false
+ "comments": true
}
diff --git a/.browserslistrc b/.browserslistrc
new file mode 100644
index 000000000..df2d47160
--- /dev/null
+++ b/.browserslistrc
@@ -0,0 +1,7 @@
+>0.2%
+not op_mini all
+Safari > 15
+Firefox >= 115
+Firefox ESR
+Android > 4
+not dead
diff --git a/.eslintrc.js b/.eslintrc.js
index 3c48baa89..361cff5f2 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,7 +1,7 @@
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
@@ -21,6 +21,7 @@ module.exports = {
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
- 'vue/require-prop-types': 0
+ 'vue/require-prop-types': 0,
+ 'vue/multi-word-component-names': 0
}
}
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..c5b9ea10e
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+/build/webpack.prod.conf.js export-subst
diff --git a/.gitignore b/.gitignore
index 479d57c40..0d5befd28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@ test/e2e/reports
selenium-debug.log
.idea/
config/local.json
+static/emoji.json
+logs/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 305155d84..f4c5cf43a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,11 +4,36 @@
image: node:16
stages:
+ - check-changelog
- lint
- build
- test
- deploy
+# https://git.pleroma.social/help/ci/yaml/workflow.md#switch-between-branch-pipelines-and-merge-request-pipelines
+workflow:
+ rules:
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+ - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
+ when: never
+ - if: $CI_COMMIT_BRANCH
+
+check-changelog:
+ stage: check-changelog
+ image: alpine
+ rules:
+ - if: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH == 'pleroma/pleroma-fe' && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^renovate/
+ when: never
+ - if: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH == 'pleroma/pleroma-fe' && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'weblate'
+ when: never
+ - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"
+ before_script: ''
+ after_script: ''
+ cache: {}
+ script:
+ - apk add git
+ - sh ./tools/check-changelog
+
lint:
stage: lint
script:
@@ -18,6 +43,9 @@ lint:
test:
stage: test
+ tags:
+ - amd64
+ - himem
variables:
APT_CACHE_DIR: apt-cache
script:
@@ -29,6 +57,9 @@ test:
build:
stage: build
+ tags:
+ - amd64
+ - himem
script:
- yarn
- npm run build
diff --git a/.gitlab/issue_templates/Bug.md b/.gitlab/issue_templates/Bug.md
new file mode 100644
index 000000000..bfd5e7b41
--- /dev/null
+++ b/.gitlab/issue_templates/Bug.md
@@ -0,0 +1,25 @@
+# Environment info
+
+
+* Browser, version, OS, platform:
+* Instance URL:
+* Frontend version (see settings -> about):
+* Backend version (see settings -> about):
+* Browser extensions (ublock, rikaichamp etc):
+* Known instance/user customizations (i.e. pleromafe mods/forks, instance styles etc)
+
+# Bug description & reproduction steps
+
+
+
+
+
+# Bug seriousness
+
+
+* How annoying it is:
+* How often does it happen:
+* How many people does it affect:
+* Is there a workaround for it:
+
+/label ~Bug
diff --git a/.gitlab/issue_templates/Suggestion.md b/.gitlab/issue_templates/Suggestion.md
new file mode 100644
index 000000000..7472981a7
--- /dev/null
+++ b/.gitlab/issue_templates/Suggestion.md
@@ -0,0 +1,11 @@
+# Behavior suggestion/Feature request
+
+
+/label ~suggestion
+
diff --git a/.gitlab/issue_templates/default.md b/.gitlab/issue_templates/default.md
new file mode 100644
index 000000000..4ada07020
--- /dev/null
+++ b/.gitlab/issue_templates/default.md
@@ -0,0 +1,7 @@
+
+
+/label ~needs-triage
+
diff --git a/.gitlab/merge_request_templates/default.md b/.gitlab/merge_request_templates/default.md
new file mode 100644
index 000000000..ed9d54cb0
--- /dev/null
+++ b/.gitlab/merge_request_templates/default.md
@@ -0,0 +1,30 @@
+
+# Changes
+
+*
+*
+*
+
+
+
+
+
+
+
+/label ~needs-review
diff --git a/.node-version b/.node-version
index 431076a94..5397c87fa 100644
--- a/.node-version
+++ b/.node-version
@@ -1 +1 @@
-16.16.0
+16.18.1
diff --git a/.stylelintrc.json b/.stylelintrc.json
index fbf3a245c..d6689cc01 100644
--- a/.stylelintrc.json
+++ b/.stylelintrc.json
@@ -1,19 +1,41 @@
{
"extends": [
"stylelint-rscss/config",
- "stylelint-config-recommended",
- "stylelint-config-standard"
+ "stylelint-config-standard",
+ "stylelint-config-recommended-scss",
+ "stylelint-config-html",
+ "stylelint-config-recommended-vue/scss"
],
"rules": {
"declaration-no-important": true,
"rscss/no-descendant-combinator": false,
"rscss/class-format": [
- true,
+ false,
{
"component": "pascal-case",
"variant": "^-[a-z]\\w+",
"element": "^[a-z]\\w+"
}
+ ],
+ "selector-class-pattern": null,
+ "import-notation": null,
+ "custom-property-pattern": null,
+ "keyframes-name-pattern": null,
+ "scss/operator-no-newline-after": null,
+ "declaration-block-no-redundant-longhand-properties": [
+ true,
+ {
+ "ignoreShorthands": [
+ "grid-template",
+ "margin",
+ "padding",
+ "border",
+ "border-width",
+ "border-style",
+ "border-color",
+ "border-radius"
+ ]
+ }
]
}
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fac68ac04..9844319e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,41 +3,203 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
-## Unreleased
+## 2.7.1
+Bugfix release. Added small optimizations to emoji picker that should make it a bit more responsive, however it needs rather large change to make it more performant which might come in a major release.
+
### Fixed
-- AdminFE button no longer scrolls page to top when clicked
+- Instance default theme not respected
+- Nested panel header having wrong sticky position if navbar height != panel header height
+- Toggled buttons having bad contrast (when using v2 theme)
+
+### Changed
+- Simplify the OAuth client_name to 'PleromaFE'
+- Small optimizations to emoji picker
+
+
+## 2.7.0
+
+### Known issues
+We got some reports related to emoji picker performance, this hopefully will be fixed in 2.7.1.
+
+### Notes
+This release overhauls how themes work, themes now need to be "compiled", which can cause some delay when loading for the first time and temporarily look "wrong" in some places (popups, menus, dialogs). Please do report any issues, especially if your theme looks wrong or breaks interface when loading. Also report issues if you're experiencing constant performance issues.
+
+To admins: remember that you can update PleromaFE to recent `master` or `develop` in admin dashboard in "Front-ends" tab, scroll down to find PleromaFE box and click "Reinstall `master`" or dropdown and then "Reinstall `develop`". Currently there is no mechanism to check if there is an update or not.
+
+### Changed
+- Overhauled the way themes work, migrating to new Pleroma Interface Style Sheets system aka "Themes 3".
+- Notifications are no longer sorted by "seen" status since interacting with them can change their read status and makes UI jumpy. Old behavior can be restored in settings.
+- Notifications are now shown through a ServiceWorker (since mobile chrome does not allow them otherwise), it's always enabled, even if previously we only enabled it for WebPush notifications only. If you don't like websites "running" while closed, check how to disable them in your browser. Old way to show notifications will be used as a fallback but might not have all the new features.
+- Reorganized Settings modal to move out visual stuff into Appearance tab
+
+### Added
+- Emoji pack management to the admin panel
+- Support `status` notification type (subscriptions/bell, fixes PleromaFE on newer PleromaBE versions)
+- Poll end notifications.
+- Added option to not mark all notifications when closing notifications drawer on mobile, this creates a new button to mark all as seen.
+- Option to always "show" notifications when using web push for better compatibility with some browsers (chrome, edge, safari)
+- Option to toggle what notification types appear in native notifications, by default less important ones (likes, repeats, etc) will no longer show up in native notifications.
+- Option to treat non-interactive notifications (likes, repeats et all) as seen for visual purposes (no read mark, ignored in counters, still can show in native notifications)
+- Ability to resize UI (and certain components) scale independent of browser/text scale
+- Ability to override certain aspects of UI style independent of theme used (UI roundness, fonts, underlay)
+- Theme selector with visual previews of the theme
+- Display loading and error indicator for conversation page
+- Option to only show scrobbles that are recent enough
+- Interacting (opening reply box etc) or simply clicking on non-interactive notifications now marks them as read. Clicking on native notifications for non-interactive ones also marks them as seen.
+- Support group actors
+- Focusing into a tab clears all current desktop notifications
+- Ability to change size of emoji
+- Ability to view APNG (Animated PNG) attachments.
+- Support showing extra notifications in the notifications column
+- Create a link to the URL of the scrobble when it's present
+- Allow hiding custom emojis in picker.
+- Ability to mute sensitive posts (ported from eintei).
+- Native notifications now also have "badge" property that matches instance's favicon (visible in Android Chromium at least)
+- Display public favorites on user profiles
+- Display quotes count on posts and add quotes list page
+- Show a dedicated registration notice page when further action is required after registering
+
+### Fixed
+- Synchronized requested notification types with backend, hopefully should fix missing notifications for polls and follow requests
+- Error that appeared on mobile Chromium (and derivatives) when native notifications are allowed
+- Being unable to set notification visibility for reports and follow requests
+- Native notifications appearing as many times as there are open tabs. Clicking on notification will focus last focused tab.
+- The expiry date indication won't be shown if the poll never expires
+- Profile mentions causing a 422 error on newer PleromaBE versions.
+- Color inputs are less ugly now
+- Unread notifications should now properly catch up between sessions (eventually) in polling mode
+- Video posters on Safari
+
+
+## 2.6.1
+### Fixed
+- fix admin dashboard not having any feedback on frontend installation
+- Fix frontend admin tab crashing when no primary frontend is set
+- Add aria attributes to react and extra buttons
+
+## 2.6.0
+### Added
+- add the initial i18n translation file for Taiwanese (Hokkien), and modify some related files.
+- Implemented a very basic instance administration screen
+- Implement quoting
+
+### Fixed
+- Keep aspect ratio of custom emoji reaction in notification
+- Fix openSettingsModalTab so that it correctly opens Settings modal instead of Admin modal
+- Add alt text to emoji picker buttons
+- Use export-subst gitattribute to allow tarball builds
+- fix reports now showing reason/content
+- Fix HTML attribute parsing, discard attributes not strating with a letter
+- Make MentionsLine aware of line breaking by non-br elements
+- Fix a bug where mentioning a user twice will not fill the mention into the textarea
+- Fix parsing non-ascii tags
+- Fix OAuth2 token lingering after revocation
+- fix regex issue in HTML parser/renderer
+- don't display quoted status twice
+- fix typo in code that prevented cards from showing at all
+- Fix react button not working if reaction accounts are not loaded
+- Fix react button misalignment on safari ios
+- Fix pinned statuses gone when reloading user timeline
+- Fix scrolling emoji selector in modal in safari ios
+
+## 2.5.1
+### Fixed
+- Checkboxes in settings can now work with screenreaders
+- Autocomplete in edit boxes can now work with screenreaders
+- Status interact buttons now have focus indicator for anonymous users
+- Top bar buttons now correctly have text labels
+- It is now possible to register if the site admin requires birthday to register
+- User cards from search results will correctly popup
+- Fix notification attachment icon overflow
+- Editing mute words is less laggy
+- Repeater's name will no longer mess up with the directionality of the text sitting on the same line
+- Unauthenticated access will give better error messages
+- It is now easier to close the media viewer with a mouse when there is only one image
+- Deleting profile fields can work properly
+- Clicking the react button will correctly focus the search box
+- Clicking buttons on the top-bar will no longer bring you to the top of the page
+- Emoji picker is much faster to load
+- `blockquote`s have a better display style
+- Announcements posting and editing are now available to everyone with such a privilege, not just admins
+- Adding or removing list members will actually work
+- Emojis without a pack are now correctly displayed in emoji picker
+- Changing notification settings will actually work
+
+### Added
+- You can now set and see birthdays
+- Optional confirmation dialogs when performing various actions
+- You can now set fallback languages
+
+## 2.5.0 - 23.12.2022
+### Fixed
+- UI no longer lags when switching between mobile and desktop mode
+- Popovers no longer constrained by DOM hierarchy, shouldn't be cut off by anything
+- Emoji autocomplete popover and picker popover stick to the text cursor.
+- Attachments are ALWAYS in same order as user uploaded, no more "videos first"
- Pinned statuses no longer appear at bottom of user timeline (still appear as part of the timeline when fetched deep enough)
- Fixed many many bugs related to new mentions, including spacing and alignment issues
- Links in profile bios now properly open in new tabs
+- "Always show mobile button" is working now
- Inline images now respect their intended width/height attributes
- Links with `&` in them work properly now
-- Interaction list popovers now properly emojify names
-- Completely hidden posts still had 1px border
-- Attachments are ALWAYS in same order as user uploaded, no more "videos first"
- Attachment description is prefilled with backend-provided default when uploading
- Proper visual feedback that next image is loading when browsing
+- Additional HTML sanitization on frontend side in case backend sanitization fails
+- Interaction list popovers now properly emojify names
+- AdminFE button no longer scrolls page to top when clicked
+- User handles with non-ascii domains now have less intrusive indicator for the domain name
+- Completely hidden posts still no longer have 1px border
+- A lot of accessibility improvements
### Changed
-- (You)s are optional (opt-in) now, bolding your nickname is also optional (opt-out)
+- Using Vue 3 now
+- A lot of internal dependencies updated
+- "(You)s" are optional (opt-in) now, bolding your nickname is also optional (opt-out)
- User highlight background now also covers the `@`
- Reverted back to textual `@`, svg version is opt-in.
-- Settings window has been throughly rearranged to make make more sense and make navication settings easier.
+- Settings window has been thoroughly rearranged to make more sense and make navigation settings easier.
- Uploaded attachments are uniform with displayed attachments
- Flash is watchable in media-modal (takes up nearly full screen though due to sizing issues)
-- Notifications about likes/repeats/emoji reacts are now minimized so they always take up same amount of space irrelevant to size of post.
+- Notifications about likes/repeats/emoji reacts are now minimized so they always take up same amount of space irrelevant to size of post. (You can expand them to full if need be)
+- Slight width/spacing adjustments
+- More sizing stuff is font-size dependent now
+- Scrollbars are styled/colorized now
+- Scrollbars are toggleable (for stuff that didn't have visible scrollbars before) (opt-in)
+- Updated localization files
+- Top bar is more useful in mobile mode now.
+- "Show new" button is way more compact in mobile mode
+- Slightly adjusted placement and spacing of the topbar buttons so it's less easy to accidentally log yourself out
### Added
+- 3 column mode: only enables when there's space for it (opt-out, customizable)
+- Apologetic pleroma-tan
+- New button on timeline header to change some of the new and often-used settings
+- Support for lists
+- Added ability to edit posts and view post edit history etc.
+- Added ability to add personal note to users
+- Added initial support for admin announcements
+- Added ui for account migration
+- Added ui for backups
+- Added ability to force-unfollow a user from you
+- Emoji are now grouped by pack
+- Ability to pin navigation items and collapse the navigation menu
+- Ability to rearrange order of attachments when uploading
+- Ability to scroll column (or page) to top via panel header button
- Options to show domains in mentions
- Option to show user avatars in mention links (opt-in)
- Option to disable the tooltip for mentions
- Option to completely hide muted threads
+- Option to customize what clicking user avatar does in user popover
+- Notifications for poll results
+- "Favorites" link in navigation
+- Very early and somewhat experimental system for automatic settings sync (used only for pinned navigation and apologetic pleroma-tan)
+- Implemented remote interaction with statuses for anon visitors
- Ability to open videos in modal even if you disabled that feature, via an icon button
- New button on attachment that indicates that attachment has a description and shows a bar filled with description
- Attachments are truncated just like post contents
- Media modal now also displays description and counter position in gallery (i.e. 1/5)
-- Ability to rearrange order of attachments when uploading
- Enabled users to zoom and pan images in media viewer with mouse and touch
-- Added frontend ui for account migration
+- Timelines/panels and conversations have sticky headers now (a bit glitchy on some browsers like safari) (opt-out)
## [2.4.2] - 2022-01-09
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index f666a4ef0..dec262ded 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -10,3 +10,5 @@ Contributors of this project.
- shpuld (shpuld@shitposter.club): CSS and styling
- Vincent Guth (https://unsplash.com/photos/XrwVIFy6rTw): Background images.
- hj (hj@shigusegubu.club): Code
+- Sean King (seanking@kazv.moe): Code
+- tusooa (tusooa@kazv.moe): Code
diff --git a/README.md b/README.md
index 54529a705..6a37195d5 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,19 @@
# Pleroma-FE
-> A single column frontend designed for Pleroma.
+> Highly-customizable frontend designed for Pleroma.
-
+
# For Translators
-To translate Pleroma-FE, add your language to [src/i18n/messages.js](https://git.pleroma.social/pleroma/pleroma-fe/blob/develop/src/i18n/messages.js). Pleroma-FE will set your language by your browser locale, but you can temporarily force it in the code by changing the locale in main.js.
+To translate Pleroma-FE, use our weblate server: https://translate.pleroma.social/. If you need to add your language it should be added as a json file in [src/i18n/](https://git.pleroma.social/pleroma/pleroma-fe/blob/develop/src/i18n/) folder and added in a list within [src/i18n/languages.js](https://git.pleroma.social/pleroma/pleroma-fe/blob/develop/src/i18n/languages.js).
-# FOR ADMINS
+Pleroma-FE will set your language by your browser locale, but you can change language in settings.
-You don't need to build Pleroma-FE yourself. Those using the Pleroma backend will be able to use it out of the box.
+# For instance admins
+You don't need to build Pleroma-FE yourself. Those using the Pleroma backend will be able to use it out of the box. Information of customizing PleromaFE settings/defaults is in our [guide](https://docs-develop.pleroma.social/frontend/CONFIGURATION/) and in case you want to build your own custom version there's [another](https://docs-develop.pleroma.social/frontend/HACKING/)
-## Build Setup
+# Build Setup
``` bash
# install dependencies
@@ -20,13 +21,13 @@ npm install -g yarn
yarn
# serve with hot reload at localhost:8080
-npm run dev
+yarn dev
# build for production with minification
-npm run build
+yarn build
# run unit tests
-npm run unit
+yarn unit
```
# For Contributors:
@@ -40,10 +41,4 @@ FE Build process also leaves current commit hash in global variable `___pleromaf
# Configuration
-Edit config.json for configuration.
-
-## Options
-
-### Login methods
-
-```loginMethod``` can be set to either ```password``` (the default) or ```token```, which will use the full oauth redirection flow, which is useful for SSO situations.
+Set configuration settings in AdminFE, additionally you can edit config.json. For more details see [documentation](https://docs-develop.pleroma.social/frontend/CONFIGURATION/).
diff --git a/build/build.js b/build/build.js
index b3c9aad41..8242bc5f6 100644
--- a/build/build.js
+++ b/build/build.js
@@ -18,6 +18,9 @@ console.log(
var spinner = ora('building for production...')
spinner.start()
+var updateEmoji = require('./update-emoji').updateEmoji
+updateEmoji()
+
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
rm('-rf', assetsPath)
mkdir('-p', assetsPath)
@@ -33,4 +36,8 @@ webpack(webpackConfig, function (err, stats) {
chunks: false,
chunkModules: false
}) + '\n')
+ if (stats.hasErrors()) {
+ console.error('See above for errors.')
+ process.exit(1)
+ }
})
diff --git a/build/dev-server.js b/build/dev-server.js
index c06192bd1..e51ba9484 100644
--- a/build/dev-server.js
+++ b/build/dev-server.js
@@ -10,6 +10,9 @@ var webpackConfig = process.env.NODE_ENV === 'testing'
? require('./webpack.prod.conf')
: require('./webpack.dev.conf')
+var updateEmoji = require('./update-emoji').updateEmoji
+updateEmoji()
+
// default port where dev server listens for incoming traffic
var port = process.env.PORT || config.dev.port
// Define HTTP proxies to your custom API backend
@@ -29,18 +32,20 @@ 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()
- })
-})
+// FIXME: The statement below gives error about hooks being required in webpack 5.
+// 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) {
@@ -48,7 +53,7 @@ Object.keys(proxyTable).forEach(function (context) {
if (typeof options === 'string') {
options = { target: options }
}
- app.use(proxyMiddleware(context, options))
+ app.use(proxyMiddleware.createProxyMiddleware(context, options))
})
// handle fallback for HTML5 history API
diff --git a/build/update-emoji.js b/build/update-emoji.js
new file mode 100644
index 000000000..9f4b4e67a
--- /dev/null
+++ b/build/update-emoji.js
@@ -0,0 +1,27 @@
+
+module.exports = {
+ updateEmoji () {
+ const emojis = require('@kazvmoe-infra/unicode-emoji-json/data-by-group')
+ const fs = require('fs')
+
+ Object.keys(emojis)
+ .map(k => {
+ emojis[k].map(e => {
+ delete e.unicode_version
+ delete e.emoji_version
+ delete e.skin_tone_support_unicode_version
+ })
+ })
+
+ const res = {}
+ Object.keys(emojis)
+ .map(k => {
+ const groupId = k.replace('&', 'and').replace(/ /g, '-').toLowerCase()
+ res[groupId] = emojis[k]
+ })
+
+ console.info('Updating emojis...')
+ fs.writeFileSync('static/emoji.json', JSON.stringify(res))
+ console.info('Done.')
+ }
+}
diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js
index d667acdde..7e69352a6 100644
--- a/build/webpack.base.conf.js
+++ b/build/webpack.base.conf.js
@@ -2,9 +2,11 @@ var path = require('path')
var config = require('../config')
var utils = require('./utils')
var projectRoot = path.resolve(__dirname, '../')
-var ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin')
+var ServiceWorkerWebpackPlugin = require('serviceworker-webpack5-plugin')
var CopyPlugin = require('copy-webpack-plugin');
var { VueLoaderPlugin } = require('vue-loader')
+var ESLintPlugin = require('eslint-webpack-plugin');
+var StylelintPlugin = require('stylelint-webpack-plugin');
var env = process.env.NODE_ENV
// check env & config/index.js to decide weither to enable CSS Sourcemaps for the
@@ -22,7 +24,8 @@ module.exports = {
output: {
path: config.build.assetsRoot,
publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath,
- filename: '[name].js'
+ filename: '[name].js',
+ chunkFilename: '[name].js'
},
optimization: {
splitChunks: {
@@ -40,25 +43,15 @@ module.exports = {
'assets': path.resolve(__dirname, '../src/assets'),
'components': path.resolve(__dirname, '../src/components'),
'vue-i18n': 'vue-i18n/dist/vue-i18n.runtime.esm-bundler.js'
+ },
+ fallback: {
+ 'querystring': require.resolve('querystring-es3'),
+ 'url': require.resolve('url/')
}
},
module: {
noParse: /node_modules\/localforage\/dist\/localforage.js/,
rules: [
- {
- enforce: 'pre',
- test: /\.(js|vue)$/,
- include: projectRoot,
- exclude: /node_modules/,
- use: {
- loader: 'eslint-loader',
- options: {
- formatter: require('eslint-friendly-formatter'),
- sourceMap: config.build.productionSourceMap,
- extract: true
- }
- }
- },
{
enforce: 'post',
test: /\.(json5?|ya?ml)$/, // target json, json5, yaml and yml files
@@ -90,22 +83,16 @@ module.exports = {
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
- use: {
- loader: 'url-loader',
- options: {
- limit: 10000,
- name: utils.assetsPath('img/[name].[hash:7].[ext]')
- }
+ type: 'asset',
+ generator: {
+ filename: utils.assetsPath('img/[name].[hash:7][ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
- use: {
- loader: 'url-loader',
- options: {
- limit: 10000,
- name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
- }
+ type: 'asset',
+ generator: {
+ filename: utils.assetsPath('fonts/[name].[hash:7][ext]')
}
},
{
@@ -120,14 +107,18 @@ module.exports = {
entry: path.join(__dirname, '..', 'src/sw.js'),
filename: 'sw-pleroma.js'
}),
+ new ESLintPlugin({
+ extensions: ['js', 'vue'],
+ formatter: require('eslint-formatter-friendly')
+ }),
+ new StylelintPlugin({}),
new VueLoaderPlugin(),
// This copies Ruffle's WASM to a directory so that JS side can access it
new CopyPlugin({
patterns: [
{
- from: "node_modules/@ruffle-rs/ruffle/*",
- to: "static/ruffle",
- flatten: true
+ from: "node_modules/@ruffle-rs/ruffle/**/*",
+ to: "static/ruffle/[name][ext]"
},
],
options: {
diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js
index 4605b93df..97799f828 100644
--- a/build/webpack.dev.conf.js
+++ b/build/webpack.dev.conf.js
@@ -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 a67ed2f62..7a108f68d 100644
--- a/build/webpack.prod.conf.js
+++ b/build/webpack.prod.conf.js
@@ -5,26 +5,38 @@ var webpack = require('webpack')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var MiniCssExtractPlugin = require('mini-css-extract-plugin')
+const CssMinimizerPlugin = require("css-minimizer-webpack-plugin")
var HtmlWebpackPlugin = require('html-webpack-plugin')
var env = process.env.NODE_ENV === 'testing'
? require('../config/test.env')
: config.build.env
-let commitHash = require('child_process')
- .execSync('git rev-parse --short HEAD')
- .toString();
+let commitHash = (() => {
+ const subst = "$Format:%h$";
+ if(!subst.match(/Format:/)) {
+ return subst;
+ } else {
+ return require('child_process')
+ .execSync('git rev-parse --short HEAD')
+ .toString();
+ }
+})();
var webpackConfig = merge(baseWebpackConfig, {
mode: 'production',
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, extract: true })
},
- devtool: config.build.productionSourceMap ? '#source-map' : false,
+ devtool: config.build.productionSourceMap ? 'source-map' : false,
optimization: {
minimize: true,
splitChunks: {
chunks: 'all'
- }
+ },
+ minimizer: [
+ `...`,
+ new CssMinimizerPlugin()
+ ]
},
output: {
path: config.build.assetsRoot,
@@ -60,9 +72,7 @@ var webpackConfig = merge(baseWebpackConfig, {
ignoreCustomComments: [/server-generated-meta/]
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
- },
- // necessary to consistently work with multiple chunks via CommonsChunkPlugin
- chunksSortMode: 'dependency'
+ }
}),
// split vendor js into its own file
// extract webpack runtime and module manifest to its own file in order to
diff --git a/changelog.d/backend-repo-url.skip b/changelog.d/backend-repo-url.skip
new file mode 100644
index 000000000..e69de29bb
diff --git a/changelog.d/better-shadow-control.fix b/changelog.d/better-shadow-control.fix
new file mode 100644
index 000000000..585ef6d26
--- /dev/null
+++ b/changelog.d/better-shadow-control.fix
@@ -0,0 +1 @@
+Updated shadow editor, hopefully fixed long-standing bugs, added ability to specify shadow's name.
diff --git a/changelog.d/bookmark-folders.add b/changelog.d/bookmark-folders.add
new file mode 100644
index 000000000..f22966602
--- /dev/null
+++ b/changelog.d/bookmark-folders.add
@@ -0,0 +1 @@
+Support bookmark folders
diff --git a/changelog.d/browsers-support.change b/changelog.d/browsers-support.change
new file mode 100644
index 000000000..a62e50240
--- /dev/null
+++ b/changelog.d/browsers-support.change
@@ -0,0 +1,9 @@
+Updated our build system to support browsers:
+ Safari >= 15
+ Firefox >= 115
+ Android > 4
+ no Opera Mini support
+ no IE support
+ no "dead" (unmaintained) browsers support
+
+This does not guarantee that browsers will or will not work.
diff --git a/changelog.d/checkbox.fix b/changelog.d/checkbox.fix
new file mode 100644
index 000000000..6a947ec8e
--- /dev/null
+++ b/changelog.d/checkbox.fix
@@ -0,0 +1 @@
+checkbox vertical alignment has been fixed
diff --git a/changelog.d/colorfuncs.fix b/changelog.d/colorfuncs.fix
new file mode 100644
index 000000000..18c49e2fc
--- /dev/null
+++ b/changelog.d/colorfuncs.fix
@@ -0,0 +1 @@
+Fix some of the color manipulation functions
diff --git a/changelog.d/custom.add b/changelog.d/custom.add
new file mode 100644
index 000000000..97848d7e4
--- /dev/null
+++ b/changelog.d/custom.add
@@ -0,0 +1 @@
+Added support for fetching /{resource}.custom.ext to allow adding instance-specific themes without altering sourcetree
diff --git a/changelog.d/date-absolute.add b/changelog.d/date-absolute.add
new file mode 100644
index 000000000..d9365f464
--- /dev/null
+++ b/changelog.d/date-absolute.add
@@ -0,0 +1 @@
+Support displaying time in absolute format
diff --git a/changelog.d/deprecate-subscribe.change b/changelog.d/deprecate-subscribe.change
new file mode 100644
index 000000000..10fb34f46
--- /dev/null
+++ b/changelog.d/deprecate-subscribe.change
@@ -0,0 +1 @@
+Use /api/v1/accounts/:id/follow for account subscriptions instead of the deprecated routes
\ No newline at end of file
diff --git a/changelog.d/emoji-size.fix b/changelog.d/emoji-size.fix
new file mode 100644
index 000000000..a1189b833
--- /dev/null
+++ b/changelog.d/emoji-size.fix
@@ -0,0 +1 @@
+fix emoji inconsistencies in notifications, fix some emoji not scaling with interface
diff --git a/changelog.d/misc-markup.fix b/changelog.d/misc-markup.fix
new file mode 100644
index 000000000..7af934a29
--- /dev/null
+++ b/changelog.d/misc-markup.fix
@@ -0,0 +1 @@
+Fix small markup inconsistencies
diff --git a/changelog.d/multiple-status-mute-reasons.fix b/changelog.d/multiple-status-mute-reasons.fix
new file mode 100644
index 000000000..952ccea82
--- /dev/null
+++ b/changelog.d/multiple-status-mute-reasons.fix
@@ -0,0 +1 @@
+Fix whitespaces for multiple status mute reasons, display bot status reason
diff --git a/changelog.d/non-anonymous-polls.add b/changelog.d/non-anonymous-polls.add
new file mode 100644
index 000000000..9ff7f3adc
--- /dev/null
+++ b/changelog.d/non-anonymous-polls.add
@@ -0,0 +1 @@
+Inform users that Smithereen public polls are public
\ No newline at end of file
diff --git a/changelog.d/oauth-app-name.change b/changelog.d/oauth-app-name.change
new file mode 100644
index 000000000..15d6f87ee
--- /dev/null
+++ b/changelog.d/oauth-app-name.change
@@ -0,0 +1 @@
+Simplify the OAuth client_name to 'PleromaFE'
diff --git a/changelog.d/panel-stack.fix b/changelog.d/panel-stack.fix
new file mode 100644
index 000000000..518ff32fe
--- /dev/null
+++ b/changelog.d/panel-stack.fix
@@ -0,0 +1 @@
+proper sticky header for conversations on user page
diff --git a/changelog.d/piss-fix.skip b/changelog.d/piss-fix.skip
new file mode 100644
index 000000000..e69de29bb
diff --git a/changelog.d/piss-serialization.skip b/changelog.d/piss-serialization.skip
new file mode 100644
index 000000000..e69de29bb
diff --git a/changelog.d/quote-buttons.fix b/changelog.d/quote-buttons.fix
new file mode 100644
index 000000000..859e5d6c5
--- /dev/null
+++ b/changelog.d/quote-buttons.fix
@@ -0,0 +1 @@
+reply-or-quote buttons now take less space
diff --git a/changelog.d/show-bookmarks-on-mobile.fix b/changelog.d/show-bookmarks-on-mobile.fix
new file mode 100644
index 000000000..3b5db4834
--- /dev/null
+++ b/changelog.d/show-bookmarks-on-mobile.fix
@@ -0,0 +1 @@
+Bookmarks visible again on mobile
diff --git a/changelog.d/splashfix.skip b/changelog.d/splashfix.skip
new file mode 100644
index 000000000..e69de29bb
diff --git a/changelog.d/splashscreen.add b/changelog.d/splashscreen.add
new file mode 100644
index 000000000..f1f56551a
--- /dev/null
+++ b/changelog.d/splashscreen.add
@@ -0,0 +1 @@
+Splash screen + loading indicator to make process of identifying initialization issues and load performance
diff --git a/changelog.d/tabs.change b/changelog.d/tabs.change
new file mode 100644
index 000000000..e716ad427
--- /dev/null
+++ b/changelog.d/tabs.change
@@ -0,0 +1 @@
+Tabs now have indentation for better visibility of which tab is currently active
diff --git a/changelog.d/themes3.add b/changelog.d/themes3.add
new file mode 100644
index 000000000..040957ced
--- /dev/null
+++ b/changelog.d/themes3.add
@@ -0,0 +1 @@
+UI for making v3 themes and palettes, support for bundling v3 themes
diff --git a/changelog.d/user-link.add b/changelog.d/user-link.add
new file mode 100644
index 000000000..ca65aa5fa
--- /dev/null
+++ b/changelog.d/user-link.add
@@ -0,0 +1 @@
+Make UserLink wrappable
diff --git a/changelog.d/weird-absolute-time-format.fix b/changelog.d/weird-absolute-time-format.fix
new file mode 100644
index 000000000..727d58764
--- /dev/null
+++ b/changelog.d/weird-absolute-time-format.fix
@@ -0,0 +1 @@
+Show only month and day instead of weird "day, hour" format. While at it, fixed typo "defualt" in a comment.
\ No newline at end of file
diff --git a/docs/HACKING.md b/docs/HACKING.md
index 7f2964b4e..a5c491136 100644
--- a/docs/HACKING.md
+++ b/docs/HACKING.md
@@ -25,7 +25,17 @@ This could be a bit trickier, you basically need steps 1-4 from *develop build*
### Replacing your instance's frontend with custom FE build
-This is the most easiest way to use and test FE build: you just need to copy or symlink contents of `dist` folder into backend's [static directory](../backend/configuration/static_dir.md), by default it is located in `instance/static`, or in `/var/lib/pleroma/static` for OTP release installations, create it if it doesn't exist already. Be aware that running `yarn build` wipes the contents of `dist` folder.
+#### New way (via AdminFE, a bit janky but works)
+
+In backend's [static directory](../backend/configuration/static_dir.md) there should be a folder called `frontends` if you installed any frontends from AdminFE before, otherwise you can create it yourself (ensuring correct permissions). Backend will serve given frontend from path `frontends/{frontend}/{reference}`, where `{frontend}` is name of frontend (`pleroma-fe`) and `{reference}` is version. You could make a production build, move `dist` folder into `frontends/pleroma-fe` and rename it into something like `myCustomVersion`. To actually make backend serve this frontend by default, in AdminFE you'll need to set name/reference in Settings -> Frontend -> Frontends -> Primary.
+
+You could also install from a zip file (i.e. CI build) but AdminFE UI is a bit buggy and lacking, so this approach is not recommended.
+
+Take note that frontend management is in early development and currently there's no way for user to change frontend or version for themselves, primary frontend becomes default frontend for all users and visitors.
+
+#### Old way (replaces everything, hard to maintain, not recommended)
+
+Copy or symlink contents of `dist` folder into backend's [static directory](../backend/configuration/static_dir.md), by default it is located in `instance/static`, or in `/var/lib/pleroma/static` for OTP release installations, create it if it doesn't exist already. Be aware that running `yarn build` wipes the contents of `dist` folder, and this could remove emojis, other frontends etc. and therefore this approach is not recommended.
### Running production build locally or on a separate server
diff --git a/image-1.png b/image-1.png
new file mode 100644
index 000000000..602cbb263
Binary files /dev/null and b/image-1.png differ
diff --git a/image.png b/image.png
new file mode 100644
index 000000000..c1004c7c8
Binary files /dev/null and b/image.png differ
diff --git a/index.html b/index.html
index ba072edab..63f071aac 100644
--- a/index.html
+++ b/index.html
@@ -3,12 +3,165 @@