-
+
@@ -28,6 +28,17 @@
{{ $t('noUsers') }}
+
@@ -53,18 +64,23 @@ export default defineComponent({
return {
username: '',
host: '',
+ recentUsers: [],
users: [],
selected: null,
faTimes, faCheck
};
},
- mounted() {
+ async mounted() {
this.focus();
this.$nextTick(() => {
this.focus();
});
+
+ this.recentUsers = await os.api('users/show', {
+ userIds: this.$store.state.device.recentlyUsedUsers
+ });
},
methods: {
@@ -90,6 +106,12 @@ export default defineComponent({
ok() {
this.$emit('ok', this.selected);
this.$refs.dialog.close();
+
+ // 最近使ったユーザー更新
+ let recents = this.$store.state.device.recentlyUsedUsers;
+ recents = recents.filter(x => x !== this.selected.id);
+ recents.unshift(this.selected.id);
+ this.$store.commit('device/set', { key: 'recentlyUsedUsers', value: recents.splice(0, 16) });
},
cancel() {
@@ -107,6 +129,14 @@ export default defineComponent({
overflow: auto;
height: 100%;
+ &.result.hit {
+ padding: 0;
+ }
+
+ &.recent {
+ padding: 0;
+ }
+
> .inputs {
> .input {
display: inline-block;
diff --git a/src/client/store.ts b/src/client/store.ts
index 6dec9205ba..952c5fef53 100644
--- a/src/client/store.ts
+++ b/src/client/store.ts
@@ -60,6 +60,7 @@ export const defaultDeviceSettings = {
serverDisconnectedBehavior: 'quiet',
accounts: [],
recentlyUsedEmojis: [],
+ recentlyUsedUsers: [],
themes: [],
darkTheme: '8050783a-7f63-445a-b270-36d0f6ba1677',
lightTheme: '4eea646f-7afa-4645-83e9-83af0333cd37',