From da479969a53c78dd18a645945187a5bd4eb49814 Mon Sep 17 00:00:00 2001 From: KaiKimera Date: Thu, 4 Apr 2024 23:34:02 +0300 Subject: [PATCH] 2024-04-04 20:33:59 --- .github/workflows/mirror.yml | 38 ---------------------- assets/js/theme.js | 6 ++-- i18n/en.yml | 2 +- i18n/ru.yml | 2 +- layouts/partials/footer.html | 2 +- layouts/partials/module/menu/theme.html | 8 ++++- layouts/partials/module/search/button.html | 2 +- 7 files changed, 14 insertions(+), 46 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index ed7d756..405e6de 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -123,44 +123,6 @@ jobs: dst_user: '${{ secrets.BOT_MIRROR_NAME }}' dst_token: '${{ secrets.BOT_MIRROR_TOKEN_MOSHUB }}' - # ------------------------------------------------------------------------------------------------------------------ # - # GIT.ORG.RU. - # ------------------------------------------------------------------------------------------------------------------ # - - mirror_gitorgru: - runs-on: ubuntu-latest - name: 'GIT.ORG.RU' - env: - DOMAIN: 'https://git.org.ru' - VERSION: 'v1' - steps: - - name: 'Get repository name' - shell: bash - run: | - echo "REPO_NAME=$( echo '${{ github.repository }}' | awk -F '/' '{ print $2 }' )" >> $GITHUB_ENV - - name: 'Create repository' - shell: bash - run: | - http="$( curl -s -o '/dev/null' -I -w '%{http_code}' -A '${{ env.USER_AGENT }}' '${{ env.DOMAIN }}/${{ env.OWNER }}/${{ env.REPO_NAME }}' )" - if [[ "${http}" -ne 200 ]]; then - curl -X POST \ - -H 'Authorization: token ${{ secrets.BOT_MIRROR_TOKEN_GITORGRU }}' \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' \ - -A '${{ env.USER_AGENT }}' \ - '${{ env.DOMAIN }}/api/${{ env.VERSION }}/orgs/${{ env.OWNER }}/repos' \ - -d '{"name":"${{ env.REPO_NAME }}"}' - fi - - name: 'Mirror repository' - uses: ghastore/github-mirror@main - with: - src_repo: '${{ github.server_url }}/${{ github.repository }}.git' - src_user: '${{ secrets.BOT_MIRROR_NAME }}' - src_token: '${{ secrets.BOT_MIRROR_TOKEN_GITHUB }}' - dst_repo: '${{ env.DOMAIN }}/${{ env.OWNER }}/${{ env.REPO_NAME }}.git' - dst_user: '${{ secrets.BOT_MIRROR_NAME }}' - dst_token: '${{ secrets.BOT_MIRROR_TOKEN_GITORGRU }}' - # ------------------------------------------------------------------------------------------------------------------ # # Disroot. # ------------------------------------------------------------------------------------------------------------------ # diff --git a/assets/js/theme.js b/assets/js/theme.js index ebb0158..03b2486 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -7,8 +7,8 @@ (() => { 'use strict' - const $getStoredTheme = () => localStorage.getItem('theme') - const $setStoredTheme = $theme => localStorage.setItem('theme', $theme) + const $getStoredTheme = () => localStorage.getItem('ui.theme') + const $setStoredTheme = $theme => localStorage.setItem('ui.theme', $theme) const $getPreferredTheme = () => { const $storedTheme = $getStoredTheme() @@ -32,7 +32,7 @@ $setTheme($getPreferredTheme()) const $showActiveTheme = ($theme, $focus = false) => { - const $themeSwitcher = document.querySelector('#bd-theme') + const $themeSwitcher = document.querySelector('.ui-theme') if (!$themeSwitcher) { return diff --git a/i18n/en.yml b/i18n/en.yml index b9bf67c..fc581ba 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -65,7 +65,7 @@ theme: dark: { other: 'Dark' } label: { other: 'Toggle theme' } light: { other: 'Light' } - tooltip: { other: 'Toggle theme' } + theme: { other: 'UI Theme' } # -------------------------------------------------------------------------------------------------------------------- # # Browser console. diff --git a/i18n/ru.yml b/i18n/ru.yml index 2eea2fe..0fcc943 100644 --- a/i18n/ru.yml +++ b/i18n/ru.yml @@ -65,7 +65,7 @@ theme: dark: { other: 'Тёмная' } label: { other: 'Переключить тему' } light: { other: 'Светлая' } - tooltip: { other: 'Переключение темы' } + theme: { other: 'Тема интерфейса' } # -------------------------------------------------------------------------------------------------------------------- # # Browser console. diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 0030d64..ab5c9b7 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -19,7 +19,7 @@ -
+
diff --git a/layouts/partials/module/menu/theme.html b/layouts/partials/module/menu/theme.html index c19dd67..b94b223 100644 --- a/layouts/partials/module/menu/theme.html +++ b/layouts/partials/module/menu/theme.html @@ -1,5 +1,11 @@