Skip to content

Commit

Permalink
enh: modify styling and text for Context
Browse files Browse the repository at this point in the history
Signed-off-by: Cleopatra Enjeck M <patrathewhiz@gmail.com>
  • Loading branch information
enjeck committed Mar 12, 2024
1 parent 1e64bed commit 44d037a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
7 changes: 3 additions & 4 deletions src/modules/navigation/partials/NavigationContextItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ context.iconName }}
</template>
<template v-else>
<Table :size="20" />
<TableIcon :size="20" />
</template>
</template>
<template #actions>
Expand All @@ -24,7 +24,7 @@
import { NcAppNavigationItem, NcActionButton } from '@nextcloud/vue'
import '@nextcloud/dialogs/dist/index.css'
import { mapGetters } from 'vuex'
import Table from 'vue-material-design-icons/Table.vue'
import TableIcon from 'vue-material-design-icons/Table.vue'
import { emit } from '@nextcloud/event-bus'
import PlaylistEdit from 'vue-material-design-icons/PlaylistEdit.vue'
import permissionsMixin from '../../../shared/components/ncTable/mixins/permissionsMixin.js'
Expand All @@ -34,8 +34,7 @@ export default {
components: {
PlaylistEdit,
// eslint-disable-next-line vue/no-reserved-component-names
Table,
TableIcon,
NcAppNavigationItem,
NcActionButton,
},
Expand Down
10 changes: 5 additions & 5 deletions src/pages/Context.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

<div class="resources">
<div v-for="resource in contextResources" :key="resource.key">
<div v-if="!resource.isView">
<div v-if="!resource.isView" class="resource">
<TableWrapper :table="resource" :columns="columns[resource.key]" :rows="rows[resource.key]"
:view-setting="viewSetting" @create-column="createColumn(false, resource)"
@import="openImportModal(resource, false)" @download-csv="downloadCSV(resource, false)" />
</div>
<div v-else-if="resource.isView">
<div v-else-if="resource.isView" class="resource">
<CustomView :view="resource" :columns="columns[resource.key]" :rows="rows[resource.key]"
:view-setting="viewSetting" @create-column="createColumn(true, resource)"
@import="openImportModal(resource, true)" @download-csv="downloadCSV(resource, true)" />
Expand Down Expand Up @@ -181,9 +181,9 @@ export default {

<style scoped lang="scss">
.content {
margin: 50px;
margin: 50px 50px 0;
}
.resource, content {
padding: 30px 0;
.resource {
margin: 40px 0;
}
</style>
2 changes: 1 addition & 1 deletion src/shared/components/ncContextResource/ResourceForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<NcSelect style="width: 100%;" :loading="loading" :options="options" :clear-on-select="true"
:hide-selected="true" :placeholder="t('tables', 'Select a table or view')" :searchable="true"
:get-option-key="(option) => option.key" label="title"
:aria-label-combobox="t('tables', 'Select a table or view')" :user-select="true" :preselect-first="true"
:aria-label-combobox="t('tables', 'Select a table or view')" :preselect-first="true"
:preserve-search="true" @search="asyncFind" @input="addResource">
<template #no-options>
{{ t('tables', 'No recommendations. Start typing.') }}
Expand Down
12 changes: 6 additions & 6 deletions src/store/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default new Vuex.Store({
try {
res = await axios.post(generateOcsUrl('/apps/tables/api/2/contexts'), data)
} catch (e) {
displayError(e, t('tables', 'Could not insert context.'))
displayError(e, t('tables', 'Could not insert application.'))
return false
}
const contexts = state.contexts
Expand Down Expand Up @@ -345,7 +345,7 @@ export default new Vuex.Store({
try {
res = await axios.put(generateOcsUrl('/apps/tables/api/2/contexts/' + id), data)
} catch (e) {
displayError(e, t('tables', 'Could not update context.'))
displayError(e, t('tables', 'Could not update application.'))
return false
}

Expand Down Expand Up @@ -378,8 +378,8 @@ export default new Vuex.Store({
const res = await axios.get(generateOcsUrl('/apps/tables/api/2/contexts'))
commit('setContexts', res.data.ocs.data)
} catch (e) {
displayError(e, t('tables', 'Could not load contexts.'))
showError(t('tables', 'Could not fetch contexts'))
displayError(e, t('tables', 'Could not load applications.'))
showError(t('tables', 'Could not fetch applications'))
}
commit('setContextsLoading', false)
return true
Expand All @@ -390,8 +390,8 @@ export default new Vuex.Store({
const res = await axios.get(generateOcsUrl('/apps/tables/api/2/contexts/' + id))
commit('setContext', res.data.ocs.data)
} catch (e) {
displayError(e, t('tables', 'Could not load context.'))
showError(t('tables', 'Could not fetch context'))
displayError(e, t('tables', 'Could not load application.'))
showError(t('tables', 'Could not fetch application'))
}
return true
},
Expand Down

0 comments on commit 44d037a

Please sign in to comment.