Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Resolve style warnings
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Apr 13, 2022
commit d48600d5726a6f26bac686ac8b39946854952477
32 changes: 17 additions & 15 deletions src/components/ExportSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
<div class="section">
<h2>{{ t('user_migration', 'Export') }}</h2>

<h3 class="settings-hint">{{ t('user_migration', 'Please select the data you want to export') }}</h3>
<h3 class="settings-hint">
{{ t('user_migration', 'Please select the data you want to export') }}
</h3>

<div class="section__grid">
<!-- Base user data is permanently enabled -->
Expand All @@ -36,8 +38,8 @@
<em class="section__description">{{ t('user_migration', 'Basic user information including user ID and display name as well as your settings') }}</em>
</div>
<div v-for="({id, displayName, description}) in sortedMigrators"
class="section__checkbox"
:key="id">
:key="id"
class="section__checkbox">
<CheckboxRadioSwitch name="migrators"
:value="id"
:checked.sync="selectedMigrators">
Expand All @@ -57,7 +59,7 @@
</template>
{{ t('user_migration', 'Export') }}
</Button>
<div class="section__status" v-else>
<div v-else class="section__status">
<Button type="secondary"
:aria-label="t('user_migration', 'Show export status')"
:disabled="status.current === 'import'"
Expand Down Expand Up @@ -108,6 +110,15 @@ import { APP_ID } from '../shared/constants'
export default {
name: 'ExportSection',

components: {
Button,
CheckboxRadioSwitch,
CheckCircleOutline,
EmptyContent,
Modal,
PackageDown,
},

props: {
migrators: {
type: Array,
Expand All @@ -119,15 +130,6 @@ export default {
},
},

components: {
Button,
CheckboxRadioSwitch,
CheckCircleOutline,
EmptyContent,
Modal,
PackageDown,
},

data() {
return {
modalOpened: false,
Expand All @@ -148,7 +150,7 @@ export default {
sortedMigrators() {
// TODO sort migrators?
return this.migrators
}
},
},

methods: {
Expand Down Expand Up @@ -199,7 +201,7 @@ export default {

.settings-hint {
margin: auto 0;
};
}
}

.section__modal {
Expand Down
22 changes: 12 additions & 10 deletions src/components/ImportSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
<div class="section">
<h2>{{ t('user_migration', 'Import') }}</h2>

<h3 class="section__hint settings-hint">{{ t('user_migration', 'Please note that existing data may be overwritten') }}</h3>
<h3 class="section__hint settings-hint">
{{ t('user_migration', 'Please note that existing data may be overwritten') }}
</h3>

<!-- TODO use server API -->

Expand All @@ -38,7 +40,7 @@
</template>
{{ t('user_migration', 'Import') }}
</Button>
<div class="section__status" v-else>
<div v-else class="section__status">
<Button type="secondary"
:aria-label="t('user_migration', 'Show import status')"
:disabled="status.current === 'export'"
Expand Down Expand Up @@ -94,13 +96,6 @@ const picker = getFilePickerBuilder(t('user_migration', 'Choose a file to import
export default {
name: 'ImportSection',

props: {
status: {
type: Object,
default: () => ({}),
},
},

components: {
Button,
CheckCircleOutline,
Expand All @@ -109,6 +104,13 @@ export default {
PackageUp,
},

props: {
status: {
type: Object,
default: () => ({}),
},
},

data() {
return {
modalOpened: false,
Expand Down Expand Up @@ -176,7 +178,7 @@ export default {

.settings-hint {
margin: auto 0;
};
}
}

.section__picker-error {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Personal/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ export default {
onRefreshStatus() {
this.fetchStatus()
},
}
},
}
</script>