Skip to content

Commit

Permalink
Merge pull request #646 from Zagrios/revert/changelogs-modal
Browse files Browse the repository at this point in the history
[revert] revert changelogs modal feature
  • Loading branch information
Zagrios authored Nov 6, 2024
2 parents d5f2ba3 + 8208874 commit 5cbc480
Show file tree
Hide file tree
Showing 17 changed files with 6 additions and 247 deletions.
14 changes: 0 additions & 14 deletions assets/jsons/changelogs.json

This file was deleted.

4 changes: 0 additions & 4 deletions assets/jsons/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@
"open-logs": "Protokolle öffnen"
}
},
"changelogs": {
"open" : "🚀 Neues im Changelog entdecken!",
"not-founds": "😕 Hoppla, kein Changelog zu sehen!"
},
"advanced": {
"title": "Erweiterte",
"description": "Erweiterte Einstellungen für BSManager.",
Expand Down
4 changes: 0 additions & 4 deletions assets/jsons/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@
"open-logs": "Open logs"
}
},
"changelogs": {
"open": "🚀 Check Out the Changelog!",
"not-founds": "😕 Oops, No Changelog Here!"
},
"advanced": {
"title": "Advanced",
"description": "Advanced settings for BSManager.",
Expand Down
4 changes: 0 additions & 4 deletions assets/jsons/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@
"open-logs": "Abrir los registros"
}
},
"changelogs": {
"open": "🚀 ¡Descubre lo nuevo en el Changelog!",
"not-founds": "😕 Uy, ¡Changelog no encontrado!"
},
"advanced": {
"title": "Avanzados",
"description": "Configuraciones avanzadas para BSManager.",
Expand Down
4 changes: 0 additions & 4 deletions assets/jsons/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@
"open-logs": "Ouvrir les logs"
}
},
"changelogs": {
"open" : "🚀 Jetez un œil au Changelog !",
"not-founds": "😕 Oups, Changelog introuvable !"
},
"advanced": {
"title": "Avancés",
"description": "Paramètres avancés pour BSManager.",
Expand Down
4 changes: 0 additions & 4 deletions assets/jsons/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@
"open-logs": "ログを表示"
}
},
"changelogs": {
"open" : "🚀 チェンジログを覗いてみて!",
"not-founds": "😕 あれ、チェンジログが見当たらない!"
},
"advanced": {
"title": "高度な設定",
"description": "BSManagerの高度な設定。",
Expand Down
4 changes: 0 additions & 4 deletions assets/jsons/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@
"open-logs": "로그 보기"
}
},
"changelogs": {
"open": "🚀 변경 로그를 확인해보세요!",
"not-founds": "😕 변경 로그가 보이지 않습니다!"
},
"advanced": {
"title": "고급 설정",
"description": "BSManager의 고급 설정입니다.",
Expand Down
4 changes: 0 additions & 4 deletions assets/jsons/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@
"open-logs": "Открыть логи"
}
},
"changelogs": {
"open" : "🚀 Изучаем Changelog!",
"not-founds": "😕 Ой, Changelog нигде не видно!"
},
"advanced": {
"title": "Дополнительные",
"description": "Дополнительные настройки для BSManager.",
Expand Down
4 changes: 0 additions & 4 deletions assets/jsons/translations/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@
"open-logs": "打開日誌"
}
},
"changelogs": {
"open" : "🚀 探索更新日誌!",
"not-founds": "😕 噢,找不到更新日誌!"
},
"advanced": {
"title": "高级设置",
"description": "BSManager的高级设置。",
Expand Down
4 changes: 0 additions & 4 deletions assets/jsons/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@
"open-logs": "打开日志"
}
},
"changelogs": {
"open" : "🚀 探索更新日志!",
"not-founds": "😕 哎呀,找不到更新日志!"
},
"advanced": {
"title": "高级设置",
"description": "BSManager的高级设置。",
Expand Down
22 changes: 0 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@
"@types/color": "^3.0.3",
"@types/crypto-js": "^4.2.1",
"@types/dateformat": "^5.0.0",
"@types/dompurify": "^3.0.5",
"@types/got": "^9.6.12",
"@types/jest": "^29.5.11",
"@types/node": "22.8.6",
Expand Down Expand Up @@ -241,7 +240,6 @@
"color": "^4.2.3",
"crypto-js": "^4.2.0",
"dateformat": "^5.0.3",
"dompurify": "^3.0.9",
"dot-prop": "^8.0.2",
"electron-debug": "^3.2.0",
"electron-log": "^4.4.8",
Expand Down

This file was deleted.

This file was deleted.

36 changes: 4 additions & 32 deletions src/renderer/pages/settings-page.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@ import { BsStore } from "shared/models/bs-store.enum";
import { SteamIcon } from "renderer/components/svgs/icons/steam-icon.component";
import { OculusIcon } from "renderer/components/svgs/icons/oculus-icon.component";
import { BsDownloaderService } from "renderer/services/bs-version-download/bs-downloader.service";
import { AutoUpdaterService } from "renderer/services/auto-updater.service";
import BeatWaitingImg from "../../../assets/images/apngs/beat-waiting.png";
import BeatConflict from "../../../assets/images/apngs/beat-conflict.png";
import { logRenderError } from "renderer";
import { SettingToogleSwitchGrid } from "renderer/components/settings/setting-toogle-switch-grid.component";
import { BasicModal } from "renderer/components/modal/basic-modal.component";
import { StaticConfigurationService } from "renderer/services/static-configuration.service";
import { tryit } from "shared/helpers/error.helpers";
import { InstallationLocationService } from "renderer/services/installation-location.service";
import { AutoUpdaterService } from "renderer/services/auto-updater.service";

export function SettingsPage() {

Expand All @@ -65,9 +63,9 @@ export function SettingsPage() {
const playlistsManager = useService(PlaylistsManagerService);
const modelsManager = useService(ModelsManagerService);
const versionLinker = useService(VersionFolderLinkerService);
const autoUpdater = useService(AutoUpdaterService);
const staticConfig = useService(StaticConfigurationService);
const installationLocationService = useService(InstallationLocationService);
const autoUpdater = useService(AutoUpdaterService);

const { firstColor, secondColor } = useThemeColor();

Expand Down Expand Up @@ -100,10 +98,7 @@ export function SettingsPage() {
const [hasDownloaderSession, setHasDownloaderSession] = useState(false);
const [hardwareAccelerationEnabled, setHardwareAccelerationEnabled] = useState(true);
const [useSymlink, setUseSymlink] = useState(false);
const appVersion = useObservable(() => ipcService.sendV2("current-version"));

const [isChangelogAvailable, setIsChangelogAvailable] = useState(true);
const [changlogsLoading, setChanglogsLoading] = useState(false);
const appVersion = useObservable(() => autoUpdater.getAppVersion());

useEffect(() => {
loadInstallationFolder();
Expand Down Expand Up @@ -161,24 +156,6 @@ export function SettingsPage() {
i18nService.setLanguage(item.value);
};

const handleVersionClick = async () => {
let isChangelogResolved = false;
const timeoutId = setTimeout(() => setChanglogsLoading(() => !isChangelogResolved), 100);

await autoUpdater.showChangelog(await lastValueFrom(autoUpdater.getAppVersion()))
.then(() => {
setIsChangelogAvailable(() => true);
})
.catch(err => {
logRenderError(err);
setIsChangelogAvailable(() => false);
})
.finally(() => { isChangelogResolved = true; });

setChanglogsLoading(() => false);
clearTimeout(timeoutId);
};

const setDefaultProtonFolder = async () => {
if (!progressBarService.require()) {
return;
Expand Down Expand Up @@ -605,12 +582,7 @@ export function SettingsPage() {
]}/>
</SettingContainer>

<Tippy content={isChangelogAvailable ? t("pages.settings.changelogs.open") : t("pages.settings.changelogs.not-founds")} placement="left" className="font-bold bg-main-color-3">
<div className="!bg-light-main-color-1 dark:!bg-main-color-1 rounded-md py-1 px-2 font-bold float-right mb-5 hover:brightness-125 h-auto w-auto">
<BsmButton onClick={handleVersionClick} text={`v${appVersion}`} withBar={false} typeColor="none"/>
</div>
</Tippy>
<BsmImage className={`h-7 my-auto spin-loading float-right ${changlogsLoading ? "" : "hidden"}`} image={BeatWaitingImg} loading="eager" />
<span className="bg-light-main-color-1 dark:bg-main-color-1 rounded-md py-1 px-2 font-bold float-right mb-5">v{appVersion}</span>
</div>
<SupportersView isVisible={showSupporters} setVisible={setShowSupporters} />
</div>
Expand Down
Loading

0 comments on commit 5cbc480

Please sign in to comment.