Skip to content

Commit

Permalink
πŸ”€ #299 from LSS-Manager/dev
Browse files Browse the repository at this point in the history
πŸ”€πŸ”– 4.1.5
  • Loading branch information
jxn-30 authored Nov 27, 2020
2 parents ad4842f + 23c1db4 commit c9f2e1e
Show file tree
Hide file tree
Showing 39 changed files with 649 additions and 384 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
time: "03:00"
timezone: "Europe/Berlin"
assignees:
- "jxn-30"
commit-message:
Expand Down
49 changes: 49 additions & 0 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ moduleDirs.forEach((module: string) => {
const docs = fs
.readdirSync(`./src/modules/${module}/docs`)
.filter((f: string) => f.match(/^[a-z]{2}_[A-Z]{2}\.md$/));
const availableLangs = [] as string[];
docs.forEach((f: string) => {
const lang = f.split('.')[0];
availableLangs.push(lang);
if (!modulesSorted.hasOwnProperty(lang)) modulesSorted[lang] = [];
if (!fs.existsSync(`./docs/${lang}/modules`))
fs.mkdirSync(`./docs/${lang}/modules`);
Expand Down Expand Up @@ -83,6 +85,53 @@ ${content}`
`./docs/.vuepress/public/assets/${module}`
);
}

Object.keys(config.games).forEach(lang => {
if (
availableLangs.includes(lang) ||
!fs.existsSync(`./docs/${lang}`)
)
return;
if (!fs.existsSync(`./docs/${lang}/modules`))
fs.mkdirSync(`./docs/${lang}/modules`);
const rootFile = `./src/modules/${module}/i18n/${lang}.root`;
// eslint-disable-next-line @typescript-eslint/no-var-requires
let title = require(`../.${rootFile.replace(lang, 'en_US')}`).name;
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
title = require(`../.${rootFile}`).name;
} catch {
// Do nothing
}
fs.writeFileSync(
`./docs/${lang}/modules/${module}.md`,
`---
title: ${title}
lang: ${lang}
---
# ${title}
:::warning No module page existing yet
Dear User,
thanks for your interest in the Wiki page of **${title}**!
Unfortunately, we weren't able to create the content for your language \`${lang}\` yet. If you want to contribute to our wiki, feel free to create this page [on GitHub](https://github.com/${
config.github.repo
}/new/dev/src/modules/${module}/docs?filename=${lang}.md)!
We suggest to have a look at the files of the other languages for examples in the [docs directory](https://github.com/${
config.github.repo
}/tree/dev/src/modules/${module}/docs)
This module already has a Wiki page in the following languages:
${availableLangs
.map(
l =>
`* [${config.games[l].flag} ${config.games[l].name}](/v4/docs/${l}/modules/${module}.html)`
)
.join('\n')}
:::
`
);
});
}
});
const noMapkitModules = {} as {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.1.4+20201125.0812",
"version": "4.1.5+20201127.2128",
"license": "CC-BY-NC-SA-4.0",
"scripts": {
"predev": "tsc -b scripts && node scripts predev",
Expand Down Expand Up @@ -35,15 +35,15 @@
"vue-responsive-dash": "^0.5.0",
"vue-select": "^3.10.7",
"vue-slim-tabs": "^0.4.0",
"vuex": "^3.5.1"
"vuex": "^3.6.0"
},
"devDependencies": {
"@types/combokeys": "^2.4.6",
"@types/i18n-js": "^3.0.3",
"@types/jquery": "^3.5.4",
"@types/leaflet": "^1.5.19",
"@types/lodash": "^4.14.165",
"@types/node": "^14.14.9",
"@types/node": "^14.14.10",
"@types/speed-measure-webpack-plugin": "^1.3.0",
"@types/ua-parser-js": "^0.7.33",
"@types/vue-select": "^2.5.1",
Expand Down Expand Up @@ -95,4 +95,4 @@
"author": "Aisaka | Sanni | Jan (jxn_30) | Ron31",
"description": "Das Tool fΓΌr das LSS in der Version 4"
}
}
}
14 changes: 8 additions & 6 deletions src/LSSM-Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export default Vue.extend<
wiki: this.$store.getters.wiki,
version: this.$store.state.version,
mode: this.$store.state.mode,
nav: document.getElementById('main_navbar'),
};
},
computed: {
Expand Down Expand Up @@ -214,8 +213,14 @@ export default Vue.extend<
);
},
storeIconBg() {
if (this.iconBgAsNavBg && this.nav) {
this.nav.style.backgroundColor = this.iconBg ?? '#000';
if (this.iconBgAsNavBg) {
this.$store.dispatch('addStyle', {
selectorText:
'.navbar-default, .navbar-default .dropdown-menu',
style: {
'background-color': this.iconBg,
},
});
}
LSSM.$store.dispatch('settings/setSetting', {
moduleId: 'global',
Expand All @@ -233,9 +238,6 @@ export default Vue.extend<
this.labelInMenu = labelInMenu;
this.iconBg = iconBg;
this.iconBgAsNavBg = iconBgAsNavBg;
if (iconBgAsNavBg && this.nav) {
this.nav.style.backgroundColor = iconBg;
}
});
},
});
Expand Down
15 changes: 15 additions & 0 deletions src/LSSMV4.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ export default Vue.extend<
props.close();
},
},
mounted() {
this.$store
.dispatch('settings/getModule', 'global')
.then(({ iconBg, iconBgAsNavBg }) => {
if (iconBgAsNavBg) {
this.$store.dispatch('addStyle', {
selectorText:
'.navbar-default, .navbar-default .dropdown-menu',
style: {
'background-color': iconBg,
},
});
}
});
},
});
</script>

Expand Down
28 changes: 12 additions & 16 deletions src/components/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,7 @@
:name="setting.name"
v-model="settings[moduleId][settingId].value"
:options="
setting.values.map(value => ({
label: setting.noLabelTranslation
? value
: $t(
`modules.${moduleId}.settings.${settingId}.${value}`
),
value,
}))
getSelectOptions(moduleId, setting, settingId)
"
:placeholder="
$t(
Expand All @@ -217,14 +210,7 @@
:name="setting.name"
v-model="settings[moduleId][settingId].value"
:options="
setting.values.map(value => ({
label: setting.noLabelTranslation
? value
: $t(
`modules.${moduleId}.settings.${settingId}.${value}`
),
value,
}))
getSelectOptions(moduleId, setting, settingId)
"
:placeholder="
$t(
Expand Down Expand Up @@ -586,6 +572,16 @@ export default Vue.extend<
};
},
$m: (key, args) => LSSM.$t(`modules.settings.${key}`, args),
getSelectOptions(module, setting, settingId) {
return setting.values.map((v, vi) => ({
label: setting.noLabelTranslation
? v
: setting.labels?.[vi] ??
this.$t(`modules.${module}.settings.${settingId}.${v}`) ??
v,
value: v,
}));
},
},
mounted() {
this.getExportData();
Expand Down
6 changes: 3 additions & 3 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ export default {
admins: ['de_DE-205976', 'de_DE-675'],
browser: {
chrome: {
latest: 86,
latest: 87,
supported: 84,
download: 'https://chrome.com',
},
firefox: {
latest: 82,
latest: 83,
supported: 79,
download: 'https://firefox.com',
},
Expand All @@ -24,7 +24,7 @@ export default {
download: 'https://apple.com/safari/',
},
edge: {
latest: 86,
latest: 87,
supported: 86,
download: 'https://microsoft.com/edge',
},
Expand Down
Loading

0 comments on commit c9f2e1e

Please sign in to comment.