Compare commits

...

7 Commits

Author SHA1 Message Date
Tykayn 74a3757e1e Merge tag '1.0.7' into chapril 2021-03-01 21:29:45 +01:00
Thomas Citharel 3b00ad66c9
Bump version to 1.0.7
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-02-26 16:34:51 +01:00
Thomas Citharel 7997a10c29
Improve search form display
Closes #557

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-02-26 16:30:37 +01:00
Thomas Citharel 0b6d21fe7a
Fix editing a group discussion
Make sure media is preloaded

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-02-26 16:30:23 +01:00
Thomas Citharel c934889b58
Allow every origin for connect-src because of Webfinger
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-02-26 12:07:23 +01:00
Thomas Citharel c4b997bc52
Fix accessing group event unlogged
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-02-26 12:07:14 +01:00
Thomas Citharel c6590415a3 Fix accessing group event unlogged
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-02-19 17:12:36 +01:00
9 changed files with 51 additions and 29 deletions

View File

@ -5,7 +5,17 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 1.0.6 - 04-02-2020
## 1.0.7 - 27-02-2021
### Fixed
- Fixed accessing group event unlogged
- Fixed broken redirection with Webfinger due to strict connect-src
- Fixed editing group discussions
- Fixed search form display
- Fixed wrong year in CHANGELOG.md
## 1.0.6 - 04-02-2021
### Added
@ -17,13 +27,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed sending events & posts to group followers
- Fixed redirection after deleting an event
## 1.0.5 - 27-01-2020
## 1.0.5 - 27-01-2021
### Fixed
- Fixed duplicate entries in search with empty search query
## 1.0.4 - 26-01-2020
## 1.0.4 - 26-01-2021
### Added

View File

@ -1,6 +1,6 @@
{
"name": "mobilizon",
"version": "1.0.6",
"version": "1.0.7",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

View File

@ -296,11 +296,9 @@ export default class Comment extends Vue {
}
get commentFromOrganizer(): boolean {
return (
this.event.organizerActor !== undefined &&
this.comment.actor != null &&
this.comment.actor.id === this.event.organizerActor.id
);
const organizerId =
this.event?.organizerActor?.id || this.event?.attributedTo?.id;
return organizerId !== undefined && this.comment?.actor?.id === organizerId;
}
get commentId(): string {

View File

@ -320,11 +320,9 @@ export default class CommentTree extends Vue {
}
get isEventOrganiser(): boolean {
return (
this.currentActor.id !== undefined &&
this.event.organizerActor !== undefined &&
this.currentActor.id === this.event.organizerActor.id
);
const organizerId =
this.event?.organizerActor?.id || this.event?.attributedTo?.id;
return organizerId !== undefined && this.currentActor?.id === organizerId;
}
get areCommentsClosed(): boolean {
@ -335,7 +333,7 @@ export default class CommentTree extends Vue {
}
get isAbleToComment(): boolean {
if (this.currentActor && this.currentActor.id) {
if (this.currentActor?.id) {
return this.areCommentsClosed || this.isEventOrganiser;
}
return false;

View File

@ -578,7 +578,7 @@ export default class EditEvent extends Vue {
}
private getDefaultActor() {
if (this.event.organizerActor && this.event.organizerActor.id) {
if (this.event.organizerActor?.id) {
return this.event.organizerActor;
}
return this.currentActor;
@ -724,7 +724,7 @@ export default class EditEvent extends Vue {
get isCurrentActorOrganizer(): boolean {
return !(
this.eventId &&
this.event.organizerActor &&
this.event.organizerActor?.id !== undefined &&
this.currentActor.id !== this.event.organizerActor.id
) as boolean;
}
@ -821,19 +821,17 @@ export default class EditEvent extends Vue {
}
get attributedToEqualToOrganizerActor(): boolean {
return (this.event.organizerActor &&
this.event.attributedTo &&
this.event.attributedTo.id === this.event.organizerActor.id) as boolean;
return (this.event.organizerActor?.id !== undefined &&
this.event.attributedTo?.id === this.event.organizerActor?.id) as boolean;
}
/**
* Build variables for Event GraphQL creation query
*/
private async buildVariables() {
this.event.organizerActor =
this.event.organizerActor && this.event.organizerActor.id
? this.event.organizerActor
: this.currentActor;
this.event.organizerActor = this.event.organizerActor?.id
? this.event.organizerActor
: this.currentActor;
let res = this.event.toEditJSON();
if (this.event.organizerActor) {
res = Object.assign(res, {

View File

@ -31,7 +31,7 @@
/>
</b-field>
<b-field :label="$t('Radius')" label-for="radius">
<b-select v-model="radius" id="radius">
<b-select v-model="radius" id="radius" expanded>
<option
v-for="(radiusOption, index) in radiusOptions"
:key="index"
@ -42,7 +42,12 @@
</b-select>
</b-field>
<b-field :label="$t('Date')" label-for="date">
<b-select v-model="when" id="date" :disabled="activeTab !== 0">
<b-select
v-model="when"
id="date"
:disabled="activeTab !== 0"
expanded
>
<option
v-for="(option, index) in options"
:key="index"
@ -463,5 +468,16 @@ form {
::v-deep .field label.label {
margin-bottom: 0;
}
.field.is-expanded:last-child > .field-body > .field.is-grouped {
flex-wrap: wrap;
flex: 1;
.field {
flex: 1 0 auto;
&:first-child {
flex: 3 0 300px;
}
}
}
}
</style>

View File

@ -43,7 +43,8 @@ defmodule Mobilizon.Discussions do
:replies,
:tags,
:mentions,
:discussion
:discussion,
:media
]
@discussion_preloads [

View File

@ -52,8 +52,9 @@ defmodule Mobilizon.Web.Plugs.HTTPSecurityPlug do
media_src = ["media-src 'self' "] ++ Config.get([:http_security, :csp_policy, :media_src])
# Connect-src is available for any origin because of webfinger query to redirect to content
connect_src =
["connect-src 'self' blob: ", static_url, ?\s, websocket_url] ++
["connect-src 'self' * blob: ", static_url, ?\s, websocket_url] ++
Config.get([:http_security, :csp_policy, :connect_src])
script_src =

View File

@ -1,7 +1,7 @@
defmodule Mobilizon.Mixfile do
use Mix.Project
@version "1.0.6"
@version "1.0.7"
def project do
[