aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings_modal/tabs/profile_tab.vue
diff options
context:
space:
mode:
authorkPherox <admin@mail.kr-kp.com>2020-06-10 03:24:55 +0900
committerkPherox <admin@mail.kr-kp.com>2020-06-10 03:37:58 +0900
commit54fdc220017122c8e30e0fb16f0dd2534fc60947 (patch)
tree3d6af9d13a40312357a8aa1b40015148cb9634fe /src/components/settings_modal/tabs/profile_tab.vue
parentaa125072b329a7e2f3ce645d0f2666c9875bc484 (diff)
Add profile fields form
Diffstat (limited to 'src/components/settings_modal/tabs/profile_tab.vue')
-rw-r--r--src/components/settings_modal/tabs/profile_tab.vue46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue
index fff4f970..2fa3021e 100644
--- a/src/components/settings_modal/tabs/profile_tab.vue
+++ b/src/components/settings_modal/tabs/profile_tab.vue
@@ -95,6 +95,52 @@
{{ $t('settings.discoverable') }}
</Checkbox>
</p>
+ <div v-if="maxFields > 0">
+ <p>{{ $t('settings.profile_fields.label') }}</p>
+ <div
+ v-for="(_, i) in newFields"
+ :key="i"
+ class="profile-fields"
+ >
+ <EmojiInput
+ v-model="newFields[i].name"
+ :suggest="emojiSuggestor"
+ hide-emoji-button
+ >
+ <input
+ v-model="newFields[i].name"
+ :placeholder="$t('settings.profile_fields.name')"
+ >
+ </EmojiInput>
+ <EmojiInput
+ v-model="newFields[i].value"
+ :suggest="emojiSuggestor"
+ hide-emoji-button
+ >
+ <input
+ v-model="newFields[i].value"
+ :placeholder="$t('settings.profile_fields.value')"
+ >
+ </EmojiInput>
+ <div
+ class="icon-container"
+ >
+ <i
+ v-show="newFields.length > 1"
+ class="icon-cancel"
+ @click="deleteField(i)"
+ />
+ </div>
+ </div>
+ <a
+ v-if="newFields.length < maxFields"
+ class="add-field faint"
+ @click="addField"
+ >
+ <i class="icon-plus" />
+ {{ $t("settings.profile_fields.add_field") }}
+ </a>
+ </div>
<button
:disabled="newName && newName.length === 0"
class="btn btn-default"