{{
$t('login.agreeTAC1')
- }}
+ }}
{{ $t('login.agreeTAC2')
}}
diff --git a/front_end/src/components/widgets/CopyToClipboard.ts b/front_end/src/components/widgets/CopyToClipboard.ts
new file mode 100644
index 0000000..5a90b58
--- /dev/null
+++ b/front_end/src/components/widgets/CopyToClipboard.ts
@@ -0,0 +1,22 @@
+import { ElNotification } from "element-plus";
+import { local } from "@/store";
+import i18n from "@/i18n";
+// @ts-ignore
+const { t } = i18n.global;
+
+export const copyToClipboard = async (str: string) => {
+ try {
+ await navigator.clipboard.writeText(str);
+ ElNotification({
+ title: t('msg.copyToClipboardSuccess'),
+ type: 'success',
+ duration: local.notification_duration,
+ });
+ } catch(err) {
+ ElNotification({
+ title: t('msg.copyToClipboardFail'),
+ type: 'error',
+ duration: local.notification_duration,
+ })
+ }
+}
diff --git a/front_end/src/components/widgets/IdentifierManager.vue b/front_end/src/components/widgets/IdentifierManager.vue
index e1967f2..91bb607 100644
--- a/front_end/src/components/widgets/IdentifierManager.vue
+++ b/front_end/src/components/widgets/IdentifierManager.vue
@@ -1,37 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/front_end/src/components/widgets/UserArbiterCSV.vue b/front_end/src/components/widgets/UserArbiterCSV.vue
new file mode 100644
index 0000000..4e52a44
--- /dev/null
+++ b/front_end/src/components/widgets/UserArbiterCSV.vue
@@ -0,0 +1,136 @@
+
+
+ {{ $t('profile.exportJSON') }}
+
+
+
+
+
+
+
+ {{ $t('profile.exportArbiterCSV') }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/front_end/src/i18n/locales/en.ts b/front_end/src/i18n/locales/en.ts
index 7a6081d..d790b06 100644
--- a/front_end/src/i18n/locales/en.ts
+++ b/front_end/src/i18n/locales/en.ts
@@ -196,6 +196,8 @@ export default {
captchaRequired: 'Captcha required',
confirmPasswordMismatch: 'Mismatches password',
connectionFail: 'Connection failed. Please try again',
+ copyToClipboardFail: 'Failed to copy.',
+ copyToClipboardSuccess: 'Text copied.',
emailCodeInvalid: 'Email code is invalid or expired',
emailCodeRequired: 'Email code required',
emailCollision: 'Email already exists',
@@ -249,8 +251,10 @@ export default {
modeRecord: ' mode record: '
},
videos: 'All videos',
- exportArbiterCSV: 'Export as stats_csv.csv',
- exportArbiterCSVTooltip: 'Compatible with the datasheet generated by Minesweeper Arbiter.
Not supporting Leff, Reff, Deff, GZiNi and HZiNi at present.',
+ exportJSON: 'Export as JSON',
+ exportJSONTooltip: 'Raw data fetched from the server.',
+ exportArbiterCSV: 'Export as CSV',
+ exportArbiterCSVTooltip: 'Compatible with stats_csv.csv generated by Minesweeper Arbiter.
Not supporting Leff, Reff, Deff, GZiNi and HZiNi at present.',
upload: {
title: 'Video Upload',
dragOrClick: `Drag files here or click here to select`,
diff --git a/front_end/src/i18n/locales/zh-cn.ts b/front_end/src/i18n/locales/zh-cn.ts
index 1ba127e..5b53e00 100644
--- a/front_end/src/i18n/locales/zh-cn.ts
+++ b/front_end/src/i18n/locales/zh-cn.ts
@@ -196,6 +196,8 @@ export default {
captchaRequired: '请输入图形验证码',
confirmPasswordMismatch: '密码和确认密码不一致',
connectionFail: '无法连接到服务器,请重试',
+ copyToClipboardFail: '复制失败',
+ copyToClipboardSuccess: '复制成功',
emailCodeInvalid: '邮箱验证码过期或不正确',
emailCodeRequired: '请输入邮箱验证码',
emailCollision: '邮箱已存在',
@@ -249,8 +251,10 @@ export default {
modeRecord: '模式纪录:'
},
videos: '全部录像',
- exportArbiterCSV: '导出stats_csv.csv',
- exportArbiterCSVTooltip: '兼容 Minesweeper Arbiter 生成的数据表。
目前不支持 Leff, Reff, Deff, GZiNi, HZiNi。',
+ exportJSON: '导出JSON',
+ exportJSONTooltip: '从服务器获取的源数据',
+ exportArbiterCSV: '导出CSV',
+ exportArbiterCSVTooltip: '兼容 Minesweeper Arbiter 生成的 stats_csv.csv。
目前不支持 Leff, Reff, Deff, GZiNi, HZiNi。',
upload: {
title: '上传录像',
dragOrClick: `将录像拉到此处或 点击此处选择`,
diff --git a/front_end/src/store/index.ts b/front_end/src/store/index.ts
index 91183b9..531a409 100644
--- a/front_end/src/store/index.ts
+++ b/front_end/src/store/index.ts
@@ -11,7 +11,11 @@ export const store = defineStore('user', {
realname: "",
is_banned: false,
is_staff: false,
- country: ""
+ country: "",
+ accountlink: [],
+ identifiers: [],
+ videos: [],
+ loading: true,
}, // 真正的用户
// 访问谁的地盘不再具有记忆性。即点“我的地盘”,将永远是“我”的地盘
// 想要访问特定用户,可以用url
@@ -22,7 +26,12 @@ export const store = defineStore('user', {
username: "",
realname: "",
is_banned: false,
- country: ""
+ is_staff: false,
+ country: "",
+ accountlink: [] as any[],
+ identifiers: [] as string[],
+ videos: [] as any[],
+ loading: true,
},
login_status: LoginStatus.Undefined, // 登录状态,全局维护
new_identifier: false, // 是否有新标识录像
diff --git a/front_end/src/views/PlayerProfileView.vue b/front_end/src/views/PlayerProfileView.vue
index 05957a0..6a0f78e 100644
--- a/front_end/src/views/PlayerProfileView.vue
+++ b/front_end/src/views/PlayerProfileView.vue
@@ -1,8 +1,16 @@
{{ $t('accountlink.title') }}
+
+
+
+
+
\ No newline at end of file
diff --git a/front_end/src/views/PlayerVideosView.vue b/front_end/src/views/PlayerVideosView.vue
index 350a1ba..6913cc9 100644
--- a/front_end/src/views/PlayerVideosView.vue
+++ b/front_end/src/views/PlayerVideosView.vue
@@ -1,111 +1,15 @@
-
- {{ $t('profile.exportArbiterCSV') }}
-
-
-
-
-
-
+
-
-
+
+
-
-
-
diff --git a/front_end/src/views/PlayerView.vue b/front_end/src/views/PlayerView.vue
index 963b3b3..34d2005 100644
--- a/front_end/src/views/PlayerView.vue
+++ b/front_end/src/views/PlayerView.vue
@@ -46,14 +46,13 @@
- {{ realname }}
+ {{ realname }}
+
{{ signature }}
+ $t('profile.change') }}
- {{ $t('profile.identifier') }}{{
- identifiers.join(", ") }}
@@ -70,7 +69,7 @@
-
+
@@ -106,15 +105,12 @@ import { useRoute } from 'vue-router';
const t = useI18n();
const route = useRoute()
-const loading = ref(true)
-
//编辑前的
const userid = ref("");
const username = ref("");
const realname = ref("");
const signature = ref("");
const popularity = ref("");
-const identifiers = ref([]); // 通过审核的标识
//编辑状态时的
const realname_edit = ref("");
@@ -164,7 +160,9 @@ function refresh() {
store.player.username = data.username;
store.player.is_banned = data.is_banned;
store.player.country = data.country;
-
+ store.player.is_staff = data.is_staff;
+ store.player.identifiers = data.identifiers;
+ store.player.videos = data.videos;
userid.value = data.id;
realname.value = data.realname;
@@ -174,15 +172,13 @@ function refresh() {
popularity.value = data.popularity;
realname_edit.value = data.realname;
signature_edit.value = data.signature;
- identifiers.value.length = 0;
- identifiers.value.push(...data.identifiers);
// console.log(imageUrl);
if (data.avatar) {
imageUrl.value = "data:image/;base64," + data.avatar;
imageUrlOld = "data:image/;base64," + data.avatar;
}
// console.log(imageUrl);
- loading.value = false;
+ store.player.loading = false;
})
}
diff --git a/front_end/src/views/SettingView.vue b/front_end/src/views/SettingView.vue
index c41dab0..4f0f370 100644
--- a/front_end/src/views/SettingView.vue
+++ b/front_end/src/views/SettingView.vue
@@ -38,21 +38,15 @@
{{ $t('common.toDo') }}
{{ $t('common.toDo') }}
-
-
-
-
-
\ No newline at end of file