Skip to content

Commit

Permalink
version: 1.6.3(1000013) => 1.6.4(1000014);
Browse files Browse the repository at this point in the history
feat: individualized what's new panel;
feat: copy from the scratching board;
code: removed en_US language since its duplicate with the base profile;
code: removed all webview_ready variables and its related codes since now a blank page is, literally, transparent.
  • Loading branch information
awaLiny2333 committed Dec 9, 2024
1 parent 3daa10b commit 72dda96
Show file tree
Hide file tree
Showing 20 changed files with 344 additions and 167 deletions.
4 changes: 2 additions & 2 deletions AppScope/app.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"app": {
"bundleName": "com.next.liny.linysbrowserNEXT",
"vendor": "example",
"versionCode": 1000013,
"versionName": "1.6.3",
"versionCode": 1000014,
"versionName": "1.6.4",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
Expand Down
38 changes: 20 additions & 18 deletions home/src/main/ets/blocks/meowAppSettings.ets
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import woofAdsBlocker from '../dialogs/woofAdsBlocker';
import meowWhatsNew from './meowWhatsNew';
import meowColorsManager from './meowColorsManager';
import { BusinessError } from '@kit.BasicServicesKit';
import meowCredits from './meowCredits';
import meowCreditsRepos from './meowCreditsRepos';
import meowCreditsUsers from './meowCreditsUsers';

@Component
struct meowAppSettings {
Expand Down Expand Up @@ -241,6 +242,19 @@ struct meowAppSettings {
Column({ space: 15 }) {
linysTitleText({ text: $r('app.string.Settings_Experience') })

Row() {
linysText({ text: $r('app.string.Settings_experience_web_force_dark_mode'), max_lines: 3 })
.layoutWeight(1)
Toggle({ isOn: this.web_force_dark_mode, type: ToggleType.Switch })
.switchPointColor(this.color_current_secondary)
.selectedColor(this.color_current_font)
.onChange(isOn => {
this.web_force_dark_mode = isOn;
this.bunch_of_settings.set('web_force_dark_mode', isOn);
})
} // Force dark mode
.width("100%")

Row() {
linysText({ text: $r('app.string.Settings_experience_use_adblock'), max_lines: 1 })
.layoutWeight(1)
Expand Down Expand Up @@ -277,19 +291,6 @@ struct meowAppSettings {
} // Use sys back
.width("100%")

Row() {
linysText({ text: $r('app.string.Settings_experience_web_force_dark_mode'), max_lines: 3 })
.layoutWeight(1)
Toggle({ isOn: this.web_force_dark_mode, type: ToggleType.Switch })
.switchPointColor(this.color_current_secondary)
.selectedColor(this.color_current_font)
.onChange(isOn => {
this.web_force_dark_mode = isOn;
this.bunch_of_settings.set('web_force_dark_mode', isOn);
})
} // Force dark mode
.width("100%")

linysText({ text: $r('app.string.Settings_experience_max_bookmark_advice'), max_lines: 2 })
Row({ space: 5 }) {
Slider({
Expand Down Expand Up @@ -533,20 +534,21 @@ struct meowAppSettings {
will_be_reversed_boolean: this.showing_app_settings,
text: $r('app.string.About_bilibili'),
link: "https://space.bilibili.com/678438347",
})
}) // bili
linysLink({
will_be_reversed_boolean: this.showing_app_settings,
text: $r('app.string.About_GitHub'),
link: "https://github.com/awaLiny2333/LinysBrowser_NEXT",
})
}) // GitHub
linysLink({
will_be_reversed_boolean: this.showing_app_settings,
text: $r('app.string.About_Gitee'),
link: "https://gitee.com/awa_Liny/LinysBrowser_NEXT",
})
}) // Gitee
linysText({ text: "(ฅ^・ﻌ・^)ฅ - " + this.versionName + " - " + this.versionNo }) // Version Info
meowWhatsNew()
meowCredits()
meowCreditsRepos()
meowCreditsUsers()
}
.padding(15)
.alignItems(HorizontalAlign.Start)
Expand Down
7 changes: 3 additions & 4 deletions home/src/main/ets/blocks/meowBookmarks.ets
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ struct meowBookmarks {
@StorageProp('tablet_mode') tablet_mode: boolean = false;
@StorageLink('bunch_of_bookmarks') bunch_of_bookmarks: bunch_of_bookmarks = new bunch_of_bookmarks("meow");
@StorageLink('bunch_of_tabs') bunch_of_tabs: bunch_of_tabs = new bunch_of_tabs();
@Link webViews_ready: boolean;
@State viewing_contents: unified_item[] = this.bunch_of_bookmarks.root.get_content();
@State @Watch('refresh_content_view') looking_at_path: string = "";
@State current_folder: folder | undefined = undefined;
Expand Down Expand Up @@ -53,7 +52,7 @@ struct meowBookmarks {
my_index: key,
viewing_contents: this.viewing_contents, // For editing
looking_at_path: this.looking_at_path, // the path of now showing list (directory) on the panel
webViews_ready: this.webViews_ready, // To ask webViews to show
// To ask webViews to show
height_of_panel: this.scroll_area_height, // for animation params
parent_path: this.looking_at_path, // for get_my_path()
});
Expand Down Expand Up @@ -414,7 +413,7 @@ struct bookmarkItem {
@Prop my_index: number = 0;
@StorageLink('bunch_of_bookmarks') bunch_of_bookmarks: bunch_of_bookmarks = new bunch_of_bookmarks("meow");
@StorageLink('bunch_of_tabs') bunch_of_tabs: bunch_of_tabs = new bunch_of_tabs();
@Link webViews_ready: boolean;

@Link looking_at_path: string;
@Link viewing_contents: unified_item[];
@Prop parent_path: string;
Expand Down Expand Up @@ -668,7 +667,7 @@ struct bookmarkItem {
// Will automatically cause meowBookmarks to update the UI list (@Watch)
} else {
// Load web
this.webViews_ready = true;

this.bunch_of_tabs.stop_onWorkingTab()
this.bunch_of_tabs.loadUrl_onWorkingTab((this.item.get_item() as bookmark).get_link())
}
Expand Down
83 changes: 0 additions & 83 deletions home/src/main/ets/blocks/meowCredits.ets

This file was deleted.

48 changes: 48 additions & 0 deletions home/src/main/ets/blocks/meowCreditsRepos.ets
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import linysText from '../components/linysText';
import { animation_default } from '../hosts/bunch_of_defaults';
import { resource_to_string } from '../utils/resource_tools';

@Component
struct meowCreditsRepos {
@State credits_repos_and_projs_resource: Resource = $r("app.string.Credits_repos_and_projs");
@State credits_repos_and_projs: string = resource_to_string(this.credits_repos_and_projs_resource);
@State credits_repos_and_projs_list: string[] = this.credits_repos_and_projs.split('\n');

build() {
Column({ space: 8 }) {
linysText({
text: $r('app.string.Credits'),
max_lines: 3
})

ForEach(this.credits_repos_and_projs_list, (text: string, index: number) => {
linysText({
text: text,
max_lines: 48
})
.opacity(0.8)
})
}
.alignItems(HorizontalAlign.Start)
.padding(10)
.borderRadius(13.5)
.backgroundColor($r('sys.color.comp_background_tertiary'))
.width("100%")
.animation(animation_default())
.onAreaChange(() => {
this.update_resource_string();
})
}

/**
* Convert the Resource to string again.
*
* Usually called to deal with the change of language.
* */
update_resource_string() {
this.credits_repos_and_projs = resource_to_string(this.credits_repos_and_projs_resource);
this.credits_repos_and_projs_list = this.credits_repos_and_projs.split('\n');
}
}

export default meowCreditsRepos;
53 changes: 53 additions & 0 deletions home/src/main/ets/blocks/meowCreditsUsers.ets
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import linysText from '../components/linysText';
import { animation_default } from '../hosts/bunch_of_defaults';
import { resource_to_string } from '../utils/resource_tools';

@Component
struct meowCreditsUsers {
@State credits_devs_and_users_resource: Resource = $r("app.string.Credits_devs_and_users");
@State credits_devs_and_users: string = resource_to_string(this.credits_devs_and_users_resource);
@State credits_devs_and_users_list: string[] = this.credits_devs_and_users.split('\n');

build() {
Column({ space: 8 }) {
linysText({
text: $r('app.string.Credits_issues'),
max_lines: 3
})

ForEach(this.credits_devs_and_users_list, (text: string, index: number) => {
linysText({
text: text,
max_lines: 48
})
.opacity(0.8)
})
linysText({
text: $r("app.string.Credits_extra"),
max_lines: 6
})
.opacity(0.8)
}
.alignItems(HorizontalAlign.Start)
.padding(10)
.borderRadius(13.5)
.backgroundColor($r('sys.color.comp_background_tertiary'))
.width("100%")
.animation(animation_default())
.onAreaChange(() => {
this.update_resource_string();
})
}

/**
* Convert the Resource to string again.
*
* Usually called to deal with the change of language.
* */
update_resource_string() {
this.credits_devs_and_users = resource_to_string(this.credits_devs_and_users_resource);
this.credits_devs_and_users_list = this.credits_devs_and_users.split('\n');
}
}

export default meowCreditsUsers;
4 changes: 2 additions & 2 deletions home/src/main/ets/blocks/meowDownloads.ets
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ struct meowDownloadsButton {
linysText({
text: this.my_link,
max_lines: 4,
})// FIle link
}) // FIle link
.clickEffect(click_effect_default())
.onClick(() => {
copy(this.my_link);
Expand Down Expand Up @@ -195,7 +195,7 @@ struct meowDownloadsButton {
.clickEffect(click_effect_default())
.animation(animation_default())

Button(this.my_paused ? " 󰂴 " : " 󰂱 ")// Pause Continue
Button(this.my_paused ? " 󰂴 " : " 󰂱 ") // Pause Continue
.type(ButtonType.Capsule)
.backgroundColor($r("app.color.font_color_title"))
.fontColor(this.color_current_primary)
Expand Down
Loading

0 comments on commit 72dda96

Please sign in to comment.