fix tx isdone checkbox text size

This commit is contained in:
xds
2026-03-10 15:08:24 +03:00
parent d969551491
commit a0b4a4bcf3
7 changed files with 74 additions and 3 deletions

View File

@@ -1,10 +1,12 @@
<script setup lang="ts">
import {onMounted, ref} from "vue";
import {Divider, ToggleSwitch} from "primevue";
import {Divider, ToggleSwitch, Button} from "primevue";
import {spaceService} from "@/services/space-service";
import {SettingType} from "@/models/enums";
import {useUserStore} from "@/stores/userStore";
const userStore = useUserStore()
const spacePeriodStarts = ref(10)
const spaceSubPeriodStarts = ref(25)
@@ -87,6 +89,31 @@ const settingChanged = async (setting: SettingType) => {
}
declare global {
interface Window {
google: any;
}
}
const linkGoogleDrive = () => {
if (typeof window.google === 'undefined') {
console.error('Google client not loaded')
return
}
const client = window.google.accounts.oauth2.initCodeClient({
client_id: import.meta.env.VITE_GOOGLE_CLIENT_ID,
scope: 'https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.readonly',
ux_mode: 'popup',
callback: async (response: any) => {
if (response.code) {
await userStore.linkGoogleDrive(response.code)
}
},
});
client.requestCode();
}
onMounted(async () => {
await fetchData()
})
@@ -143,6 +170,25 @@ onMounted(async () => {
</div>
</div>
</div>
<div class="flex backup flex-col !w-full mt-2">
<span class="text-sm !pl-2">Storage & Backup</span>
<div class="flex card flex-col !w-full justify-between p-2">
<div class="flex flex-row !w-full justify-between items-center">
<div class="flex flex-col">
<span>Google Drive</span>
<span class="text-xs text-gray-500" v-if="userStore.user?.isGoogleDriveLinked">Connected</span>
<span class="text-xs text-gray-500" v-else>Not connected</span>
</div>
<Button
:label="userStore.user?.isGoogleDriveLinked ? 'Reconnect' : 'Connect'"
:icon="userStore.user?.isGoogleDriveLinked ? 'pi pi-refresh' : 'pi pi-google'"
:severity="userStore.user?.isGoogleDriveLinked ? 'secondary' : 'primary'"
size="small"
@click="linkGoogleDrive"
/>
</div>
</div>
</div>
</div>
</div>
</template>