Small visual change
parent
979ac88365
commit
bf466589b0
|
|
@ -149,14 +149,15 @@ export default Vue.extend({
|
||||||
this.pushInfo("Uploading...");
|
this.pushInfo("Uploading...");
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
const createdPost = await this.szuru.createPost(this.post);
|
const createdPost = await this.szuru.createPost(this.post);
|
||||||
// HACK: Directly set message because there isn't a better way to update messages
|
this.clearMessages();
|
||||||
// TODO: Clicking a link doesn't actually open it in a new tab,
|
// TODO: Clicking a link doesn't actually open it in a new tab,
|
||||||
// see https://stackoverflow.com/questions/8915845
|
// see https://stackoverflow.com/questions/8915845
|
||||||
this.messages[0].content = `<a href='${this.getPostUrl(createdPost)}'>Uploaded post</a>`;
|
this.pushInfo(`<a href='${this.getPostUrl(createdPost)}'>Uploaded post</a>`);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
const error = ex as LocalError;
|
const error = ex as LocalError;
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
|
this.clearMessages();
|
||||||
this.pushError(error.description);
|
this.pushError(error.description);
|
||||||
} else {
|
} else {
|
||||||
// Probably too long for a message
|
// Probably too long for a message
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue