You've already forked SmartisanNote.Remake
优化 头部便签管理点击区域;
补充注释;
This commit is contained in:
@@ -81,61 +81,75 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, onMounted } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useAppStore } from '../stores/useAppStore';
|
||||
import Header from '../components/Header.vue';
|
||||
|
||||
const store = useAppStore();
|
||||
const router = useRouter();
|
||||
|
||||
// 加载初始数据
|
||||
// 页面挂载时加载初始数据
|
||||
// 从localStorage加载用户设置和便签数据
|
||||
onMounted(() => {
|
||||
store.loadData();
|
||||
});
|
||||
|
||||
// 切换云同步设置
|
||||
// 调用store中的方法更新云同步状态
|
||||
const toggleCloudSync = () => {
|
||||
store.toggleCloudSync();
|
||||
};
|
||||
|
||||
// 切换深色模式设置
|
||||
// 调用store中的方法更新深色模式状态
|
||||
const toggleDarkMode = () => {
|
||||
store.toggleDarkMode();
|
||||
};
|
||||
|
||||
// 处理登录云同步按钮点击事件
|
||||
// 在完整实现中,这里会打开登录界面
|
||||
const handleLogin = () => {
|
||||
// In a full implementation, this would open a login screen
|
||||
console.log('Login to cloud');
|
||||
};
|
||||
|
||||
// 处理隐私政策按钮点击事件
|
||||
// 在完整实现中,这里会显示隐私政策内容
|
||||
const handlePrivacyPolicy = () => {
|
||||
// In a full implementation, this would show the privacy policy
|
||||
console.log('Privacy policy');
|
||||
};
|
||||
|
||||
// 处理服务条款按钮点击事件
|
||||
// 在完整实现中,这里会显示服务条款内容
|
||||
const handleTermsOfService = () => {
|
||||
// In a full implementation, this would show the terms of service
|
||||
console.log('Terms of service');
|
||||
};
|
||||
|
||||
// 处理备份便签按钮点击事件
|
||||
// 在完整实现中,这里会执行便签备份操作
|
||||
const handleBackup = () => {
|
||||
// In a full implementation, this would backup notes
|
||||
console.log('Backup notes');
|
||||
};
|
||||
|
||||
// 处理恢复便签按钮点击事件
|
||||
// 在完整实现中,这里会执行便签恢复操作
|
||||
const handleRestore = () => {
|
||||
// In a full implementation, this would restore notes
|
||||
console.log('Restore notes');
|
||||
};
|
||||
|
||||
// 处理导出便签按钮点击事件
|
||||
// 在完整实现中,这里会执行便签导出操作
|
||||
const handleExport = () => {
|
||||
// In a full implementation, this would export notes
|
||||
console.log('Export notes');
|
||||
};
|
||||
|
||||
// 处理导入便签按钮点击事件
|
||||
// 在完整实现中,这里会执行便签导入操作
|
||||
const handleImport = () => {
|
||||
// In a full implementation, this would import notes
|
||||
console.log('Import notes');
|
||||
};
|
||||
|
||||
const handleBackPress = () => {
|
||||
window.history.back();
|
||||
router.back();
|
||||
};
|
||||
|
||||
const settings = computed(() => store.settings);
|
||||
|
||||
Reference in New Issue
Block a user