diff --git a/popup/src/components/ember-tab/main.vue b/popup/src/components/ember-tab/main.vue new file mode 100644 index 0000000..bfbb7d7 --- /dev/null +++ b/popup/src/components/ember-tab/main.vue @@ -0,0 +1,4 @@ + + + + diff --git a/popup/src/components/ember-tab/script.ts b/popup/src/components/ember-tab/script.ts new file mode 100644 index 0000000..8ff92a3 --- /dev/null +++ b/popup/src/components/ember-tab/script.ts @@ -0,0 +1,37 @@ +import { Component, Vue } from 'vue-property-decorator' +import { Person } from '@/classes/DTO/Person' +import VueClipboard from 'vue-clipboard2' +import sender from '@/classes/Service/Browser/Chrome/Sender' +import { Action } from '@/classes/Enum/Action' +import notificationCleaner from '@/classes/Service/NotificationCleaner' + +Vue.use(VueClipboard) + +@Component +export default class HelloWorld extends Vue { + person = new Person() + isAutoCleaner = false + + mounted () { + /** todo заполнить первоначальное значение */ + notificationCleaner.state().then((isAutoCleaner) => { + this.isAutoCleaner = isAutoCleaner + console.log('this.isAutoCleaner = ' + isAutoCleaner) + }) + } + + cleanNotifications (): void { + sender.send({ + action: Action.CLEAN_NOTIFICATION + }) + } + + onChangeAutoCleaner () { + console.log(this.isAutoCleaner) + if (this.isAutoCleaner) { + notificationCleaner.enable() + } else { + notificationCleaner.disable() + } + } +} diff --git a/popup/src/components/ember-tab/style.scss b/popup/src/components/ember-tab/style.scss new file mode 100644 index 0000000..fe25a0b --- /dev/null +++ b/popup/src/components/ember-tab/style.scss @@ -0,0 +1,65 @@ +.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/ember-tab/template.html b/popup/src/components/ember-tab/template.html new file mode 100644 index 0000000..f953c9d --- /dev/null +++ b/popup/src/components/ember-tab/template.html @@ -0,0 +1,17 @@ +