ui: optimize bundle

This commit is contained in:
undefined committed 2022-08-24 00:28:25 +08:00
1 parent 9c02ed4dd8
commit 5ae8258b8a
28 files changed
+57 -179

No files matched your search

-1
View File
@@ -88,7 +88,6 @@ async function handleClickUpload(files) {
Notification.success(i18n('File uploaded successfully.'));
await pjax.request({ push: false });
} catch (e) {
window.captureException?.(e);
console.error(e);
Notification.error(i18n('File upload failed: {0}', e.toString()));
} finally {
@@ -7,7 +7,6 @@ import VjNotification from 'vj/components/notification';
import { NamedPage } from 'vj/misc/Page';
import api, { gql } from 'vj/utils/api';
import loadReactRedux from 'vj/utils/loadReactRedux';
import parseQueryString from 'vj/utils/parseQueryString';
const page = new NamedPage('home_messages', () => {
let reduxStore;
@@ -92,10 +91,10 @@ const page = new NamedPage('home_messages', () => {
* A target user id may be assigned in the query string.
*/
async function loadSendTarget() {
const queryString = parseQueryString();
if (!queryString.target) return;
const target = new URL(window.location.href).searchParams.get('target');
if (!target) return;
const user = await api(gql`
users(search: ${queryString.target}, exact: true) {
users(search: ${target}, exact: true) {
_id
uname
avatarUrl
@@ -100,7 +100,6 @@ const page = new NamedPage('problem_files', () => {
Notification.success(i18n('File uploaded successfully.'));
await pjax.request({ push: false });
} catch (e) {
window.captureException?.(e);
console.error(e);
Notification.error(i18n('File upload failed: {0}', e.toString()));
} finally {