Skip to content

Commit

Permalink
add dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
little3201 committed Apr 17, 2024
1 parent 18c23a7 commit cac6e36
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 15 deletions.
6 changes: 5 additions & 1 deletion src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<q-layout view="hHh LpR lFf">
<q-layout view="hHh LpR lff">
<q-header elevated>
<q-toolbar>
<q-toolbar-title :shrink="true">
Expand Down Expand Up @@ -61,6 +61,10 @@
<router-view />
</q-page-container>

<q-footer class="bg-transparent">
<p class="text-center text-black">Copyright &copy; 2018 - {{ new Date().getFullYear() }}
All rights reserved.</p>
</q-footer>
</q-layout>
</template>

Expand Down
6 changes: 3 additions & 3 deletions src/mocks/dictionaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ for (let i = 0; i < 20; i++) {
const data: Dictionary = {
id: i,
name: 'dictionary_' + i,
description: 'description',
enabled: true,
description: 'this is description for this row',
enabled: i % 3 > 0,
lastModifiedDate: new Date()
}
for (let j = 0; j < i; j++) {
const data: Dictionary = {
id: j,
name: 'dictionary_' + i + '_' + j,
superiorId: i,
enabled: true,
enabled: j % 2 > 0,
description: 'description',
lastModifiedDate: new Date()
}
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ for (let i = 0; i < 20; i++) {
const data: Group = {
id: i,
groupName: 'group_' + i,
enabled: true,
enabled: i % 3 > 0,
lastModifiedDate: new Date()
}
datas.push(data)
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/regions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ for (let i = 0; i < 20; i++) {
name: 'region_' + i,
areaCode: i,
postalCode: i,
enabled: true,
enabled: i % 3 > 0,
description: 'description',
lastModifiedDate: new Date()
}
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ for (let i = 0; i < 20; i++) {
const data: Role = {
id: i,
name: 'role_' + i,
enabled: true,
enabled: i % 3 > 0,
description: 'description',
lastModifiedDate: new Date()
}
Expand Down
4 changes: 2 additions & 2 deletions src/mocks/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ for (let i = 0; i < 20; i++) {
username: 'username' + i,
firstname: 'firstname_' + i,
lastname: 'lastname_' + i,
enabled: true,
accountNonLocked: true,
enabled: i % 2 > 0,
accountNonLocked: i % 3 > 0,
accountExpiresAt: new Date(),
credentialsExpiresAt: new Date(),
lastModifiedDate: new Date()
Expand Down
6 changes: 4 additions & 2 deletions src/pages/IndexPage.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<q-page class="row items-center justify-evenly">
<div>Index</div>
<q-page padding>
<q-card flat>
<q-card-section>Index</q-card-section>
</q-card>
</q-page>
</template>

Expand Down
7 changes: 4 additions & 3 deletions src/pages/system/dictionary/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
<q-table flat bordered ref="tableRef" title="Dictionaries" :rows="rows" :columns="columns" row-key="id"
:loading="loading" v-model:pagination="pagination" binary-state-sort @request="onRequest" class="full-width">
<template v-slot:top-right>
<q-btn color="primary" title="add" :disable="loading" icon="sym_r_add" label="Add" @click="addRow" />
<q-btn color="primary" title="refresh" :disable="loading" icon="sym_r_refresh" label="Refresh"
@click="refresh" />
<q-btn color="primary" title="export" class="q-ml-sm" icon="sym_r_sim_card_download" label="Export"
@click="exportTable" />
</template>
Expand Down Expand Up @@ -139,8 +140,8 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
}).finally(() => { loading.value = false })
}
function addRow() {
visiable.value = true
function refresh() {
tableRef.value.requestServerInteraction()
}
function editRow(id: number) {
Expand Down
1 change: 1 addition & 0 deletions src/pages/system/dictionary/SubPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const loading = ref(false)
const form = ref<Dictionary>({
name: '',
superiorId: props.superiorId,
description: ''
})
Expand Down
1 change: 0 additions & 1 deletion src/pages/system/user/IndexPage.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<q-page class="row items-center justify-evenly" padding>

<q-dialog v-model="visible" persistent>
<q-card style="min-width: 350px">
<q-form @submit="onSubmit" @reset="onReset" class="q-gutter-md">
Expand Down

0 comments on commit cac6e36

Please sign in to comment.