diff --git a/ansible/VERSION b/ansible/VERSION index ebc61bbdc..ced68c150 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.7.25 +v0.7.26 diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index 5847bad01..eaaa6b79e 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -1,4 +1,3 @@ -proxy_cache_path /var/cache/lemmy_frontend levels=1:2 keys_zone=lemmy_frontend_cache:10m max_size=100m use_temp_path=off; limit_req_zone $binary_remote_addr zone=lemmy_ratelimit:10m rate=1r/s; server { @@ -65,13 +64,6 @@ server { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - - # Proxy Cache - proxy_cache lemmy_frontend_cache; - proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; - proxy_cache_revalidate on; - proxy_cache_lock on; - proxy_cache_min_uses 5; } # Redirect pictshare images to pictrs diff --git a/docker/prod/deploy.sh b/docker/prod/deploy.sh index 3b7ee1740..2e8728180 100755 --- a/docker/prod/deploy.sh +++ b/docker/prod/deploy.sh @@ -12,8 +12,6 @@ third_semver=$(echo $new_tag | cut -d "." -f 3) # Setting the version on the front end cd ../../ -echo "export const version: string = '$new_tag';" > "ui/src/version.ts" -git add "ui/src/version.ts" # Setting the version on the backend echo "pub const VERSION: &str = \"$new_tag\";" > "server/src/version.rs" git add "server/src/version.rs" diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index 5dbe9fe35..3affe5f06 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: always lemmy: - image: dessalines/lemmy:v0.7.25 + image: dessalines/lemmy:v0.7.26 ports: - "127.0.0.1:8536:8536" restart: always diff --git a/docs/src/about_guide.md b/docs/src/about_guide.md index 6f709b580..3c5e34b4b 100644 --- a/docs/src/about_guide.md +++ b/docs/src/about_guide.md @@ -35,6 +35,8 @@ Horizontal Rule
\--- | Horizontal Rule
\*\*\* | Horizontal Rule

\`Inline code\` with backticks | |`Inline code` with backticks \`\`\`
\# code block
print '3 backticks or'
print 'indent 4 spaces'
\`\`\` | ····\# code block
····print '3 backticks or'
····print 'indent 4 spaces' | \# code block
print '3 backticks or'
print 'indent 4 spaces' ::: spoiler hidden or nsfw stuff
*a bunch of spoilers here*
::: | |
hidden or nsfw stuff

a bunch of spoilers here

+Some ~subscript~ text | | Some subscript text +Some ^superscript^ text | | Some superscript text [CommonMark Tutorial](https://commonmark.org/help/tutorial/) diff --git a/docs/src/contributing_websocket_http_api.md b/docs/src/contributing_websocket_http_api.md index 5445a23a7..8577a5e56 100644 --- a/docs/src/contributing_websocket_http_api.md +++ b/docs/src/contributing_websocket_http_api.md @@ -952,6 +952,8 @@ Search types are `All, Comments, Posts, Communities, Users, Url` site: Option, admins: Vec, banned: Vec, + online: usize, // This is currently broken + version: String, } } ``` diff --git a/server/Cargo.lock b/server/Cargo.lock index 44fb405ea..a6171cf50 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -3,7 +3,7 @@ [[package]] name = "activitystreams-ext" version = "0.1.0" -source = "git+https://git.asonix.dog/asonix/activitystreams-ext?branch=main#9acc466c7cb550ada31b669a1c47ea088f1c8471" +source = "git+https://yerbamate.dev/asonix/activitystreams-ext?branch=main#2799a4c606467a2f577e1f45f93c6828ec83cfdf" dependencies = [ "activitystreams-new", "serde 1.0.114", @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "activitystreams-new" version = "0.1.0" -source = "git+https://git.asonix.dog/asonix/activitystreams-sketch?branch=main#857d5167dfa13054dd0d21d3d54f8147eea0d546" +source = "git+https://yerbamate.dev/asonix/activitystreams-new?branch=main#857d5167dfa13054dd0d21d3d54f8147eea0d546" dependencies = [ "chrono", "mime", @@ -783,9 +783,9 @@ checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" [[package]] name = "cpuid-bool" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec6763c20301ab0dc67051d1b6f4cc9132ad9e6eddcb1f10c6c53ea6d6ae2183" +checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" [[package]] name = "crc32fast" @@ -798,12 +798,12 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" +checksum = "09ee0cc8804d5393478d743b035099520087a5186f3b93fa58cec08fa62407b6" dependencies = [ + "cfg-if", "crossbeam-utils", - "maybe-uninit", ] [[package]] @@ -1336,6 +1336,15 @@ dependencies = [ "tracing", ] +[[package]] +name = "hashbrown" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb" +dependencies = [ + "autocfg 1.0.0", +] + [[package]] name = "heck" version = "0.3.1" @@ -1448,11 +1457,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe" +checksum = "5b88cd59ee5f71fea89a62248fc8f387d44400cefe05ef548466d61ced9029a7" dependencies = [ "autocfg 1.0.0", + "hashbrown", ] [[package]] @@ -1671,9 +1681,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.72" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9f8082297d534141b30c8d39e9b1773713ab50fdbe4ff30f750d063b3bfd701" +checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" [[package]] name = "linked-hash-map" @@ -1745,12 +1755,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.3.3" @@ -2178,9 +2182,9 @@ checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" [[package]] name = "proc-macro2" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" +checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" dependencies = [ "unicode-xid", ] @@ -2834,9 +2838,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cae2873c940d92e697597c5eee105fb570cd5689c695806f672883653349b" +checksum = "fb7f4c519df8c117855e19dd8cc851e89eb746fe7a73f0157e0d95fdec5369b0" dependencies = [ "proc-macro2", "quote", diff --git a/server/Cargo.toml b/server/Cargo.toml index 06078ba51..356cbced5 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -18,8 +18,8 @@ lemmy_db = { path = "./lemmy_db" } diesel = "1.4.4" diesel_migrations = "1.4.0" dotenv = "0.15.0" -activitystreams-new = { git = "https://git.asonix.dog/asonix/activitystreams-sketch", branch = "main" } -activitystreams-ext = { git = "https://git.asonix.dog/asonix/activitystreams-ext", branch = "main" } +activitystreams-new = { git = "https://yerbamate.dev/asonix/activitystreams-new", branch = "main" } +activitystreams-ext = { git = "https://yerbamate.dev/asonix/activitystreams-ext", branch = "main" } bcrypt = "0.8.0" chrono = { version = "0.4.7", features = ["serde"] } serde_json = { version = "1.0.52", features = ["preserve_order"]} diff --git a/server/src/api/site.rs b/server/src/api/site.rs index 241a80e31..a945d9ec0 100644 --- a/server/src/api/site.rs +++ b/server/src/api/site.rs @@ -3,6 +3,7 @@ use crate::{ api::{claims::Claims, APIError, Oper, Perform}, apub::fetcher::search_by_apub_id, blocking, + version, websocket::{server::SendAllMessage, UserOperation, WebsocketInfo}, DbPool, LemmyError, @@ -110,6 +111,7 @@ pub struct GetSiteResponse { admins: Vec, banned: Vec, pub online: usize, + version: String, } #[derive(Serialize, Deserialize)] @@ -424,6 +426,7 @@ impl Perform for Oper { admins, banned, online, + version: version::VERSION.to_string(), }) } } @@ -666,6 +669,7 @@ impl Perform for Oper { admins, banned, online: 0, + version: version::VERSION.to_string(), }) } } diff --git a/server/src/version.rs b/server/src/version.rs index c87091539..b3b4186c7 100644 --- a/server/src/version.rs +++ b/server/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.7.25"; +pub const VERSION: &str = "v0.7.26"; diff --git a/ui/package.json b/ui/package.json index 1bd07e863..f59b86255 100644 --- a/ui/package.json +++ b/ui/package.json @@ -37,6 +37,8 @@ "markdown-it": "^10.0.0", "markdown-it-container": "^2.0.0", "markdown-it-emoji": "^1.4.0", + "markdown-it-sub": "^1.0.0", + "markdown-it-sup": "^1.0.0", "moment": "^2.24.0", "node-fetch": "^2.6.0", "prettier": "^2.0.4", diff --git a/ui/src/components/admin-settings.tsx b/ui/src/components/admin-settings.tsx index 0034c229e..6fe4e9347 100644 --- a/ui/src/components/admin-settings.tsx +++ b/ui/src/components/admin-settings.tsx @@ -46,6 +46,7 @@ export class AdminSettings extends Component { admins: [], banned: [], online: null, + version: null, }, siteConfigForm: { config_hjson: null, diff --git a/ui/src/components/footer.tsx b/ui/src/components/footer.tsx index cadb6aa39..e911370fa 100644 --- a/ui/src/components/footer.tsx +++ b/ui/src/components/footer.tsx @@ -1,12 +1,41 @@ import { Component } from 'inferno'; import { Link } from 'inferno-router'; -import { repoUrl } from '../utils'; -import { version } from '../version'; import { i18n } from '../i18next'; +import { Subscription } from 'rxjs'; +import { retryWhen, delay, take } from 'rxjs/operators'; +import { WebSocketService } from '../services'; +import { repoUrl, wsJsonToRes } from '../utils'; +import { + UserOperation, + WebSocketJsonResponse, + GetSiteResponse, +} from '../interfaces'; -export class Footer extends Component { +interface FooterState { + version: string; +} + +export class Footer extends Component { + private wsSub: Subscription; + emptyState: FooterState = { + version: null, + }; constructor(props: any, context: any) { super(props, context); + + this.state = this.emptyState; + + this.wsSub = WebSocketService.Instance.subject + .pipe(retryWhen(errors => errors.pipe(delay(3000), take(10)))) + .subscribe( + msg => this.parseMessage(msg), + err => console.error(err), + () => console.log('complete') + ); + } + + componentWillUnmount() { + this.wsSub.unsubscribe(); } render() { @@ -15,7 +44,7 @@ export class Footer extends Component {