aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
authorConfuSomu2023-08-15 19:55:52 -0400
committerConfuSomu2023-08-15 20:16:07 -0400
commitdef9f251739e9a0d6d0ff1c98dc4562dade3e9ef (patch)
tree1e36bddaf8d04312cf81f5335f3afedc6aa5c784 /src/templates
parentade98b4cf6630635e2fdbf84ac29fe83a79cc371 (diff)
downloadActorViewer-def9f251739e9a0d6d0ff1c98dc4562dade3e9ef.tar
ActorViewer-def9f251739e9a0d6d0ff1c98dc4562dade3e9ef.tar.gz
ActorViewer-def9f251739e9a0d6d0ff1c98dc4562dade3e9ef.zip
Implement "fill address" in instance settings
Implement the "fill address" action in the instance login settings frame that is in the network tab.
Diffstat (limited to 'src/templates')
0 files changed, 0 insertions, 0 deletions
#008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#pragma once

#include "src/types.h"
#include <QString>
#include <QStringList>
#include <vector>

enum struct APObjectType {NOTE, QUESTION, UNKNOWN};

// All these fields (including APAttachmentFields, etc. in other files) are made to map to the fields present in the ActivityStream JSON's "object" for very easy construction.
// There are additional fields that we don't use so they are not included in the objects (including parent and APActivity).

struct APQuestionFields {
    QString end_time;
    QString closed_time;
    int total_votes;
    struct Option {
        QString name;
        int votes;
    };
    std::vector<Option> poll_options;
};

struct APAttachmentFields {
    QString path;
    QString filename; // "nicer" filename
    QString media_type;
    QString name;
};

struct APObjectFields {
    QStringList to_actors; // Start APObject
    QStringList cc_actors;
    QString by_actor;
    QString object_url;
    QString web_url;
    QString reply_to_url;
    QString published;
    std::vector<APAttachmentFields> attachments; // End APObject
    QStringList languages; // This is taken from "content_map"
    QString content;
    QString summary;
    StatusType visibility; // status type discovery is better left to the archive/API parser as this can very between fedi implementations and archive formats

    APQuestionFields question = {}; // only fill if it's of type Question.
};