Compare commits

..

No commits in common. "5f876ffc2519338ce935dd26125fbddc38a9178f" and "10fa537a56193294c665bc7ca2a96acc7ca60c8b" have entirely different histories.

9 changed files with 8 additions and 126 deletions

4
.gitignore vendored
View file

@ -25,7 +25,3 @@ dist-ssr
# Custom
.env.dev
# Nix
.direnv
result

View file

@ -43,7 +43,7 @@ Everything is designed and engineered following my taste and vision. This is a p
- **Status actions (reply, boost, favourite, bookmark, etc) are hidden by default**.<br>They only appear in individual status page. This is to reduce clutter and distraction. It may result in lower engagement, but we're not chasing numbers here.
- **Boost is represented with the rocket icon**.<br>The green double arrow icon (retweet for Twitter) doesn't look right for the term "boost". Green rocket looks weird, so I use purple.
- ~~**Short usernames (`@username`) are displayed in timelines, instead of the full account username (`@username@instance`)**.<br>Despite the [guideline](https://docs.joinmastodon.org/api/guidelines/#username) mentioned that "Decentralization must be transparent to the user", I don't think we should shove it to the face every single time. There are also some [screen-reader-related accessibility concerns](https://twitter.com/lifeofablindgrl/status/1595864647554502656) with the full username, though this web app is unfortunately not accessible yet.~~ DTTHDon fork displays the full username by default.
- **Short usernames (`@username`) are displayed in timelines, instead of the full account username (`@username@instance`)**.<br>Despite the [guideline](https://docs.joinmastodon.org/api/guidelines/#username) mentioned that "Decentralization must be transparent to the user", I don't think we should shove it to the face every single time. There are also some [screen-reader-related accessibility concerns](https://twitter.com/lifeofablindgrl/status/1595864647554502656) with the full username, though this web app is unfortunately not accessible yet.
- **No autoplay for video/GIF/whatever in timeline**.<br>The timeline is already a huge mess with lots of people, brands, news and media trying to grab your attention. Let's not make it worse. (Current exception now would be animated emojis.)
- **Hash-based URLs**.<br>This web app is not meant to be a full-fledged replacement to Mastodon's existing front-end. There's no SEO, database, serverless or any long-running servers. I could be wrong one day.

View file

@ -1,61 +0,0 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1689413807,
"narHash": "sha256-exuzOvOhGAEKWQKwDuZAL4N8a1I837hH5eocaTcIbLc=",
"owner": "nixOS",
"repo": "nixpkgs",
"rev": "46ed466081b9cad1125b11f11a2af5cc40b942c7",
"type": "github"
},
"original": {
"owner": "nixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,38 +0,0 @@
{
inputs.nixpkgs.url = github:nixOS/nixpkgs/nixpkgs-unstable;
inputs.flake-utils.url = github:numtide/flake-utils;
outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
lib = pkgs.lib;
in
{
packages.default = pkgs.buildNpmPackage {
pname = "dtth-phanpy";
version = "0.1.0";
buildInputs = with pkgs; [ git ];
src = lib.cleanSource ./.;
npmDepsHash = "sha256-1c6ZyWIfV4rBnZA7mSNH7ikCbJvbTRS3SacIjBW3yhc=";
# DTTH-specific env variables
VITE_CLIENT_NAME = "DTTH Phanpy";
VITE_CLIENT_ID = "ch.dtth.phanpy";
VITE_WEBSITE = "https://social.dtth.ch";
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cp -r dist $out/lib/phanpy
runHook postInstall
'';
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ nodejs ];
};
});
}

View file

@ -15,9 +15,6 @@ a.name-text.short:is(:hover, :focus) i {
font-style: normal;
opacity: 0.75;
}
.name-text i.instance {
opacity: 0.35;
}
.name-text .avatar {
vertical-align: middle;

View file

@ -60,13 +60,12 @@ function NameText({
<b>
<EmojiText text={displayName} emojis={emojis} />
</b>
{!showAcct && username ? (
{!showAcct && username && (
<>
{' '}
<i>@{username}</i>
</>
) : ' '}
<i class="instance">{acct2}</i>
)}
</>
) : short ? (
<i>@{username}</i>

View file

@ -15,7 +15,7 @@ function Login() {
const cachedInstanceURL = store.local.get('instanceURL');
const [uiState, setUIState] = useState('default');
const [instanceText, setInstanceText] = useState(
cachedInstanceURL?.toLowerCase() || 'gts.dtth.ch',
cachedInstanceURL?.toLowerCase() || '',
);
const [instancesList, setInstancesList] = useState([]);
@ -25,9 +25,6 @@ function Login() {
const res = await fetch(instancesListURL);
const data = await res.json();
setInstancesList(data);
// Automatically just login to DTTHDon
submitInstance("gts.dtth.ch")
} catch (e) {
// Silently fail
console.error(e);

View file

@ -38,7 +38,7 @@ function Welcome() {
</b>
</big>
</p>
<p class="desc">A minimalistic opinionated DTTHDon web client.</p>
<p class="desc">A minimalistic opinionated Mastodon web client.</p>
</div>
<div id="why-container">
<div class="sections">
@ -99,13 +99,8 @@ function Welcome() {
</div>
<hr />
<p>
<p>
<a href="https://git.dtth.ch/nki/phanpy" target="_blank">
DTTHDon Fork
</a>
</p>
<a href="https://github.com/cheeaun/phanpy" target="_blank">
Original built
Built
</a>{' '}
by{' '}
<a

View file

@ -16,10 +16,7 @@ const {
} = loadEnv('production', process.cwd());
const now = new Date();
const commitHash = (() => {
try { return execSync('git rev-parse --short HEAD').toString().trim(); }
catch (e) { return "unknown"; }
})();
const commitHash = execSync('git rev-parse --short HEAD').toString().trim();
const rollbarCode = fs.readFileSync(
resolve(__dirname, './rollbar.js'),