Skip to content

Commit

Permalink
fix: Keep the mixin and script configuration unchanged after subscrip…
Browse files Browse the repository at this point in the history
…tion updates.
  • Loading branch information
Ayideyia committed Jul 12, 2024
1 parent a4efd24 commit 1583846
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lang/locale/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export default {
noSubs: 'There are no available subscriptions.',
group: 'Group Details',
rule: 'Rule Details',
auto: 'This configuration is managed by subscription and will be overwritten when the subscription is updated!\nIf you want to modify this profile, please use the plugin system.',
auto: 'This profile is controlled by subscription and will be overwritten after updates.\nTo modify it, use mixins and scripts.',
mixinSettings: {
name: 'Mixin',
priority: 'Priority',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lang/locale/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export default {
noSubs: '没有可用的订阅',
group: '策略组详情',
rule: '规则详情',
auto: '此配置由订阅接管,更新订阅时会被覆盖!\n如果你想修改此配置,请使用插件系统。',
auto: '此配置文件由订阅控制,并将在更新订阅时被覆盖。要修改它,请使用混入和脚本。',
mixinSettings: {
name: '混入配置',
priority: '优先级',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/stores/subscribes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ export const useSubscribesStore = defineStore('subscribes', () => {
if (profile) {
_profile.name = profile.name
_profile.advancedConfig.secret = profile.advancedConfig.secret
_profile.mixinConfig = profile.mixinConfig
_profile.scriptConfig = profile.scriptConfig
profilesStore.editProfile(profile.id, _profile)
} else {
_profile.name = s.name
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const generateRuleProviders = async (
1. Generate the config from the profile.
2. Merge the config using mixins.
3. Process the config using scripts.
4. Handle the config using plugins.
4. Process the config using plugins.
*/
export const generateConfig = async (originalProfile: ProfileType) => {
const profile = deepClone(originalProfile)
Expand Down

0 comments on commit 1583846

Please sign in to comment.