release 1.3.1

This commit is contained in:
Developer
2026-04-01 18:40:21 +08:00
parent 91ef47f991
commit f0a62ed68b
60 changed files with 1750 additions and 313 deletions

View File

@@ -6,8 +6,8 @@ import { preferences } from '@kit.ArkData';
struct WidgetSettings {
@State selectedStyle: string = 'classic';
@State showTime: boolean = true;
@State showWeather: boolean = true;
@State showQuote: boolean = true;
@State showWeather: boolean = false;
@State showQuote: boolean = false;
@State quoteText: string = '床前明月光,疑是地上霜。';
@State authorText: string = '李白《静夜思》';
private preference: preferences.Preferences | null = null;
@@ -26,11 +26,11 @@ struct WidgetSettings {
this.showTime = Boolean(showTimeVal);
console.info('[WidgetSettings] showTime raw value: ' + showTimeVal + ', type: ' + typeof showTimeVal + ', parsed: ' + this.showTime);
const showWeatherVal = await this.preference.get('showWeather', true);
const showWeatherVal = await this.preference.get('showWeather', false);
this.showWeather = Boolean(showWeatherVal);
console.info('[WidgetSettings] showWeather raw value: ' + showWeatherVal + ', type: ' + typeof showWeatherVal + ', parsed: ' + this.showWeather);
const showQuoteVal = await this.preference.get('showQuote', true);
const showQuoteVal = await this.preference.get('showQuote', false);
this.showQuote = Boolean(showQuoteVal);
this.quoteText = await this.preference.get('quote', '床前明月光,疑是地上霜。') as string;