Small visual change

feature-show_image_resolution
neobooru 2019-08-31 01:26:58 +02:00
parent 979ac88365
commit bf466589b0
1 changed files with 3 additions and 2 deletions

View File

@ -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