2020-08-21 12:51:20 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2020-08-24 02:56:33 +00:00
|
|
|
<ft-loader
|
|
|
|
v-if="isLoading"
|
|
|
|
:fullscreen="true"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
v-else
|
|
|
|
>
|
|
|
|
<ft-card class="card">
|
|
|
|
<h2>{{ $t("Profile.Edit Profile") }}</h2>
|
|
|
|
<ft-flex-box>
|
|
|
|
<ft-input
|
|
|
|
class="profileName"
|
|
|
|
placeholder="Profile Name"
|
|
|
|
:value="profileName"
|
|
|
|
:show-arrow="false"
|
|
|
|
@input="e => profileName = e"
|
|
|
|
/>
|
|
|
|
</ft-flex-box>
|
|
|
|
<h3>{{ $t("Profile.Color Picker") }}</h3>
|
|
|
|
<ft-flex-box
|
2020-08-31 21:35:22 +00:00
|
|
|
class="bottomMargin colorOptions"
|
2020-08-24 02:56:33 +00:00
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-for="(color, index) in colorValues"
|
|
|
|
:key="index"
|
|
|
|
class="colorOption"
|
|
|
|
:style="{ background: color }"
|
|
|
|
@click="profileBgColor = color"
|
|
|
|
/>
|
|
|
|
</ft-flex-box>
|
|
|
|
<ft-flex-box
|
|
|
|
class="bottomMargin"
|
|
|
|
>
|
|
|
|
<div>
|
|
|
|
<label for="colorPicker">{{ $t("Profile.Custom Color") }}</label>
|
|
|
|
<input
|
|
|
|
id="colorPicker"
|
|
|
|
v-model="profileBgColor"
|
2020-09-02 03:25:06 +00:00
|
|
|
type="color"
|
|
|
|
>
|
2020-08-24 02:56:33 +00:00
|
|
|
</div>
|
|
|
|
</ft-flex-box>
|
|
|
|
<ft-flex-box>
|
|
|
|
<ft-input
|
|
|
|
class="profileName"
|
|
|
|
placeholder=""
|
|
|
|
:value="profileBgColor"
|
|
|
|
:show-arrow="false"
|
|
|
|
:disabled="true"
|
|
|
|
/>
|
|
|
|
</ft-flex-box>
|
|
|
|
<h3>{{ $t("Profile.Profile Preview") }}</h3>
|
|
|
|
<ft-flex-box
|
|
|
|
class="bottomMargin"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
class="colorOption"
|
|
|
|
:style="{ background: profileBgColor, color: profileTextColor }"
|
|
|
|
style="cursor: default"
|
|
|
|
>
|
|
|
|
<p
|
|
|
|
class="initial"
|
|
|
|
>
|
|
|
|
{{ profileInitial }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</ft-flex-box>
|
|
|
|
<ft-flex-box>
|
|
|
|
<ft-button
|
2020-08-31 21:35:22 +00:00
|
|
|
v-if="isNew"
|
|
|
|
:label="$t('Profile.Create Profile')"
|
|
|
|
@click="saveProfile"
|
|
|
|
/>
|
|
|
|
<ft-button
|
|
|
|
v-if="!isNew"
|
2020-08-24 02:56:33 +00:00
|
|
|
:label="$t('Profile.Update Profile')"
|
|
|
|
@click="saveProfile"
|
|
|
|
/>
|
|
|
|
<ft-button
|
2020-08-31 21:35:22 +00:00
|
|
|
v-if="!isNew"
|
2020-08-24 02:56:33 +00:00
|
|
|
:label="$t('Profile.Make Default Profile')"
|
2020-08-31 21:35:22 +00:00
|
|
|
@click="setDefaultProfile"
|
2020-08-24 02:56:33 +00:00
|
|
|
/>
|
|
|
|
<ft-button
|
2020-08-31 21:35:22 +00:00
|
|
|
v-if="profileId !== 'allChannels' && !isNew"
|
2020-08-24 02:56:33 +00:00
|
|
|
:label="$t('Profile.Delete Profile')"
|
|
|
|
text-color="var(--text-with-main-color)"
|
|
|
|
background-color="var(--primary-color)"
|
2020-08-31 21:35:22 +00:00
|
|
|
@click="openDeletePrompt"
|
2020-08-24 02:56:33 +00:00
|
|
|
/>
|
|
|
|
</ft-flex-box>
|
|
|
|
</ft-card>
|
|
|
|
</div>
|
2020-08-31 21:35:22 +00:00
|
|
|
<ft-prompt
|
|
|
|
v-if="showDeletePrompt"
|
|
|
|
:label="deletePromptLabel"
|
|
|
|
:option-names="deletePromptNames"
|
|
|
|
:option-values="deletePromptValues"
|
|
|
|
@click="handleDeletePrompt"
|
|
|
|
/>
|
2020-08-21 12:51:20 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./ProfileEdit.js" />
|
|
|
|
<style scoped src="./ProfileEdit.css" />
|