diff --git a/config/config.example.ini b/config/config.example.ini index 8d252ab..8b39921 100644 --- a/config/config.example.ini +++ b/config/config.example.ini @@ -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 diff --git a/resources/assets/typescript/Sakura/Changelog.ts b/resources/assets/typescript/Sakura/Changelog.ts deleted file mode 100644 index d04b560..0000000 --- a/resources/assets/typescript/Sakura/Changelog.ts +++ /dev/null @@ -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 = DOM.Create('table', 'changelog sidepanel-table'); - - this.Element.style.borderSpacing = '0 1px'; - - var title: HTMLDivElement = DOM.Create('div', 'content__header content__header--alt'), - link: 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(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 = DOM.Create('tr', 'changelog__row changelog__row--header'), - headerInner: 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 = DOM.Create('tr', 'changelog__row'), - action: HTMLTableCellElement = DOM.Create('td', 'changelog__column sidepanel-table__column'), - message: 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); - } - } - } -} diff --git a/resources/assets/typescript/Sakura/Config.ts b/resources/assets/typescript/Sakura/Config.ts index ba12e71..ca1031e 100644 --- a/resources/assets/typescript/Sakura/Config.ts +++ b/resources/assets/typescript/Sakura/Config.ts @@ -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; diff --git a/resources/assets/typescript/Sakura/IChangelogAction.ts b/resources/assets/typescript/Sakura/IChangelogAction.ts deleted file mode 100644 index 75a6d64..0000000 --- a/resources/assets/typescript/Sakura/IChangelogAction.ts +++ /dev/null @@ -1,8 +0,0 @@ -namespace Sakura -{ - export interface IChangelogAction - { - id: number; - name: string; - } -} diff --git a/resources/assets/typescript/Sakura/IChangelogChange.ts b/resources/assets/typescript/Sakura/IChangelogChange.ts deleted file mode 100644 index c60e046..0000000 --- a/resources/assets/typescript/Sakura/IChangelogChange.ts +++ /dev/null @@ -1,12 +0,0 @@ -namespace Sakura -{ - export interface IChangelogChange - { - id: number; - action?: IChangelogAction; - contributor?: IChangelogContributor; - major: boolean; - url: string; - message: string; - } -} diff --git a/resources/assets/typescript/Sakura/IChangelogContributor.ts b/resources/assets/typescript/Sakura/IChangelogContributor.ts deleted file mode 100644 index 696b75d..0000000 --- a/resources/assets/typescript/Sakura/IChangelogContributor.ts +++ /dev/null @@ -1,9 +0,0 @@ -namespace Sakura -{ - export interface IChangelogContributor - { - id: number; - name: string; - url: string; - } -} diff --git a/resources/assets/typescript/Sakura/IChangelogDate.ts b/resources/assets/typescript/Sakura/IChangelogDate.ts deleted file mode 100644 index da3e804..0000000 --- a/resources/assets/typescript/Sakura/IChangelogDate.ts +++ /dev/null @@ -1,9 +0,0 @@ -namespace Sakura -{ - export interface IChangelogDate - { - date: string; - release?: IChangelogRelease; - changes: IChangelogChange[]; - } -} diff --git a/resources/assets/typescript/Sakura/IChangelogRelease.ts b/resources/assets/typescript/Sakura/IChangelogRelease.ts deleted file mode 100644 index 7eaa76e..0000000 --- a/resources/assets/typescript/Sakura/IChangelogRelease.ts +++ /dev/null @@ -1,9 +0,0 @@ -namespace Sakura -{ - export interface IChangelogRelease - { - id: number; - colour: string; - name: string; - } -} diff --git a/resources/views/yuuno/master.twig b/resources/views/yuuno/master.twig index f48bfc9..7e3d7cb 100644 --- a/resources/views/yuuno/master.twig +++ b/resources/views/yuuno/master.twig @@ -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({