Change slogan and refactor project info naming

The project's slagon has been updated back to "Privacy is sexy" from
"Now you have the choice" for enhanced brand clarity and memorability.

This change also reflects the community's preference and aligns with the
project's established identity.

This commit also refactors naming and structure of project information
(metadata) struct to enhance clarity and maintainability in relation to
changing the slogan.

Key changes include:

- Update UI components to display the revised slogan.
- Remove period from project slogan in code area for consistency with a
  explanatory comment for future maintainability.
- Refactor header container and class names for clarity.
- Standardize project metadata usage in `TheCodeArea.vue` to ensure
  consistency.
- Improve code clarity by renaming `IProjectInformation` to
  `ProjectDetails` and `ProjectInformation` to `GitHubProjectDetails`.
- Organize `ProjectDetails` under a dedicated `Project` directory within
  the domain layer for better structure.

These changes are expected to improve the project's appeal and
streamline future maintenance and development efforts.
This commit is contained in:
undergroundwires
2024-02-10 18:50:56 +01:00
parent b9c89b701f
commit a54e16488c
38 changed files with 273 additions and 256 deletions

View File

@@ -44,14 +44,14 @@ export default defineComponent({
setup() {
const { currentState } = injectKey((keys) => keys.useCollectionState);
const { info } = injectKey((keys) => keys.useApplication);
const { projectDetails } = injectKey((keys) => keys.useApplication);
const operatingSystem = computed<OperatingSystem>(() => currentState.value.os);
const appName = computed<string>(() => info.name);
const appName = computed<string>(() => projectDetails.name);
const downloadUrl = computed<string>(
() => info.getDownloadUrl(operatingSystem.value),
() => projectDetails.getDownloadUrl(operatingSystem.value),
);
const osName = computed<string>(

View File

@@ -24,6 +24,7 @@ import { IReadOnlyCategoryCollectionState } from '@/application/Context/State/IC
import { CodeBuilderFactory } from '@/application/Context/State/Code/Generation/CodeBuilderFactory';
import SizeObserver from '@/presentation/components/Shared/SizeObserver.vue';
import { NonCollapsing } from '@/presentation/components/Scripts/View/Cards/NonCollapsingDirective';
import type { ProjectDetails } from '@/domain/Project/ProjectDetails';
import ace from './ace-importer';
export default defineComponent({
@@ -41,6 +42,7 @@ export default defineComponent({
},
setup(props) {
const { onStateChange, currentState } = injectKey((keys) => keys.useCollectionState);
const { projectDetails } = injectKey((keys) => keys.useApplication);
const { events } = injectKey((keys) => keys.useAutoUnsubscribedEvents);
const editorId = 'codeEditor';
@@ -74,7 +76,7 @@ export default defineComponent({
}
function updateCode(code: string, language: ScriptingLanguage) {
const innerCode = code || getDefaultCode(language);
const innerCode = code || getDefaultCode(language, projectDetails);
editor?.setValue(innerCode, 1);
}
@@ -171,10 +173,14 @@ function getLanguage(language: ScriptingLanguage) {
}
}
function getDefaultCode(language: ScriptingLanguage): string {
function getDefaultCode(language: ScriptingLanguage, project: ProjectDetails): string {
return new CodeBuilderFactory()
.create(language)
.appendCommentLine('privacy.sexy — Now you have the choice.')
.appendCommentLine(`${project.name}${project.slogan}`)
/*
Keep the slogan without a period for impact and continuity.
Slogans should be punchy and memorable, not punctuated like full sentences.
*/
.appendCommentLine(' 🔐 Enforce privacy & security best-practices on Windows, macOS and Linux.')
.appendLine()
.appendCommentLine('-- 🤔 How to use')
@@ -183,7 +189,7 @@ function getDefaultCode(language: ScriptingLanguage): string {
.appendCommentLine(' 📙 After you choose any tweak, you can download or copy to execute your script.')
.appendCommentLine(' 📙 Come back regularly to apply latest version for stronger privacy and security.')
.appendLine()
.appendCommentLine('-- 🧐 Why privacy.sexy')
.appendCommentLine(`-- 🧐 Why ${project.name}`)
.appendCommentLine(' ✔️ Rich tweak pool to harden security & privacy of the OS and other software on it.')
.appendCommentLine(' ✔️ No need to run any compiled software on your system, just run the generated scripts.')
.appendCommentLine(' ✔️ Have full visibility into what the tweaks do as you enable them.')

View File

@@ -62,9 +62,9 @@ export default defineComponent({
setup() {
const { modifyCurrentState, onStateChange } = injectKey((keys) => keys.useCollectionState);
const { events } = injectKey((keys) => keys.useAutoUnsubscribedEvents);
const { info } = injectKey((keys) => keys.useApplication);
const { projectDetails } = injectKey((keys) => keys.useApplication);
const repositoryUrl = computed<string>(() => info.repositoryWebUrl);
const repositoryUrl = computed<string>(() => projectDetails.repositoryWebUrl);
const searchQuery = ref<string | undefined>();
const isSearching = computed(() => Boolean(searchQuery.value));
const searchHasMatches = ref(false);

View File

@@ -3,6 +3,6 @@ import { IApplication } from '@/domain/IApplication';
export function useApplication(application: IApplication) {
return {
application,
info: application.info,
projectDetails: application.projectDetails,
};
}

View File

@@ -26,7 +26,7 @@ export default defineComponent({
},
},
setup(props) {
const { info } = injectKey((keys) => keys.useApplication);
const { projectDetails } = injectKey((keys) => keys.useApplication);
const { os: currentOs } = injectKey((keys) => keys.useRuntimeEnvironment);
const isCurrentOs = computed<boolean>(() => {
@@ -42,7 +42,7 @@ export default defineComponent({
});
const downloadUrl = computed<string>(() => {
return info.getDownloadUrl(props.operatingSystem);
return projectDetails.getDownloadUrl(props.operatingSystem);
});
return {

View File

@@ -59,11 +59,11 @@ import { injectKey } from '@/presentation/injectionSymbols';
export default defineComponent({
setup() {
const { info } = injectKey((keys) => keys.useApplication);
const { projectDetails } = injectKey((keys) => keys.useApplication);
const { isRunningAsDesktopApplication } = injectKey((keys) => keys.useRuntimeEnvironment);
const repositoryUrl = computed<string>(() => info.repositoryUrl);
const feedbackUrl = computed<string>(() => info.feedbackUrl);
const repositoryUrl = computed<string>(() => projectDetails.repositoryUrl);
const feedbackUrl = computed<string>(() => projectDetails.feedbackUrl);
return {
repositoryUrl,

View File

@@ -67,20 +67,20 @@ export default defineComponent({
FlatButton,
},
setup() {
const { info } = injectKey((keys) => keys.useApplication);
const { projectDetails } = injectKey((keys) => keys.useApplication);
const { isRunningAsDesktopApplication } = injectKey((keys) => keys.useRuntimeEnvironment);
const isPrivacyDialogVisible = ref(false);
const version = computed<string>(() => info.version.toString());
const version = computed<string>(() => projectDetails.version.toString());
const homepageUrl = computed<string>(() => info.homepage);
const homepageUrl = computed<string>(() => projectDetails.homepage);
const repositoryUrl = computed<string>(() => info.repositoryWebUrl);
const repositoryUrl = computed<string>(() => projectDetails.repositoryWebUrl);
const releaseUrl = computed<string>(() => info.releaseUrl);
const releaseUrl = computed<string>(() => projectDetails.releaseUrl);
const feedbackUrl = computed<string>(() => info.feedbackUrl);
const feedbackUrl = computed<string>(() => projectDetails.feedbackUrl);
function showPrivacyDialog() {
isPrivacyDialogVisible.value = true;

View File

@@ -1,9 +1,13 @@
<template>
<div id="container">
<h1 class="child title">
<div class="container">
<h1 class="child brand">
{{ title }}
</h1>
<h2 class="child subtitle">
<h2 class="child slogan">
<!--
Keep the slogan without a period for impact and continuity.
Slogans should be punchy and memorable, not punctuated like full sentences.
-->
{{ subtitle }}
</h2>
</div>
@@ -15,10 +19,10 @@ import { injectKey } from '@/presentation/injectionSymbols';
export default defineComponent({
setup() {
const { info } = injectKey((keys) => keys.useApplication);
const { projectDetails } = injectKey((keys) => keys.useApplication);
const title = computed(() => info.name);
const subtitle = computed(() => info.slogan);
const title = computed(() => projectDetails.name);
const subtitle = computed(() => projectDetails.slogan);
return {
title,
@@ -32,7 +36,7 @@ export default defineComponent({
<style scoped lang="scss">
@use "@/presentation/assets/styles/main" as *;
#container {
.container {
display: flex;
align-items: center;
flex-direction: column;
@@ -42,13 +46,13 @@ export default defineComponent({
text-align: center;
}
.title {
.brand {
margin: 0;
text-transform: uppercase;
font-family: $font-main;
font-size: $font-size-absolute-xx-large;
}
.subtitle {
.slogan {
margin: 0;
font-size: $font-size-absolute-x-large;
color: $color-primary;

View File

@@ -1,9 +1,9 @@
import { shell } from 'electron';
import { UpdateInfo } from 'electron-updater';
import { ElectronLogger } from '@/infrastructure/Log/ElectronLogger';
import { ProjectInformation } from '@/domain/ProjectInformation';
import { GitHubProjectDetails } from '@/domain/Project/GitHubProjectDetails';
import { Version } from '@/domain/Version';
import { parseProjectInformation } from '@/application/Parser/ProjectInformationParser';
import { parseProjectDetails } from '@/application/Parser/ProjectDetailsParser';
import { OperatingSystem } from '@/domain/OperatingSystem';
import { UpdateProgressBar } from '../UpdateProgressBar';
import {
@@ -139,8 +139,8 @@ interface UpdateUrls {
}
function getRemoteUpdateUrls(targetVersion: string): UpdateUrls {
const existingProject = parseProjectInformation();
const targetProject = new ProjectInformation(
const existingProject = parseProjectDetails();
const targetProject = new GitHubProjectDetails(
existingProject.name,
new Version(targetVersion),
existingProject.slogan,