Browse Source

Autofix for markdown.

pull/464/head
Sebastian 7 years ago
parent
commit
debb0aeb00
  1. 4
      frontend/app/features/settings/pages/more/more-page.component.ts
  2. 12
      frontend/app/framework/angular/avatar.component.ts
  3. 1
      frontend/app/shared/components/markdown-editor.component.ts

4
frontend/app/features/settings/pages/more/more-page.component.ts

@ -45,7 +45,7 @@ export class MorePageComponent extends ResourceOwner implements OnInit {
public ngOnInit() {
this.own(
this.appsState.reloadSelected().pipe(map(x => x!))
this.appsState.selectedApp
.subscribe(app => {
this.app = app;
@ -56,6 +56,8 @@ export class MorePageComponent extends ResourceOwner implements OnInit {
this.updateForm.load(app);
this.updateForm.setEnabled(this.isEditable);
}));
this.appsState.reloadSelected();
}
public save() {

12
frontend/app/framework/angular/avatar.component.ts

@ -12,7 +12,7 @@ import { picasso } from '@app/framework/internal';
@Component({
selector: 'sqx-avatar',
template: `
<img
<img *ngIf="imageSource"
[style.width]="sizeInPx"
[style.height]="sizeInPx"
[src]="imageSource | sqxSafeUrl"
@ -20,9 +20,6 @@ import { picasso } from '@app/framework/internal';
`
})
export class AvatarComponent implements OnChanges {
public imageSource: string;
public sizeInPx: string;
@Input()
public identifier: string;
@ -32,6 +29,9 @@ export class AvatarComponent implements OnChanges {
@Input()
public size = 50;
public imageSource: string | null;
public sizeInPx: string;
public ngOnChanges() {
this.imageSource = this.image || this.createSvg();
@ -39,6 +39,10 @@ export class AvatarComponent implements OnChanges {
}
private createSvg() {
if (!this.identifier) {
return null;
}
const svg = picasso(this.identifier);
return `data:image/svg+xml;utf8,${svg}`;

1
frontend/app/shared/components/markdown-editor.component.ts

@ -95,6 +95,7 @@ export class MarkdownEditorComponent extends StatefulControlComponent<State, str
previewRender: (text: string) => {
return marked(text, { pedantic: true });
},
autoDownloadFontAwesome: true,
toolbar: [
{
name: 'bold',

Loading…
Cancel
Save