diff --git a/.eslintrc.json b/.eslintrc.json
index cc1bff1e..3a60a6bb 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -18,6 +18,7 @@
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
+ "@typescript-eslint/no-empty-function": 0,
"arrow-body-style": 0,
"curly": 0,
"eol-last": 0,
@@ -37,7 +38,7 @@
"no-useless-constructor": 0,
"no-useless-escape": 0,
"no-var": 0,
- "prefer-const": 0,
+ "prefer-const": 1,
"prefer-rest-params": 0,
"quote-props": 0,
"unicorn/filename-case": 0
diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md
deleted file mode 100644
index 69b116fd..00000000
--- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-name: "\U0001F41E Bug Report"
-about: Create a report to help us improve Lemmy
-title: ""
-labels: bug
-assignees: ""
----
-
-Found a bug? Please fill out the sections below. 👍
-
-For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy)
-
-### Issue Summary
-
-A summary of the bug.
-
-### Steps to Reproduce
-
-1. (for example) I clicked login, and an endless spinner show up.
-2. I tried to install lemmy via this guide, and I'm getting this error.
-3. ...
-
-### Technical details
-
-- Please post your log: `sudo docker-compose logs > lemmy_log.out`.
-- What OS are you trying to install lemmy on?
-- Any browser console errors?
diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
new file mode 100644
index 00000000..64579090
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
@@ -0,0 +1,47 @@
+name: "\U0001F41E Bug Report"
+description: Create a report to help us improve lemmy-ui
+title: "[Bug]: "
+labels: ["bug", "triage"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Found a bug? Please fill out the sections below. 👍
+ Thanks for taking the time to fill out this bug report!
+ For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy)
+ - type: textarea
+ id: summary
+ attributes:
+ label: Summary
+ description: A summary of the bug.
+ validations:
+ required: true
+ - type: textarea
+ id: reproduce
+ attributes:
+ label: Steps to Reproduce
+ description: |
+ Describe the steps to reproduce the bug.
+ The better your description is _(go 'here', click 'there'...)_ the fastest you'll get an _(accurate)_ resolution.
+ value: |
+ 1.
+ 2.
+ 3.
+ validations:
+ required: true
+ - type: textarea
+ id: technical
+ attributes:
+ label: Technical Details
+ description: |
+ - Any browser console errors?
+ validations:
+ required: true
+ - type: input
+ id: lemmy-ui-version
+ attributes:
+ label: Version
+ description: Which Lemmy UI version do you use? Displayed in the footer.
+ placeholder: ex. 0.17.4-rc.4
+ validations:
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
deleted file mode 100644
index bfeca29a..00000000
--- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
+++ /dev/null
@@ -1,43 +0,0 @@
----
-name: "\U0001F680 Feature request"
-about: Suggest an idea for improving Lemmy
-title: ""
-labels: enhancement
-assignees: ""
----
-
-For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy)
-
-### Is your proposal related to a problem?
-
-
-
-(Write your answer here.)
-
-### Describe the solution you'd like
-
-
-
-(Describe your proposed solution here.)
-
-### Describe alternatives you've considered
-
-
-
-(Write your answer here.)
-
-### Additional context
-
-
-
-(Write your answer here.)
diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
new file mode 100644
index 00000000..375d06d3
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
@@ -0,0 +1,41 @@
+name: "\U0001F680 Feature request"
+description: Suggest an idea for improving Lemmy
+labels: ["enhancement"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Have a suggestion about Lemmy's UI?
+ For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy)
+ - type: textarea
+ id: problem
+ attributes:
+ label: Is your proposal related to a problem?
+ description: |
+ Provide a clear and concise description of what the problem is.
+ For example, "I'm always frustrated when..."
+ validations:
+ required: true
+ - type: textarea
+ id: solution
+ attributes:
+ label: Describe the solution you'd like.
+ description: |
+ Provide a clear and concise description of what you want to happen.
+ validations:
+ required: true
+ - type: textarea
+ id: alternatives
+ attributes:
+ label: Describe alternatives you've considered.
+ description: |
+ Let us know about other solutions you've tried or researched.
+ validations:
+ required: true
+ - type: textarea
+ id: context
+ attributes:
+ label: Additional context
+ description: |
+ Is there anything else you can add about the proposal?
+ You might want to link to related issues here, if you haven't already.
diff --git a/.github/ISSUE_TEMPLATE/QUESTION.md b/.github/ISSUE_TEMPLATE/QUESTION.md
deleted file mode 100644
index 15325873..00000000
--- a/.github/ISSUE_TEMPLATE/QUESTION.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-name: "? Question"
-about: General questions about Lemmy
-title: ""
-labels: question
-assignees: ""
----
-
-What's the question you have about lemmy?
diff --git a/.github/ISSUE_TEMPLATE/QUESTION.yml b/.github/ISSUE_TEMPLATE/QUESTION.yml
new file mode 100644
index 00000000..460d9a44
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/QUESTION.yml
@@ -0,0 +1,17 @@
+name: "? Question"
+description: General questions about Lemmy
+title: "Question: "
+labels: ["question", "triage"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Have a question about Lemmy's UI?
+ Please check the docs first: https://join-lemmy.org/docs/en/index.html
+ - type: textarea
+ id: question
+ attributes:
+ label: Question
+ description: What's the question you have about Lemmy's UI?
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/hexbear.md b/.github/ISSUE_TEMPLATE/hexbear.md
deleted file mode 100644
index 65483df8..00000000
--- a/.github/ISSUE_TEMPLATE/hexbear.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-name: Hexbear
-about: For hexbear issues
-title: ""
-labels: hexbear
-assignees: ""
----
-
-For hexbear-related issues
diff --git a/.github/ISSUE_TEMPLATE/hexbear.yml b/.github/ISSUE_TEMPLATE/hexbear.yml
new file mode 100644
index 00000000..199b97e9
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/hexbear.yml
@@ -0,0 +1,11 @@
+name: "Hexbear"
+description: For hexbear issues
+labels: ["hexbear", "triage"]
+body:
+ - type: textarea
+ id: question
+ attributes:
+ label: Question
+ description: What's the question you have about hexbear?
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.woodpecker.yml b/.woodpecker.yml
index 8d3c6f1c..656903a1 100644
--- a/.woodpecker.yml
+++ b/.woodpecker.yml
@@ -1,6 +1,6 @@
pipeline:
fetch_git_submodules:
- image: node:14-alpine
+ image: node:alpine
commands:
- apk add git
- git submodule init
@@ -8,93 +8,27 @@ pipeline:
# - git fetch --tags
yarn:
- image: node:14-alpine
+ image: node:alpine
commands:
- yarn
yarn_lint:
- image: node:14-alpine
+ image: node:alpine
commands:
- yarn lint
yarn_build_dev:
- image: node:14-alpine
+ image: node:alpine
commands:
- yarn build:dev
- nightly_build:
- image: plugins/docker
+ publish_release_docker:
+ image: woodpeckerci/plugin-docker-buildx
+ secrets: [docker_username, docker_password]
settings:
- dockerfile: Dockerfile
repo: dessalines/lemmy-ui
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- tags:
- - dev
- when:
- event:
- - cron
-
- publish_release_docker_image_amd:
- image: plugins/docker
- settings:
dockerfile: Dockerfile
- repo: dessalines/lemmy-ui
+ platforms: linux/amd64
auto_tag: true
- auto_tag_suffix: linux-amd64
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- when:
- event: tag
- platform: linux/arm64
-
- publish_release_docker_image_arm:
- image: plugins/docker
- settings:
- dockerfile: Dockerfile
- repo: dessalines/lemmy-ui
- auto_tag: true
- auto_tag_suffix: linux-arm64
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- when:
- event: tag
- platform: linux/amd64
-
- publish_release_docker_manifest:
- image: plugins/manifest
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- target: "dessalines/lemmy-ui:${CI_COMMIT_TAG}"
- template: "dessalines/lemmy-ui:${CI_COMMIT_TAG}-OS-ARCH"
- platforms:
- - linux/amd64
- - linux/arm64
- ignore_missing: true
- when:
- event: tag
-
- publish_latest_release_docker_manifest:
- image: plugins/manifest
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- target: "dessalines/lemmy-ui:latest"
- template: "dessalines/lemmy-ui:${CI_COMMIT_TAG}-OS-ARCH"
- platforms:
- - linux/amd64
- - linux/arm64
- ignore_missing: true
when:
event: tag
diff --git a/README.md b/README.md
index 6c9ef63a..f1917bff 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# lemmy-ui
+# Lemmy-UI
The official web app for [Lemmy](https://github.com/LemmyNet/lemmy), written in inferno.
@@ -13,7 +13,6 @@ The following environment variables can be used to configure lemmy-ui:
| `LEMMY_UI_HOST` | `string` | `0.0.0.0:1234` | The IP / port that the lemmy-ui isomorphic node server is hosted at. |
| `LEMMY_UI_LEMMY_INTERNAL_HOST` | `string` | `0.0.0.0:8536` | The internal IP / port that lemmy is hosted at. Often `lemmy:8536` if using docker. |
| `LEMMY_UI_LEMMY_EXTERNAL_HOST` | `string` | `0.0.0.0:8536` | The external IP / port that lemmy is hosted at. Often `DOMAIN.TLD`. |
-| `LEMMY_UI_LEMMY_WS_HOST` | `string` | `0.0.0.0:8536` | An alternate location for lemmy's websocket address. Not usually necessary. |
| `LEMMY_UI_HTTPS` | `bool` | `false` | Whether to use https. |
| `LEMMY_UI_EXTRA_THEMES_FOLDER` | `string` | `./extra_themes` | A location for additional lemmy css themes. |
| `LEMMY_UI_DEBUG` | `bool` | `false` | Loads the [Eruda](https://github.com/liriliri/eruda) debugging utility. |
diff --git a/deploy.sh b/deploy.sh
index ce125fcd..e919779a 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -4,7 +4,8 @@ set -e
new_tag="$1"
# Old deploy
-# sudo docker build . --tag dessalines/lemmy-ui:$new_tag
+# sudo docker build . --tag dessalines/lemmy-ui:$new_tag --platform=linux/amd64 --push
+# sudo docker build . --tag dessalines/lemmy-ui:$new_tag --platform=linux/amd64
# sudo docker push dessalines/lemmy-ui:$new_tag
# Upgrade version
diff --git a/lemmy-translations b/lemmy-translations
index ddf0d3a4..f45ddff2 160000
--- a/lemmy-translations
+++ b/lemmy-translations
@@ -1 +1 @@
-Subproject commit ddf0d3a4dcfba5eddbcdb702db2470b52abb3815
+Subproject commit f45ddff206adb52ab0ac7555bf14978edac5d2f2
diff --git a/package.json b/package.json
index 43b8883b..fd7cf4ad 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "lemmy-ui",
- "version": "0.17.1",
+ "version": "0.18.0-beta.6",
"description": "An isomorphic UI for lemmy",
"repository": "https://github.com/LemmyNet/lemmy-ui",
"license": "AGPL-3.0",
@@ -17,16 +17,9 @@
"start": "yarn build:dev --watch"
},
"lint-staged": {
- "*.{ts,tsx,js}": [
- "prettier --write",
- "eslint --fix"
- ],
- "*.{css, scss}": [
- "prettier --write"
- ],
- "package.json": [
- "sortpack"
- ]
+ "*.{ts,tsx,js}": ["prettier --write", "eslint --fix"],
+ "*.{css, scss}": ["prettier --write"],
+ "package.json": ["sortpack"]
},
"dependencies": {
"@babel/plugin-proposal-decorators": "^7.21.0",
@@ -49,6 +42,7 @@
"emoji-mart": "^5.4.0",
"emoji-short-name": "^2.0.0",
"express": "~4.18.2",
+ "history": "^5.3.0",
"html-to-text": "^9.0.5",
"i18next": "^22.4.15",
"inferno": "^8.1.1",
@@ -60,7 +54,7 @@
"inferno-server": "^8.1.1",
"isomorphic-cookie": "^1.2.4",
"jwt-decode": "^3.1.2",
- "lemmy-js-client": "0.17.2-rc.17",
+ "lemmy-js-client": "0.17.2-rc.24",
"lodash": "^4.17.21",
"markdown-it": "^13.0.1",
"markdown-it-container": "^3.0.0",
@@ -73,7 +67,6 @@
"moment": "^2.29.4",
"register-service-worker": "^1.7.2",
"run-node-webpack-plugin": "^1.3.0",
- "rxjs": "^7.8.1",
"sanitize-html": "^2.10.0",
"sass": "^1.62.1",
"sass-loader": "^13.2.2",
@@ -85,8 +78,7 @@
"tributejs": "^5.1.3",
"webpack": "5.82.1",
"webpack-cli": "^5.1.1",
- "webpack-node-externals": "^3.0.0",
- "websocket-ts": "^1.1.1"
+ "webpack-node-externals": "^3.0.0"
},
"devDependencies": {
"@babel/core": "^7.21.8",
@@ -120,6 +112,7 @@
"typescript": "^5.0.4",
"webpack-dev-server": "4.15.0"
},
+ "packageManager": "yarn@1.22.19",
"engines": {
"node": ">=8.9.0"
},
diff --git a/src/assets/css/main.css b/src/assets/css/main.css
index 5315aa37..e1adfc53 100644
--- a/src/assets/css/main.css
+++ b/src/assets/css/main.css
@@ -75,6 +75,11 @@
font-size: 1.2rem;
}
+.md-div pre {
+ white-space: pre;
+ overflow-x: auto;
+}
+
.md-div table {
border-collapse: collapse;
width: 100%;
@@ -275,6 +280,10 @@ hr {
-ms-filter: blur(10px);
}
+.img-cover {
+ object-fit: cover;
+}
+
.img-expanded {
max-height: 90vh;
}
diff --git a/src/assets/css/themes/_variables.bootstra_386-tmp.scss b/src/assets/css/themes/_variables.bootstra_386-tmp.scss
deleted file mode 100644
index 7804f9b3..00000000
--- a/src/assets/css/themes/_variables.bootstra_386-tmp.scss
+++ /dev/null
@@ -1,865 +0,0 @@
-//
-// Variables
-// --------------------------------------------------
-
-//== Colors
-//
-//## Gray and brand colors for use across Bootstrap.
-
-//// colors from bs-2
-// Grays
-// -------------------------
-$black: #000;
-$grayDark: #555;
-$gray: #bbb;
-$grayLight: #bbb;
-$white: #fff;
-
-// Accent colors
-// -------------------------
-$blue: #5555ff;
-$cyan: #55ffff;
-$cyanDark: #00aaaa;
-$blueDark: #000084;
-$green: #55ff55;
-$greenDark: #00aa00;
-$magenta: #ff55ff;
-$magentaDark: #aa00aa;
-$red: #ff5555;
-$redDark: #aa0000;
-$yellow: #fefe54;
-$brown: #aa5500;
-$orange: #a85400;
-$pink: #fe54fe;
-$purple: #fe5454;
-
-// end colors
-
-$gray-base: $gray;
-$gray-darker: $grayDark;
-$gray-dark: $grayDark;
-$gray-light: $grayLight;
-$gray-lighter: $grayLight;
-
-$brand-primary: $gray;
-$brand-primary-bg: $cyanDark;
-$brand-success: $greenDark;
-$brand-info: $brown;
-$brand-warning: $magentaDark;
-$brand-danger: $redDark;
-
-//== Scaffolding
-//
-//## Settings for some of the most global styles.
-
-//** Background color for `
`.
-$body-bg: $blueDark;
-//** Global text color on ``.
-$text-color: $gray-light;
-
-//** Global textual link color.
-$link-color: $brand-primary;
-//** Link hover color set via `darken()` function.
-$link-hover-color: $white;
-//** Link hover decoration.
-$link-hover-decoration: none;
-
-//== Typography
-//
-//## Font, line-height, and color for body text, headings, and more.
-
-$font-family-sans-serif: DOS, Monaco, Menlo, Consolas, "Courier New", monospace;
-$font-family-serif: DOS, Monaco, Menlo, Consolas, "Courier New", monospace;
-//** Default monospace fonts for ``, ``, and `
`.
-$font-family-monospace: DOS, Monaco, Menlo, Consolas, "Courier New", monospace;
-$font-family-base: $font-family-sans-serif;
-
-$baseWidth: 10px;
-$font-size-base: 18px;
-$font-size-large: $font-size-base;
-$font-size-small: $font-size-base;
-
-$font-size-h1: $font-size-base;
-$font-size-h2: $font-size-base;
-$font-size-h3: $font-size-base;
-$font-size-h4: $font-size-base;
-$font-size-h5: $font-size-base;
-$font-size-h6: $font-size-base;
-
-//** Unit-less `line-height` for use in components like buttons.
-$baseLineHeight: 19px;
-$line-height-base: $baseLineHeight;
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-$line-height-computed: $line-height-base;
-
-//** By default, this inherits from the ``.
-$headings-font-family: inherit;
-$headings-font-weight: normal;
-$headings-line-height: $line-height-base;
-$headings-color: inherit;
-
-$space: $baseWidth;
-$halfbaseLineHeight: ($baseLineHeight / 2);
-$borderWidth: 2px;
-$baseLineWidth: ($baseLineHeight / 2);
-$halfSpace: ($baseWidth / 2);
-$lhsNB: ($baseWidth / 2 + 1);
-$rhsNB: ($baseWidth / 2 - 1);
-$lhs: ($lhsNB - ($borderWidth));
-$rhs: ($rhsNB - ($borderWidth / 2));
-$tsNB: ($baseLineHeight / 2);
-$bsNB: $tsNB;
-$ts: ($tsNB - ($borderWidth / 2));
-$bs: $ts;
-$tsMargin: 3px;
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-$icon-font-path: "../fonts/";
-//** File name for all font files.
-$icon-font-name: "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-$icon-font-svg-id: "glyphicons_halflingsregular";
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-$padding-base-vertical: 0px;
-$padding-base-horizontal: 0px;
-
-$padding-large-vertical: 0px;
-$padding-large-horizontal: $halfSpace;
-
-$padding-small-vertical: 0px;
-$padding-small-horizontal: 0px;
-
-$padding-xs-vertical: 0px;
-$padding-xs-horizontal: 0px;
-
-$line-height-large: $baseLineHeight;
-$line-height-small: $baseLineHeight;
-
-$border-radius-base: 0;
-$border-radius-large: 0;
-$border-radius-small: 0;
-
-//** Global color for active items (e.g., navs or dropdowns).
-$component-active-color: $white;
-//** Global background color for active items (e.g., navs or dropdowns).
-$component-active-bg: $black;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-$caret-width-base: 4px;
-//** Carets increase slightly in size for larger components.
-$caret-width-large: 5px;
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for `
`s and `
`s.
-$table-cell-padding: $ts $rhs $bs $lhs;
-//** Padding for cells in `.table-condensed`.
-$table-condensed-cell-padding: $ts $rhs $bs $lhs;
-
-//** Default background color used for all tables.
-$table-bg: transparent;
-//** Background color used for `.table-striped`.
-$table-bg-accent: $black;
-//** Background color used for `.table-hover`.
-$table-bg-hover: #f5f5f5;
-$table-bg-active: $table-bg-hover;
-
-//** Border color for table and cell borders.
-$table-border-color: $gray;
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-$btn-font-weight: normal;
-
-$btn-default-color: $black;
-$btn-default-bg: $grayLight;
-$btn-default-border: $grayLight;
-
-$btn-primary-color: $black;
-$btn-primary-bg: $cyanDark;
-$btn-primary-border: $grayLight;
-
-$btn-success-color: #fff;
-$btn-success-bg: $brand-success;
-$btn-success-border: $btn-success-bg;
-
-$btn-info-color: #fff;
-$btn-info-bg: $brand-info;
-$btn-info-border: $btn-info-bg;
-
-$btn-warning-color: #fff;
-$btn-warning-bg: $brand-warning;
-$btn-warning-border: $btn-warning-bg;
-
-$btn-danger-color: #fff;
-$btn-danger-bg: $brand-danger;
-$btn-danger-border: $btn-danger-bg;
-
-$btn-link-disabled-color: $gray-light;
-
-//== Forms
-//
-//##
-
-//** `` background color
-$input-bg: $cyanDark;
-//** `` background color
-$input-bg-disabled: $gray-lighter;
-
-//** Text color for ``s
-$input-color: $white;
-//** `` border color
-$input-border: #ccc;
-
-// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
-//** Default `.form-control` border radius
-// This has no effect on `