Removed changelog code

the domain doesn't exist anymore
This commit is contained in:
flash 2017-03-24 17:48:05 +01:00
parent 42798742ac
commit 948e8fcee4
9 changed files with 0 additions and 144 deletions

View file

@ -78,9 +78,6 @@ show_errors = false
; Enable twig (the templating engine) debug mode
twig_debug = false
; Show a small version of the changelog loaded from sakura.flash.moe
show_changelog = false
; Host for the mahou serve command
host = localhost:8000

View file

@ -1,88 +0,0 @@
namespace Sakura
{
export class Changelog
{
private static Client: AJAX;
private static Element: HTMLDivElement;
private static Fetch: number = 0;
private static Colours: string[] = [
'inherit', // Unknown
'#2A2', // Add
'#2AA', // Update
'#2AA', // Fix
'#A22', // Remove
'#62C', // Export
'#C44', // Revert
];
public static Build(target: HTMLElement)
{
this.Client = new AJAX;
this.Element = <HTMLDivElement>DOM.Create('table', 'changelog sidepanel-table');
this.Element.style.borderSpacing = '0 1px';
var title: HTMLDivElement = <HTMLDivElement>DOM.Create('div', 'content__header content__header--alt'),
link: HTMLLinkElement = <HTMLLinkElement>DOM.Create('a', 'underline');
title.style.marginBottom = '1px';
link.innerText = 'Changelog';
link.href = Config.ChangelogUrl;
link.target = '_blank';
link.style.color = 'inherit';
DOM.Append(title, link);
DOM.Append(target, title);
DOM.Append(target, this.Element);
this.Client.SetUrl(Config.ChangelogUrl + Config.ChangelogApi);
this.Client.AddCallback(200, (client: AJAX) => {
Changelog.Add(<IChangelogDate>client.JSON());
if (Changelog.Fetch < 2) {
Changelog.Fetch++;
Changelog.Client.SetUrl(Config.ChangelogUrl + Config.ChangelogApi + Changelog.Fetch);
Changelog.Client.Start(HTTPMethod.GET);
}
});
this.Client.SetUrl(Config.ChangelogUrl + Config.ChangelogApi + Changelog.Fetch);
this.Client.Start(HTTPMethod.GET);
}
private static Add(changelog: IChangelogDate)
{
var header: HTMLTableRowElement = <HTMLTableRowElement>DOM.Create('tr', 'changelog__row changelog__row--header'),
headerInner: HTMLTableHeaderCellElement = <HTMLTableHeaderCellElement>DOM.Create('th', 'changelog__header sidepanel-table__head');
headerInner.innerText = changelog.date;
headerInner.style.fontSize = '1.2em';
headerInner.colSpan = 2;
DOM.Append(header, headerInner);
DOM.Append(this.Element, header);
for (var _i in changelog.changes)
{
var change: IChangelogChange = changelog.changes[_i],
row: HTMLTableRowElement = <HTMLTableRowElement>DOM.Create('tr', 'changelog__row'),
action: HTMLTableCellElement = <HTMLTableCellElement>DOM.Create('td', 'changelog__column sidepanel-table__column'),
message: HTMLTableCellElement = <HTMLTableCellElement>DOM.Create('td', 'changelog__column sidepanel-table__column');
action.innerText = change.action.name;
action.style.backgroundColor = this.Colours[change.action.id];
action.style.borderBottom = '1px solid ' + this.Colours[change.action.id];
message.innerText = change.message;
message.style.borderBottom = '1px solid ' + this.Colours[change.action.id];
message.style.textAlign = 'left';
DOM.Append(row, action);
DOM.Append(row, message);
DOM.Append(this.Element, row);
}
}
}
}

View file

@ -5,8 +5,6 @@ namespace Sakura
public static UserId: number = 0;
public static SessionId: string = "";
public static LoggedIn: boolean = false;
public static ChangelogUrl: string = "https://sakura.flash.moe/";
public static ChangelogApi: string = "api.php/";
public static ForumTitleMin: number = 0;
public static ForumTitleMax: number = 0;
public static ForumTextMin: number = 0;

View file

@ -1,8 +0,0 @@
namespace Sakura
{
export interface IChangelogAction
{
id: number;
name: string;
}
}

View file

@ -1,12 +0,0 @@
namespace Sakura
{
export interface IChangelogChange
{
id: number;
action?: IChangelogAction;
contributor?: IChangelogContributor;
major: boolean;
url: string;
message: string;
}
}

View file

@ -1,9 +0,0 @@
namespace Sakura
{
export interface IChangelogContributor
{
id: number;
name: string;
url: string;
}
}

View file

@ -1,9 +0,0 @@
namespace Sakura
{
export interface IChangelogDate
{
date: string;
release?: IChangelogRelease;
changes: IChangelogChange[];
}
}

View file

@ -1,9 +0,0 @@
namespace Sakura
{
export interface IChangelogRelease
{
id: number;
colour: string;
name: string;
}
}

View file

@ -123,10 +123,6 @@
Yuuno.Main.Startup();
{% if config('dev.show_changelog') and server['REQUEST_URI'] == '/' %}
Sakura.Changelog.Build(Sakura.DOM.ID('indexPanel'));
{% endif %}
{% if config('dev.show_errors') %}
window.addEventListener("error", function () {
Yuuno.Notifications.Display({