diff --git a/popup/src/components/person-tab/script.ts b/popup/src/components/person-tab/script.ts index 13b6a16..a0f4e89 100644 --- a/popup/src/components/person-tab/script.ts +++ b/popup/src/components/person-tab/script.ts @@ -9,8 +9,6 @@ import VueClipboard from 'vue-clipboard2' import { Target } from '@/classes/Enum/Target' import sender from '@/classes/Service/Browser/Chrome/Sender' import { Action } from '@/classes/Enum/Action' -import notificationCleaner from '@/classes/Service/NotificationCleaner' -import { Registers } from '@/classes/DTO/Registers' import Mocks from '@/components/mocks/main.vue' Vue.use(VueClipboard) @@ -23,8 +21,6 @@ Vue.use(VueClipboard) export default class PersonTab extends Vue { personalId = '' person = new Person() - registers = new Registers() - isAutoCleaner = false copyText = '' get allowedMonths () { @@ -44,14 +40,6 @@ export default class PersonTab extends Vue { return result } - mounted () { - /** todo заполнить первоначальное значение */ - notificationCleaner.state().then((isAutoCleaner) => { - this.isAutoCleaner = isAutoCleaner - console.log('this.isAutoCleaner = ' + isAutoCleaner) - }) - } - copyPersonalId () { const personalId = personalIdGenerator.generate(this.person) this.personalId = personalId @@ -60,11 +48,13 @@ export default class PersonTab extends Vue { copyIban () { const iban = ibanGenerator.generate(this.person.country) + this.personalId = '' this.copy(iban) } copyPhone () { const phone = phoneGenerator.generate(this.person.country) + this.personalId = '' this.copy(phone) } @@ -75,6 +65,8 @@ export default class PersonTab extends Vue { autocomplete () { const personalId = personalIdGenerator.generate(this.person) + this.personalId = personalId + this.copy(personalId) this.insertValueToNode(Target.PERSONAL_ID, personalId) const iban = ibanGenerator.generate(this.person.country) this.insertValueToNode(Target.IBAN, iban) @@ -93,23 +85,4 @@ export default class PersonTab extends Vue { value: value }) } - - cleanNotifications (): void { - sender.send({ - action: Action.CLEAN_NOTIFICATION - }) - } - - onChangeAutoCleaner () { - console.log(this.isAutoCleaner) - if (this.isAutoCleaner) { - notificationCleaner.enable() - } else { - notificationCleaner.disable() - } - } - - saveMocks () { - console.log(this.personalId, this.registers) - } } diff --git a/popup/src/components/person-tab/style.scss b/popup/src/components/person-tab/style.scss index e8608be..fe25a0b 100644 --- a/popup/src/components/person-tab/style.scss +++ b/popup/src/components/person-tab/style.scss @@ -1,3 +1,65 @@ -.option-select { - width: 350px; +.container { + max-width: 400px; + min-width: 400px; + border: solid 2px gray; + + .wrapper { + padding: 10px; + + .tab-panel { + display: flex; + + &__item { + flex-grow: 1; + padding: 5px; + cursor: pointer; + border-bottom: solid 2px #cae5fa; + + &_active { + border-bottom: solid 2px #298df8; + } + + &:hover { + border-bottom: solid 2px #298df8; + } + } + } + + .tab-page { + padding-top: 10px; + + &__item { + display: none; + + + &_show { + display: block; + } + + .form-row { + display: flex; + margin-bottom: 5px; + + &__item { + flex-grow: 1; + margin-right: 10px; + + &-input { + width: 100%; + } + } + + &:last-child { + margin-bottom: 0; + } + } + } + } + + .memory-panel { + text-align: left; + padding: 5px; + margin-top: 10px; + } + } } diff --git a/popup/src/components/person-tab/template.html b/popup/src/components/person-tab/template.html index 5ad780e..c46f160 100644 --- a/popup/src/components/person-tab/template.html +++ b/popup/src/components/person-tab/template.html @@ -58,4 +58,8 @@