Finish refactoring

This commit is contained in:
Pieter Vander Vennet 2020-11-06 04:02:53 +01:00
parent dc1dde6c3d
commit b764371cce
55 changed files with 76 additions and 3201 deletions

View file

@ -5,6 +5,7 @@ import CheckBox from "../Input/CheckBox";
import Combine from "../Base/Combine";
import State from "../../State";
import {Tag} from "../../Logic/Tags";
import Svg from "../../Svg";
export default class DeleteImage extends UIElement {
@ -35,7 +36,7 @@ export default class DeleteImage extends UIElement {
cancelButton
]).SetStyle("display:flex;flex-direction:column;"),
"<img src='./assets/delete.svg' style='width:1.5em;'>"
Svg.delete_icon_ui().SetStyle('width:1.5em;display:block;padding-left: calc(50% - 0.75em);')
)
}

View file

@ -8,6 +8,7 @@ import {Imgur} from "../../Logic/Web/Imgur";
import {DropDown} from "../Input/DropDown";
import {Tag} from "../../Logic/Tags";
import Translations from "../i18n/Translations";
import Svg from "../../Svg";
export class ImageUploadFlow extends UIElement {
private readonly _licensePicker: UIElement;
@ -96,7 +97,7 @@ export class ImageUploadFlow extends UIElement {
]);
const label = new Combine([
"<img style='width: 36px;height: 36px;padding: 0.1em;margin-top: 5px;border-radius: 0;float: left;' src='./assets/camera-plus.svg'/> ",
Svg.camera_plus_ui().SetStyle("width: 36px;height: 36px;padding: 0.1em;margin-top: 5px;border-radius: 0;float: left;display:block"),
Translations.t.image.addPicture
.SetStyle("width:max-content;font-size: 28px;" +
"font-weight: bold;" +

View file

@ -27,7 +27,8 @@ export class SlideShow extends UIElement {
const self = this;
this._prev = new Combine([
"<div class='vspan'></div>",
Svg.arrow_left_smooth_img]).SetStyle("prev-button")
Svg.arrow_left_smooth_img])
.SetClass("prev-button")
.onClick(() => {
const current = self._currentSlide.data;
self.MoveTo(current - 1);
@ -64,11 +65,12 @@ export class SlideShow extends UIElement {
}
slides += " <div class=\"slide " + state + "\">" + embeddedElement.Render() + "</div>\n";
}
return new Combine(["<div class='image-slideshow'>"
, this._prev
return new Combine([
this._prev
, "<div class='slides'>", slides, "</div>"
, this._next
, "</div>"]).Render();
, this._next])
.SetClass('image-slideshow')
.Render();
}
public MoveTo(index: number) {