Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dialogs): report #787

Merged
merged 8 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions data/ui/menus.ui
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@
<attribute name="action">view.muting</attribute>
</item>
<section>
<item>
<attribute name="label" translatable="yes">Report</attribute>
<attribute name="action">view.report</attribute>
<!-- TODO: Reporting users -->
<attribute name="hidden-when">action-missing</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Block</attribute>
<attribute name="action">view.blocking</attribute>
Expand All @@ -62,6 +56,10 @@
<attribute name="action">view.domain_blocking</attribute>
<!-- <attribute name="hidden-when">action-disabled</attribute> -->
</item>
<item>
<attribute name="label" translatable="yes">Report</attribute>
<attribute name="action">view.report</attribute>
</item>
</section>
</section>

Expand Down
8 changes: 8 additions & 0 deletions src/API/Instance.vala
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
public class Tuba.API.Instance : Entity {
public class Rule : Entity {
public string id { get; set; default=""; }
public string text { get; set; default=""; }
}

public string uri { get; set; default=""; }
public string title { get; set; default=""; }
public string thumbnail { get; set; default=null; }
Expand All @@ -9,11 +14,14 @@ public class Tuba.API.Instance : Entity {
public API.Mastodon.Configuration.Polls? poll_limits { get; set; default = null; }
public int64 upload_limit { get; set; default = 0; }
public API.Pleroma.Instance? pleroma { get; set; default = null; }
public Gee.ArrayList<Rule>? rules { get; set; }

public override Type deserialize_array_type (string prop) {
switch (prop) {
case "languages":
return Type.STRING;
case "rules":
return typeof (Rule);
}

return base.deserialize_array_type (prop);
Expand Down
Loading
Loading