Change paste settings and add copyright headers

- There's now a notice reminding people to change the base URL if they
  had a custom base URL and change the paste type (that was something I
  personally had problems with when I was testing, so a reminder was
  helpful for me).

- Broke down some of the long lines on APIPage.cpp to be more readable.

- Added copyright headers where they were missing.

- Changed the paste service display names to the names they are more
  commonly known by.

- Changed the default hastebin base URL to https://hst.sh due to the
  acquisition of https://hastebin.com by Toptal.
This commit is contained in:
Lenny McLennington
2022-05-13 17:48:19 +01:00
parent 35f71f5793
commit caf6d02728
7 changed files with 95 additions and 14 deletions

View File

@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* PolyMC - Minecraft Launcher
* Copyright (C) 2022 Lenny McLennington <lenny@sneed.church>
* Copyright (C) 2022 Swirl <swurl@swurl.xyz>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -43,10 +45,10 @@
#include <QFile>
std::array<PasteUpload::PasteTypeInfo, 4> PasteUpload::PasteTypes = {
{{"0x0", "https://0x0.st", ""},
{"hastebin", "https://hastebin.com", "/documents"},
{"paste (paste.gg)", "https://paste.gg", "/api/v1/pastes"},
{"mclogs", "https://api.mclo.gs", "/1/log"}}};
{{"0x0.st", "https://0x0.st", ""},
{"hastebin", "https://hst.sh", "/documents"},
{"paste.gg", "https://paste.gg", "/api/v1/pastes"},
{"mclo.gs", "https://api.mclo.gs", "/1/log"}}};
PasteUpload::PasteUpload(QWidget *window, QString text, QString baseUrl, PasteType pasteType) : m_window(window), m_baseUrl(baseUrl), m_pasteType(pasteType), m_text(text.toUtf8())
{

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* PolyMC - Minecraft Launcher
* Copyright (C) 2022 Lenny McLennington <lenny@sneed.church>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -45,7 +46,7 @@ class PasteUpload : public Task
{
Q_OBJECT
public:
enum PasteType : unsigned int {
enum PasteType : int {
// 0x0.st
NullPointer,
// hastebin.com